Browse Source

Merge remote-tracking branch 'origin_elink/dev_tmdata'

# Conflicts:
#	epmet-gateway/src/main/resources/bootstrap.yml
dev
yinzuomei 3 years ago
parent
commit
258252b8a8
  1. 16
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/processor/MaskProcessor.java
  2. 2
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/CoverageController.java
  3. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java
  4. 1
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java
  5. 24
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java
  6. 13
      epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml
  7. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  8. 1
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java
  9. 5
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/TopArticleFormDTO.java
  10. 2
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java
  11. 2
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java
  12. 20
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
  13. 3
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberDTO.java
  14. 6
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java
  15. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java

16
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/processor/MaskProcessor.java

@ -15,7 +15,6 @@ import java.lang.reflect.Field;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.regex.Pattern;
/** /**
* desc:脱敏处理器 * desc:脱敏处理器
@ -83,6 +82,9 @@ public class MaskProcessor {
String maskResult = maskString((String) value, fieldsMaskType.get(index)); String maskResult = maskString((String) value, fieldsMaskType.get(index));
entry.setValue(maskResult); entry.setValue(maskResult);
} }
} else if (value instanceof List) {
// 列表
((List)value).forEach(e -> mask(e));
} }
} }
} }
@ -155,10 +157,12 @@ public class MaskProcessor {
// 2个字以上的,首位字母明文,中间* // 2个字以上的,首位字母明文,中间*
// 中文不能用\\w,要用[\u4e00-\u9fa5] // 中文不能用\\w,要用[\u4e00-\u9fa5]
if (length == 2) { if (length == 2) {
return originString.replaceAll("^([\\u4e00-\\u9fa5]).*$", "$1*"); // return originString.replaceAll("^([\\u4e00-\\u9fa5]).*$", "$1*");
return originString.substring(0).concat("*");
} else { } else {
String maskStr = StrUtil.repeat("*", length - 2); String maskStr = StrUtil.repeat("*", length - 2);
return originString.replaceAll("^([\\u4e00-\\u9fa5]).*([\\u4e00-\\u9fa5])$", "$1" + maskStr + "$2"); // return originString.replaceAll("^([\\u4e00-\\u9fa5]).*([\\u4e00-\\u9fa5])$", "$1" + maskStr + "$2");
return originString.charAt(0) + maskStr + originString.charAt(originString.length() - 1);
} }
} }
@ -168,7 +172,7 @@ public class MaskProcessor {
* @param originString * @param originString
* @return * @return
*/ */
private String maskIdCard(String originString) { public static String maskIdCard(String originString) {
IdCardRegexUtils regexUtil = IdCardRegexUtils.parse(originString); IdCardRegexUtils regexUtil = IdCardRegexUtils.parse(originString);
if (regexUtil == null) { if (regexUtil == null) {
@ -216,7 +220,9 @@ public class MaskProcessor {
public static void main(String[] args) { public static void main(String[] args) {
String[] idc = {"idCard"}; String[] idc = {"idCard"};
String[] idct = {MaskResponse.MASK_TYPE_ID_CARD}; String[] idct = {MaskResponse.MASK_TYPE_ID_CARD};
String r = new MaskProcessor(idc, idct).maskString("333333333333333333", MaskResponse.MASK_TYPE_ID_CARD); String r = new MaskProcessor(idc, idct).maskString("王五(372284152412022222)", MaskResponse.MASK_TYPE_ID_CARD);
System.out.println(r); System.out.println(r);
String s = MaskProcessor.maskIdCard("372284152412022222");
System.out.println(s);
} }
} }

2
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/CoverageController.java

@ -1,6 +1,7 @@
package com.epmet.dataaggre.controller; package com.epmet.dataaggre.controller;
import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.annotation.MaskResponse;
import com.epmet.commons.tools.dto.result.ZhzlCategorySelectDTO; import com.epmet.commons.tools.dto.result.ZhzlCategorySelectDTO;
import com.epmet.commons.tools.enums.ZhzlResiCategoryEnum; import com.epmet.commons.tools.enums.ZhzlResiCategoryEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
@ -74,6 +75,7 @@ public class CoverageController {
* @author zxc * @author zxc
* @date 2022/7/26 16:29 * @date 2022/7/26 16:29
*/ */
@MaskResponse(fieldNames = {"mobile","idCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE,MaskResponse.MASK_TYPE_ID_CARD})
@PostMapping("search") @PostMapping("search")
public Result<CoverageHomeSearchResultDTO> coverageHomeSearch(@RequestBody CoverageHomeSearchFormDTO formDTO, @LoginUser TokenDto tokenDto){ public Result<CoverageHomeSearchResultDTO> coverageHomeSearch(@RequestBody CoverageHomeSearchFormDTO formDTO, @LoginUser TokenDto tokenDto){
formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setCustomerId(tokenDto.getCustomerId());

7
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java

@ -9,6 +9,7 @@ import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.processor.MaskProcessor;
import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
@ -670,7 +671,7 @@ public class CoverageServiceImpl implements CoverageService {
return new CoverageAnalisisDataListResultDTO( return new CoverageAnalisisDataListResultDTO(
re.getId(), categoryKey, isPage ? categoryDict.getCategoryName() : null, placeType, re.getId(), categoryKey, isPage ? categoryDict.getCategoryName() : null, placeType,
re.getName().concat(StrConstant.BRACKET_LEFT).concat(re.getIdCard()).concat(StrConstant.BRACKET_RIGNT), re.getName().concat(StrConstant.BRACKET_LEFT).concat(MaskProcessor.maskIdCard(re.getIdCard())).concat(StrConstant.BRACKET_RIGNT),
coordinates[1], coordinates[0]); coordinates[1], coordinates[0]);
}).collect(Collectors.toList()); }).collect(Collectors.toList());
@ -684,7 +685,7 @@ public class CoverageServiceImpl implements CoverageService {
return new CoverageAnalisisDataListResultDTO( return new CoverageAnalisisDataListResultDTO(
re.getId(), categoryKey, isPage ? categoryDict.getCategoryName() : null, placeType, re.getId(), categoryKey, isPage ? categoryDict.getCategoryName() : null, placeType,
re.getName().concat(StrConstant.BRACKET_LEFT).concat(re.getIdNum()).concat(StrConstant.BRACKET_RIGNT), re.getName().concat(StrConstant.BRACKET_LEFT).concat(MaskProcessor.maskIdCard(re.getIdNum())).concat(StrConstant.BRACKET_RIGNT),
coordinates[1], coordinates[0]); coordinates[1], coordinates[0]);
}).collect(Collectors.toList()); }).collect(Collectors.toList());
@ -1276,4 +1277,4 @@ public class CoverageServiceImpl implements CoverageService {
} }
return resultList; return resultList;
} }
} }

