From dd57216f8ffe4a885a6ccfce2fd6d8e0d16ec83f Mon Sep 17 00:00:00 2001 From: puhanshu <a9236326> Date: 星期四, 13 一月 2022 14:33:52 +0800 Subject: [PATCH] 商业街授权登录 --- springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java | 26 +++++++++++++++++++++++--- 1 files changed, 23 insertions(+), 3 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java index 273543b..50aeef7 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java @@ -5,6 +5,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.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.*; @@ -18,6 +20,8 @@ import com.panzhihua.common.model.vos.*; import com.panzhihua.common.model.vos.shop.ShopStoreVO; import com.panzhihua.common.model.vos.user.*; + +import javax.validation.Valid; /** * @program: springcloud_k8s_panzhihuazhihuishequ @@ -1129,7 +1133,7 @@ R getSysUserByPhone(@RequestParam("phone") String phone, @RequestParam("type") Integer type); /** - * 发送验证码登录 + * 发送验证码 * @param phone 手机号 * @param clientIP 用户ip * @param prefixKey redis Key 前缀 @@ -1137,10 +1141,26 @@ * @param timeout 超次数获取时间等待 * @return */ - @GetMapping("/sendMessageCodeForLogin") - R sendMessageCodeForLogin(@RequestParam("phone") String phone, + @GetMapping("/sendMessageCode") + 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); + + /** + * 根据openId获取微商业街用户 + * @param openid + * @return + */ + @GetMapping("/getMcsUserByOpenId") + R getMcsUserByOpenId(@RequestParam("openid") String openid); + + /** + * 商业街用户微信授权-绑定手机号 + * @param bindUserPhoneDTO + * @return + */ + @PostMapping("/mcs/bindPhone") + R bindOrAddMcsUser(@RequestBody @Valid BindUserPhoneDTO bindUserPhoneDTO); } -- Gitblit v1.7.1