Browse Source

Merge remote-tracking branch 'remotes/origin/dev_bugfix_ljj' into dev_warn_notice

dev
jianjun 3 years ago
parent
commit
a281f5e946
  1. 10
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java
  2. 12
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java
  3. 5
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovCustomerMenuServiceImpl.java
  4. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java
  5. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java
  6. 2
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml
  7. 8
      epmet-module/open-data-worker/open-data-worker-server/src/main/resources/bootstrap.yml
  8. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java
  9. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java

10
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java

@ -743,6 +743,14 @@ public class RedisKeys {
} }
public static String getCustomerMenuList(String customerId, Integer type) { public static String getCustomerMenuList(String customerId, Integer type) {
return rootPrefix.concat("oper:access:nav:customerId:").concat(customerId).concat(":type:")+type; return getCustomerMenuListPrefix().concat(customerId).concat(":type:")+type;
}
/**
* desc:菜单缓存前缀
* @return
*/
public static String getCustomerMenuListPrefix() {
return rootPrefix.concat("oper:access:nav:customerId:");
} }
} }

12
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/redis/GovCustomerMenuRedis.java

@ -17,6 +17,7 @@
package com.epmet.redis; package com.epmet.redis;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.dto.GovMenuDTO; import com.epmet.dto.GovMenuDTO;
@ -66,16 +67,11 @@ public class GovCustomerMenuRedis {
/** /**
* desc:删除客户菜单缓存 * desc:删除客户菜单缓存
* @param customerId
* @param type
* @see com.epmet.enums.MenuTypeEnum * @see com.epmet.enums.MenuTypeEnum
*/ */
public void delCustomerMenu(String customerId, Integer type) { public void delAllCustomerMenu() {
if (checkParam(customerId, type)) { String key = RedisKeys.getCustomerMenuListPrefix().concat(StrConstant.STAR);
String key = RedisKeys.getCustomerMenuList(customerId, type); redisUtils.deleteByPattern(key);
redisUtils.delete(key);
}
} }
private boolean checkParam(String customerId, Integer type) { private boolean checkParam(String customerId, Integer type) {

5
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovCustomerMenuServiceImpl.java

@ -28,7 +28,6 @@ import com.epmet.dao.GovCustomerMenuDao;
import com.epmet.dto.GovCustomerMenuDTO; import com.epmet.dto.GovCustomerMenuDTO;
import com.epmet.dto.form.MenuConfigFormDTO; import com.epmet.dto.form.MenuConfigFormDTO;
import com.epmet.entity.GovCustomerMenuEntity; import com.epmet.entity.GovCustomerMenuEntity;
import com.epmet.enums.MenuTypeEnum;
import com.epmet.redis.GovCustomerMenuRedis; import com.epmet.redis.GovCustomerMenuRedis;
import com.epmet.service.GovCustomerMenuService; import com.epmet.service.GovCustomerMenuService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -119,8 +118,8 @@ public class GovCustomerMenuServiceImpl extends BaseServiceImpl<GovCustomerMenuD
} }
insertBatch(entities); insertBatch(entities);
} }
//删除缓存 //删除全部客户缓存
formDTO.getCustomerIds().forEach(customerId-> govCustomerMenuRedis.delCustomerMenu(customerId, MenuTypeEnum.MENU.value())); govCustomerMenuRedis.delAllCustomerMenu();
} }
@Override @Override

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java

@ -48,7 +48,7 @@ public interface IcNeighborHoodDao extends BaseDao<IcNeighborHoodEntity> {
@Param("agencyNameList") List<String> agencyNameList, @Param("agencyNameList") List<String> agencyNameList,
@Param("gridNameList") List<String> gridNameList); @Param("gridNameList") List<String> gridNameList);
Integer checkNameUq(@Param("customerId") String customerId, Integer checkNameUq(@Param("gridId") String gridId,
@Param("neighborHoodName")String neighborHoodName, @Param("neighborHoodName")String neighborHoodName,
@Param("neighborId")String neighborId); @Param("neighborId")String neighborId);

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java

