From 2dff7f26adc08af4fcf0b77ff0ddda99d75c77c4 Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期五, 18 十一月 2022 15:21:25 +0800 Subject: [PATCH] #feat 修改库存 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java index 4689b83..758fbd9 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java @@ -120,7 +120,7 @@ //添加user R addUserResult = userService.addConvenientMerchantUser(convenientMerchantDTO); if (R.isOk(addUserResult)) { - Long merchantUserId =Long.parseLong(addUserResult.getData().toString()); + Long merchantUserId = Long.parseLong(addUserResult.getData().toString()); convenientMerchantDO.setUserId(merchantUserId); this.baseMapper.updateById(convenientMerchantDO); } else { @@ -307,6 +307,8 @@ merchantVO.setLogo("https://www.psciio.com//idcard/0694d975ed4d4c49bcfb728a678518f2.jpg"); merchantVO.setIntroduction("农产直销、综合商贸、冷链储运、中央厨房、检验检疫、农博会展、总部商务、综合服务。"); merchantVO.setServiceScope(""); + merchantVO.setConsultationVolume(0); + merchantVO.setMonthConsultationVolume(0); merchantVOS.add(merchantVO); //第一页默认把犇师傅维修中心加载到第一个 List<ConvenientMerchantVO> merchantList = this.baseMapper.selectMerchantByName(pagePopularMerchantDTO.getCommunityId(), currentMon); @@ -467,4 +469,14 @@ } return true; } + + @Override + public R getMerchantByUserId(Long userId) { + ConvenientMerchantVO convenientMerchantVO = this.baseMapper.selectMerchantByUserId(userId); + if (nonNull(convenientMerchantVO)){ + List<Long> serviceIds = convenientServiceCategoryDAO.selectServiceIdsForMerchant(convenientMerchantVO.getId()); + convenientMerchantVO.setServiceIds(serviceIds); + } + return R.ok(convenientMerchantVO); + } } -- Gitblit v1.7.1