From 161e27e08b1495c04cd3f35906c1d7dd873f1d60 Mon Sep 17 00:00:00 2001
From: puhanshu <a9236326>
Date: 星期一, 17 一月 2022 11:38:20 +0800
Subject: [PATCH] 商业街bug修改

---
 springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java |   30 ++++++++++++++++++++++++++----
 1 files changed, 26 insertions(+), 4 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 8c23141..9394a5a 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.*;
 
@@ -1281,7 +1283,7 @@
     }
 
     /**
-     * 发送验证码登录
+     * 发送验证码
      * @param phone 手机号
      * @param clientIP 用户ip
      * @param prefixKey redis Key 前缀
@@ -1289,12 +1291,32 @@
      * @param timeout 超次数获取时间等待
      * @return
      */
-    @GetMapping("/sendMessageCodeForLogin")
-    public R sendMessageCodeForLogin(@RequestParam("phone") String phone,
+    @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.sendMessageCodeForLogin(phone, clientIP, prefixKey, limit, 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