From b2fce0dc7dc4ea5dec9792a2bc3ceb9d33d6e07b Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期一, 04 九月 2023 13:59:52 +0800 Subject: [PATCH] 修改后台社区动态加载不出来 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/VolunteerIntegralMerchantApi.java | 58 +++++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 37 insertions(+), 21 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 1af57bd..aa0195a 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 @@ -84,15 +84,7 @@ return R.fail("商品所需积分不能为空"); } - if(StringUtils.isEmpty(vimVO.getCommodityValue())) - { - return R.fail("商品价值不能为空"); - } - if(StringUtils.isEmpty(vimVO.getGoodNum())) - { - return R.fail("商品数量不能为空"); - } int num= merchantService.insertVolunteer(vimVO); if(num>0) @@ -122,20 +114,9 @@ vimVO.setCommunityId(getCommunityId()+""); } - if(StringUtils.isEmpty(vimVO.getName())) - { - return R.fail("商品名称不能为空"); - } - - if(StringUtils.isEmpty(vimVO.getIntegral())) { return R.fail("商品所需积分不能为空"); - } - - if(StringUtils.isEmpty(vimVO.getCommodityValue())) - { - return R.fail("商品价值不能为空"); } int num= merchantService.updateById(vimVO); @@ -163,7 +144,7 @@ if(StringUtils.isEmpty(vimVO.getState())) { - return R.fail("商品上下架状态不能为空"); + vimVO.setState("1"); } if(StringUtils.isEmpty(vimVO.getCommunityId())) @@ -216,7 +197,7 @@ @RequestParam(value = "userName", required = false) String userName, @RequestParam(value = "communityId", required = false) String communityId, @RequestParam(value = "userId", required = false) String userId, - @RequestParam(value = "orderType", required = true) String orderType) + @RequestParam(value = "orderType", required = false) String orderType) { return vceService.getList(pageNum,pageSize,goodsId,orderNumber,goodsName, condition,userName,communityId,userId,orderType); @@ -253,6 +234,24 @@ item.setUserId(userInfoVO.getUserId()+""); return vceService.insertData(item); + } + + /** + * 新增用户购买商家商品记录 + * @param + * @return + */ + @PostMapping("/order/insertMerchantData") + public R insertMerchantData(@RequestBody VolunteerCreditsExchangeVO item) + { + LoginUserInfoVO userInfoVO= getLoginUserInfo(); + if(StringUtils.isEmpty(item.getCommunityId())) + { + item.setCommunityId(userInfoVO.getCommunityId()+""); + } + + item.setUserId(userInfoVO.getUserId()+""); + return vceService.insertMerchantData(item); } /** @@ -297,4 +296,21 @@ } + + /** + * 社区取消订单 + * @param id + * @return + */ + @GetMapping("/order/communityCancellation") + public R communityCancellation(@RequestParam("id") String id) + { + if(StringUtils.isEmpty(id)) + { + return R.fail("订单id不能为空"); + } + return vceService.communityCancellation(id); + } + + } -- Gitblit v1.7.1