From 918e3f07f06b36746959add0109c60bd4c376a5c Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期三, 21 五月 2025 18:55:09 +0800
Subject: [PATCH] 修改bug

---
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java          |   13 ++++++++++++-
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java |    7 ++++++-
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/MgtComplaintQuery.java         |    9 ++-------
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java         |   14 +++++++++++++-
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/ComAct.java               |   10 +++++++---
 5 files changed, 40 insertions(+), 13 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java
index 3ccb34b..f7b0eb7 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/api/SystemUserController.java
@@ -220,7 +220,7 @@
 		// 获取最高层级的用于原来的判断
 		systemUserLevels.sort(Comparator.comparing(SystemUserLevel::getLevel));
 		Integer level = systemUserLevels.get(0).getLevel();
-		user.setAccountLevel(level);
+		systemUser.setAccountLevel(level);
 
 
 		if(2 == user.getAccountLevel() && 1 == systemUser.getAccountLevel()){
@@ -284,6 +284,9 @@
 			return R.fail("手机号重复。");
 		}
 
+
+
+
 		String districtsCode = systemUser.getDistrictsCode();
 		if (!StringUtils.isEmpty(districtsCode)){
 			BcRegion bcRegion = bcRegionService.getOne(new LambdaQueryWrapper<BcRegion>().eq(BcRegion::getRegionCode, districtsCode));
@@ -304,6 +307,12 @@
 
 		systemUser.setStatus(1);
 		systemUser.setCreateTime(LocalDateTime.now());
+
+		// 获取最高层级的用于原来的判断
+		systemUserLevels.sort(Comparator.comparing(SystemUserLevel::getLevel));
+		Integer level = systemUserLevels.get(0).getLevel();
+		systemUser.setAccountLevel(level);
+
 		systemUserService.updateById(systemUser);
 		// 移除原来层级 在添加新层级
 		systemUserLevelService.remove(new LambdaQueryWrapper<SystemUserLevel>().eq(SystemUserLevel::getSystemUserId, systemUser.getId()));
@@ -311,6 +320,8 @@
 			e.setSystemUserId(systemUser.getId());
 			e.setStatus(1);
 		});
+
+
 		systemUserLevelService.saveBatch(systemUserLevels);
 
 
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java
index c4f3135..6674c0c 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/controller/HomeController.java
@@ -99,7 +99,19 @@
             Integer levelId = o2.getLevelId();
             if(levelId!=null) {
                 SystemUserLevel systemUserLevel = systemUserLevelService.getById(levelId);
-                systemUser.setLevelId(systemUserLevel.getLevel());
+                if (systemUserLevel == null) {
+                    List<SystemUserLevel> list = systemUserLevelService.list(new LambdaQueryWrapper<SystemUserLevel>().eq(SystemUserLevel::getSystemUserId, systemUser.getId()).eq(SystemUserLevel::getStatus, 1));
+                    if (list.size() > 0) {
+                        systemUser.setLevelId(list.get(0).getLevel());
+                    }
+                } else {
+                    systemUser.setLevelId(systemUserLevel.getLevel());
+                }
+            }else {
+                List<SystemUserLevel> list = systemUserLevelService.list(new LambdaQueryWrapper<SystemUserLevel>().eq(SystemUserLevel::getSystemUserId, systemUser.getId()).eq(SystemUserLevel::getStatus, 1));
+                if (list.size() > 0) {
+                    systemUser.setLevelId(list.get(0).getLevel());
+                }
             }
         }
         return R.ok(systemUser);
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/ComAct.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/ComAct.java
index 204b79d..03abfae 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/ComAct.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/model/entity/ComAct.java
@@ -1,15 +1,17 @@
 package com.panzhihua.sangeshenbian.model.entity;
 
-import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.IdType;
-import java.time.LocalDateTime;
 import com.baomidou.mybatisplus.annotation.TableId;
-import java.io.Serializable;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
 
 /**
  * <p>
@@ -30,9 +32,11 @@
 
     @ApiModelProperty(value = ",主键")
     @TableId(value = "community_id", type = IdType.NONE)
+    @JsonFormat(shape = JsonFormat.Shape.STRING)
     private Long communityId;
 
     @ApiModelProperty(value = "街道Id")
+    @JsonFormat(shape = JsonFormat.Shape.STRING)
     private Long streetId;
 
     @ApiModelProperty(value = "社区名字")
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
index 5e9b046..ac919ca 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/ComplaintServiceImpl.java
@@ -265,7 +265,7 @@
             Long reporterId = s.getReporterId();
             Long superiorId = s.getSuperiorId2();
             if (!targetId.equals(reporterId) && !targetId.equals(superiorId) && (s.getStatus() == 5)) {
-                s.setStatus(0);
+//                s.setStatus(0);
             }
         }
         return page;
@@ -1101,6 +1101,11 @@
         }
         //审核不通过
         if (complaintAuditRecord.getAuditType().equals(1) && complaintAuditRecord.getAuditStatus().equals(0) && dto.getAuditResult().equals(2)) {
+            Complaint complaint = getById(complaintAuditRecord.getComplaintId());
+            // 设置为正在办理
+            complaint.setStatus(0);
+            updateById(complaint);
+
             complaintAuditRecord.setRejectReason(dto.getRejectReason());
             complaintAuditRecord.setAuditStatus(2);
             complaintAuditRecord.setAuditorId(loginUserInfoVO.getUserId());
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/MgtComplaintQuery.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/MgtComplaintQuery.java
index 1628258..f18602b 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/MgtComplaintQuery.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/warpper/MgtComplaintQuery.java
@@ -1,15 +1,10 @@
 package com.panzhihua.sangeshenbian.warpper;
 
-import com.baomidou.mybatisplus.annotation.TableField;
 import com.panzhihua.sangeshenbian.model.query.BasePage;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
-
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
-import java.util.Date;
 
 /**
  * @author mitao
@@ -32,11 +27,11 @@
 
     @ApiModelProperty(value = "发生时间-开始")
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date startTime;
+    private String startTime;
 
     @ApiModelProperty(value = "发生时间-结束")
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date endTime;
+    private String endTime;
 
     @ApiModelProperty(value = "问题类型")
     private String problemType;

--
Gitblit v1.7.1