puhanshu
2022-01-12 10cc0db30a1be5377e4c09bce349014a667849b6
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
@@ -1257,4 +1257,44 @@
    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("/sendMessageCodeForLogin")
    public R sendMessageCodeForLogin(@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);
    }
}