1
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java

@ -106,6 +106,7 @@ public class GovMenuController {
/** /**
* 导航 * 导航
* +数字社区-系统管理-角色管理配置角色权限也会调用此接口
* @param tokenDto token * @param tokenDto token
* @return List<GovMenuDTO> * @return List<GovMenuDTO>
*/ */

24
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java

@ -234,13 +234,22 @@ public class GovMenuServiceImpl extends BaseServiceImpl<GovMenuDao, GovMenuEntit
// PC端 每个客户的菜单信息,不放入缓存,每次登陆重新查询。 // PC端 每个客户的菜单信息,不放入缓存,每次登陆重新查询。
// 或者 你可以选择,在给每个客户 配置可见菜单的时候, 在saveCustomerMenu方法中,增加更新缓存的逻辑 // 或者 你可以选择,在给每个客户 配置可见菜单的时候, 在saveCustomerMenu方法中,增加更新缓存的逻辑
tableName = getTableName(tableName); tableName = getTableName(tableName);
return getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value(),tableName,tokenDto.getUserId()); // 来自于烟台的需求,需要添加按钮,所以不限制type
// return getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value(),tableName,tokenDto.getUserId());
return getCustomerMenuList(tokenDto.getCustomerId(),null,tableName,tokenDto.getUserId());
} }
@Override @Override
public List<GovMenuDTO> navDigitalCommunity(TokenDto tokenDto, String tableName) { public List<GovMenuDTO> navDigitalCommunity(TokenDto tokenDto, String tableName) {
tableName = getTableName(tableName); tableName = getTableName(tableName);
List<GovMenuEntity> menuList = baseDao.getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value(), HttpContextUtils.getLanguage(),tableName); List<GovMenuEntity> menuList=new ArrayList<>();
if("gov_menu".equals(tableName)){
// 管理平台菜单返回所有的
menuList = baseDao.getCustomerMenuList(tokenDto.getCustomerId(),null, HttpContextUtils.getLanguage(),tableName);
}else{
//数据分析还是沿用原来的
menuList = baseDao.getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value(), HttpContextUtils.getLanguage(),tableName);
}
Result<Boolean> isRootManager = epmetUserOpenFeignClient.getIsRootManager(tokenDto.getUserId()); Result<Boolean> isRootManager = epmetUserOpenFeignClient.getIsRootManager(tokenDto.getUserId());
if (!isRootManager.success()){ if (!isRootManager.success()){
throw new EpmetException("getIsRootManager method is failure"); throw new EpmetException("getIsRootManager method is failure");
@ -249,6 +258,11 @@ public class GovMenuServiceImpl extends BaseServiceImpl<GovMenuDao, GovMenuEntit
List<GovMenuDTO> govMenuDTOS = ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class); List<GovMenuDTO> govMenuDTOS = ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class);
return TreeUtils.buildTree(govMenuDTOS); return TreeUtils.buildTree(govMenuDTOS);
} }
/*for(GovMenuEntity m:menuList){
if("ic_resi_add".equals(m.getPermissions())){
logger.info("1、菜单返回了新增居民");
}
}*/
disposeGovMenu(menuList,tokenDto.getUserId()); disposeGovMenu(menuList,tokenDto.getUserId());
Map<Boolean, List<GovMenuEntity>> groupByStatus = menuList.stream().collect(Collectors.groupingBy(GovMenuEntity::getRoleStatus)); Map<Boolean, List<GovMenuEntity>> groupByStatus = menuList.stream().collect(Collectors.groupingBy(GovMenuEntity::getRoleStatus));
List<GovMenuDTO> dtoList = ConvertUtils.sourceToTarget(CollectionUtils.isEmpty(groupByStatus.get(true)) ? new ArrayList<>() : groupByStatus.get(true), GovMenuDTO.class); List<GovMenuDTO> dtoList = ConvertUtils.sourceToTarget(CollectionUtils.isEmpty(groupByStatus.get(true)) ? new ArrayList<>() : groupByStatus.get(true), GovMenuDTO.class);
@ -284,11 +298,17 @@ public class GovMenuServiceImpl extends BaseServiceImpl<GovMenuDao, GovMenuEntit
menuList = new ArrayList<>(); menuList = new ArrayList<>();
return; return;
} }
// logger.info("==roleIdList="+ JSON.toJSONString(roleIdList));
List<String> menuIdsList = govRoleMenuDao.getMenuIdsList(roleIdList); List<String> menuIdsList = govRoleMenuDao.getMenuIdsList(roleIdList);
if (CollectionUtils.isEmpty(menuIdsList)){ if (CollectionUtils.isEmpty(menuIdsList)){
menuList = new ArrayList<>(); menuList = new ArrayList<>();
return; return;
} }
/*for(String mid:menuIdsList){
if("1581827798717898754".equals(mid)){
logger.info("2、角色也有此菜单");
}
}*/
for (String id : menuIdsList) { for (String id : menuIdsList) {
for (GovMenuEntity m : menuList) { for (GovMenuEntity m : menuList) {
if (m.getId().equals(id)){ if (m.getId().equals(id)){

13
epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml

@ -47,9 +47,16 @@
select t1.*, select t1.*,
lang.field_value name lang.field_value name
from gov_menu t1 from gov_menu t1
INNER join gov_language lang on lang.table_name=#{tableName} and lang.field_name='name' and lang.table_id=t1.id and lang.language=#{language} INNER join gov_language lang
RIGHT JOIN gov_customer_menu m ON t1.id = m.TABLE_ID on (lang.table_name=#{tableName}
where t1.del_flag = 0 AND m.del_flag = 0 and lang.field_name='name'
and lang.table_id=t1.id
and lang.language=#{language}
)
RIGHT JOIN gov_customer_menu m
ON t1.id = m.TABLE_ID
where t1.del_flag = 0
AND m.del_flag = 0
<if test="type != null"> <if test="type != null">
and t1.type = #{type} and t1.type = #{type}
</if> </if>

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java

@ -180,7 +180,9 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
try { try {
entity.setHouseQrcodeUrl(createHouseQrcodeUrl(icHouseDTO.getId(),null)); entity.setHouseQrcodeUrl(createHouseQrcodeUrl(icHouseDTO.getId(),null));
} catch (Exception e) { } catch (Exception e) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"二维码生成失败","二维码生成失败"); String errorMsg = ExceptionUtils.getErrorStackTrace(e);
log.error("二维码生成失败:"+errorMsg);
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"二维码生成失败:","二维码生成失败");
} }
icHouseDao.updateById(entity); icHouseDao.updateById(entity);
} }

1
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java

@ -5,6 +5,7 @@ import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.annotation.MaskResponse;
import com.epmet.commons.tools.annotation.RequirePermission; import com.epmet.commons.tools.annotation.RequirePermission;
import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;

5
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/TopArticleFormDTO.java

@ -22,5 +22,10 @@ public class TopArticleFormDTO {
*/ */
@NotBlank(message = "type不能为空,置顶:top,取消置顶:cancel_top") @NotBlank(message = "type不能为空,置顶:top,取消置顶:cancel_top")
private String type; private String type;
/**
* 封面图片
*/
private String imgUrl;
} }