@ -73,8 +73,8 @@ public class NeighborHoodServiceImpl implements NeighborHoodService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void AddNeighborhood(String customerId, IcNeighborHoodFormDTO formDTO) { public void AddNeighborhood(String customerId, IcNeighborHoodFormDTO formDTO) {
//同一客户下,小区名称唯一 //同一网格下,小区名称唯一
Integer count = icNeighborHoodDao.checkNameUq(customerId,formDTO.getNeighborHoodName(),null); Integer count = icNeighborHoodDao.checkNameUq(formDTO.getGridId(),formDTO.getNeighborHoodName(),null);
if (null != count && count > 0) { if (null != count && count > 0) {
throw new RenException(EpmetErrorCode.NEIGHBOOR_NAME_EXITED.getCode(), EpmetErrorCode.NEIGHBOOR_NAME_EXITED.getMsg()); throw new RenException(EpmetErrorCode.NEIGHBOOR_NAME_EXITED.getCode(), EpmetErrorCode.NEIGHBOOR_NAME_EXITED.getMsg());
} }
@ -155,7 +155,7 @@ public class NeighborHoodServiceImpl implements NeighborHoodService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void UpdateNeighborhood(String customerId, IcNeighborHoodFormDTO formDTO) { public void UpdateNeighborhood(String customerId, IcNeighborHoodFormDTO formDTO) {
//同一客户下,小区名称唯一 //同一客户下,小区名称唯一
Integer count = icNeighborHoodDao.checkNameUq(customerId,formDTO.getNeighborHoodName(),formDTO.getNeighborHoodId()); Integer count = icNeighborHoodDao.checkNameUq(formDTO.getGridId(),formDTO.getNeighborHoodName(),formDTO.getNeighborHoodId());
if (null != count && count > 0) { if (null != count && count > 0) {
throw new RenException(EpmetErrorCode.NEIGHBOOR_NAME_EXITED.getCode(), EpmetErrorCode.NEIGHBOOR_NAME_EXITED.getMsg()); throw new RenException(EpmetErrorCode.NEIGHBOOR_NAME_EXITED.getCode(), EpmetErrorCode.NEIGHBOOR_NAME_EXITED.getMsg());
} }

2
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml

@ -208,7 +208,7 @@
count(*) count(*)
from ic_neighbor_hood a from ic_neighbor_hood a
where a.del_flag='0' where a.del_flag='0'
and a.customer_id=#{customerId} and a.grid_id=#{gridId}
and a.NEIGHBOR_HOOD_NAME=#{neighborHoodName} and a.NEIGHBOR_HOOD_NAME=#{neighborHoodName}
<if test=" null != neighborId and neighborId.trim() != ''"> <if test=" null != neighborId and neighborId.trim() != ''">
and a.id !=#{neighborId} and a.id !=#{neighborId}

8
epmet-module/open-data-worker/open-data-worker-server/src/main/resources/bootstrap.yml

@ -98,6 +98,12 @@ mybatis-plus:
feign: feign:
hystrix: hystrix:
enabled: true enabled: true
threadpool:
default:
coreSize: 20
maximumSize: 50
maxQueueSize: 500
queueSizeRejectionThreshold: 8000
client: client:
config: config:
default: default:
@ -146,4 +152,4 @@ thread:
queueCapacity: @thread.threadPool.queue-capacity@ queueCapacity: @thread.threadPool.queue-capacity@
keepAliveSeconds: @thread.threadPool.keep-alive-seconds@ keepAliveSeconds: @thread.threadPool.keep-alive-seconds@
threadNamePrefix: @thread.threadPool.thread-name-prefix@ threadNamePrefix: @thread.threadPool.thread-name-prefix@
rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@

4
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java

@ -1586,7 +1586,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
if ("1".equals(oldValue)) { if ("1".equals(oldValue)) {
IcUserChangeDetailedEntity changeDetail = fillChangeDetail(loginUserCustomerId, resiId, transferChangeRecord.getId(), oldAgencyId, IcUserChangeDetailedEntity changeDetail = fillChangeDetail(loginUserCustomerId, resiId, transferChangeRecord.getId(), oldAgencyId,
oldGridId, oldvillageId, oldBuildId, oldUnitId, oldGridId, oldvillageId, oldBuildId, oldUnitId,
oldHomeId, transferChangeRecord.getType(), transferChangeRecord.getTypeName(), key, -1, pids); oldHomeId, "out", "迁出", key, -1, pids);
icUserChangeDetailedDao.insert(changeDetail); icUserChangeDetailedDao.insert(changeDetail);
} }
} }
@ -1600,7 +1600,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
if ("1".equals(newValue)) { if ("1".equals(newValue)) {
IcUserChangeDetailedEntity changeDetail = fillChangeDetail(loginUserCustomerId, resiId, transferChangeRecord.getId(), newAgencyId, IcUserChangeDetailedEntity changeDetail = fillChangeDetail(loginUserCustomerId, resiId, transferChangeRecord.getId(), newAgencyId,
newGridId, newvillageId, newBuildId, newUnitId, newGridId, newvillageId, newBuildId, newUnitId,
newHomeId, transferChangeRecord.getType(), transferChangeRecord.getTypeName(), key, 1, pids); newHomeId, "in", "迁入", key, 1, pids);
icUserChangeDetailedDao.insert(changeDetail); icUserChangeDetailedDao.insert(changeDetail);
} }
} }

10
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java

@ -134,6 +134,14 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl<IcUserChangeR
} else { } else {
resultDto.setGridName(StrConstant.EPMETY_STR); resultDto.setGridName(StrConstant.EPMETY_STR);
} }
//类别变动添加 新增/减少后缀
if ("category".equals(resultDto.getType())){
String tempSuffix = "减少";
if (resultDto.getValue().equals(NumConstant.ONE)){
tempSuffix = "增加";
}
resultDto.setTypeName(resultDto.getTypeName().concat(tempSuffix));
}
}); });
} }
return new PageData<>(list, pageInfo.getTotal()); return new PageData<>(list, pageInfo.getTotal());
@ -265,4 +273,4 @@ public class IcUserChangeRecordServiceImpl extends BaseServiceImpl<IcUserChangeR
icUserChangeDetailedService.insertBatch(detailedList); icUserChangeDetailedService.insertBatch(detailedList);
} }
} }

Loading…
Cancel
Save