updateGrid=new LambdaUpdateWrapper<>();
- updateGrid.set(CustomerGridEntity::getAbandonFlag,true);
+ updateGrid.set(CustomerGridEntity::getAbandonFlag,NumConstant.ZERO);
updateGrid.eq(CustomerGridEntity::getId,gridId);
baseDao.update(null,updateGrid);
}
From 7d5000fbb1b05db195bef7d4b71789dd518278c5 Mon Sep 17 00:00:00 2001
From: zxc <1272811460@qq.com>
Date: Thu, 17 Mar 2022 14:14:45 +0800
Subject: [PATCH 56/84] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=BD=91=E6=A0=BC?=
=?UTF-8?q?=E4=BF=A1=E6=81=AFfeign=E8=B0=83=E6=88=90=E7=BB=9F=E4=B8=80?=
=?UTF-8?q?=E6=96=B9=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../tools/dto/form/CustomerGridFormDTO.java | 42 +++++++++++++++++++
.../tools/feign/CommonGovOrgFeignClient.java | 8 ++--
...ommonGovOrgFeignClientFallBackFactory.java | 5 ++-
.../tools/redis/common/CustomerOrgRedis.java | 5 ++-
4 files changed, 53 insertions(+), 7 deletions(-)
create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/CustomerGridFormDTO.java
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/CustomerGridFormDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/CustomerGridFormDTO.java
new file mode 100644
index 0000000000..767f03bc07
--- /dev/null
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/CustomerGridFormDTO.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.commons.tools.dto.form;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+
+/**
+ * epmet-user端调用gov-org端的入参
+ * @author sun
+ */
+@Data
+public class CustomerGridFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+ /**
+ * 网格Id
+ */
+ @NotBlank(message = "网格ID不能为空", groups = {Grid.class})
+ private String gridId;
+
+ public interface Grid{}
+
+}
\ No newline at end of file
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonGovOrgFeignClient.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonGovOrgFeignClient.java
index 3ece646100..bb6bfe423b 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonGovOrgFeignClient.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonGovOrgFeignClient.java
@@ -1,13 +1,13 @@
package com.epmet.commons.tools.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
-import com.epmet.commons.tools.feign.fallback.CommonAggFeignClientFallBackFactory;
+import com.epmet.commons.tools.dto.form.CustomerGridFormDTO;
import com.epmet.commons.tools.feign.fallback.CommonGovOrgFeignClientFallBackFactory;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RequestBody;
/**
* @Author zxc
@@ -19,11 +19,11 @@ public interface CommonGovOrgFeignClient {
/**
* @Description 查询网格信息
- * @param gridId
+ * @param customerGridFormDTO
* @author zxc
* @date 2021/11/5 2:54 下午
*/
@PostMapping("/gov/org/grid/getbaseinfo")
- Result getGridInfo(@RequestParam("gridId")String gridId);
+ Result getGridInfo(@RequestBody CustomerGridFormDTO customerGridFormDTO);
}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java
index bcde96c380..e292d07c69 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java
@@ -1,6 +1,7 @@
package com.epmet.commons.tools.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
+import com.epmet.commons.tools.dto.form.CustomerGridFormDTO;
import com.epmet.commons.tools.feign.CommonGovOrgFeignClient;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.utils.ModuleUtils;
@@ -16,8 +17,8 @@ import org.springframework.stereotype.Component;
public class CommonGovOrgFeignClientFallBackFactory implements CommonGovOrgFeignClient {
@Override
- public Result getGridInfo(String gridId) {
- return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridInfo", gridId);
+ public Result getGridInfo(CustomerGridFormDTO customerGridFormDTO) {
+ return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridInfo", customerGridFormDTO);
}
}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerOrgRedis.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerOrgRedis.java
index 94c413431a..66faab24d3 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerOrgRedis.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerOrgRedis.java
@@ -2,6 +2,7 @@ package com.epmet.commons.tools.redis.common;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON;
+import com.epmet.commons.tools.dto.form.CustomerGridFormDTO;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.CommonAggFeignClient;
import com.epmet.commons.tools.feign.CommonGovOrgFeignClient;
@@ -61,7 +62,9 @@ public class CustomerOrgRedis {
if (!CollectionUtils.isEmpty(grid)) {
return ConvertUtils.mapToEntity(grid, GridInfoCache.class);
}
- Result gridInfoResult = customerOrgRedis.govOrgFeignClient.getGridInfo(gridId);
+ CustomerGridFormDTO formDTO = new CustomerGridFormDTO();
+ formDTO.setGridId(gridId);
+ Result gridInfoResult = customerOrgRedis.govOrgFeignClient.getGridInfo(formDTO);
if (!gridInfoResult.success()){
throw new RenException("查询网格信息失败...");
}
From e1878114117c0055551439f601838e91090cb2af Mon Sep 17 00:00:00 2001
From: jianjun
Date: Thu, 17 Mar 2022 14:27:30 +0800
Subject: [PATCH 57/84] fallback
---
.../CommonOrgFeignClientFallback.java | 25 +++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonOrgFeignClientFallback.java
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonOrgFeignClientFallback.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonOrgFeignClientFallback.java
new file mode 100644
index 0000000000..1f9ddecf02
--- /dev/null
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonOrgFeignClientFallback.java
@@ -0,0 +1,25 @@
+package com.epmet.commons.tools.feign.fallback;
+
+import com.epmet.commons.tools.constant.ServiceConstant;
+import com.epmet.commons.tools.feign.CommonGovOrgFeignClient;
+import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
+import com.epmet.commons.tools.utils.ModuleUtils;
+import com.epmet.commons.tools.utils.Result;
+import org.springframework.stereotype.Component;
+
+/**
+ * 调用政府端权限
+ * @Author wxz
+ * @Description
+ * @Date 2020/4/24 11:17
+ **/
+@Component
+public class CommonOrgFeignClientFallback implements CommonGovOrgFeignClient {
+
+ @Override
+ public Result getGridInfo(String gridId) {
+ return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridInfo", gridId);
+ }
+
+
+}
From cd4cddd617a4e0ed4da76e95548881124a70806a Mon Sep 17 00:00:00 2001
From: zxc <1272811460@qq.com>
Date: Thu, 17 Mar 2022 14:38:25 +0800
Subject: [PATCH 58/84] =?UTF-8?q?=E5=93=88=E5=93=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../tools/feign/fallback/CommonOrgFeignClientFallback.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonOrgFeignClientFallback.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonOrgFeignClientFallback.java
index 1f9ddecf02..c7308d15ab 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonOrgFeignClientFallback.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonOrgFeignClientFallback.java
@@ -1,6 +1,7 @@
package com.epmet.commons.tools.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
+import com.epmet.commons.tools.dto.form.CustomerGridFormDTO;
import com.epmet.commons.tools.feign.CommonGovOrgFeignClient;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.utils.ModuleUtils;
@@ -17,8 +18,8 @@ import org.springframework.stereotype.Component;
public class CommonOrgFeignClientFallback implements CommonGovOrgFeignClient {
@Override
- public Result getGridInfo(String gridId) {
- return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridInfo", gridId);
+ public Result getGridInfo(CustomerGridFormDTO customerGridFormDTO) {
+ return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridInfo", customerGridFormDTO);
}
From 3e8b7cbb0ed820e6bd9e97566af42c36c2579bbd Mon Sep 17 00:00:00 2001
From: jianjun
Date: Thu, 17 Mar 2022 14:54:44 +0800
Subject: [PATCH 59/84] fallback
---
...CommonGovOrgFeignClientFallBackFactory.java | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java
index e292d07c69..219d8f38cd 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java
@@ -1,11 +1,9 @@
package com.epmet.commons.tools.feign.fallback;
-import com.epmet.commons.tools.constant.ServiceConstant;
-import com.epmet.commons.tools.dto.form.CustomerGridFormDTO;
+import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.feign.CommonGovOrgFeignClient;
-import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
-import com.epmet.commons.tools.utils.ModuleUtils;
-import com.epmet.commons.tools.utils.Result;
+import feign.hystrix.FallbackFactory;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
@@ -13,12 +11,14 @@ import org.springframework.stereotype.Component;
* @DateTime 2022/3/17 1:46 下午
* @DESC
*/
+@Slf4j
@Component
-public class CommonGovOrgFeignClientFallBackFactory implements CommonGovOrgFeignClient {
-
+public class CommonGovOrgFeignClientFallBackFactory implements FallbackFactory {
+ private CommonOrgFeignClientFallback fallback = new CommonOrgFeignClientFallback();
@Override
- public Result getGridInfo(CustomerGridFormDTO customerGridFormDTO) {
- return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridInfo", customerGridFormDTO);
+ public CommonGovOrgFeignClient create(Throwable cause) {
+ log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
+ return fallback;
}
}
From b0a480d79122ce69ae36dae299195c818b51d5bd Mon Sep 17 00:00:00 2001
From: jianjun
Date: Thu, 17 Mar 2022 15:03:12 +0800
Subject: [PATCH 60/84] fallback
---
.../feign/fallback/CommonGovOrgFeignClientFallBackFactory.java | 2 +-
...ClientFallback.java => CommonGovOrgFeignClientFallback.java} | 2 +-
.../java/com/epmet/service/impl/CustomerGridServiceImpl.java | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
rename epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/{CommonOrgFeignClientFallback.java => CommonGovOrgFeignClientFallback.java} (90%)
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java
index 219d8f38cd..8cde59e6e1 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
@Slf4j
@Component
public class CommonGovOrgFeignClientFallBackFactory implements FallbackFactory {
- private CommonOrgFeignClientFallback fallback = new CommonOrgFeignClientFallback();
+ private CommonGovOrgFeignClientFallback fallback = new CommonGovOrgFeignClientFallback();
@Override
public CommonGovOrgFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonOrgFeignClientFallback.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallback.java
similarity index 90%
rename from epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonOrgFeignClientFallback.java
rename to epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallback.java
index c7308d15ab..c54567c350 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonOrgFeignClientFallback.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallback.java
@@ -15,7 +15,7 @@ import org.springframework.stereotype.Component;
* @Date 2020/4/24 11:17
**/
@Component
-public class CommonOrgFeignClientFallback implements CommonGovOrgFeignClient {
+public class CommonGovOrgFeignClientFallback implements CommonGovOrgFeignClient {
@Override
public Result getGridInfo(CustomerGridFormDTO customerGridFormDTO) {
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
index bd30ca06ac..094df4ba53 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
@@ -1047,7 +1047,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl updateGrid=new LambdaUpdateWrapper<>();
- updateGrid.set(CustomerGridEntity::getAbandonFlag,NumConstant.ZERO);
+ updateGrid.set(CustomerGridEntity::getAbandonFlag,NumConstant.ONE);
updateGrid.eq(CustomerGridEntity::getId,gridId);
baseDao.update(null,updateGrid);
}
From 110a1335876b8c4e2063d8fecd26977b770614e1 Mon Sep 17 00:00:00 2001
From: jianjun
Date: Thu, 17 Mar 2022 15:23:32 +0800
Subject: [PATCH 61/84] =?UTF-8?q?=E9=94=99=E8=AF=AF=E9=94=99=E8=AF=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../epmet/service/impl/CustomerGridServiceImpl.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
index 094df4ba53..53d3242cfa 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
@@ -40,6 +40,7 @@ import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.CustomerGridConstant;
@@ -98,6 +99,8 @@ public class CustomerGridServiceImpl extends BaseServiceImpl staffList = customerStaffGridDao.getGridStaffList(gridId);
- if (CollectionUtils.isEmpty(staffList)){
- log.info("abandonGridForDealBizData gridId:{} have any staff", gridId);
- return;
+ if (staffList == null){
+ staffList = new ArrayList<>();
}
logger.debug("abandonGridForDealBizData staffList:{}", JSON.toJSONString(staffList));
List updateList = new ArrayList<>();
@@ -1013,8 +1015,8 @@ public class CustomerGridServiceImpl extends BaseServiceImplCustomerStaffRedis.delStaffInfoFormCache(customerId,staff.getStaffId()));
From bdc89ab26258d1da0d1105c6604e4fbb4b7fa630 Mon Sep 17 00:00:00 2001
From: yinzuomei <576302893@qq.com>
Date: Thu, 17 Mar 2022 15:34:48 +0800
Subject: [PATCH 62/84] updatedTime
---
.../com/epmet/dto/form/AbandonGridFormDTO.java | 1 +
.../java/com/epmet/controller/GridController.java | 3 ++-
.../com/epmet/service/CustomerGridService.java | 4 ++--
.../service/impl/CustomerGridServiceImpl.java | 14 ++++++++------
4 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AbandonGridFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AbandonGridFormDTO.java
index 1d1aca23e1..85f8d7fd34 100644
--- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AbandonGridFormDTO.java
+++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AbandonGridFormDTO.java
@@ -11,4 +11,5 @@ import java.io.Serializable;
public class AbandonGridFormDTO implements Serializable {
@NotBlank(message = "网格id不能为空",groups = AddGroup.class)
private String gridId;
+ private String userId;
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java
index 20c4dd4aef..8f026e9f44 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java
@@ -235,7 +235,8 @@ public class GridController {
*/
@RequirePermission(requirePermission = RequirePermissionEnum.ORG_GRID_DELETE)
@PostMapping("abandon")
- public Result abandonGrid(@RequestBody AbandonGridFormDTO formDTO){
+ public Result abandonGrid(@LoginUser TokenDto tokenDto,@RequestBody AbandonGridFormDTO formDTO){
+ formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO, AddGroup.class);
customerGridService.abandonGrid(formDTO);
return new Result();
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java
index 504555fbc7..c3ba7c1286 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java
@@ -384,7 +384,7 @@ public interface CustomerGridService extends BaseService {
/**
* desc:移除网格内的工作人员关系 并迁移到组织
- * @param gridId
+ * @param formDTO
*/
- void abandonGridForDealBizData(String gridId);
+ void abandonGridForDealBizData(AbandonGridFormDTO formDTO);
}
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
index 094df4ba53..60735f8615 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
@@ -981,17 +981,17 @@ public class CustomerGridServiceImpl extends BaseServiceImpl staffList = customerStaffGridDao.getGridStaffList(gridId);
+ List staffList = customerStaffGridDao.getGridStaffList(formDTO.getGridId());
if (CollectionUtils.isEmpty(staffList)){
- log.info("abandonGridForDealBizData gridId:{} have any staff", gridId);
+ log.info("abandonGridForDealBizData gridId:{} have any staff", formDTO.getGridId());
return;
}
logger.debug("abandonGridForDealBizData staffList:{}", JSON.toJSONString(staffList));
@@ -1015,7 +1015,7 @@ public class CustomerGridServiceImpl extends BaseServiceImplCustomerStaffRedis.delStaffInfoFormCache(customerId,staff.getStaffId()));
@@ -1026,7 +1026,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl staffList, List updateList) {
+ public void dealBizDataForAbandon(String customerId, String gridId, String userId,List staffList, List updateList) {
//1.删除工作人员与网格的关系
LambdaQueryWrapper updateWrapper = new LambdaQueryWrapper<>();
updateWrapper.eq(CustomerStaffGridEntity::getGridId,gridId);
@@ -1048,6 +1048,8 @@ public class CustomerGridServiceImpl extends BaseServiceImpl updateGrid=new LambdaUpdateWrapper<>();
updateGrid.set(CustomerGridEntity::getAbandonFlag,NumConstant.ONE);
+ updateGrid.set(CustomerGridEntity::getUpdatedBy,userId);
+ updateGrid.set(CustomerGridEntity::getUpdatedTime,new Date());
updateGrid.eq(CustomerGridEntity::getId,gridId);
baseDao.update(null,updateGrid);
}
From 7f4123c5cffd14dc662642663756c6f1ed3d3452 Mon Sep 17 00:00:00 2001
From: yinzuomei <576302893@qq.com>
Date: Thu, 17 Mar 2022 15:38:01 +0800
Subject: [PATCH 63/84] merge
---
.../java/com/epmet/service/impl/CustomerGridServiceImpl.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
index b63db4f280..c337f989e3 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
+++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
@@ -992,7 +992,7 @@ public class CustomerGridServiceImpl extends BaseServiceImpl staffList = customerStaffGridDao.getGridStaffList(gridId);
+ List staffList = customerStaffGridDao.getGridStaffList(formDTO.getGridId());
if (staffList == null){
staffList = new ArrayList<>();
}
@@ -1017,7 +1017,7 @@ public class CustomerGridServiceImpl extends BaseServiceImplCustomerStaffRedis.delStaffInfoFormCache(customerId,staff.getStaffId()));
From d1a24727d496e3d845204735175f5b81dcbaa5fb Mon Sep 17 00:00:00 2001
From: yinzuomei <576302893@qq.com>
Date: Thu, 17 Mar 2022 16:38:30 +0800
Subject: [PATCH 64/84] =?UTF-8?q?=E6=97=B6=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/epmet/service/impl/UserServiceImpl.java | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java
index a6f88e5c0f..ee45a0afe7 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java
@@ -467,18 +467,29 @@ public class UserServiceImpl extends BaseServiceImpl implem
//2、修改历史徽章表
LambdaUpdateWrapper recUpdate=new LambdaUpdateWrapper<>();
- recUpdate.set(UserBadgeCertificateRecordEntity::getGridId,newGridInfo.getId());
+ recUpdate.set(UserBadgeCertificateRecordEntity::getGridId,newGridInfo.getId())
+ .set(UserBadgeCertificateRecordEntity::getUpdatedBy,formDTO.getUserId())
+ .set(UserBadgeCertificateRecordEntity::getUpdatedTime,new Date());
recUpdate.eq(UserBadgeCertificateRecordEntity::getCustomerId,formDTO.getCustomerId())
.eq(UserBadgeCertificateRecordEntity::getUserId,formDTO.getUserId());
userBadgeCertificateRecordDao.update(null,recUpdate);
LambdaUpdateWrapper badgeUpdate=new LambdaUpdateWrapper<>();
- badgeUpdate.set(ResiUserBadgeEntity::getGridId,newGridInfo.getId());
+ badgeUpdate.set(ResiUserBadgeEntity::getGridId,newGridInfo.getId())
+ .set(ResiUserBadgeEntity::getUpdatedBy,formDTO.getUserId())
+ .set(ResiUserBadgeEntity::getUpdatedTime,new Date());;
badgeUpdate.eq(ResiUserBadgeEntity::getCustomerId,formDTO.getCustomerId())
.eq(ResiUserBadgeEntity::getUserId,formDTO.getUserId());
resiUserBadgeDao.update(null,badgeUpdate);
//3、修改支援者信息表
+ modifyVolunteerGrid(formDTO,newGridInfo);
+
+ //4、删除用户缓存信息
+ userBaseInfoRedis.clearUserCache(Arrays.asList(formDTO.getUserId()));
+ }
+
+ private void modifyVolunteerGrid(ModifyRegGridFormDTO formDTO, GridInfoCache newGridInfo) {
VolunteerInfoDTO volunteerInfoDTO=new VolunteerInfoDTO();
volunteerInfoDTO.setCustomerId(formDTO.getCustomerId());
volunteerInfoDTO.setUserId(formDTO.getUserId());
@@ -490,8 +501,6 @@ public class UserServiceImpl extends BaseServiceImpl implem
if (!volunteerRes.success()) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "居民端_修改注册网格:修改用户志愿者信息异常", "服务器开小差了...");
}
- //4、删除用户缓存信息
- userBaseInfoRedis.clearUserCache(Arrays.asList(formDTO.getUserId()));
}
}
From 90c1207acc8c0dc0e43a155701f993543c2e0568 Mon Sep 17 00:00:00 2001
From: zxc <1272811460@qq.com>
Date: Thu, 17 Mar 2022 16:52:22 +0800
Subject: [PATCH 65/84] =?UTF-8?q?=E6=A0=B9=E6=8D=AEuserId=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2=E6=B3=A8=E5=86=8C=E7=BD=91=E6=A0=BCID=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/resources/mapper/RegisterRelationDao.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml
index 74c1691615..3ce51f018a 100644
--- a/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml
+++ b/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml
@@ -79,7 +79,7 @@
- SELECT GRID_ID FROM register_relation WHERE DEL_FLAG = 0 and USER_ID = #{userId}
+ SELECT GRID_ID FROM register_relation WHERE DEL_FLAG = 0 AND FIRST_REGISTER = 1 and USER_ID = #{userId}
From c540404bf6ca70a67a6764ebc23e347ca84e3412 Mon Sep 17 00:00:00 2001
From: zxc <1272811460@qq.com>
Date: Thu, 17 Mar 2022 18:15:50 +0800
Subject: [PATCH 66/84] =?UTF-8?q?commonFeign=E5=88=A0=E9=99=A4=E8=8E=B7?=
=?UTF-8?q?=E5=8F=96=E7=BD=91=E6=A0=BC=E6=96=B9=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../epmet/commons/tools/feign/CommonAggFeignClient.java | 8 --------
.../feign/fallback/CommonAggFeignClientFallback.java | 4 ----
2 files changed, 12 deletions(-)
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonAggFeignClient.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonAggFeignClient.java
index 5a03583011..5ec2ed2e44 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonAggFeignClient.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonAggFeignClient.java
@@ -37,12 +37,4 @@ public interface CommonAggFeignClient {
@PostMapping("/data/aggregator/org/agency")
Result getAgencyInfo(@RequestParam("agencyId")String agencyId);
- /**
- * @Description 查询网格信息
- * @param gridId
- * @author zxc
- * @date 2021/11/5 2:54 下午
- */
- @PostMapping("/data/aggregator/org/grid")
- Result getGridInfo(@RequestParam("gridId")String gridId);
}
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonAggFeignClientFallback.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonAggFeignClientFallback.java
index 02f209f4f2..317e7bb131 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonAggFeignClientFallback.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonAggFeignClientFallback.java
@@ -28,8 +28,4 @@ public class CommonAggFeignClientFallback implements CommonAggFeignClient {
return ModuleUtils.feignConError(ServiceConstant.DATA_AGGREGATOR_SERVER, "getAgencyInfo", agencyId);
}
- @Override
- public Result getGridInfo(String gridId) {
- return ModuleUtils.feignConError(ServiceConstant.DATA_AGGREGATOR_SERVER, "getGridInfo", gridId);
- }
}
From e20910681e61006541930e434e2d49f9eb122dc7 Mon Sep 17 00:00:00 2001
From: yinzuomei <576302893@qq.com>
Date: Thu, 17 Mar 2022 19:05:04 +0800
Subject: [PATCH 67/84] user_reg_grid_change_rec
---
.../epmet/dao/UserRegGridChangeRecDao.java | 16 ++++++++
.../entity/UserRegGridChangeRecEntity.java | 41 +++++++++++++++++++
.../epmet/service/impl/UserServiceImpl.java | 15 ++++++-
.../V0.0.25__create_user_reg_grid_rec.sql | 14 +++++++
.../mapper/UserRegGridChangeRecDao.xml | 8 ++++
5 files changed, 92 insertions(+), 2 deletions(-)
create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserRegGridChangeRecDao.java
create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserRegGridChangeRecEntity.java
create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.25__create_user_reg_grid_rec.sql
create mode 100644 epmet-user/epmet-user-server/src/main/resources/mapper/UserRegGridChangeRecDao.xml
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserRegGridChangeRecDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserRegGridChangeRecDao.java
new file mode 100644
index 0000000000..c14ace1ab7
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserRegGridChangeRecDao.java
@@ -0,0 +1,16 @@
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.UserRegGridChangeRecEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 用户注册网格变更记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-03-17
+ */
+@Mapper
+public interface UserRegGridChangeRecDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserRegGridChangeRecEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserRegGridChangeRecEntity.java
new file mode 100644
index 0000000000..262c79e608
--- /dev/null
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserRegGridChangeRecEntity.java
@@ -0,0 +1,41 @@
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 用户注册网格变更记录表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-03-17
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("user_reg_grid_change_rec")
+public class UserRegGridChangeRecEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 居民端用户id
+ */
+ private String userId;
+
+ /**
+ * 原始网格id
+ */
+ private String originGridId;
+
+ /**
+ * 当前所选择的注册网格
+ */
+ private String gridId;
+
+}
diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java
index ee45a0afe7..12380e64c2 100644
--- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java
+++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java
@@ -75,6 +75,9 @@ public class UserServiceImpl extends BaseServiceImpl implem
private UserBadgeCertificateRecordDao userBadgeCertificateRecordDao;
@Autowired
private UserBaseInfoRedis userBaseInfoRedis;
+ @Autowired
+ private UserRegGridChangeRecDao UserRegGridChangeRecDao;
+
private static final Logger log = LoggerFactory.getLogger(UserServiceImpl.class);
@@ -438,8 +441,9 @@ public class UserServiceImpl extends BaseServiceImpl implem
@Override
public void modifyRegGrid(ModifyRegGridFormDTO formDTO) {
GridInfoCache newGridInfo= CustomerOrgRedis.getGridInfo(formDTO.getGridId());
- if (null == newGridInfo) {
- throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "居民端_修改注册网格:查询当前网格信息异常", "服务器开小差了...");
+ RegisterRelationEntity originReg=registerRelationDao.selectRegisteredGridIdByUserIdAndCustomerId(formDTO.getUserId(),formDTO.getCustomerId());
+ if (null == newGridInfo || null == originReg) {
+ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "居民端_修改注册网格:查询网格信息异常", "服务器开小差了...");
}
//修改register_relation表
LambdaQueryWrapper