2
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java

@ -432,7 +432,7 @@ public class ArticleController {
@PostMapping("topArticle") @PostMapping("topArticle")
public Result topArticle(@RequestBody TopArticleFormDTO formDTO){ public Result topArticle(@RequestBody TopArticleFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO); ValidatorUtils.validateEntity(formDTO);
articleService.topArticle(formDTO.getArticleId(),formDTO.getType()); articleService.topArticle(formDTO.getArticleId(),formDTO.getType(),formDTO.getImgUrl());
return new Result(); return new Result();
} }
/** /**

2
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java

@ -256,5 +256,5 @@ public interface ArticleService extends BaseService<ArticleEntity> {
PublishedListResultDTO detailV2(ArticleListFormDTO formDTO); PublishedListResultDTO detailV2(ArticleListFormDTO formDTO);
void topArticle(String articleId, String type); void topArticle(String articleId, String type,String imgUrl);
} }

20
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

@ -878,7 +878,10 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
//1.查询文章详情信息 //1.查询文章详情信息
ArticleDetailResultDTO articleInfo = baseDao.selectArticleDetail(articleDetailFormDTO.getGridId(), articleDetailFormDTO.getArticleId()); ArticleDetailResultDTO articleInfo = baseDao.selectArticleDetail(articleDetailFormDTO.getGridId(), articleDetailFormDTO.getArticleId());
if (null == articleInfo) { if (null == articleInfo) {
throw new RenException(String.format(ModuleConstant.SPECIFIED_ARTICLE_NOT_FOUND_EXCEPTION_TEMPLATE, articleDetailFormDTO.getArticleId(), articleDetailFormDTO.getGridId())); throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),
String.format(ModuleConstant.SPECIFIED_ARTICLE_NOT_FOUND_EXCEPTION_TEMPLATE, articleDetailFormDTO.getArticleId(), articleDetailFormDTO.getGridId()),
"文章已下线");
// throw new RenException(String.format(ModuleConstant.SPECIFIED_ARTICLE_NOT_FOUND_EXCEPTION_TEMPLATE, articleDetailFormDTO.getArticleId(), articleDetailFormDTO.getGridId()));
} }
//2.判断当前用户当前文章当前网格是否存在访问记录 //2.判断当前用户当前文章当前网格是否存在访问记录
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
@ -1777,7 +1780,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
} }
@Override @Override
public void topArticle(String articleId, String type) { public void topArticle(String articleId, String type,String imgUrl) {
ArticleEntity articleEntity = baseDao.selectById(articleId); ArticleEntity articleEntity = baseDao.selectById(articleId);
if (null != articleEntity) { if (null != articleEntity) {
/** /**
@ -1786,6 +1789,19 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
*/ */
if ("top".equals(type)) { if ("top".equals(type)) {
articleEntity.setIsTop(NumConstant.ONE); articleEntity.setIsTop(NumConstant.ONE);
if(StringUtils.isNotBlank(imgUrl)){
//如果没有封面图片的话,更新
LambdaQueryWrapper<ArticleCoverEntity> queryWrapper=new LambdaQueryWrapper();
queryWrapper.eq(ArticleCoverEntity::getArticleId,articleEntity);
if (articleCoverDao.selectCount(queryWrapper) == 0) {
ArticleCoverEntity articleCoverEntity=new ArticleCoverEntity();
articleCoverEntity.setCustomerId(articleEntity.getCustomerId());
articleCoverEntity.setArticleId(articleId);
articleCoverEntity.setImgUrl(imgUrl);
articleCoverEntity.setAuditStatus("pass");
articleCoverDao.insert(articleCoverEntity);
}
}
} else if ("cancel_top".equals(type)) { } else if ("cancel_top".equals(type)) {
articleEntity.setIsTop(NumConstant.ZERO); articleEntity.setIsTop(NumConstant.ZERO);
} }

