From 4ddc5fd15120f714780f63a3e178d2e4cce5b9ac Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期二, 29 八月 2023 13:45:55 +0800 Subject: [PATCH] 新增商家商品模块 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/VolunteerIntegralMerchantApi.java | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/VolunteerIntegralMerchantApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/VolunteerIntegralMerchantApi.java index 0bcbbc4..058fb24 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/VolunteerIntegralMerchantApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/VolunteerIntegralMerchantApi.java @@ -6,7 +6,6 @@ import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.VolunteerCreditsExchangeVO; import com.panzhihua.common.model.vos.community.VolunteerIntegralMerchantVO; -import com.panzhihua.common.service.user.UserService; import com.panzhihua.common.utlis.StringUtils; import com.panzhihua.service_community.entity.VolunteerIntegralMerchant; import com.panzhihua.service_community.service.VolunteerCreditsExchangeService; @@ -16,6 +15,10 @@ import javax.annotation.Resource; + +/** + * 商品内容逻辑 + */ @Slf4j @RestController @RequestMapping("/VolunteerIntegralMerchant") @@ -23,9 +26,6 @@ { @Resource private VolunteerIntegralMerchantService merchantService; - - @Resource - private UserService userService; /** * 获取单个详情 @@ -47,10 +47,12 @@ public R VolunteerIntegralMerchantQueryList(@RequestParam("pageNum") int pageNum, @RequestParam("pageSize") int pageSize, @RequestParam(value = "name", required = false) String name, - @RequestParam(value = "state", required = false) String state) + @RequestParam(value = "state", required = false) String state, + @RequestParam(value = "goodType", required = false) String goodType, + @RequestParam(value = "merchantId", required = false) String merchantId) { Page page=new Page<VolunteerIntegralMerchant>(pageNum,pageSize); - return R.ok(merchantService.queryList(page,name,state)); + return R.ok(merchantService.queryList(page,name,state,goodType,merchantId)); } /** @@ -85,6 +87,11 @@ if(StringUtils.isEmpty(vimVO.getCommodityValue())) { return R.fail("商品价值不能为空"); + } + + if(StringUtils.isEmpty(vimVO.getGoodNum())) + { + return R.fail("商品数量不能为空"); } int num= merchantService.insertVolunteer(vimVO); @@ -243,10 +250,7 @@ item.setCommunityId(userInfoVO.getCommunityId()+""); } - R<LoginUserInfoVO> loginUserInfoVOR=userService.getUserInfoByUserId(userInfoVO.getUserId()+""); - item.setUserId(userInfoVO.getUserId()+""); - item.setNeedScore(loginUserInfoVOR.getData().getLoveIntegral()); return vceService.insertData(item); } -- Gitblit v1.7.1