From d22e1edaf883f878685eda9b43b90f72e81c4b7b Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期四, 31 八月 2023 16:43:21 +0800
Subject: [PATCH] 修改用户商家上下架问题
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/VolunteerMerchantApi.java | 32 ++++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/VolunteerMerchantApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/VolunteerMerchantApi.java
index a2bf60c..0445451 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/VolunteerMerchantApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/VolunteerMerchantApi.java
@@ -2,6 +2,7 @@
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.VolunteerMerchantVO;
+import com.panzhihua.common.utlis.StringUtils;
import com.panzhihua.service_community.service.VolunteerMerchantService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
@@ -17,13 +18,21 @@
@Resource
private VolunteerMerchantService vtService;
+
+
+ @GetMapping("/getById")
+ public R volunteerMerchantGetById(@RequestParam("id") String id)
+ {
+ return vtService.getById(id);
+ }
+
/**
* 分页查询
* @param
* @return
*/
@GetMapping("/getList")
- public R volunteerMerchantGetList(@RequestParam("pageNum") int pageNum,
+ public R volunteerMerchantGetList( int pageNum,
@RequestParam("pageSize") int pageSize,
@RequestParam(value = "merchantState", required = false) String merchantState,
@RequestParam(value = "merchantType", required = false) String merchantType,
@@ -61,10 +70,25 @@
@GetMapping("/getUser")
public R volunteerMerchantGetUser(@RequestParam("communityId") String communityId,
- @RequestParam("userName") String userName,
- @RequestParam("userPhone") String userPhone)
+ @RequestParam(value = "userName", required = false) String userName,
+ @RequestParam(value = "userPhone", required = false) String userPhone)
{
- return R.ok(vtService.getUser(communityId,userName,userPhone));
+ return vtService.getUser(communityId,userName,userPhone);
+ }
+
+ /**
+ * 是否是商家
+ * @param userId
+ * @return
+ */
+ @GetMapping("/isMerchant")
+ public R isMerchant(@RequestParam("userId") String userId)
+ {
+ if(StringUtils.isEmpty(userId))
+ {
+ return R.fail("用户id不能为空");
+ }
+ return vtService.isMerchant(userId);
}
--
Gitblit v1.7.1