From 589149ab46aaf6e53b4e24115bebf2ba2b507a15 Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期三, 13 四月 2022 14:04:22 +0800 Subject: [PATCH] 花城E+防疫相关修改 --- springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 101 insertions(+), 6 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 12f8075..6d16b6e 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,9 @@ 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.*; import com.panzhihua.common.model.dtos.PageDTO; @@ -243,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); } @@ -393,6 +396,18 @@ @PostMapping("putuserbackstage") R putUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO) { return userService.putUserBackstage(administratorsUserVO); + } + + /** + * 更新 + * + * @param administratorsUserVO + * 编辑账户内容 + * @return 编辑结果 + */ + @PostMapping("updateStreet") + R updateStreet(@RequestBody AdministratorsUserVO administratorsUserVO) { + return userService.updateStreetId(administratorsUserVO); } /** @@ -1238,12 +1253,92 @@ } /** - * 通过UnionId获取用户信息 - * @param unionId + * 微商业街新增商家账号 + * @param mcsMerchantDTO + * @return 商家用户id + */ + @PostMapping("insertMcsMerchantAccount") + public R addMcsMerchantUser(@RequestBody McsMerchantDTO mcsMerchantDTO) { + return userService.addMcsMerchantUser(mcsMerchantDTO); + } + + /** + * 微商业街修改商家账号 + * @param mcsMerchantDTO * @return */ - @GetMapping("/getByUnionId") - public R getUserInfoByUnionId(@RequestParam("unionId") String unionId) { - return userService.getUserInfoByUnionId(unionId); + @PutMapping("putMcsMerchantUser") + public R putMcsMerchantUser(@RequestBody McsMerchantDTO mcsMerchantDTO) { + return userService.putMcsMerchantUser(mcsMerchantDTO); } + + /** + * 检查用户是否有效 + * @param userId + * @param type + * @return + */ + @PutMapping("checkUserIsValid") + 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); + } + + /** + * 删除用户信息缓存 + * @param phone + */ + @DeleteMapping("/deleteUserCashByPhone") + public R deleteUserCashByPhone(@RequestParam("phone") String phone) { + return userService.deleteUserCashByPhone(phone); + } + } -- Gitblit v1.7.1