From 08f1b1f1804a8bd833d42f257908d80e88387b55 Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期五, 14 三月 2025 11:27:47 +0800
Subject: [PATCH] 3.5增加登录验证、修改密码、人员列表调整
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/VolunteerIntegralMerchantApi.java | 76 ++++++++++++++++++++++++-------------
1 files changed, 49 insertions(+), 27 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..abf5287 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));
}
/**
@@ -82,10 +84,7 @@
return R.fail("商品所需积分不能为空");
}
- if(StringUtils.isEmpty(vimVO.getCommodityValue()))
- {
- return R.fail("商品价值不能为空");
- }
+
int num= merchantService.insertVolunteer(vimVO);
if(num>0)
@@ -115,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);
@@ -156,7 +144,7 @@
if(StringUtils.isEmpty(vimVO.getState()))
{
- return R.fail("商品上下架状态不能为空");
+ vimVO.setState("1");
}
if(StringUtils.isEmpty(vimVO.getCommunityId()))
@@ -208,10 +196,12 @@
@RequestParam(value = "condition", required = false) String condition,
@RequestParam(value = "userName", required = false) String userName,
@RequestParam(value = "communityId", required = false) String communityId,
- @RequestParam(value = "userId", required = false) String userId)
+ @RequestParam(value = "userId", required = false) String userId,
+ @RequestParam(value = "orderType", required = false) String orderType,
+ @RequestParam(value = "merchantId", required = false) String merchantId)
{
return vceService.getList(pageNum,pageSize,goodsId,orderNumber,goodsName,
- condition,userName,communityId,userId);
+ condition,userName,communityId,userId,orderType,merchantId);
}
/**
@@ -243,11 +233,26 @@
item.setCommunityId(userInfoVO.getCommunityId()+"");
}
- R<LoginUserInfoVO> loginUserInfoVOR=userService.getUserInfoByUserId(userInfoVO.getUserId()+"");
+ 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()+"");
- item.setNeedScore(loginUserInfoVOR.getData().getLoveIntegral());
- return vceService.insertData(item);
+ return vceService.insertMerchantData(item);
}
/**
@@ -292,4 +297,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