3
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberDTO.java

@ -63,7 +63,8 @@ public class IcPartyMemberDTO implements Serializable {
*/ */
@NotBlank(message = "当前网格id不能为空",groups ={AddGroup.class, UpdateGroup.class}) @NotBlank(message = "当前网格id不能为空",groups ={AddGroup.class, UpdateGroup.class})
private String mobile; private String mobile;
private String showMobile;
private String showIdCard;
/** /**
* 身份证号 * 身份证号
*/ */

6
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java

@ -30,7 +30,6 @@ import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.constants.ImportTaskConstants; import com.epmet.constants.ImportTaskConstants;
import com.epmet.dto.form.IcPartyMemberFormDTO; import com.epmet.dto.form.IcPartyMemberFormDTO;
import com.epmet.dto.form.IcPartyMemberListFormDTO; import com.epmet.dto.form.IcPartyMemberListFormDTO;
import com.epmet.dto.form.ReadIcMessageFormDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO; import com.epmet.dto.result.ImportTaskCommonResultDTO;
import com.epmet.dto.result.PartyMemberAgeResultDTO; import com.epmet.dto.result.PartyMemberAgeResultDTO;
import com.epmet.dto.result.PartyMemberEducationResultDTO; import com.epmet.dto.result.PartyMemberEducationResultDTO;
@ -90,9 +89,14 @@ public class IcPartyMemberController implements ResultDataResolver {
return new Result<PageData<IcPartyMemberResultDTO>>().ok(page); return new Result<PageData<IcPartyMemberResultDTO>>().ok(page);
} }
@MaskResponse(fieldNames = { "showMobile", "showIdCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD })
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<IcPartyMemberDTO> get(@LoginUser TokenDto tokenDto, @PathVariable("id") String id){ public Result<IcPartyMemberDTO> get(@LoginUser TokenDto tokenDto, @PathVariable("id") String id){
IcPartyMemberDTO data = icPartyMemberService.get(tokenDto, id); IcPartyMemberDTO data = icPartyMemberService.get(tokenDto, id);
if(null!=data){
data.setShowMobile(data.getMobile());
data.setShowIdCard(data.getIdCard());
}
return new Result<IcPartyMemberDTO>().ok(data); return new Result<IcPartyMemberDTO>().ok(data);
} }
@NoRepeatSubmit @NoRepeatSubmit

9
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java

@ -421,6 +421,7 @@ public class IcResiUserController implements ResultDataResolver {
* @author yinzuomei * @author yinzuomei
* @date 2021/10/28 10:29 上午 * @date 2021/10/28 10:29 上午
*/ */
@MaskResponse(fieldNames = {"MOBILE","ID_CARD"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD})
@PostMapping("detail") @PostMapping("detail")
public Result queryIcResiDetail(@LoginUser TokenDto tokenDto, @RequestBody IcResiDetailFormDTO pageFormDTO) { public Result queryIcResiDetail(@LoginUser TokenDto tokenDto, @RequestBody IcResiDetailFormDTO pageFormDTO) {
//pageFormDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); //pageFormDTO.setCustomerId("45687aa479955f9d06204d415238f7cc");
@ -754,6 +755,7 @@ public class IcResiUserController implements ResultDataResolver {
* @author zxc * @author zxc
* @date 2021/11/3 9:21 上午 * @date 2021/11/3 9:21 上午
*/ */
@MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE})
@PostMapping("persondata") @PostMapping("persondata")
public Result<PersonDataResultDTO> personData(@LoginUser TokenDto tokenDto, @RequestBody PersonDataFormDTO formDTO) { public Result<PersonDataResultDTO> personData(@LoginUser TokenDto tokenDto, @RequestBody PersonDataFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setCustomerId(tokenDto.getCustomerId());
@ -783,6 +785,7 @@ public class IcResiUserController implements ResultDataResolver {
* @param tokenDto * @param tokenDto
* @return 根据分类搜索 * @return 根据分类搜索
*/ */
@MaskResponse(fieldNames = {"mobile","idCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD})
@PostMapping("searchbycategory") @PostMapping("searchbycategory")
public Result<PageData<SearchByNameResultDTO>> search(@RequestBody SearchByNameFormDTO formDTO, @LoginUser TokenDto tokenDto) { public Result<PageData<SearchByNameResultDTO>> search(@RequestBody SearchByNameFormDTO formDTO, @LoginUser TokenDto tokenDto) {
formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setCustomerId(tokenDto.getCustomerId());
@ -895,7 +898,7 @@ public class IcResiUserController implements ResultDataResolver {
* @Date 2021/12/10 17:54 * @Date 2021/12/10 17:54
*/ */
@PostMapping("partymemberagelist") @PostMapping("partymemberagelist")
@MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE}) @MaskResponse(fieldNames = {"name","mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_CHINESE_NAME,MaskResponse.MASK_TYPE_MOBILE})
public Result<PageData<PartyMemberAgeResultDTO>> partyMemberAgelist(@RequestBody PartyMemberListFormDTO formDTO) { public Result<PageData<PartyMemberAgeResultDTO>> partyMemberAgelist(@RequestBody PartyMemberListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO); ValidatorUtils.validateEntity(formDTO);
return new Result<PageData<PartyMemberAgeResultDTO>>().ok(icResiUserService.getPartyMemberAgeList(formDTO)); return new Result<PageData<PartyMemberAgeResultDTO>>().ok(icResiUserService.getPartyMemberAgeList(formDTO));
@ -974,7 +977,7 @@ public class IcResiUserController implements ResultDataResolver {
* @Date 2021/12/10 17:58 * @Date 2021/12/10 17:58
*/ */
@PostMapping("partymembereducationlist") @PostMapping("partymembereducationlist")
@MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE}) @MaskResponse(fieldNames = {"name","mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_CHINESE_NAME,MaskResponse.MASK_TYPE_MOBILE})
public Result<PageData<PartyMemberEducationResultDTO>> partyMemberEducationlist(@RequestBody PartyMemberListFormDTO formDTO) { public Result<PageData<PartyMemberEducationResultDTO>> partyMemberEducationlist(@RequestBody PartyMemberListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO); ValidatorUtils.validateEntity(formDTO);
return new Result<PageData<PartyMemberEducationResultDTO>>().ok(icResiUserService.getPartyMemberEducationList(formDTO)); return new Result<PageData<PartyMemberEducationResultDTO>>().ok(icResiUserService.getPartyMemberEducationList(formDTO));
@ -1042,6 +1045,7 @@ public class IcResiUserController implements ResultDataResolver {
* @param resiUserId * @param resiUserId
* @return * @return
*/ */
@MaskResponse(fieldNames = {"mobile","idCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE,MaskResponse.MASK_TYPE_ID_CARD})
@PostMapping("resi-brief/{resi-user-id}") @PostMapping("resi-brief/{resi-user-id}")
public Result<IcResiUserBriefDTO> getResiBrief(@PathVariable("resi-user-id") String resiUserId, @LoginUser TokenDto loginUser) { public Result<IcResiUserBriefDTO> getResiBrief(@PathVariable("resi-user-id") String resiUserId, @LoginUser TokenDto loginUser) {
String customerId = loginUser.getCustomerId(); String customerId = loginUser.getCustomerId();
@ -1416,6 +1420,7 @@ public class IcResiUserController implements ResultDataResolver {
* @Author sun * @Author sun
* @Description 人房概览居民统计数点击查询列表 * @Description 人房概览居民统计数点击查询列表
**/ **/
@MaskResponse(fieldNames = {"mobile", "idCard"},fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD})
@PostMapping("icuserstatislist") @PostMapping("icuserstatislist")
public Result<PageData<SearchByNameResultDTO>> icUserStatisList(@LoginUser TokenDto tokenDto, @RequestBody UserChartFormDTO formDTO) { public Result<PageData<SearchByNameResultDTO>> icUserStatisList(@LoginUser TokenDto tokenDto, @RequestBody UserChartFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setCustomerId(tokenDto.getCustomerId());

Loading…
Cancel
Save