package com.panzhihua.service_user.api;
|
|
import java.util.List;
|
|
import javax.annotation.Resource;
|
|
import cn.hutool.core.util.StrUtil;
|
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 com.panzhihua.common.model.dtos.partybuilding.ComPbCheckUserDTO;
|
import com.panzhihua.common.service.community.CommunityService;
|
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.web.bind.annotation.*;
|
|
import com.panzhihua.common.model.dtos.PageDTO;
|
import com.panzhihua.common.model.dtos.community.ExportSpecialUserDTO;
|
import com.panzhihua.common.model.dtos.community.ExportUserDTO;
|
import com.panzhihua.common.model.dtos.community.NoticeReadDTO;
|
import com.panzhihua.common.model.dtos.grid.*;
|
import com.panzhihua.common.model.dtos.user.*;
|
import com.panzhihua.common.model.vos.*;
|
import com.panzhihua.common.model.vos.shop.ShopStoreVO;
|
import com.panzhihua.common.model.vos.user.*;
|
import com.panzhihua.service_user.service.SysUserInputService;
|
import com.panzhihua.service_user.service.UserService;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
/**
|
* @program: springcloud_k8s_panzhihuazhihuishequ
|
* @description: 用户
|
* @author: huang.hongfa weixin hhf9596 qq 959656820
|
* @create: 2020-11-24 09:00
|
**/
|
@Slf4j
|
@RestController("/")
|
public class UserApi {
|
@Resource
|
private UserService userService;
|
@Resource
|
private SysUserInputService sysUserInputService;
|
|
|
/**
|
* 新增微信用户
|
*
|
* @param openid
|
* 微信小程序标志
|
* @param sessionKey
|
* 会话密钥
|
* @param unionid
|
* 微信平台唯一ID
|
* @return 新增结果
|
*/
|
@PostMapping("/addOrUpdate")
|
public R addOrUpdate(@RequestParam("openid") String openid, @RequestParam("sessionKey") String sessionKey,
|
@RequestParam("unionid") String unionid,@RequestParam("appId")String appId) {
|
return userService.updateInsertUser(openid, sessionKey, unionid,appId);
|
}
|
|
/**
|
* 维护小程序用户基本信息 头像 昵称 性别
|
*
|
* @param userId
|
* 数据库用户ID
|
* @param nickName
|
* 昵称
|
* @param gender
|
* 性别
|
* @param avatarUrl
|
* 头像
|
* @return 维护结果
|
*/
|
@PostMapping("/updateUserWeiXinInfo")
|
public R updateUserWeiXinInfo(@RequestParam("userId") Long userId, @RequestParam("nickName") String nickName,
|
@RequestParam("gender") int gender, @RequestParam("avatarUrl") String avatarUrl) {
|
return userService.updateUserWeiXinInfo(userId, nickName, gender, avatarUrl);
|
}
|
|
/**
|
* 维护微信用户手机号
|
*
|
* @param userId
|
* 数据库ID
|
* @param purePhoneNumber
|
* 没有区号的手机号
|
* @return 维护结果
|
*/
|
@PostMapping("/updateUserWeiXinPhone")
|
public R updateUserWeiXinPhone(@RequestParam("userId") Long userId,
|
@RequestParam("purePhoneNumber") String purePhoneNumber) {
|
return userService.updateUserWeiXinPhone(userId, purePhoneNumber);
|
}
|
|
/**
|
* 获取平台用户
|
*
|
* @param userName
|
* 登录账户+_type
|
* @return 平台用户信息
|
*/
|
@PostMapping("/getUserInfo")
|
public R<LoginUserInfoVO> getUserInfo(@RequestParam("userName") String userName) {
|
int index2 = userName.lastIndexOf("_");
|
String appid=userName.substring(index2+1);
|
String username=userName.substring(0,index2);
|
int index = username.lastIndexOf("_");
|
String type = username.substring(index + 1);
|
String name = username.substring(0, index);
|
return userService.getUserInfo(name, Integer.parseInt(type),appid);
|
}
|
|
/**
|
* 获取平台用户
|
*
|
* @param userId
|
* 用户ID
|
* @return 平台用户信息
|
*/
|
@PostMapping("/getUserInfoUserId")
|
public R<LoginUserInfoVO> getUserInfoByUserId(@RequestParam("userId") String userId) {
|
return userService.getUserInfo(userId);
|
}
|
|
/**
|
* 修改用户登录密码
|
*
|
* @param changePasswordVO
|
* 新密码
|
* @return 修改结果
|
*/
|
@PostMapping("changepassword")
|
public R changePassword(@RequestBody ChangePasswordVO changePasswordVO) {
|
return userService.changePassword(changePasswordVO);
|
}
|
|
/**
|
* 重置密码
|
*
|
* @param userId
|
* 新密码
|
* @return 修改结果
|
*/
|
@GetMapping("resetPassword")
|
public R resetPassword(@RequestParam("userId") Long userId) {
|
return userService.resetPassword(userId);
|
}
|
|
/**
|
* 批量重置密码
|
*
|
* @param userId
|
* 新密码
|
* @return 修改结果
|
*/
|
@GetMapping("resetPasswordPatch")
|
public R resetPasswordPatch(@RequestParam("userIds") Long[] userId,@RequestParam("password")String password) {
|
return userService.resetPasswordPatch(userId,password);
|
}
|
|
/**
|
* 某社区后台人员查询
|
*
|
* @param param
|
* 名字
|
* @param communityId
|
* 社区id
|
* @return 人员集合
|
*/
|
@PostMapping("listactivitymanager")
|
public R listActivityManager(@RequestParam("param") String param, @RequestParam("communityId") Long communityId) {
|
return userService.listActivityManager(param, communityId);
|
}
|
|
/**
|
* 微心愿搜索社区团队人员列表
|
*
|
* @param param
|
* 请求参数
|
* @param communityId
|
* 社区id
|
* @return 社区团队人员列表
|
*/
|
@PostMapping("listactivitymanager2")
|
public R listActivityManager2(@RequestParam("param") String param, @RequestParam("communityId") Long communityId) {
|
return userService.listActivityManager2(param, communityId);
|
}
|
|
/**
|
* 分页查询人脸识别
|
*
|
* @param loginUserInfoVO
|
* 查询参数
|
* @return 分页集合
|
*/
|
@PostMapping("pageuserface")
|
public R pageUserFace(@RequestBody LoginUserInfoVO loginUserInfoVO) {
|
return userService.pageUserFace(loginUserInfoVO);
|
}
|
|
/**
|
* 编辑人脸采集数据通过、驳回、删除
|
*
|
* @param loginUserInfoVO
|
* 操作信息
|
* @return 操作结果
|
*/
|
@PostMapping("putuserface")
|
public R putUserFace(@RequestBody LoginUserInfoVO loginUserInfoVO) {
|
return userService.putUserFace(loginUserInfoVO);
|
}
|
|
/**
|
* 分页查询人口管理
|
*
|
* @param userInfoVO
|
* 查询参数
|
* @return 分页数据
|
*/
|
@PostMapping("pageuser")
|
public R pageUser(@RequestBody AppletUserInfoVO userInfoVO) {
|
return userService.pageUser(userInfoVO);
|
}
|
|
/**
|
* 查询所有人员标签
|
*
|
* @return 标签集合
|
*/
|
@PostMapping("listtag")
|
public R listTag() {
|
return userService.listTag();
|
}
|
|
/**
|
* 查询当前社区所有标签以及预设标签
|
*
|
* @return 标签集合
|
*/
|
@PostMapping("listtag/getTag")
|
public R listTags() {
|
return userService.listTags();
|
}
|
|
/**
|
* 人员详情
|
*
|
* @param userId
|
* 用户id
|
* @return 人员详情
|
*/
|
@PostMapping("detailuser")
|
public R<LoginUserInfoVO> detailUser(@RequestParam("userId") Long userId) {
|
return userService.detailUser(userId);
|
// return userService.getUserInfo(userId+"");
|
}
|
|
/**
|
* 设置用户标签
|
*
|
* @param loginUserInfoVO
|
* 标签信息
|
* @return 设置结果
|
*/
|
@PostMapping("putusertag")
|
public R putUserTag(@RequestBody LoginUserInfoVO loginUserInfoVO) {
|
return userService.putUserTag(loginUserInfoVO);
|
}
|
|
/**
|
* 修改用户志愿者状态
|
*
|
* @param phone
|
* 志愿者手机号
|
* @param type
|
* 1是志愿者 0 不是
|
*/
|
@PostMapping("putuserisvolunteer")
|
R putUserIsVolunteer(@RequestParam("phone") String phone, @RequestParam("type") int type) {
|
return userService.putUserIsVolunteer(phone, type);
|
}
|
|
/**
|
* 修改用户志愿者状态
|
*
|
* @param userId
|
* 志愿者ID
|
* @param type
|
* 1是志愿者 0 不是
|
*/
|
@PostMapping("putuserisvolunteerbyid")
|
R putUserIsVolunteerById(@RequestParam("userId") Long userId, @RequestParam("type") int type) {
|
return userService.putUserIsVolunteerById(userId, type);
|
}
|
|
/**
|
* 用户绑定社区、小区
|
*
|
* @param loginUserInfoVO
|
* 社区小区数据
|
* @return 绑定结果
|
*/
|
@PostMapping("putusercommunityarea")
|
R putUserCommunityArea(@RequestBody LoginUserInfoVO loginUserInfoVO) {
|
return userService.putUserCommunityArea(loginUserInfoVO);
|
}
|
|
/**
|
* 用户实名认证
|
*
|
* @param loginUserInfoVO
|
* 认证数据
|
* @return 认证结果
|
*/
|
@PostMapping("putuserauthentication")
|
public R putUserAuthentication(@RequestBody LoginUserInfoVO loginUserInfoVO) {
|
return userService.putUserAuthentication(loginUserInfoVO);
|
}
|
|
/**
|
* 修改用户手机号
|
*
|
* @param userPhoneVO
|
* 手机号信息
|
* @return 修改结果
|
*/
|
@PostMapping("putuserphone")
|
public R putUserphone(@RequestBody UserPhoneVO userPhoneVO) {
|
return userService.putUserphone(userPhoneVO);
|
}
|
|
/**
|
* 修改用户信息
|
*
|
* @param loginUserInfoVO
|
* 修改内容
|
* @return 修改结果
|
*/
|
@PostMapping("putuser")
|
public R putUser(@RequestBody LoginUserInfoVO loginUserInfoVO) {
|
return userService.putUser(loginUserInfoVO);
|
}
|
|
/**
|
* 家庭成员列表
|
*
|
* @param userId
|
* 登录用户
|
* @return 成员集合
|
*/
|
@PostMapping("listfamily")
|
public R listFamily(@RequestParam("userId") Long userId, @RequestParam(value = "pageNum") Long pageNum,
|
@RequestParam("pageSize") Long pageSize) {
|
return userService.listFamily(userId, pageNum, pageSize);
|
}
|
|
/**
|
* 新增家庭成员
|
*
|
* @param comMngFamilyInfoVO
|
* 家庭成员基本信息
|
* @return 增加结果
|
*/
|
@PostMapping("addFamily")
|
public R addFamily(@RequestBody ComMngFamilyInfoVO comMngFamilyInfoVO) {
|
return userService.addFamily(comMngFamilyInfoVO);
|
}
|
|
/**
|
* 编辑家庭成员
|
*
|
* @param comMngFamilyInfoVO
|
* 家庭成员信息
|
* @return 编辑结果
|
*/
|
@PostMapping("putfamily")
|
public R putFamily(@RequestBody ComMngFamilyInfoVO comMngFamilyInfoVO) {
|
return userService.putFamily(comMngFamilyInfoVO);
|
}
|
|
/**
|
* 新增运营、社区后台账户
|
*
|
* @param administratorsUserVO
|
* 账户信息
|
* @return 新增结果
|
*/
|
@PostMapping("adduserbackstage")
|
public R addUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO) {
|
|
return userService.addUserBackstage(administratorsUserVO);
|
}
|
|
/**
|
* 编辑运营、社区后台账户
|
*
|
* @param administratorsUserVO
|
* 编辑账户内容
|
* @return 编辑结果
|
*/
|
@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);
|
}
|
|
/**
|
* 新增社区后台物业,社会组织,业主委员会账户
|
*
|
* @param administratorsUserVO
|
* 账户信息
|
* @return 新增结果
|
*/
|
@PostMapping("adduserbackstageproperty")
|
public R adduserbackstageproperty(@RequestBody AdministratorsUserVO administratorsUserVO) {
|
|
return userService.addUserBackstageProperty(administratorsUserVO);
|
}
|
|
/**
|
* 删除后台用户
|
*
|
* @param administratorsUserVO
|
* 用户主键
|
* @return 删除结果
|
*/
|
@PostMapping("deleteuserbackstage")
|
public R deleteUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO) {
|
return userService.deleteUserBackstage(administratorsUserVO);
|
}
|
|
/**
|
* 分页查询后台用户
|
*
|
* @param administratorsUserVO
|
* 查询参数
|
* @return 后台用户
|
*/
|
@PostMapping("pageuserbackstage")
|
public R pageUserBackstage(@RequestBody AdministratorsUserVO administratorsUserVO) {
|
return userService.pageUserBackstage(administratorsUserVO);
|
}
|
|
/**
|
* 保存操作日志
|
*
|
* @param operlog
|
* 日志内容
|
* @return 保存结果
|
*/
|
@PostMapping("addoperlog")
|
public R addOperLog(@RequestBody SysOperLogVO operlog) {
|
return userService.addOperLog(operlog);
|
}
|
|
/**
|
* 分页展示操作日志
|
*
|
* @param sysOperLogVO
|
* 分页参数
|
* @return 分页集合
|
*/
|
@PostMapping("pageoperlog")
|
public R pageOperLog(@RequestBody SysOperLogVO sysOperLogVO) {
|
return userService.pageOperLog(sysOperLogVO);
|
}
|
|
/**
|
* 用户协议
|
*
|
* @return 协议集合
|
*/
|
@PostMapping("listagreement")
|
public R listAgreement(@RequestParam("communityId") Long communityId) {
|
return userService.listAgreement(communityId);
|
}
|
|
/**
|
* 编辑用户协议
|
*
|
* @param sysUserAgreementVO
|
* 编辑内容
|
* @return 编辑结果
|
*/
|
@PostMapping("putagreement")
|
public R putAgreement(@RequestBody SysUserAgreementVO sysUserAgreementVO) {
|
return userService.putAgreement(sysUserAgreementVO);
|
}
|
|
/**
|
* 用户标签
|
*
|
* @param communityId
|
* 社区id
|
* @return 标签集合
|
*/
|
@PostMapping("listcommngusertag")
|
public R listComMngUserTag(@RequestParam("communityId") Long communityId) {
|
return userService.listComMngUserTag(communityId);
|
}
|
|
/**
|
* 新增删除用户标签
|
*
|
* @param systemmanagementConfigVO
|
* 操作内容
|
* @return 操作结果
|
*/
|
@PostMapping("putcommngusertag")
|
public R putComMngUserTag(@RequestBody SystemmanagementConfigVO systemmanagementConfigVO) {
|
return userService.putComMngUserTag(systemmanagementConfigVO);
|
}
|
|
/**
|
* 分页查询小程序用户
|
*
|
* @param pageUserAppletsBackstageDTO
|
* 查询参数
|
* @return 分页集合
|
*/
|
@PostMapping("pageuserappletsbackstage")
|
public R pageUserAppletsBackstage(@RequestBody PageUserAppletsBackstageDTO pageUserAppletsBackstageDTO) {
|
return userService.pageUserAppletsBackstage(pageUserAppletsBackstageDTO);
|
}
|
|
/**
|
* 编辑用户状态
|
*
|
* @param pageUserAppletsBackstageDTO
|
* 启用或者禁用 1 启用 2 禁用
|
* @return 编辑结果
|
*/
|
@PostMapping("putuserappletsbackstage")
|
public R putUserAppletsBackstage(@RequestBody PageUserAppletsBackstageDTO pageUserAppletsBackstageDTO) {
|
return userService.putUserAppletsBackstage(pageUserAppletsBackstageDTO);
|
}
|
|
/**
|
* 调试接口--清除昵称、社区、小区
|
*
|
* @param userId
|
* 登录用户id
|
* @return 清除结果
|
*/
|
@PostMapping("deleteusertest")
|
public R deleteUserTest(@RequestParam("userId") Long userId) {
|
return userService.deleteUserTest(userId);
|
}
|
|
/**
|
* 用户协议和隐私政策
|
*
|
* @param type
|
* 所属app 1居民端app 2网格员端app 3商家端app
|
* @return 协议内容
|
*/
|
@PostMapping("useragreement")
|
public R userAgreement(@RequestParam("type") int type,@RequestParam("appid")String appId) {
|
return userService.userAgreement(type,appId);
|
}
|
|
/**
|
* 意见反馈
|
*
|
* @param sysUserFeedbackDTO
|
* 反馈内容
|
* @return 反馈结果
|
*/
|
@PostMapping("addfeedback")
|
public R addFeedback(@RequestBody SysUserFeedbackDTO sysUserFeedbackDTO) {
|
return userService.addFeedback(sysUserFeedbackDTO);
|
}
|
|
/**
|
* 分页通知列表
|
*
|
* @param pageDTO
|
* 分页参数
|
* @return 分页结果
|
*/
|
@PostMapping("pagenotice")
|
public R pageNotice(@RequestBody PageDTO pageDTO) {
|
return userService.pageNotice(pageDTO);
|
}
|
|
/**
|
* 通知已读
|
*
|
* @param noticeReadDTO
|
* 通知已读
|
* @return 修改状态
|
*/
|
@PostMapping("putnotice")
|
public R putNotice(@RequestBody NoticeReadDTO noticeReadDTO) {
|
return userService.putNotice(noticeReadDTO);
|
}
|
|
/**
|
* 分页查询用户意见反馈
|
*
|
* @param pageFeedBackDTO
|
* 分页查询参数
|
* @return 意见集合
|
*/
|
@PostMapping("pagefeedback")
|
public R pageFeedback(@RequestBody PageFeedBackDTO pageFeedBackDTO) {
|
return userService.pageFeedback(pageFeedBackDTO);
|
}
|
|
/**
|
* 未读消息汇总
|
*
|
* @param userId
|
* 登录用户信息
|
* @return 未读汇总
|
*/
|
@PostMapping("noticeunreadnum")
|
public R noticeUnreadNum(@RequestParam("userId") Long userId) {
|
return userService.noticeUnreadNum(userId);
|
}
|
|
/**
|
* 反馈意见详情
|
*
|
* @param id
|
* 反馈主键
|
* @return 反馈详情
|
*/
|
@PostMapping("detailfeedback")
|
public R detailFeedback(@RequestParam("id") Long id) {
|
return userService.detailFeedback(id);
|
}
|
|
/**
|
* 数据看板
|
*
|
* @return 运营后台数据看板
|
*/
|
@PostMapping("datakanban")
|
public R dataKanban(@RequestParam("areaCode")String areaCode) {
|
return userService.dataKanban(areaCode);
|
}
|
|
/**
|
* 社区管理后台数据看板
|
*
|
* @param communityId
|
* 社区id
|
* @return 看板用户数据
|
*/
|
@PostMapping("indexdatacommunitybackstage")
|
public R indexDataCommunityBackstage(@RequestParam("communityId") Long communityId) {
|
return userService.indexDataCommunityBackstage(communityId);
|
}
|
|
/**
|
* 定时任务维护用户持续登录时间
|
*
|
* @return 维护结果
|
*/
|
@PostMapping("timedtaskcontinuouslandingdays")
|
public R timedTaskContinuousLandingDays() {
|
return userService.timedTaskContinuousLandingDays();
|
}
|
|
/**
|
* 新增用户通知
|
*
|
* @param sysUserNoticeVO
|
* 通知内容
|
* @return 新增结果
|
*/
|
@PostMapping("addnotice")
|
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);
|
}
|
|
@PostMapping("updateuserispartymemberByPhone")
|
public R updateUserIsPartymemberByPhone(@RequestParam("phone") String phone) {
|
return userService.updateUserIsPartymemberByPhone(phone);
|
}
|
|
/**
|
* 修改用户为非党员状态
|
*
|
* @param idCard
|
* 身份证号
|
* @return 修改结果
|
*/
|
@PostMapping("updateusernotpartymember")
|
R updateUserNotPartymember(@RequestParam("idCard") String idCard) {
|
return userService.updateUserNotPartymember(idCard);
|
}
|
|
/**
|
* 获取各种协议
|
*
|
* @param type
|
* 1居民端app协议 2网格员端app协议 3商家端app协议 4隐私政策
|
* @return 协议内容
|
*/
|
@PostMapping("agreement")
|
public R agreement(@RequestParam("type") Integer type,@RequestParam("appId")String appId) {
|
return userService.agreement(type,appId);
|
}
|
|
/**
|
* 维护用户最后登录时间
|
*
|
* @param userId
|
* 用户主键
|
* @return 维护结果
|
*/
|
@PostMapping("putuserlastlogintime")
|
public R putUserLastLoginTime(@RequestParam("userId") Long userId) {
|
return userService.putUserLastLoginTime(userId);
|
}
|
|
/**
|
* 删除意见反馈
|
*
|
* @param id
|
* 主键
|
* @return 删除结果
|
*/
|
@PostMapping("deletefeedback")
|
public R deleteFeedback(@RequestParam("id") Long id) {
|
return userService.deleteFeedback(id);
|
}
|
|
/**
|
* 校验小区是否存在
|
*
|
* @param areaName
|
* 小区名字
|
* @return 校验结果
|
*/
|
@PostMapping("checkaereaname")
|
public R checkAereaName(@RequestParam("areaName") String areaName) {
|
return userService.checkAereaName(areaName);
|
}
|
|
/**
|
* 批量导入居民用户
|
*
|
* @param list
|
* 居民用户集合
|
* @param areaName
|
* 小区名字
|
* @return 导入结果
|
*/
|
@PostMapping("batchsaveuser")
|
public R batchSaveUser(@RequestBody List<EexcelUserDTO> list, @RequestParam("areaName") StringBuffer areaName) {
|
R r = null;
|
try {
|
r = sysUserInputService.batchSaveUser(list, areaName);
|
} catch (Exception e) {
|
String message = e.getMessage();
|
log.error(message);
|
if (message.contains("unique_id_card")) {
|
int i = message.indexOf("'");
|
String idcard = message.substring(i + 1, message.indexOf("'", i + 1));
|
// System.out.println(idcard);
|
return R.fail("身份证存在重复" + idcard);
|
} else {
|
return R.fail(e.getMessage());
|
}
|
}
|
return r;
|
}
|
|
/**
|
* 社区人员详情包括导入人员
|
*
|
* @param userId
|
* 人员id
|
* @return CommunityUserInfoVO
|
*/
|
@PostMapping("detailusercomunity")
|
public R detailUserComunity(@RequestParam("userId") Long userId) {
|
CommunityUserInfoVO communityUserInfoVO;
|
communityUserInfoVO = sysUserInputService.detailUserComunity(userId);
|
if (communityUserInfoVO==null) {
|
communityUserInfoVO = userService.detailUserComunity(userId);
|
}
|
return R.ok(communityUserInfoVO);
|
}
|
|
/**
|
* 用户搜索了就下载搜索的用户否则下载所有用户
|
*
|
* @param exportUserDTO
|
* 用户搜索内容
|
* @return List<EexcelUserDTO> excel内容
|
*/
|
@PostMapping("export")
|
public R export(@RequestBody ExportUserDTO exportUserDTO) {
|
return userService.export(exportUserDTO);
|
}
|
|
/**
|
* 通过手机号码查询用户信息
|
*
|
* @param phone
|
* @return
|
*/
|
@GetMapping("getUserByPhone")
|
public R getSysUserVOByPhone(@RequestParam(value = "phone") String phone) {
|
return userService.getSysUserVOByPhone(phone);
|
}
|
|
/**
|
* 通过账号和渠道查询用户信息
|
*
|
* @param account
|
* @return
|
*/
|
@GetMapping("getUserByAccount")
|
public R getSysUserVOByAccount(@RequestParam(value = "account") String account,
|
@RequestParam(value = "type") Integer type) {
|
return userService.getSysUserVOByAccount(account, type);
|
}
|
|
/**
|
* 分页查询人口管理
|
*
|
* @param pageInputUserDTO
|
* 查询参数
|
* @return 分页数据
|
*/
|
@PostMapping("common/data/user/page")
|
public R pageInputUser(@RequestBody PageInputUserDTO pageInputUserDTO) {
|
return sysUserInputService.pageInputUser(pageInputUserDTO);
|
}
|
|
/**
|
* 设置用户标签
|
*
|
* @param inputUserTagsDTO
|
* 标签信息
|
* @return 设置结果
|
*/
|
@PostMapping("common/data/user/tags")
|
public R setInputUserTag(@RequestBody InputUserTagsDTO inputUserTagsDTO) {
|
return sysUserInputService.putUserTag(inputUserTagsDTO);
|
}
|
|
/**
|
* 批量导入居民用户
|
*
|
* @param list
|
* 居民用户集合
|
* @param areaName
|
* 小区名字
|
* @return 导入结果
|
*/
|
@PostMapping("common/data/user/import")
|
public R batchSaveInputUser(@RequestBody List<EexcelUserDTO> list,
|
@RequestParam("areaName") StringBuffer areaName) {
|
R r = null;
|
try {
|
r = sysUserInputService.batchSaveUser(list, areaName);
|
} catch (Exception e) {
|
String message = e.getMessage();
|
log.error(message);
|
if (message.contains("unique_id_card")) {
|
int i = message.indexOf("'");
|
String idcard = message.substring(i + 1, message.indexOf("'", i + 1));
|
// System.out.println(idcard);
|
return R.fail("身份证存在重复" + idcard);
|
} else {
|
return R.fail(e.getMessage());
|
}
|
}
|
return r;
|
}
|
|
/**
|
* 居民管理》居民详情
|
*
|
* @param id
|
* 人员id
|
* @return CommunityUserInfoVO
|
*/
|
@PostMapping("common/data/user/detail")
|
public R inputUserDetail(@RequestParam("id") Long id) {
|
return sysUserInputService.inputUserDetail(id);
|
}
|
|
/**
|
* 用户搜索了就下载搜索的用户否则下载所有用户
|
*
|
* @param exportUserDTO
|
* 用户搜索内容
|
* @return List<EexcelUserDTO> excel内容
|
*/
|
@PostMapping("common/data/user/export")
|
public R inputUserExport(@RequestBody ExportUserDTO exportUserDTO) {
|
return sysUserInputService.exportInputUser(exportUserDTO);
|
}
|
|
/**
|
* 特殊群体
|
*
|
* @param pageInputUserDTO
|
* @return
|
*/
|
@PostMapping("common/data/special/page")
|
R specialInputUser(@RequestBody PageInputUserDTO pageInputUserDTO) {
|
return sysUserInputService.specialInputUser(pageInputUserDTO);
|
}
|
|
/**
|
* 特殊群体
|
*
|
* @param id
|
* @return
|
*/
|
@DeleteMapping("common/data/special/delete")
|
R deleteSpecialInputUser(@RequestParam(value = "id") Long id) {
|
return sysUserInputService.deleteSpecialInputUser(id);
|
}
|
|
/**
|
* 特殊群体标签列表
|
*
|
* @param comMngUserTagDTO
|
* @return
|
*/
|
@PostMapping("common/data/special/tags/page")
|
R specialInputUserTags(@RequestBody ComMngUserTagDTO comMngUserTagDTO) {
|
return sysUserInputService.specialInputUserTags(comMngUserTagDTO);
|
}
|
|
/**
|
* 新增或修改特殊群体标签
|
*
|
* @param comMngTagVO
|
* @return
|
*/
|
@PostMapping("common/data/special/tags/save")
|
R saveSpecialInputUserTags(@RequestBody ComMngTagVO comMngTagVO) {
|
return sysUserInputService.saveSpecialInputUserTags(comMngTagVO);
|
}
|
|
/**
|
* 删除特殊群体标签
|
*
|
* @param id
|
* @return
|
*/
|
@DeleteMapping("common/data/special/tags/delete")
|
R deleteSpecialInputUserTags(@RequestParam(value = "id") Long id) {
|
return sysUserInputService.deleteSpecialInputUserTags(id);
|
}
|
|
/**
|
* 特殊群体导出
|
*
|
* @param exportSpecialUserDTO
|
* @return
|
*/
|
@PostMapping("common/data/special/export")
|
R specialUserExport(@RequestBody ExportSpecialUserDTO exportSpecialUserDTO) {
|
return sysUserInputService.specialUserExport(exportSpecialUserDTO);
|
}
|
|
/**
|
* 创建SysUser用户信息以及权限
|
*
|
* @param storeVO
|
* 请求参数
|
* @return 创建结果
|
*/
|
@PostMapping("addSysUser")
|
public R addSysUser(@RequestBody ShopStoreVO storeVO) {
|
return userService.addSysUser(storeVO);
|
}
|
|
/**
|
* 修改SysUser用户信息
|
*
|
* @param storeVO
|
* 请求参数
|
* @return 修改结果
|
*/
|
@PostMapping("editSysUser")
|
public R editSysUser(@RequestBody ShopStoreVO storeVO) {
|
return userService.editSysUser(storeVO);
|
}
|
|
/**
|
* 修改用户小程序首页活动提示
|
*
|
* @param userEditTipsDTO
|
* 请求参数
|
* @return 修改结果
|
*/
|
@PostMapping("editUserTips")
|
public R editUserTips(@RequestBody SysUserEditTipsDTO userEditTipsDTO) {
|
return userService.editUserTips(userEditTipsDTO);
|
}
|
|
/**
|
* 获取用户电子档案
|
*
|
* @param userId
|
* 家庭成员信息
|
* @return 结果
|
*/
|
@GetMapping("getUserArchives")
|
public R getUserArchives(@RequestParam("userId") Long userId) {
|
return userService.getUserArchives(userId);
|
}
|
|
/**
|
* 编辑用户电子档案
|
*
|
* @param userArchivesVO
|
* 编辑的信息
|
* @return 编辑结果
|
*/
|
@PostMapping("updateUserArchives")
|
public R updateUserArchives(@RequestBody UpdateUserArchivesVO userArchivesVO) {
|
return userService.updateUserArchives(userArchivesVO);
|
}
|
|
/**
|
* 修改app用户密码
|
*
|
* @param userInfoAppDTO
|
* 请求参数
|
* @return 修改结果
|
*/
|
@PutMapping("updateUserPassByApp")
|
public R updateUserPassByApp(@RequestBody EditUserInfoPassAppDTO userInfoAppDTO) {
|
return userService.updateUserPassByApp(userInfoAppDTO);
|
}
|
|
/**
|
* 添加网格员
|
*
|
* @param eventGridMemberAddDTO
|
* 请求参数
|
* @return 结果
|
*/
|
@PostMapping("addGridUser")
|
R addGridUser(@RequestBody EventGridMemberAddDTO eventGridMemberAddDTO) {
|
return userService.addGridUser(eventGridMemberAddDTO);
|
}
|
|
/**
|
* 网格员管理
|
*
|
* @param memberRelationDTO
|
* 请求参数
|
* @return 网格员列表
|
*/
|
@PostMapping("member/list")
|
public R getGridMemberList(@RequestBody PageEventGridMemberRelationDTO memberRelationDTO) {
|
return userService.getGridMemberList(memberRelationDTO);
|
}
|
|
/**
|
* 修改网格员信息
|
*
|
* @param gridMemberDTO
|
* 请求参数
|
* @return 修改结果
|
*/
|
@PostMapping("editGridUser")
|
public R gridMemberEdit(@RequestBody EventGridMemberEditAdminDTO gridMemberDTO) {
|
return userService.editGridUser(gridMemberDTO);
|
}
|
|
/**
|
* 重置网格员密码
|
*
|
* @param gridMemberDTO
|
* 请求参数
|
* @return 重置结果
|
*/
|
@PostMapping("passResetUser")
|
public R passResetUser(@RequestBody EventGridMemberPassResetDTO gridMemberDTO) {
|
return userService.passResetUser(gridMemberDTO);
|
}
|
|
/**
|
* 批量删除网格员
|
*
|
* @param Ids
|
* 网格员id集合
|
* @return 删除结果
|
*/
|
@PostMapping("deleteMembers")
|
public R deleteMembers(@RequestBody List<Long> Ids) {
|
return userService.deleteMembers(Ids);
|
}
|
|
@PostMapping("gridMemberEditStatus")
|
public R gridMemberEditStatus(@RequestBody EventGridMemberEditStatusDTO gridMemberEditDTO) {
|
return userService.gridMemberEditStatus(gridMemberEditDTO);
|
}
|
|
@GetMapping("big/no/tip")
|
public R noTips(@RequestParam("userId") Long userId) {
|
return userService.noTips(userId);
|
}
|
|
/**
|
* 查询社区的收益说明
|
*
|
* @param communityId
|
* 社区id
|
* @return 收益说明
|
*/
|
@PostMapping("listagreements")
|
public R listAgreements(@RequestParam("communityId") Long communityId) {
|
return userService.listAgreements(communityId);
|
}
|
|
@PostMapping("user/getUserGrids")
|
public R getGridIsOk(@RequestParam("userId") Long userId) {
|
return userService.getGridIsOk(userId);
|
}
|
|
@GetMapping("getGridsMemberList")
|
public R getGridsMemberList(@RequestParam("communityId") Long communityId) {
|
return userService.getGridsMemberList(communityId);
|
}
|
|
/**
|
* 根据用户id查询用户openid
|
*
|
* @param userId
|
* 用户id
|
* @return openid
|
*/
|
@GetMapping("getUserOpenId")
|
public R getUserOpenId(@RequestParam("userId") Long userId) {
|
return userService.getUserOpenId(userId);
|
}
|
|
/**
|
* 查询社区后台工作人员列表
|
*
|
* @param communityId
|
* 社区id
|
* @return 社区后台工作人员列表
|
*/
|
@GetMapping("getUserListByCommunityId")
|
public R getUserListByCommunityId(@RequestParam("communityId") Long communityId) {
|
return userService.getUserListByCommunityId(communityId);
|
}
|
|
/**
|
* 检查当前用户是否是社区工作人员
|
* @param phone
|
* @param communityId
|
* @return
|
*/
|
@GetMapping("checkIsTeam")
|
public R checkCurrentUserIsTeam(String phone, Long communityId) {
|
return userService.checkCurrentUserIsTeam(phone, communityId);
|
}
|
|
/**
|
* 便民服务新增商家账号
|
* @param convenientMerchantDTO
|
* @return 商家用户id
|
*/
|
@PostMapping("insertMerchantAccount")
|
public R addConvenientMerchantUser(@RequestBody ConvenientMerchantDTO convenientMerchantDTO) {
|
return userService.addConvenientMerchantUser(convenientMerchantDTO);
|
}
|
|
/**
|
* 修改便民服务商家绑定账号
|
* @param userId 用户id
|
* @param account 修改账户
|
* @return 修改结果
|
*/
|
@PutMapping("putMerchantUserAccount")
|
public R putUserAccount(@RequestParam("userId") Long userId, @RequestParam("account") String account) {
|
return userService.putUserAccount(userId, account);
|
}
|
|
/**
|
* 禁用/启用便民服务商家用户
|
* @param disableOrEnableConvenientMerchantDTO
|
* @return
|
*/
|
@PutMapping("disableOrEnableMerchantUsers")
|
public R disableOrEnableMerchantUsers(@RequestBody DisableOrEnableConvenientMerchantDTO disableOrEnableConvenientMerchantDTO) {
|
return userService.disableOrEnableMerchantUsers(disableOrEnableConvenientMerchantDTO);
|
}
|
|
/**
|
* 根据openid维护社区团队里是否注册
|
* @param openid 用户微信唯一标识
|
*/
|
@PostMapping("judgeCommunityTeam")
|
public void judgeCommunityTeam(@RequestParam("openid") String openid) {
|
userService.judgeCommunityTeam(openid);
|
}
|
|
/**
|
* 数据看板升级版
|
*
|
* @return 运营后台数据看板升级版
|
*/
|
@PostMapping("datakanbans")
|
public R dataKanBans(@RequestBody DataKanBansDto dataKanBansDto) {
|
return userService.dataKanBans(dataKanBansDto);
|
}
|
|
/**
|
* 运营后台-用户数据统计汇总
|
* @return 用户数据统计汇总
|
*/
|
@GetMapping("community/statistics")
|
public R communityStatistics(@RequestParam("areaCode") String areaCode) {
|
return userService.communityStatistics(areaCode);
|
}
|
|
@GetMapping("community/statistics/export")
|
public R communityStatisticsExport(@RequestParam("areaCode") String areaCode) {
|
return userService.communityStatisticsExport(areaCode);
|
}
|
|
/**
|
* 通过UnionId获取用户信息
|
* @param unionId
|
* @return
|
*/
|
@GetMapping("/getByUnionId")
|
public R getUserInfoByUnionId(@RequestParam("unionId") String unionId) {
|
return userService.getUserInfoByUnionId(unionId);
|
}
|
|
/**
|
* 微商业街新增商家账号
|
* @param mcsMerchantDTO
|
* @return 商家用户id
|
*/
|
@PostMapping("insertMcsMerchantAccount")
|
public R addMcsMerchantUser(@RequestBody McsMerchantDTO mcsMerchantDTO) {
|
return userService.addMcsMerchantUser(mcsMerchantDTO);
|
}
|
|
/**
|
* 微商业街修改商家账号
|
* @param mcsMerchantDTO
|
* @return
|
*/
|
@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);
|
}
|
|
@PostMapping("/update/user/party/status")
|
public R updateUserPartyStatus(@RequestParam("userId") Long userId) {
|
return userService.updateUserPartyStatus(userId);
|
}
|
|
@PostMapping("/uuLogin")
|
public R uuLogin(@RequestBody UuLoginVO uuLoginVO){
|
return userService.uuLogin(uuLoginVO);
|
}
|
|
|
/**
|
* 数据看板:数据总览
|
* @return
|
*/
|
@GetMapping("/indexData/totalData")
|
public R indexData(@RequestParam(value = "type",required = false) Integer type,
|
@RequestParam(value = "streetId",required = false) Long streetId,
|
@RequestParam(value = "areaCode",required = false) Long areaCode,@RequestParam("appId")String appId){
|
return userService.newIndexData(type,streetId,areaCode,appId);
|
}
|
|
/**
|
* 数据看板:用户占比
|
* @return
|
*/
|
@GetMapping("/indexData/userRate")
|
public R userRate(@RequestParam(value = "type",required = false) Integer type,
|
@RequestParam(value = "streetId",required = false) Long streetId,
|
@RequestParam(value = "areaCode",required = false) Long areaCode,
|
@RequestParam(value = "range",required = false) Integer range,@RequestParam("appId")String appId){
|
return userService.userRate(type,streetId,areaCode,range,appId);
|
}
|
|
/**
|
* 数据看板:真实用户统计
|
* @return
|
*/
|
@GetMapping("/indexData/realUser")
|
public R realUser(@RequestParam(value = "type",required = false) Integer type,
|
@RequestParam(value = "streetId",required = false) Long streetId,
|
@RequestParam(value = "areaCode",required = false) Long areaCode,
|
@RequestParam(value = "range",required = false) Integer range,@RequestParam(value = "appId",required = false)String appId){
|
return userService.realUser(type,streetId,areaCode,range,appId);
|
}
|
|
|
@GetMapping("/indexData/userActivity")
|
public R userActivity(@RequestParam(value = "type",required = false) Integer type,
|
@RequestParam(value = "streetId",required = false) Long streetId,
|
@RequestParam(value = "areaCode",required = false) Long areaCode,
|
@RequestParam(value = "range",required = false) Integer range,
|
@RequestParam(value = "appId",required = false) String appId){
|
return userService.userActivity(type,streetId,areaCode,range, appId);
|
}
|
|
|
/**
|
*导出验证密码
|
*/
|
@GetMapping("/checkExport")
|
public R checkExport(@RequestParam("account")String account,@RequestParam("password")String password,@RequestParam("oldPassword")String oldPassword){
|
return userService.checkExport(account,password,oldPassword);
|
}
|
|
/**
|
* uu洗车推送
|
* @param washPhone
|
* @param phone
|
* @param washName
|
* @param orderStatus
|
* @return
|
*/
|
@GetMapping("/uuPush")
|
public R uuPush(@RequestParam(value = "washPhone",required = false)String washPhone,@RequestParam("phone")String phone,@RequestParam(value = "washName",required = false)String washName,@RequestParam("orderStatus")Integer orderStatus){
|
return userService.uuPush(washPhone,phone,washName,orderStatus);
|
}
|
|
/**
|
* 无水洗车推送
|
* @param washPhone
|
* @param phone
|
* @param washName
|
* @param orderStatus
|
* @return
|
*/
|
@GetMapping("/wsPush")
|
public R wsPush(@RequestParam(value = "washPhone",required = false)String washPhone,@RequestParam("phone")String phone,@RequestParam(value = "washName",required = false)String washName,@RequestParam("orderStatus")Integer orderStatus){
|
return userService.wsPush(washPhone,phone,washName,orderStatus);
|
}
|
|
@GetMapping("/indexData/getAreaAndStreet")
|
public R getAreaAndStreet(){
|
return userService.getAreaAndStreet();
|
}
|
|
@GetMapping("/communityList")
|
public R getCommunityList(@RequestParam("name") String name, @RequestParam(value = "id",required = false) Long id){
|
return userService.getCommunityList(name,id);
|
}
|
|
@GetMapping("/getAllCommunityList")
|
public R getAllCommunityList(){
|
return userService.getAllCommunityList();
|
}
|
|
@GetMapping("/resetPasswordAccount")
|
public R resetPasswordAccount(@RequestParam("type")Integer type,@RequestParam("account")String account,@RequestParam("appId")String appId){
|
return userService.resetPassword(type,account,appId);
|
}
|
|
@PostMapping("/tfLogin")
|
public R tfLogin(@RequestBody UuLoginVO uuLoginVO){
|
return userService.tfLogin(uuLoginVO);
|
}
|
|
/**
|
* 三说会堂新增业务中心或专家账号
|
* */
|
@PostMapping("/sanshuoAddUser")
|
public R sanshuoAddUser(@RequestBody AdministratorsUserVO administratorsUserVO){
|
return userService.addExpertOrIndustryCenter(administratorsUserVO);
|
}
|
|
/**
|
* 三说会堂后台重置密码
|
* */
|
@GetMapping("/sanshuoResetPassword")
|
public R sanshuoAddUser(@RequestParam("account") String account,@RequestParam("pass")String password){
|
return userService.resetPassExpertOrIndustryCenter(account,password);
|
}
|
|
/**
|
* 移除账号专家权限
|
*
|
*/
|
@GetMapping("/removeExpertRole")
|
public R removeExpertRole(@RequestParam(value = "phone",required = false)String phone){
|
return userService.removeExpertRole(phone);
|
}
|
|
@GetMapping("/accept")
|
public R accept(@RequestParam("userId")Long userId){
|
return userService.accept(userId);
|
}
|
|
@PostMapping("/addComPbCheckUser")
|
public R addComPbCheckUser(@RequestBody ComPbCheckUserDTO comPbCheckUserDTO){
|
return userService.addComPbCheckUser(comPbCheckUserDTO);
|
}
|
|
@PostMapping("/feedBackReply")
|
public R feedBackReply(@RequestBody SysUserFeedbackVO sysUserFeedbackVO){
|
return userService.feedBackReply(sysUserFeedbackVO);
|
}
|
|
@GetMapping("/myFeedBack")
|
public R myFeedBack(@RequestParam("userId")Long id,@RequestParam(value = "type",required = false)Integer type,@RequestParam("propertyId")Long propertyId){
|
return userService.myFeedBack(id,type,propertyId);
|
}
|
|
@GetMapping("/propertyCheck")
|
public R propertyCheck(@RequestParam String phone){
|
return userService.propertyCheck(phone);
|
}
|
|
}
|