From 72515e6ac4db34d02617916888374d1c774744c7 Mon Sep 17 00:00:00 2001
From: Null <281575458@qq.com>
Date: 星期六, 20 三月 2021 17:25:42 +0800
Subject: [PATCH] 一标三实接口BUG修改
---
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java | 146 ++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 138 insertions(+), 8 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 5fcd0b1..f3de6ea 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
@@ -1,12 +1,10 @@
package com.panzhihua.service_user.api;
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.user.EexcelUserDTO;
-import com.panzhihua.common.model.dtos.user.PageFeedBackDTO;
-import com.panzhihua.common.model.dtos.user.PageUserAppletsBackstageDTO;
-import com.panzhihua.common.model.dtos.user.SysUserFeedbackDTO;
+import com.panzhihua.common.model.dtos.user.*;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.SystemmanagementConfigVO;
@@ -14,10 +12,7 @@
import com.panzhihua.service_user.service.SysUserInputService;
import com.panzhihua.service_user.service.UserService;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@@ -595,4 +590,139 @@
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 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);
+ }
}
--
Gitblit v1.7.1