From 5a278a0965b417e7f39e8c209e2ff401f415066a Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期一, 21 二月 2022 14:07:48 +0800
Subject: [PATCH] Merge branch 'hemenkou_dev' into dev

---
 springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java |   66 +++++++++++++++++++++++++++++---
 1 files changed, 59 insertions(+), 7 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
index f7bb273..09a90c4 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
@@ -7,6 +7,8 @@
 import com.panzhihua.common.model.dtos.DataKanBansDto;
 import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO;
 import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO;
+import com.panzhihua.common.model.dtos.community.microCommercialStreet.BindUserPhoneDTO;
+import com.panzhihua.common.model.dtos.community.microCommercialStreet.LoginWithPhoneDTO;
 import com.panzhihua.common.model.dtos.community.microCommercialStreet.McsMerchantDTO;
 import org.springframework.web.bind.annotation.*;
 
@@ -244,7 +246,7 @@
      * @return 人员详情
      */
     @PostMapping("detailuser")
-    public R detailUser(@RequestParam("userId") Long userId) {
+    public R<LoginUserInfoVO> detailUser(@RequestParam("userId") Long userId) {
         return userService.detailUser(userId);
     }
 
@@ -629,8 +631,8 @@
      * @return 运营后台数据看板
      */
     @PostMapping("datakanban")
-    public R dataKanban() {
-        return userService.dataKanban();
+    public R dataKanban(@RequestParam("areaCode")String areaCode) {
+        return userService.dataKanban(areaCode);
     }
 
     /**
@@ -1219,13 +1221,13 @@
      * @return  用户数据统计汇总
      */
     @GetMapping("community/statistics")
-    public R communityStatistics() {
-        return userService.communityStatistics();
+    public R communityStatistics(@RequestParam("areaCode") String areaCode) {
+        return userService.communityStatistics(areaCode);
     }
 
     @GetMapping("community/statistics/export")
-    public R communityStatisticsExport() {
-        return userService.communityStatisticsExport();
+    public R communityStatisticsExport(@RequestParam("areaCode") String areaCode) {
+        return userService.communityStatisticsExport(areaCode);
     }
 
     /**
@@ -1268,4 +1270,54 @@
     public Boolean checkUserIsValid(@RequestParam("userId") Long userId, @RequestParam("type") Integer type) {
         return userService.checkUserIsValid(userId, type);
     }
+
+    /**
+     * 根据手机号、用户类型查询用户
+     * @param phone
+     * @param type
+     * @return
+     */
+    @GetMapping("/getSysUserByPhone")
+    public R getSysUserByPhone(@RequestParam("phone") String phone, @RequestParam("type") Integer type) {
+        return userService.getSysUserByPhone(phone, type);
+    }
+
+    /**
+     * 发送验证码
+     * @param phone 手机号
+     * @param clientIP 用户ip
+     * @param prefixKey redis Key 前缀
+     * @param limit 获取次数限制
+     * @param timeout 超次数获取时间等待
+     * @return
+     */
+    @GetMapping("/sendMessageCode")
+    public R sendMessageCode(@RequestParam("phone") String phone,
+                                     @RequestParam(value = "clientIP", required = false) String clientIP,
+                                     @RequestParam("prefixKey") String prefixKey,
+                                     @RequestParam("limit") Integer limit,
+                                     @RequestParam("timeout") Integer timeout) {
+        return userService.sendMessageCode(phone, clientIP, prefixKey, limit, timeout);
+    }
+
+    /**
+     * 根据openId获取微商业街用户
+     * @param openid
+     * @return
+     */
+    @GetMapping("/getMcsUserByOpenId")
+    public R getMcsUserByOpenId(@RequestParam("openid") String openid) {
+        return userService.getMcsUserByOpenId(openid);
+    }
+
+    /**
+     * 商业街用户微信授权-绑定手机号
+     * @param bindUserPhoneDTO
+     * @return
+     */
+    @PostMapping("/mcs/bindPhone")
+    public R bindOrAddMcsUser(@RequestBody BindUserPhoneDTO bindUserPhoneDTO) {
+        return userService.bindOrAddMcsUser(bindUserPhoneDTO);
+    }
+
 }

--
Gitblit v1.7.1