huanghongfa
2021-01-27 a6039dd43de890a85d3586c044a23378b12cca02
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
@@ -71,9 +71,9 @@
     */
    @PostMapping("/getUserInfo")
    public R<LoginUserInfoVO> getUserInfo(@RequestParam("userName") String userName){
        int index = userName.indexOf("_");
        int index = userName.lastIndexOf("_");
        String type = userName.substring(index+1, userName.length());
        String name = userName.substring(0, userName.indexOf("_"));
        String name = userName.substring(0, index);
        return userService.getUserInfo(name,Integer.parseInt(type));
    }
@@ -485,4 +485,35 @@
    public R addNotice(@RequestBody SysUserNoticeVO sysUserNoticeVO){
        return userService.addNotice(sysUserNoticeVO);
    }
    /**
     * 修改用户的党员状态
     * @param idCard 身份证号
     * @return 修改结果
     */
    @PostMapping("updateuserispartymember")
    public R updateUserIsPartymember(@RequestParam("idCard")String idCard){
        return userService.updateUserIsPartymember(idCard);
    }
    /**
     * 获取各种协议
     * @param type  1居民端app协议 2网格员端app协议 3商家端app协议 4隐私政策
     * @return 协议内容
     */
    @PostMapping("agreement")
    public R agreement(@RequestParam("type")Integer type){
        return userService.agreement(type);
    }
    /**
     * 维护用户最后登录时间
     * @param userId 用户主键
     * @return 维护结果
     */
    @PostMapping("putuserlastlogintime")
    public R putUserLastLoginTime(@RequestParam("userId")Long userId){
        return userService.putUserLastLoginTime(userId);
    }
}