101captain
2022-01-18 b22bc1a0d7931c9e91b96f1cd7c1c1855ff69ebf
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.*;
@@ -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);
    }
}