Browse Source

Merge remote-tracking branch 'remotes/origin/dev_personal_center' into dev_temp

# Conflicts:
#	epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
#	epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
#	epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
#	epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
#	epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
#	epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
#	epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java
#	epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java
master
jianjun 5 years ago
parent
commit
bca15b94a5
  1. 6
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  2. 41
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java
  3. 1
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java
  4. 7
      epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml
  5. 34
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
  6. 33
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyElementTreeResultDTO.java
  7. 35
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
  8. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  9. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
  10. 27
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  11. 8
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  12. 29
      epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/BadgeListFormDTO.java
  13. 10
      epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/MyAdviceListFormDTO.java
  14. 21
      epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/OperListFormDTO.java
  15. 13
      epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/SubmitAdviceFormDTO.java
  16. 32
      epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/result/BadgeListResultDTO.java
  17. 39
      epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/result/InitInfoResultDTO.java
  18. 51
      epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/result/OperListResultDTO.java
  19. 53
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/advice/controller/AdviceController.java
  20. 11
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/advice/service/AdviceService.java
  21. 41
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/advice/service/impl/AdviceServiceImpl.java
  22. 84
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/badege/controller/BadgeController.java
  23. 53
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/badege/service/BadgeService.java
  24. 109
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/badege/service/impl/BadgeServiceImpl.java
  25. 55
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/controller/PersonalCenterController.java
  26. 17
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/PersonalCenterService.java
  27. 51
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java
  28. 45
      epmet-user/epmet-user-client/src/main/java/com/epmet/constant/BadgeConstant.java
  29. 86
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/BadgeCertificationConfigDTO.java
  30. 96
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/BadgeDTO.java
  31. 101
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ResiUserBadgeDTO.java
  32. 156
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserAdviceDTO.java
  33. 86
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserAdviceImgDTO.java
  34. 45
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserBadgeCertificateRecordDTO.java
  35. 42
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddBadgeFormDTO.java
  36. 56
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AdviceListFormDTO.java
  37. 24
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AuthFieldFormDTO.java
  38. 20
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BadgeAuditFormDTO.java
  39. 28
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BadgeFormDTO.java
  40. 22
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BadgeSendCodeFormDTO.java
  41. 67
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CertificationAddFormDTO.java
  42. 29
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CertificationDetailFormDTO.java
  43. 40
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditBadgeFormDTO.java
  44. 52
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java
  45. 26
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/OpenedOrClosedFormDTO.java
  46. 33
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/OperAdviceListFormDTO.java
  47. 27
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ReplyAdviceFormDTO.java
  48. 33
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserBadgeListFormDTO.java
  49. 48
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserBadgeUnitFormDTO.java
  50. 28
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserOperListFormDTO.java
  51. 99
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/AdviceDetailResultDTO.java
  52. 40
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/AuthFieldResultDTO.java
  53. 43
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeAuditRecordResultDTO.java
  54. 43
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeAuditingResultDTO.java
  55. 26
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeDetailResultDTO.java
  56. 31
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeListResultDTO.java
  57. 65
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CertificationDetailResultDTO.java
  58. 44
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/OperAdviceListResultDTO.java
  59. 49
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBadgeListResultDTO.java
  60. 67
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserOperListResultDTO.java
  61. 46
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java
  62. 25
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java
  63. 23
      epmet-user/epmet-user-server/src/main/java/com/epmet/constant/BadgeMessageConstant.java
  64. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserAdviceConstant.java
  65. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserRedisKeys.java
  66. 153
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java
  67. 124
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserAdviceController.java
  68. 94
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserAdviceImgController.java
  69. 115
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserBadgeController.java
  70. 18
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java
  71. 54
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/BadgeCertificationConfigDao.java
  72. 162
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/BadgeDao.java
  73. 33
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/ResiUserBadgeDao.java
  74. 37
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserAdviceDao.java
  75. 33
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserAdviceImgDao.java
  76. 33
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBadgeCertificateRecordDao.java
  77. 104
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBadgeDao.java
  78. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java
  79. 56
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/BadgeCertificationConfigEntity.java
  80. 66
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/BadgeEntity.java
  81. 71
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/ResiUserBadgeEntity.java
  82. 126
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserAdviceEntity.java
  83. 56
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserAdviceImgEntity.java
  84. 116
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserBadgeCertificateRecordEntity.java
  85. 107
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/UserAdviceExcel.java
  86. 65
      epmet-user/epmet-user-server/src/main/java/com/epmet/excel/UserAdviceImgExcel.java
  87. 14
      epmet-user/epmet-user-server/src/main/java/com/epmet/feign/MessageFeignClient.java
  88. 14
      epmet-user/epmet-user-server/src/main/java/com/epmet/feign/fallback/MessageFeignClientFallback.java
  89. 47
      epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserAdviceImgRedis.java
  90. 47
      epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserAdviceRedis.java
  91. 150
      epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBadgeRedis.java
  92. 127
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/BadgeCertificationConfigService.java
  93. 185
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/BadgeService.java
  94. 95
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/ResiUserBadgeService.java
  95. 104
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserAdviceImgService.java
  96. 126
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserAdviceService.java
  97. 95
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBadgeCertificateRecordService.java
  98. 84
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBadgeService.java
  99. 14
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java
  100. 149
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/BadgeCertificationConfigServiceImpl.java

6
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java

@ -95,6 +95,10 @@ public enum EpmetErrorCode {
SIGN_IN_TIME_NO(8513, "签到时间还未到~"),
SIGN_IN_TIME_END(8514, "签到时间已结束~"),
//徽章管理
DUPLICATE_BADGE_NAME(8515, "徽章名已存在"),
DUPLICATE_PARTY_BADGE_NAME(8516, "不可删除党员徽章"),
// 该错误不会提示给前端,只是后端传输错误信息用。
ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"),
OPER_ADD_CUSTOMER_ROOT_AGENCY_ERROR(8702, "添加客户根级组织失败"),
@ -110,6 +114,8 @@ public enum EpmetErrorCode {
OPER_CUSTOMER_FOOTBAR_EXISTS(8712, "footbar已存在"),
OPER_CUSTOMER_FOOTBAR_NOT_FOUND(8713, "footbar不存在"),
OPER_EXT_APP_SECRET_RESET_FAIL(8714, "秘钥更新失败"),
OPER_UPLOAD_IMG_TYPE_ERROR(8715, "请上传PNG格式的图片"),
OPER_UPLOAD_IMG_SIZE_ERROR(8716, "请上传200*200的图片"),
// 党建声音 前端提示 88段
DRAFT_CONTENT_IS_NULL(8801, "至少需要添加一个段落"),

41
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java

@ -9,16 +9,23 @@
package com.epmet.commons.tools.redis;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.utils.ConvertUtils;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.*;
import org.springframework.data.redis.support.atomic.RedisAtomicLong;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
* Redis工具类
@ -171,10 +178,40 @@ public class RedisUtils {
}
}
public Object lindex(String key,Long index){
return redisTemplate.opsForList().index(key,index);
public Object lindex(String key,Long index){ return redisTemplate.opsForList().index(key,index);
}
public <T> List<T> lrange(String key,long start,long end,Class<T> clazz){
List<Object> content = redisTemplate.opsForList().range(key,start,end);
if(CollectionUtils.isEmpty(content)) return null;
return content.stream().map( o -> {
try {
T target = clazz.newInstance();
BeanUtils.copyProperties(o, target);
return target;
}catch (Exception e){throw new RenException("convert error");}
}).collect(Collectors.toList());
}
/**
* @Description Redis lrem :
* 根据参数 count 的值移除列表中与参数 value 相等的元素
* COUNT 的值可以是以下几种
* count > 0 : 从表头开始向表尾搜索移除与 value 相等的元素数量为 count
* count < 0 : 从表尾开始向表头搜索移除与 value 相等的元素数量为 count 的绝对值
* count = 0 : 移除表中所有与 value 相等的值
* 返回值 :
* 被移除元素的数量
* 列表不存在时返回 0
* @param key
* @param count
* @param o 这里的Object需要重写equals(FIXME 注意序列化)
* @return long
* @author wangc
* @date 2020.11.05 10:22
*/
public long lrem(String key,long count,Object o){ return redisTemplate.opsForList().remove(key,count,o);}
public Object rightPop(String key) {
return redisTemplate.opsForList().rightPop(key);
}

1
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/fact/FactIndexController.java

@ -63,6 +63,7 @@ public class FactIndexController {
* @Description 按月查询各项指标数据
* @author sun
*/
@PostMapping("index/ablitylist")
public Result<List<AblityListResultDTO>> ablityList(@RequestBody AblityListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, AblityListFormDTO.AddUserInternalGroup.class);

7
epmet-module/data-statistical/data-statistical-server/src/main/resources/logback-spring.xml

@ -173,6 +173,13 @@
<appender-ref ref="WARN_FILE"/>
<appender-ref ref="ERROR_FILE"/>
</root>
<!-- 屏蔽logger -->
<logger name="org.springframework" level="INFO"/>
<logger name="org.apache" level="WARN"/>
<logger name="org.mybatis.spring" level="WARN"/>
<logger name="io.netty" level="WARN"/>
<logger name="org.redisson.connection" level="WARN"/>
<logger name="org.hibernate.validator" level="WARN"/>
</springProfile>
</configuration>

34
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java

@ -10,6 +10,7 @@ package com.epmet.controller;
import com.epmet.cloud.CloudStorageConfig;
import com.epmet.cloud.OssFactory;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
@ -42,6 +43,9 @@ import springfox.documentation.annotations.ApiIgnore;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.Arrays;
import java.util.Map;
@ -223,6 +227,36 @@ public class OssController {
return ossService.uploadImg(file);
}
@PostMapping("uploadimg/badgeicon")
public Result<UploadImgResultDTO> badgeIcon(@RequestParam("file") MultipartFile file) throws IOException {
// 校验文件类型
if (!MediaType.IMAGE_PNG_VALUE.equals(file.getContentType())) {
log.error("uploadArticleImg file type:{} is not support 2 upload", file.getContentType());
throw new RenException(EpmetErrorCode.OPER_UPLOAD_IMG_TYPE_ERROR.getCode()
, EpmetErrorCode.OPER_UPLOAD_IMG_TYPE_ERROR.getMsg());
}
// 校验文件体积,不超过2m
long maxSize = 2 * 1024 * 1024;
long size = file.getSize();
if (size > maxSize) {
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode()
, EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg());
}
BufferedImage bufferedImage = ImageIO.read(file.getInputStream());
int width = bufferedImage.getWidth();
int height = bufferedImage.getHeight();
if (width != 200 || height != 200) {
throw new RenException(EpmetErrorCode.OPER_UPLOAD_IMG_SIZE_ERROR.getCode()
, EpmetErrorCode.OPER_UPLOAD_IMG_SIZE_ERROR.getMsg());
}
return ossService.uploadImg(file);
}
/**
* @param byteFile fileName
* @Description 外挂-文件上传

33
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyElementTreeResultDTO.java

@ -0,0 +1,33 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
import java.util.Set;
/**
* @description:
* @author: liushaowen
* @date: 2020/11/6 13:54
*/
@Data
public class AgencyElementTreeResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Set<String> defaultKeys;
private List<Agency> list;
@Data
public static class Agency{
private String id;
private String label;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<AgencyElementTreeResultDTO.Agency> children;
}
}

35
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java

@ -17,7 +17,9 @@
package com.epmet.controller;
import com.baomidou.mybatisplus.extension.api.R;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
@ -32,12 +34,16 @@ import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.excel.CustomerAgencyExcel;
import com.epmet.service.CustomerAgencyService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotBlank;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
@ -260,4 +266,33 @@ public class CustomerAgencyController {
Result<OrganizeTreeResultDTO> organizeTree(@PathVariable("agencyId") String agencyId) {
return new Result<OrganizeTreeResultDTO>().ok(customerAgencyService.organizeTree(agencyId));
}
/**
* @Description 对外接口根据customerId返回Element UI中Tree结构的agency列表
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author liushaowen
* @Date 2020/11/6 13:51
*/
@PostMapping("getagencyelementtreelist")
public Result<List<AgencyElementTreeResultDTO.Agency>> getAgencyElementTreeList(String customerId){
if (StringUtils.isBlank(customerId)){
throw new RenException("customerId不能为空");
}
return new Result<List<AgencyElementTreeResultDTO.Agency>>().ok(customerAgencyService.getAgencyElementTree(customerId).getList());
}
/**
* @Description 对外接口根据customerId返回Element UI中Tree结构的agency keys
* @param customerId
* @return com.epmet.commons.tools.utils.Result
* @Author liushaowen
* @Date 2020/11/6 13:51
*/
@PostMapping("getagencyelementtreekeys")
public Result<Set<String>> getAgencyElementTreeKeys(String customerId){
if (StringUtils.isBlank(customerId)){
throw new RenException("customerId不能为空");
}
return new Result<Set<String>>().ok(customerAgencyService.getAgencyElementTree(customerId).getDefaultKeys());
}
}

10
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java

@ -196,4 +196,14 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
* @author sun
**/
List<OrganizeTreeResultDTO> selectAllSub(@Param("agencyId") String agencyId);
/**
* @Description 返回elementTree结构的agency树
* @param customerId
* @param pid
* @return java.util.List<com.epmet.dto.result.AgencyElementTreeResultDTO.Agency>
* @Author liushaowen
* @Date 2020/11/6 14:57
*/
List<AgencyElementTreeResultDTO.Agency> getAgencyElementTree(@Param("customerId") String customerId,@Param("pid") String pid);
}

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java

@ -225,4 +225,13 @@ public interface CustomerAgencyService extends BaseService<CustomerAgencyEntity>
* @author sun
**/
OrganizeTreeResultDTO organizeTree(String agencyId);
/**
* @Description 运营端-返回element ui - tree 结构agency列表
* @param customerId
* @return com.epmet.dto.result.AgencyElementTreeResultDTO
* @Author liushaowen
* @Date 2020/11/6 14:02
*/
AgencyElementTreeResultDTO getAgencyElementTree(String customerId);
}

27
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

@ -1030,4 +1030,31 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
return baseDao.selectorganizeTree(agencyId);
}
/**
* @param customerId
* @return com.epmet.dto.result.AgencyElementTreeResultDTO
* @Description 运营端-返回element ui - tree 结构agency列表
* @Author liushaowen
* @Date 2020/11/6 14:02
*/
@Override
public AgencyElementTreeResultDTO getAgencyElementTree(String customerId) {
List<AgencyElementTreeResultDTO.Agency> agencyList = baseDao.getAgencyElementTree(customerId, "0");
Set<String> defaultKeys = new HashSet<>();
traversalAgencyList(agencyList,0,defaultKeys);
AgencyElementTreeResultDTO dto = new AgencyElementTreeResultDTO();
dto.setList(agencyList);
dto.setDefaultKeys(defaultKeys);
return dto;
}
private void traversalAgencyList(List<AgencyElementTreeResultDTO.Agency> agencyList,int times,Set<String> set){
if (agencyList.size() > 0 && times < 2){
for (AgencyElementTreeResultDTO.Agency list : agencyList) {
set.add(list.getId());
times++;
traversalAgencyList(list.getChildren(),times,set);
}
}
}
}

8
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -373,4 +373,12 @@
</select>
<!-- sql递归 查询组织、组织下部门、组织下网格基本信息及递归查询下级信息 end-->
<resultMap id="elementTreeAgency" type="com.epmet.dto.result.AgencyElementTreeResultDTO$Agency">
<id column="ID" property="id"></id>
<result column="ORGANIZATION_NAME" property="label"></result>
<collection property="children" select="getAgencyElementTree" column="{pid=id,customerId=customer_id}"></collection>
</resultMap>
<select id="getAgencyElementTree" resultMap="elementTreeAgency">
select id,organization_name,customer_id from customer_agency where pid = #{pid} and customer_id = #{customerId}
</select>
</mapper>

29
epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/BadgeListFormDTO.java

@ -0,0 +1,29 @@
package com.epmet.resi.mine.dto.from;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/3 11:07 上午
*/
@Data
public class BadgeListFormDTO implements Serializable {
private static final long serialVersionUID = 9082922684993474574L;
public interface BadgeList{}
/**
* 用户ID
*/
private String userId;
/**
* 客户ID
*/
@NotBlank(message = "客户ID不能为空",groups = {BadgeList.class})
private String customerId;
}

10
epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/MyAdviceListFormDTO.java

@ -0,0 +1,10 @@
package com.epmet.resi.mine.dto.from;
/**
* @description: 我的建议列表DTO
* @author: liushaowen
* @date: 2020/11/5 10:38
*/
public class MyAdviceListFormDTO {
}

21
epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/OperListFormDTO.java

@ -0,0 +1,21 @@
package com.epmet.resi.mine.dto.from;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/3 4:18 下午
*/
@Data
public class OperListFormDTO implements Serializable {
private static final long serialVersionUID = -1872129597916414752L;
public interface OperList{}
@NotBlank(message = "客户ID不能为空",groups = {OperList.class})
private String customerId;
}

13
epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/SubmitAdviceFormDTO.java

@ -0,0 +1,13 @@
package com.epmet.resi.mine.dto.from;
import lombok.Data;
/**
* @description: 提交建议DTO
* @author: liushaowen
* @date: 2020/11/5 10:35
*/
@Data
public class SubmitAdviceFormDTO {
}

32
epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/result/BadgeListResultDTO.java

@ -0,0 +1,32 @@
package com.epmet.resi.mine.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/3 11:08 上午
*/
@Data
public class BadgeListResultDTO implements Serializable {
private static final long serialVersionUID = -6542233940679158922L;
/**
* 徽章ID
*/
private String badgeId;
/**
* 徽章图片地址
*/
private String badgeIcon;
/**
* 徽章是否点亮
*/
private String isOpened;
private String badgeType;
}

39
epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/result/InitInfoResultDTO.java

@ -0,0 +1,39 @@
package com.epmet.resi.mine.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/11/3 9:58
*/
@Data
public class InitInfoResultDTO implements Serializable {
private static final long serialVersionUID = 144944007101324497L;
/**
* 头像
*/
private String headImgUrl;
/**
*
*/
private String surname;
/**
*
*/
private String name;
/**
* 路牌号
*/
private String street;
/**
* 小区名称
*/
private String district;
/**
* 详细地址
*/
private String buildingAddress;
}

51
epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/result/OperListResultDTO.java

@ -0,0 +1,51 @@
package com.epmet.resi.mine.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/3 4:20 下午
*/
@Data
public class OperListResultDTO implements Serializable {
private static final long serialVersionUID = -6185696177370545937L;
/**
* 徽章ID
*/
private String badgeId;
/**
* 徽章名字
*/
private String badgeName;
/**
* 点亮状态 yes已点亮no未点亮
*/
private String isLighted;
/**
* 是否认证 yes 认证 no 已认证
*/
private String isCertificated;
/**
* 徽章图片地址
*/
private String badgeIcon;
/**
* 是否被驳回 true已驳回false未驳回
*/
private Boolean isReject;
/**
* 徽章类型党员徽章partynone
*/
private String badgeType;
}

53
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/advice/controller/AdviceController.java

@ -0,0 +1,53 @@
package com.epmet.modules.advice.controller;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.modules.advice.service.AdviceService;
import com.epmet.resi.mine.dto.from.MyAdviceListFormDTO;
import com.epmet.resi.mine.dto.from.SubmitAdviceFormDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @description: 用户建议controller
* @author: liushaowen
* @date: 2020/11/5 9:34
*/
@RestController
@RequestMapping("advice")
public class AdviceController {
@Autowired
private AdviceService adviceService;
@Autowired
private LoginUserUtil loginUserUtil;
/**
* @Description 提交建议
* @param dto
* @return com.epmet.commons.tools.utils.Result
* @Author liushaowen
* @Date 2020/11/5 10:37
*/
@PostMapping("submitadvice")
public Result submitAdvice(SubmitAdviceFormDTO dto){
ValidatorUtils.validateEntity(dto);
return adviceService.submitAdvice(dto);
}
/**
* @Description 我的建议列表
* @param dto
* @return com.epmet.commons.tools.utils.Result
* @Author liushaowen
* @Date 2020/11/5 13:26
*/
@PostMapping("myadvicelist")
public Result getMyAdviceList(MyAdviceListFormDTO dto){
ValidatorUtils.validateEntity(dto);
return adviceService.getMyAdviceList(dto);
}
}

11
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/advice/service/AdviceService.java

@ -0,0 +1,11 @@
package com.epmet.modules.advice.service;
import com.epmet.commons.tools.utils.Result;
import com.epmet.resi.mine.dto.from.MyAdviceListFormDTO;
import com.epmet.resi.mine.dto.from.SubmitAdviceFormDTO;
public interface AdviceService {
Result submitAdvice(SubmitAdviceFormDTO dto);
Result getMyAdviceList(MyAdviceListFormDTO dto);
}

41
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/advice/service/impl/AdviceServiceImpl.java

@ -0,0 +1,41 @@
package com.epmet.modules.advice.service.impl;
import com.epmet.commons.tools.utils.Result;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.modules.advice.service.AdviceService;
import com.epmet.resi.mine.dto.from.MyAdviceListFormDTO;
import com.epmet.resi.mine.dto.from.SubmitAdviceFormDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @description:
* @author: liushaowen
* @date: 2020/11/5 10:27
*/
@Service
public class AdviceServiceImpl implements AdviceService {
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
/***
* 提交建议
* @param dto
* @return
*/
@Override
public Result submitAdvice(SubmitAdviceFormDTO dto) {
return null;
}
/**
* @Description 我的建议列表
* @param dto
* @return com.epmet.commons.tools.utils.Result
* @Author liushaowen
* @Date 2020/11/5 10:40
*/
@Override
public Result getMyAdviceList(MyAdviceListFormDTO dto) {
return null;
}
}

84
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/badege/controller/BadgeController.java

@ -0,0 +1,84 @@
package com.epmet.modules.badege.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.OpenedOrClosedFormDTO;
import com.epmet.modules.badege.service.BadgeService;
import com.epmet.resi.mine.dto.from.BadgeListFormDTO;
import com.epmet.dto.form.CertificationAddFormDTO;
import com.epmet.resi.mine.dto.from.OperListFormDTO;
import com.epmet.resi.mine.dto.result.BadgeListResultDTO;
import com.epmet.resi.mine.dto.result.OperListResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @Author zxc
* @DateTime 2020/11/3 10:42 上午
*/
@RestController
@RequestMapping("badge")
public class BadgeController {
@Autowired
private BadgeService badgeService;
/**
* @Description 个人中心-获取个人徽章点亮列表
* @Param badgeListFormDTO
* @author zxc
* @date 2020/11/3 4:11 下午
*/
@PostMapping("list")
public Result<List<BadgeListResultDTO>> getBadgeList(@LoginUser TokenDto tokenDto,@RequestBody BadgeListFormDTO badgeListFormDTO){
ValidatorUtils.validateEntity(badgeListFormDTO, BadgeListFormDTO.BadgeList.class);
return new Result<List<BadgeListResultDTO>>().ok(badgeService.getBadgeList(tokenDto,badgeListFormDTO));
}
/**
* @Description 个人中心-获取徽章可操作列表点亮取消认证
* @Param operListFormDTO
* @author zxc
* @date 2020/11/3 4:28 下午
*/
@PostMapping("operlist")
public Result<List<OperListResultDTO>> getOperList(@LoginUser TokenDto tokenDto,@RequestBody OperListFormDTO operListFormDTO){
ValidatorUtils.validateEntity(operListFormDTO, OperListFormDTO.OperList.class);
return new Result<List<OperListResultDTO>>().ok(badgeService.getOperList(tokenDto,operListFormDTO));
}
/**
* @Description 个人中心-提交徽章认证
* @Param tokenDto
* @Param certificationAddFormDTO
* @author zxc
* @date 2020/11/4 11:16 上午
*/
@PostMapping("certification/add")
public Result certificationAdd(@LoginUser TokenDto tokenDto,@RequestBody CertificationAddFormDTO certificationAddFormDTO){
ValidatorUtils.validateEntity(certificationAddFormDTO, CertificationAddFormDTO.CertificationAdd.class);
return badgeService.certificationAdd(tokenDto,certificationAddFormDTO);
}
/**
* @Description 个人中心-取消/点亮徽章
* @Param openedOrClosedFormDTO
* @author zxc
* @date 2020/11/5 9:23 上午
*/
@PostMapping("openedorclosed")
public Result openedOrClosed(@LoginUser TokenDto tokenDto,@RequestBody OpenedOrClosedFormDTO openedOrClosedFormDTO){
ValidatorUtils.validateEntity(openedOrClosedFormDTO, OpenedOrClosedFormDTO.OpenedOrClosed.class);
badgeService.openedOrClosed(tokenDto,openedOrClosedFormDTO);
return new Result();
}
}

53
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/badege/service/BadgeService.java

@ -0,0 +1,53 @@
package com.epmet.modules.badege.service;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.OpenedOrClosedFormDTO;
import com.epmet.resi.mine.dto.from.BadgeListFormDTO;
import com.epmet.dto.form.CertificationAddFormDTO;
import com.epmet.resi.mine.dto.from.OperListFormDTO;
import com.epmet.resi.mine.dto.result.BadgeListResultDTO;
import com.epmet.resi.mine.dto.result.OperListResultDTO;
import java.util.List;
/**
* @Author zxc
* @DateTime 2020/11/3 10:52 上午
*/
public interface BadgeService {
/**
* @Description 个人中心-获取个人徽章点亮列表
* @Param badgeListFormDTO
* @author zxc
* @date 2020/11/3 4:11 下午
*/
List<BadgeListResultDTO> getBadgeList(TokenDto tokenDto,BadgeListFormDTO badgeListFormDTO);
/**
* @Description 个人中心-获取徽章可操作列表点亮取消认证
* @Param operListFormDTO
* @author zxc
* @date 2020/11/3 4:28 下午
*/
List<OperListResultDTO> getOperList(TokenDto tokenDto,OperListFormDTO operListFormDTO);
/**
* @Description 个人中心-提交徽章认证
* @Param tokenDto
* @Param certificationAddFormDTO
* @author zxc
* @date 2020/11/4 11:16 上午
*/
Result certificationAdd(TokenDto tokenDto, CertificationAddFormDTO certificationAddFormDTO);
/**
* @Description 个人中心-取消/点亮徽章
* @Param openedOrClosedFormDTO
* @author zxc
* @date 2020/11/5 9:23 上午
*/
void openedOrClosed(TokenDto tokenDto,OpenedOrClosedFormDTO openedOrClosedFormDTO);
}

109
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/badege/service/impl/BadgeServiceImpl.java

@ -0,0 +1,109 @@
package com.epmet.modules.badege.service.impl;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.OpenedOrClosedFormDTO;
import com.epmet.dto.form.UserBadgeListFormDTO;
import com.epmet.dto.form.UserOperListFormDTO;
import com.epmet.dto.result.UserBadgeListResultDTO;
import com.epmet.dto.result.UserOperListResultDTO;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.modules.badege.service.BadgeService;
import com.epmet.resi.mine.dto.from.BadgeListFormDTO;
import com.epmet.dto.form.CertificationAddFormDTO;
import com.epmet.resi.mine.dto.from.OperListFormDTO;
import com.epmet.resi.mine.dto.result.BadgeListResultDTO;
import com.epmet.resi.mine.dto.result.OperListResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* @Author zxc
* @DateTime 2020/11/3 10:53 上午
*/
@Service
@Slf4j
public class BadgeServiceImpl implements BadgeService {
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
/**
* @Description 个人中心-获取个人徽章点亮列表
* @Param badgeListFormDTO
* @author zxc
* @date 2020/11/3 4:11 下午
*/
@Override
public List<BadgeListResultDTO> getBadgeList(TokenDto tokenDto,BadgeListFormDTO badgeListFormDTO) {
UserBadgeListFormDTO form = new UserBadgeListFormDTO();
form.setCustomerId(badgeListFormDTO.getCustomerId());
form.setUserId(tokenDto.getUserId());
Result<List<UserBadgeListResultDTO>> listResult = epmetUserOpenFeignClient.selectBadgeList(form);
if (!listResult.success()){
throw new RenException("获取徽章点亮列表失败......");
}
if (null == listResult.getData()){
return new ArrayList<>();
}
List<BadgeListResultDTO> result = ConvertUtils.sourceToTarget(listResult.getData(), BadgeListResultDTO.class);
return result;
}
/**
* @Description 个人中心-获取徽章可操作列表点亮取消认证
* @Param operListFormDTO
* @author zxc
* @date 2020/11/3 4:28 下午
*/
@Override
public List<OperListResultDTO> getOperList(TokenDto tokenDto,OperListFormDTO operListFormDTO) {
UserOperListFormDTO userOperListFormDTO = new UserOperListFormDTO();
userOperListFormDTO.setCustomerId(operListFormDTO.getCustomerId());
userOperListFormDTO.setUserId(tokenDto.getUserId());
Result<List<UserOperListResultDTO>> listResult = epmetUserOpenFeignClient.selectOperList(userOperListFormDTO);
if (!listResult.success()){
throw new RenException("获取徽章列表失败......");
}
if (null == listResult.getData()){
return new ArrayList<>();
}
List<OperListResultDTO> result = ConvertUtils.sourceToTarget(listResult.getData(), OperListResultDTO.class);
return result;
}
/**
* @Description 个人中心-提交徽章认证
* @Param tokenDto
* @Param certificationAddFormDTO
* @author zxc
* @date 2020/11/4 11:16 上午
*/
@Override
public Result certificationAdd(TokenDto tokenDto, CertificationAddFormDTO certificationAddFormDTO) {
certificationAddFormDTO.setUserId(tokenDto.getUserId());
Result result = epmetUserOpenFeignClient.authBadgeRecord(certificationAddFormDTO);
return result;
}
/**
* @Description 个人中心-取消/点亮徽章
* @Param openedOrClosedFormDTO
* @author zxc
* @date 2020/11/5 9:23 上午
*/
@Override
public void openedOrClosed(TokenDto tokenDto,OpenedOrClosedFormDTO openedOrClosedFormDTO) {
openedOrClosedFormDTO.setUserId(tokenDto.getUserId());
Result result = epmetUserOpenFeignClient.openedOrClosed(openedOrClosedFormDTO);
if (!result.success()){
throw new RenException("取消/点亮徽章失败了......");
}
}
}

55
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/controller/PersonalCenterController.java

@ -0,0 +1,55 @@
package com.epmet.modules.mine.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.EditInfoFormDTO;
import com.epmet.modules.mine.service.PersonalCenterService;
import com.epmet.resi.mine.dto.result.InitInfoResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 个人中心
* @author zhaoqifeng
* @date 2020/11/3 9:48
*/
@Slf4j
@RestController
@RequestMapping("personalcenter")
public class PersonalCenterController {
@Autowired
private PersonalCenterService personalCenterService;
/**
* 修改信息页面初始化
* @author zhaoqifeng
* @date 2020/11/3 10:03
* @param tokenDto
* @return com.epmet.commons.tools.utils.Result<com.epmet.resi.mine.dto.result.InitInfoResultDTO>
*/
@PostMapping("initinfo")
public Result<InitInfoResultDTO> initInfo(@LoginUser TokenDto tokenDto) {
InitInfoResultDTO resultDTO = personalCenterService.initInfo(tokenDto);
return new Result<InitInfoResultDTO>().ok(resultDTO);
}
/**
* 修改信息
* @author zhaoqifeng
* @date 2020/11/3 10:03
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping("editinfo")
public Result editInfo(@LoginUser TokenDto tokenDto, @RequestBody EditInfoFormDTO formDTO) {
personalCenterService.editInfo(tokenDto, formDTO);
return new Result();
}
}

17
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/PersonalCenterService.java

@ -0,0 +1,17 @@
package com.epmet.modules.mine.service;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.form.EditInfoFormDTO;
import com.epmet.resi.mine.dto.result.InitInfoResultDTO;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/11/3 9:50
*/
public interface PersonalCenterService {
InitInfoResultDTO initInfo(TokenDto tokenDto);
void editInfo(TokenDto tokenDto, EditInfoFormDTO formDTO);
}

51
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/mine/service/impl/PersonalCenterServiceImpl.java

@ -0,0 +1,51 @@
package com.epmet.modules.mine.service.impl;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.EditInfoFormDTO;
import com.epmet.dto.result.ResiUserBaseInfoResultDTO;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.modules.mine.service.PersonalCenterService;
import com.epmet.resi.mine.dto.result.InitInfoResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/11/3 9:50
*/
@Slf4j
@Service
public class PersonalCenterServiceImpl implements PersonalCenterService {
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Override
public InitInfoResultDTO initInfo(TokenDto tokenDto) {
Result<ResiUserBaseInfoResultDTO> baseInfoResult = epmetUserOpenFeignClient.selectUserBaseInfo(tokenDto);
if (!baseInfoResult.success()) {
throw new RenException(baseInfoResult.getCode(), baseInfoResult.getMsg());
}
InitInfoResultDTO resultDTO = new InitInfoResultDTO();
resultDTO.setHeadImgUrl(baseInfoResult.getData().getHeadImgUrl());
resultDTO.setSurname(baseInfoResult.getData().getSurname());
resultDTO.setName(baseInfoResult.getData().getName());
resultDTO.setStreet(baseInfoResult.getData().getStreet());
resultDTO.setDistrict(baseInfoResult.getData().getDistrict());
resultDTO.setBuildingAddress(baseInfoResult.getData().getBuildingAddress());
return resultDTO;
}
@Override
public void editInfo(TokenDto tokenDto, EditInfoFormDTO formDTO) {
formDTO.setUserId(tokenDto.getUserId());
Result result = epmetUserOpenFeignClient.editUserInfo(formDTO);
if (!result.success()) {
throw new RenException(result.getCode(), result.getMsg());
}
}
}

45
epmet-user/epmet-user-client/src/main/java/com/epmet/constant/BadgeConstant.java

@ -0,0 +1,45 @@
package com.epmet.constant;
/**
* @Author zxc
* @DateTime 2020/11/3 2:45 下午
*/
public interface BadgeConstant {
String BADGE_KEY = "epmet:badge:customer:";
String BADGE = "badge";
String DEFAULT_CUSTOMER = "default";
String YES = "yes";
String NO = "no";
String REJECTED = "rejected";
String APPROVED = "approved";
String NONE ="none";
String SMS_CODE_KEY = "epmet:smsCode:badge:";
String PARTY ="party";
String ONLINE ="online";
String OFFLINE ="offline";
String RESI = "resi";
String AUTH_TITLE = "您有一条认证消息";
String GET_BADGE_NAME_FAILURE = "获取徽章名称失败......";
String MESSAGE_CONTENT = "您好,您的%s因认证失败未成功点亮,请查看";
String READ_FLAG = "unread";
String DEFAULT = "default";
}

86
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/BadgeCertificationConfigDTO.java

@ -0,0 +1,86 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 徽章认证配置
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-03
*/
@Data
public class BadgeCertificationConfigDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private String id;
/**
* 客户Id 默认配置iddefault
*/
private String customerId;
/**
* 徽章ID
*/
private String badgeId;
/**
* 认证信息类型 手机号:mobile全名:fullname;身份证:idcard;认证证件: certificate;认证说明(备注):remark
*/
private String certificationType;
/**
* 删除标识 1删除0未删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

96
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/BadgeDTO.java

@ -0,0 +1,96 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 徽章
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-03
*/
@Data
public class BadgeDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private String id;
/**
* 客户Id 默认配置iddefault
*/
private String customerId;
/**
* 徽章名称
*/
private String badgeName;
/**
* 徽章图标url
*/
private String badgeIcon;
/**
* 固有徽章类型 前端页面跳转标识党员徽章party;none
*/
private String fixationBadgeType;
/**
* 状态 上线:online;下线:offline;
*/
private String badgeStatus;
/**
* 删除标识 1删除0未删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

101
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ResiUserBadgeDTO.java

@ -0,0 +1,101 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 用户徽章关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-06
*/
@Data
public class ResiUserBadgeDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private String id;
/**
* 客户Id 默认配置iddefault
*/
private String customerId;
/**
* 用户注册网格ID
*/
private String gridId;
/**
* 用户ID
*/
private String userId;
/**
* 徽章ID
*/
private String badgeId;
/**
* 是否开启(点亮) 1:点亮0:未点亮
*/
private Integer isOpened;
/**
* 认证(审核)状态 待审核:auditing;审核通过:pass;驳回:rejected;
*/
private String certificationAutidStatus;
/**
* 删除标识 1删除0未删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

156
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserAdviceDTO.java

@ -0,0 +1,156 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* user_advice
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-06
*/
@Data
public class UserAdviceDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 客户名
*/
private String customerName;
/**
* 组织ID
*/
private String agencyId;
/**
* 组织名
*/
private String agencyName;
/**
* 网格ID
*/
private String gridId;
/**
* 网格名
*/
private String gridName;
/**
* userid
*/
private String userId;
/**
* 用户姓名
*/
private String userName;
/**
* 用户注册手机号
*/
private String regPhone;
/**
* 建议描述
*/
private String adviceContent;
/**
* 填写手机号
*/
private String phone;
/**
* 问题分类(gov政府software软件,逗号分隔)
*/
private String adviceType;
/**
* 回复内容
*/
private String replyContent;
/**
* 回复人id
*/
private String replyUserId;
/**
* 回复人姓名
*/
private String replyUserName;
/**
* 回复时间
*/
private Date replyTime;
/**
* 政府存证文字
*/
private String govContent;
/**
* 删除标志
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

86
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserAdviceImgDTO.java

@ -0,0 +1,86 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 用户建议图片
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-04
*/
@Data
public class UserAdviceImgDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 建议id
*/
private String adviceId;
/**
* 类型resi为用户上传,oper为运营上传
*/
private String type;
/**
* 图片url
*/
private String imgUrl;
/**
* 删除标志
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

45
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserBadgeCertificateRecordDTO.java

@ -0,0 +1,45 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Author zxc
* @DateTime 2020/11/4 1:46 下午
*/
@Data
public class UserBadgeCertificateRecordDTO implements Serializable {
private static final long serialVersionUID = 3207509834642386145L;
private String id;
private String customerId;
private String gridId;
private String userId;
private String badgeId;
private String surname;
private String name;
private String mobile;
private String idNum;
private String certificationImg;
private String remark;
private String auditStatus;
private String auditRemark;
private String staffId;
private Date auditTime;
private String isLast;
private String delFlag;
private Integer revision;
private String createdBy;
private String updatedBy;
public UserBadgeCertificateRecordDTO() {
this.auditStatus = "auditing";
this.isLast = "yes";
this.delFlag = "0";
this.revision = 0;
this.createdBy = "APP_USER";
this.updatedBy = "APP_USER";
}
}

42
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AddBadgeFormDTO.java

@ -0,0 +1,42 @@
package com.epmet.dto.form;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/11/4 9:47
*/
@NoArgsConstructor
@Data
public class AddBadgeFormDTO implements Serializable {
private static final long serialVersionUID = -5220529162950147825L;
/**
* 徽章名称
*/
@NotBlank(message = "徽章名称不能为空")
private String badgeName;
/**
* 徽章图标
*/
@NotBlank(message = "徽章图标不能为空")
private String badgeIcon;
/**
* 徽章状态 上线:online;下线:offline;
*/
@NotBlank(message = "徽章状态不能为空")
private String badgeStatus;
/**
* 认证信息类型数组 手机号:mobile姓名:fullname;身份证:idcard;认证证件: certificate;认证说明(备注):remark
*/
@NotEmpty(message = "认证信息类型不能为空")
private List<String> certificationTypes;
}

56
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AdviceListFormDTO.java

@ -0,0 +1,56 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.Min;
import java.util.Date;
/**
* @description:
* @author: liushaowen
* @date: 2020/11/9 10:37
*/
@Data
public class AdviceListFormDTO {
/**
* 客户id 不填查询所有
*/
private String customerId;
/**
* 组织id 不填查询所有
*/
private String agencyId;
/**
* 是否被回复,0未回复1回复, 传空查询所有
*/
private String isReply;
/**
* 问题类型 gov政府,software软件 ,传空查询全部单选
*/
private String adviceType;
/**
* 开始时间 可不填
*/
private Date startTime;
/**
* 结束时间 可不填
*/
private Date endTime;
/**
* 页码
*/
@Min(1)
private int pageNo;
/**
* 页大小
*/
@Min(1)
private int pageSize;
}

24
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/AuthFieldFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/4 4:54 下午
*/
@Data
public class AuthFieldFormDTO implements Serializable {
private static final long serialVersionUID = 1976515427065841752L;
public interface AuthField{}
@NotBlank(message = "客户ID不能为空",groups = {AuthField.class})
private String customerId;
@NotBlank(message = "徽章ID不能为空",groups = {AuthField.class})
private String badgeId;
}

20
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BadgeAuditFormDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.form;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/11/5 11:06
*/
@NoArgsConstructor
@Data
public class BadgeAuditFormDTO implements Serializable {
private static final long serialVersionUID = 2209535364555130964L;
private String recordId;
private String auditStatus;
private String auditRemark;
}

28
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BadgeFormDTO.java

@ -0,0 +1,28 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/11/4 14:22
*/
@Data
public class BadgeFormDTO implements Serializable {
private static final long serialVersionUID = 9156247659994638103L;
private String badgeId;
/**
* 页码
*/
private Integer pageNo = 1;
/**
* 每页显示数量
*/
private Integer pageSize = 20;
/**
* 网格Id
*/
private String gridId;
}

22
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/BadgeSendCodeFormDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/4 3:11 下午
*/
@Data
public class BadgeSendCodeFormDTO implements Serializable {
private static final long serialVersionUID = -3926070129364657241L;
public interface BadgeSendCode{}
@NotBlank(message = "手机号不能为空", groups = {BadgeSendCode.class})
private String mobile;
}

67
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CertificationAddFormDTO.java

@ -0,0 +1,67 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/4 11:05 上午
*/
@Data
public class CertificationAddFormDTO implements Serializable {
private static final long serialVersionUID = 1330773325803513330L;
public interface CertificationAdd{}
private String userId;
/**
* 客户ID
*/
@NotBlank(message = "客户ID不能为空",groups = {CertificationAdd.class})
private String customerId;
/**
* 徽章ID
*/
private String badgeId;
/**
* 手机号
*/
private String mobile;
/**
*
*/
private String surname;
/**
*
*/
private String name;
/**
* 身份证号
*/
private String idcard;
/**
* 认证证件图片url
*/
private String certificationImg;
/**
* 认证说明
*/
private String remark;
/**
* 验证码
*/
private String code;
}

29
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CertificationDetailFormDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/4 3:51 下午
*/
@Data
public class CertificationDetailFormDTO implements Serializable {
private static final long serialVersionUID = -398879254354767770L;
public interface CertificationDetail{}
@NotBlank(message = "客户ID不能为空",groups = {CertificationDetail.class})
private String customerId;
@NotBlank(message = "徽章ID不能为空",groups = {CertificationDetail.class})
private String badgeId;
/**
* 客户ID
*/
private String userId;
}

40
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditBadgeFormDTO.java

@ -0,0 +1,40 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/11/4 14:23
*/
@Data
public class EditBadgeFormDTO implements Serializable {
private static final long serialVersionUID = 1578890423002035200L;
private String badgeId;
/**
* 徽章名称
*/
@NotBlank(message = "徽章名称不能为空")
private String badgeName;
/**
* 徽章图标
*/
@NotBlank(message = "徽章图标不能为空")
private String badgeIcon;
/**
* 徽章状态 上线:online;下线:offline;
*/
@NotBlank(message = "徽章状态不能为空")
private String badgeStatus;
/**
* 认证信息类型数组 手机号:mobile姓名:fullname;身份证:idcard;认证证件: certificate;认证说明(备注):remark
*/
@NotEmpty(message = "认证信息类型不能为空")
private List<String> certificationTypes;
}

52
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/EditInfoFormDTO.java

@ -0,0 +1,52 @@
package com.epmet.dto.form;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/11/3 9:55
*/
@NoArgsConstructor
@Data
public class EditInfoFormDTO implements Serializable {
private static final long serialVersionUID = 1280489016677129419L;
/**
* 头像
*/
@NotBlank(message = "头像不能为空")
private String userId;
/**
* 头像
*/
@NotBlank(message = "头像不能为空")
private String headImgUrl;
/**
*
*/
@NotBlank(message = "姓不能为空")
private String surname;
/**
*
*/
@NotBlank(message = "名不能为空")
private String name;
/**
* 路牌号
*/
@NotBlank(message = "路牌号不能为空")
private String street;
/**
* 小区名称
*/
private String district;
/**
* 详细地址
*/
private String buildingAddress;
}

26
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/OpenedOrClosedFormDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/4 5:43 下午
*/
@Data
public class OpenedOrClosedFormDTO implements Serializable {
private static final long serialVersionUID = 483466676158603066L;
public interface OpenedOrClosed{}
@NotBlank(message = "客户ID不能为空",groups = {OpenedOrClosed.class})
private String customerId;
private String userId;
@NotBlank(message = "徽章ID不能为空",groups = {OpenedOrClosed.class})
private String badgeId;
}

33
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/OperAdviceListFormDTO.java

@ -0,0 +1,33 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.Min;
import java.io.Serializable;
/**
* @description:
* @author: liushaowen
* @date: 2020/11/5 17:25
*/
@Data
public class OperAdviceListFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
private String customerId;
private String isReply;
private String adviceType;
private String startTime;
private String endTime;
@Min(1)
private Integer pageNo;
@Min(1)
private Integer pageSize;
}

27
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ReplyAdviceFormDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @description:回复建议FormDTO
* @author: liushaowen
* @date: 2020/11/6 10:37
*/
@Data
public class ReplyAdviceFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
@NotBlank(message = "adviceId不能为空")
private String adviceId;
@NotBlank(message = "回复内容不能为空")
private String replyContent;
private List<String> govImgList;
private String govContent;
}

33
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserBadgeListFormDTO.java

@ -0,0 +1,33 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/3 11:07 上午
*/
@Data
public class UserBadgeListFormDTO implements Serializable {
private static final long serialVersionUID = 9002922684993474574L;
/**
* 用户ID
*/
private String userId;
/**
* 客户ID
*/
private String customerId;
public UserBadgeListFormDTO(String userId, String customerId) {
this.userId = userId;
this.customerId = customerId;
}
public UserBadgeListFormDTO() {
}
}

48
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserBadgeUnitFormDTO.java

@ -0,0 +1,48 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
import java.util.Objects;
/**
* @Description 用户-徽章缓存单元
* @ClassName UserBadgeUnitFormDTO
* @Auth wangc
* @Date 2020-11-05 10:00
*/
@Data
public class UserBadgeUnitFormDTO implements Serializable {
private static final long serialVersionUID = -4497394865738168850L;
/**
* 徽章Id
*/
private String badgeId;
/**
* 徽章图标 url
*/
private String badgeIcon;
/**
* 徽章名称
*/
private String badgeName;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
UserBadgeUnitFormDTO that = (UserBadgeUnitFormDTO) o;
return badgeId.equals(that.badgeId) &&
badgeIcon.equals(that.badgeIcon) &&
badgeName.equals(that.badgeName);
}
@Override
public int hashCode() {
return Objects.hash(badgeId, badgeIcon, badgeName);
}
}

28
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserOperListFormDTO.java

@ -0,0 +1,28 @@
package com.epmet.dto.form;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/3 4:18 下午
*/
@Data
public class UserOperListFormDTO implements Serializable {
private static final long serialVersionUID = -1872129597916414712L;
private String userId;
private String customerId;
public UserOperListFormDTO(String userId, String customerId) {
this.userId = userId;
this.customerId = customerId;
}
public UserOperListFormDTO() {
}
}

99
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/AdviceDetailResultDTO.java

@ -0,0 +1,99 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @description:
* @author: liushaowen
* @date: 2020/11/5 17:37
*/
@Data
public class AdviceDetailResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 建议id
*/
private String adviceId;
/**
* 客户名
*/
private String customerName;
/**
* 组织名
*/
private String agencyName;
/**
* 网格名
*/
private String gridName;
/**
* 注册电话
*/
private String regPhone;
/**
* 意见类型
*/
private String adviceType;
/**
* 提建议人姓名
*/
private String userName;
/**
* 建议内容
*/
private String adviceContent;
/**
* 填写的电话
*/
private String phone;
/**
* 建议时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date adviceTime;
/**
* 回复内容
*/
private String replyContent;
/**
* 回复时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date replyTime;
/**
* 回复人姓名
*/
private String replyUserName;
/**
* 建议图片列表
*/
private List<String> imgList;
/**
* 政府回应图片
*/
private List<String> govImgList;
/**
* 政府回应文字
*/
private String govContent;
}

40
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/AuthFieldResultDTO.java

@ -0,0 +1,40 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/4 4:54 下午
*/
@Data
public class AuthFieldResultDTO implements Serializable {
private static final long serialVersionUID = 1856490232343125419L;
/**
* 中文名
*/
private String cnName;
/**
* 英文名字段
*/
private String enName;
/**
* 字段类型text文本img图片
*/
private String fieldType;
/**
* 是否必填
*/
private String isRequired;
/**
* 排序
*/
private Integer sort;
}

43
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeAuditRecordResultDTO.java

@ -0,0 +1,43 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/11/5 10:57
*/
@Data
public class BadgeAuditRecordResultDTO implements Serializable {
private static final long serialVersionUID = 6004101838042628105L;
/**
* 徽章Id
*/
private String badgeId;
/**
* 徽章名称
*/
private String badgeName;
/**
* 徽章图标url
*/
private String badgeIcon;
/**
* 用户Id
*/
private String userId;
/**
* 用户名
*/
private String userName;
/**
* 创建时间
*/
private Long createTime;
/**
* 用户名
*/
private String auditStatus;
}

43
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeAuditingResultDTO.java

@ -0,0 +1,43 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/11/5 9:34
*/
@NoArgsConstructor
@Data
public class BadgeAuditingResultDTO implements Serializable {
private static final long serialVersionUID = -361914591952483084L;
/**
* 徽章Id
*/
private String badgeId;
/**
* 徽章名称
*/
private String badgeName;
/**
* 徽章图标url
*/
private String badgeIcon;
/**
* 用户Id
*/
private String userId;
/**
* 用户名
*/
private String userName;
/**
* 创建时间
*/
private Long createTime;
}

26
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeDetailResultDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/11/4 14:17
*/
@NoArgsConstructor
@Data
public class BadgeDetailResultDTO implements Serializable {
private static final long serialVersionUID = 7698898330565297328L;
private String badgeId;
private String badgeName;
private String badgeIcon;
private String badgeStatus;
private List<String> certificationTypes;
}

31
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/BadgeListResultDTO.java

@ -0,0 +1,31 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/11/3 16:58
*/
@NoArgsConstructor
@Data
public class BadgeListResultDTO {
/**
* 徽章Id
*/
private String badgeId;
/**
* 徽章名称
*/
private String badgeName;
/**
* 徽章图标url
*/
private String badgeIcon;
/**
* 徽章状态 上线:online;下线:offline;
*/
private String badgeStatus;
}

65
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CertificationDetailResultDTO.java

@ -0,0 +1,65 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/4 3:51 下午
*/
@Data
public class CertificationDetailResultDTO implements Serializable {
private static final long serialVersionUID = 6538150132908927308L;
/**
*
*/
private String surname;
/**
*
*/
private String name;
/**
* 身份证号
*/
private String idCard;
/**
* 是否认证 yes 认证 no 已认证
*/
private String isCertificated;
/**
* 手机号
*/
private String mobile;
/**
* 认证图片地址
*/
private String certificationImg;
/**
* 备注
*/
private String remark;
/**
* 审核结果
*/
private String authResult;
/**
* 驳回原因
*/
private String authReason;
/**
* 审核记录ID
*/
private String recordId;
}

44
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/OperAdviceListResultDTO.java

@ -0,0 +1,44 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @description:
* @author: liushaowen
* @date: 2020/11/5 17:26
*/
@Data
public class OperAdviceListResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户名
*/
private String customerName;
/**
* 建议id
*/
private String adviceId;
/**
* 是否回复 0否1是
*/
private String isReply;
/**
* 回复内容
*/
private String adviceContent;
/**
* 手机 空为*
*/
private String phone;
/**
* 建议类型 空为*
*/
private String adviceType;
}

49
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBadgeListResultDTO.java

@ -0,0 +1,49 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/3 11:08 上午
*/
@Data
public class UserBadgeListResultDTO implements Serializable {
private static final long serialVersionUID = -6542233940679158922L;
/**
* 徽章ID
*/
private String badgeId;
/**
* 徽章图片地址
*/
private String badgeIcon;
/**
* 徽章是否点亮
*/
private String isOpened;
private String badgeType;
@JsonIgnore
private String customerId;
@JsonIgnore
private String badgeName;
@JsonIgnore
private String fixationBadgeType;
@JsonIgnore
private Boolean status;
public UserBadgeListResultDTO() {
this.badgeId = "";
this.badgeIcon = "";
this.isOpened = "0";
this.status = false;
}
}

67
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserOperListResultDTO.java

@ -0,0 +1,67 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2020/11/3 4:20 下午
*/
@Data
public class UserOperListResultDTO implements Serializable {
private static final long serialVersionUID = -6185696177370545937L;
/**
* 徽章ID
*/
private String badgeId;
/**
* 徽章名字
*/
private String badgeName;
/**
* 点亮状态 yes已点亮no未点亮
*/
private String isLighted;
/**
* 是否认证 yes 认证 no 已认证
*/
private String isCertificated;
/**
* 徽章图片地址
*/
private String badgeIcon;
/**
* 是否被驳回 true已驳回false未驳回
*/
private Boolean isReject;
/**
* 徽章类型党员徽章partynone
*/
private String badgeType;
@JsonIgnore
private String customerId;
@JsonIgnore
private String isOpened;
@JsonIgnore
private String auditStatus;
public UserOperListResultDTO() {
this.badgeId = "";
this.badgeName = "";
this.isLighted = "no";
this.isCertificated = "no";
this.badgeIcon = "";
this.isReject = false;
}
}

46
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java

@ -328,6 +328,52 @@ public interface EpmetUserOpenFeignClient {
@PostMapping(value = "epmetuser/staffagencyvisited/getstaffbasicinfo")
Result<StaffBasicInfo> getStaffBasicInfo(@RequestBody StaffBasicInfoFormDTO formDTO);
/**
* 修改个人信息
* @author zhaoqifeng
* @date 2020/11/3 10:28
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping("/epmetuser/userresiinfo/edituserinfo")
Result editUserInfo(@RequestBody EditInfoFormDTO formDTO);
/**
* @Description 查询已经点亮的徽章
* @Param userBadgeListFormDTO
* @author zxc
* @date 2020/11/3 1:33 下午
*/
@PostMapping("/epmetuser/more/badge/badgelist")
Result<List<UserBadgeListResultDTO>> selectBadgeList(@RequestBody UserBadgeListFormDTO userBadgeListFormDTO);
/**
* @Description 个人中心-获取徽章可操作列表点亮取消认证
* @Param operListFormDTO
* @author zxc
* @date 2020/11/3 4:28 下午
*/
@PostMapping("/epmetuser/more/badge/badgeoperlist")
Result<List<UserOperListResultDTO>> selectOperList(@RequestBody UserOperListFormDTO userOperListFormDTO);
/**
* @Description 徽章认证提交
* @Param certificationAddFormDTO
* @author zxc
* @date 2020/11/4 4:30 下午
*/
@PostMapping("/epmetuser/more/badge/authbadgerecord")
Result authBadgeRecord(@RequestBody CertificationAddFormDTO certificationAddFormDTO);
/**
* @Description 个人中心-取消/点亮徽章
* @Param openedOrClosedFormDTO
* @author zxc
* @date 2020/11/5 9:23 上午
*/
@PostMapping("/epmetuser/more/badge/openedorclosed")
Result openedOrClosed(@RequestBody OpenedOrClosedFormDTO openedOrClosedFormDTO);
/**
* 根据staffId查询用户基本信息
* @author sun

25
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java

@ -225,4 +225,29 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien
public Result<BasicInfoResultDTO> getStaffBasicInfo(StaffBasicInfoFromDTO fromDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getStaffBasicInfo", fromDTO);
}
@Override
public Result editUserInfo(EditInfoFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "editUserInfo", formDTO);
}
@Override
public Result<List<UserBadgeListResultDTO>> selectBadgeList(UserBadgeListFormDTO userBadgeListFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "selectBadgeList", userBadgeListFormDTO);
}
@Override
public Result<List<UserOperListResultDTO>> selectOperList(UserOperListFormDTO userOperListFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "selectOperList", userOperListFormDTO);
}
@Override
public Result authBadgeRecord(CertificationAddFormDTO certificationAddFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "authBadgeRecord", certificationAddFormDTO);
}
@Override
public Result openedOrClosed(OpenedOrClosedFormDTO openedOrClosedFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "openedOrClosed", openedOrClosedFormDTO);
}
}

23
epmet-user/epmet-user-server/src/main/java/com/epmet/constant/BadgeMessageConstant.java

@ -0,0 +1,23 @@
package com.epmet.constant;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/11/9 10:32
*/
public interface BadgeMessageConstant {
/**
* 消息标题
*/
String TITLE = "您有一条认证消息";
/**
* 审核通过消息模板
*/
String APPROVED_MSG = "您好,您提交的%s申请已通过,请查看。";
/**
* 审核驳回消息模板
*/
String REJECTED_MSG = "您好,您提交的%s申请,由于%s,已被驳回。";
}

7
epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserAdviceConstant.java

@ -0,0 +1,7 @@
package com.epmet.constant;
public interface UserAdviceConstant {
String GOV_TYPE_TEXT = "政府业务建议";
String SOFTWARE_TYPE_TEXT = "软件功能及体验问题";
}

10
epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserRedisKeys.java

@ -23,4 +23,14 @@ public class UserRedisKeys {
public static String getResiUserKey(String userId){
return rootPrefix.concat("resi:user:").concat(userId);
}
/**
* @Description 用户勋章缓存 epmet:badge:user:[customerId]:[userId]
* @param userId
* @return epmet:badge:user:[customerId]:[userId]
* @author wangc
* @date 2020.11.05 13:34
*/
public static String getResiUserBadgeKey(String customerId,String userId){
return rootPrefix.concat("badge:user:").concat(customerId).concat(":").concat(userId);}
}

153
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java

@ -0,0 +1,153 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.AddBadgeFormDTO;
import com.epmet.dto.form.BadgeAuditFormDTO;
import com.epmet.dto.form.BadgeFormDTO;
import com.epmet.dto.form.EditBadgeFormDTO;
import com.epmet.dto.result.BadgeAuditRecordResultDTO;
import com.epmet.dto.result.BadgeAuditingResultDTO;
import com.epmet.dto.result.BadgeDetailResultDTO;
import com.epmet.dto.result.BadgeListResultDTO;
import com.epmet.service.BadgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/11/3 16:09
*/
@RestController
@RequestMapping("badge")
public class BadgeController {
@Autowired
private BadgeService badgeService;
/**
* 徽章列表
* @author zhaoqifeng
* @date 2020/11/4 14:27
* @param tokenDto
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.BadgeListResultDTO>>
*/
@PostMapping("list")
public Result<List<BadgeListResultDTO>> list(@LoginUser TokenDto tokenDto) {
List<BadgeListResultDTO> result = badgeService.getList(tokenDto.getCustomerId());
return new Result<List<BadgeListResultDTO>>().ok(result);
}
/**
* 添加徽章
* @author zhaoqifeng
* @date 2020/11/4 14:27
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping("add")
public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddBadgeFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
badgeService.add(tokenDto, formDTO);
return new Result();
}
/**
* 徽章详情
* @author zhaoqifeng
* @date 2020/11/4 14:27
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.BadgeDetailResultDTO>
*/
@PostMapping("detail")
public Result<BadgeDetailResultDTO> detail(@LoginUser TokenDto tokenDto, @RequestBody BadgeFormDTO formDTO) {
BadgeDetailResultDTO result = badgeService.detail(tokenDto, formDTO);
return new Result<BadgeDetailResultDTO>().ok(result);
}
/**
* 修改
* @author zhaoqifeng
* @date 2020/11/4 15:32
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping("edit")
public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditBadgeFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
badgeService.edit(tokenDto, formDTO);
return new Result();
}
/**
* 删除徽章
* @author zhaoqifeng
* @date 2020/11/4 15:34
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping("delete")
public Result delete(@LoginUser TokenDto tokenDto, @RequestBody BadgeFormDTO formDTO) {
badgeService.deleteBadge(tokenDto, formDTO);
return new Result();
}
@PostMapping("test-cache")
public Result testCache(){
badgeService.testCache();
return new Result();
}
/**
* 待审核列表
* @author zhaoqifeng
* @date 2020/11/5 9:51
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.BadgeAuditingResultDTO>>
*/
@PostMapping("auditinglist")
public Result<List<BadgeAuditingResultDTO>> auditingList(@LoginUser TokenDto tokenDto, @RequestBody BadgeFormDTO formDTO) {
List<BadgeAuditingResultDTO> result = badgeService.auditingList(tokenDto, formDTO);
return new Result<List<BadgeAuditingResultDTO>>().ok(result);
}
/**
* 审核历史列表
* @author zhaoqifeng
* @date 2020/11/5 10:59
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.BadgeAuditRecordResultDTO>>
*/
@PostMapping("auditrecord")
public Result<List<BadgeAuditRecordResultDTO>> auditRecord(@LoginUser TokenDto tokenDto, @RequestBody BadgeFormDTO formDTO) {
List<BadgeAuditRecordResultDTO> result = badgeService.auditRecord(tokenDto, formDTO);
return new Result<List<BadgeAuditRecordResultDTO>>().ok(result);
}
/**
* 审核
* @author zhaoqifeng
* @date 2020/11/5 11:09
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping("audit")
public Result audit(@LoginUser TokenDto tokenDto, @RequestBody BadgeAuditFormDTO formDTO) {
badgeService.audit(tokenDto, formDTO);
return new Result();
}
}

124
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserAdviceController.java

@ -0,0 +1,124 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.UserAdviceDTO;
import com.epmet.dto.form.AdviceListFormDTO;
import com.epmet.dto.form.ReplyAdviceFormDTO;
import com.epmet.dto.result.AdviceDetailResultDTO;
import com.epmet.excel.UserAdviceExcel;
import com.epmet.service.UserAdviceService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* user_advice
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-06
*/
@RestController
@RequestMapping("useradvice")
public class UserAdviceController {
@Autowired
private UserAdviceService userAdviceService;
@Autowired
private LoginUserUtil loginUserUtil;
@GetMapping("page")
public Result<PageData<UserAdviceDTO>> page(@RequestParam Map<String, Object> params){
PageData<UserAdviceDTO> page = userAdviceService.page(params);
return new Result<PageData<UserAdviceDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<UserAdviceDTO> get(@PathVariable("id") String id){
UserAdviceDTO data = userAdviceService.get(id);
return new Result<UserAdviceDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody UserAdviceDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
userAdviceService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody UserAdviceDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
userAdviceService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
userAdviceService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<UserAdviceDTO> list = userAdviceService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, UserAdviceExcel.class);
}
@PostMapping("replyadvice")
public Result replyAdvice(@RequestBody ReplyAdviceFormDTO dto){
ValidatorUtils.validateEntity(dto);
userAdviceService.replyAdvice(dto,loginUserUtil.getLoginUserId());
return new Result();
}
@PostMapping("advicedetail")
public Result adviceDetail(String adviceId){
if (StringUtils.isBlank(adviceId)){
throw new RenException("adviceId不能为空");
}
return new Result<AdviceDetailResultDTO>().ok(userAdviceService.adviceDetail(adviceId));
}
@PostMapping("advicelist")
public Result<PageData<UserAdviceDTO>> adviceList(AdviceListFormDTO dto){
ValidatorUtils.validateEntity(dto);
PageData<UserAdviceDTO> page = userAdviceService.adviceList(dto);
return new Result<PageData<UserAdviceDTO>>().ok(page);
}
}

94
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserAdviceImgController.java

@ -0,0 +1,94 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.UserAdviceImgDTO;
import com.epmet.excel.UserAdviceImgExcel;
import com.epmet.service.UserAdviceImgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 用户建议图片
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-04
*/
@RestController
@RequestMapping("useradviceimg")
public class UserAdviceImgController {
@Autowired
private UserAdviceImgService userAdviceImgService;
@GetMapping("page")
public Result<PageData<UserAdviceImgDTO>> page(@RequestParam Map<String, Object> params){
PageData<UserAdviceImgDTO> page = userAdviceImgService.page(params);
return new Result<PageData<UserAdviceImgDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<UserAdviceImgDTO> get(@PathVariable("id") String id){
UserAdviceImgDTO data = userAdviceImgService.get(id);
return new Result<UserAdviceImgDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody UserAdviceImgDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
userAdviceImgService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody UserAdviceImgDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
userAdviceImgService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
userAdviceImgService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<UserAdviceImgDTO> list = userAdviceImgService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, UserAdviceImgExcel.class);
}
}

115
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserBadgeController.java

@ -0,0 +1,115 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.*;
import com.epmet.dto.result.AuthFieldResultDTO;
import com.epmet.dto.result.CertificationDetailResultDTO;
import com.epmet.dto.result.UserBadgeListResultDTO;
import com.epmet.dto.result.UserOperListResultDTO;
import com.epmet.service.UserBadgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @Author zxc
* @DateTime 2020/11/3 11:16 上午
*/
@RestController
@RequestMapping("more/badge")
public class UserBadgeController {
@Autowired
private UserBadgeService userBadgeService;
/**
* @Description 查询已经点亮的徽章
* @Param userBadgeListFormDTO
* @author zxc
* @date 2020/11/3 1:33 下午
*/
@PostMapping("badgelist")
public Result<List<UserBadgeListResultDTO>> selectBadgeList(@RequestBody UserBadgeListFormDTO userBadgeListFormDTO){
return new Result<List<UserBadgeListResultDTO>>().ok(userBadgeService.selectBadgeList(userBadgeListFormDTO));
}
/**
* @Description 个人中心-获取徽章可操作列表点亮取消认证
* @Param userOperListFormDTO
* @author zxc
* @date 2020/11/3 4:42 下午
*/
@PostMapping("badgeoperlist")
public Result<List<UserOperListResultDTO>> selectOperList(@RequestBody UserOperListFormDTO userOperListFormDTO){
return new Result<List<UserOperListResultDTO>>().ok(userBadgeService.selectOperList(userOperListFormDTO));
}
/**
* @Description 个人中心-提交徽章认证
* @Param certificationAddFormDTO
* @author zxc
* @date 2020/11/4 1:36 下午
*/
@PostMapping("authbadgerecord")
public Result authBadgeRecord(@RequestBody CertificationAddFormDTO certificationAddFormDTO){
return userBadgeService.authBadgeRecord(certificationAddFormDTO);
}
/**
* @Description 发送验证码
* @Param badgeSendCodeFormDTO
* @author zxc
* @date 2020/11/4 3:14 下午
*/
@PostMapping("badgesendcode")
public Result badgeSendCode(@RequestBody BadgeSendCodeFormDTO badgeSendCodeFormDTO){
ValidatorUtils.validateEntity(badgeSendCodeFormDTO, BadgeSendCodeFormDTO.BadgeSendCode.class);
userBadgeService.badgeSendCode(badgeSendCodeFormDTO);
return new Result();
}
/**
* @Description 个人中心-获取徽章认证页面详情
* @Param tokenDto
* @Param certificationDetailFormDTO
* @author zxc
* @date 2020/11/4 4:03 下午
*/
@PostMapping("certification/detail")
public Result<CertificationDetailResultDTO> certificationDetail(@LoginUser TokenDto tokenDto,@RequestBody CertificationDetailFormDTO certificationDetailFormDTO){
ValidatorUtils.validateEntity(certificationDetailFormDTO);
return new Result<CertificationDetailResultDTO>().ok(userBadgeService.certificationDetail(tokenDto,certificationDetailFormDTO));
}
/**
* @Description 个人中心-查询徽章要显示的认证信息字段
* @Param authFieldFormDTO
* @author zxc
* @date 2020/11/4 5:05 下午
*/
@PostMapping("authfield")
public Result<List<AuthFieldResultDTO>> authField(@RequestBody AuthFieldFormDTO authFieldFormDTO){
ValidatorUtils.validateEntity(authFieldFormDTO, AuthFieldFormDTO.AuthField.class);
return new Result<List<AuthFieldResultDTO>>().ok(userBadgeService.authField(authFieldFormDTO));
}
/**
* @Description 个人中心-取消/点亮徽章
* @Param openedOrClosedFormDTO
* @author zxc
* @date 2020/11/4 5:47 下午
*/
@PostMapping("openedorclosed")
public Result openedOrClosed(@RequestBody OpenedOrClosedFormDTO openedOrClosedFormDTO){
userBadgeService.openedOrClosed(openedOrClosedFormDTO);
return new Result();
}
}

18
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java

@ -26,10 +26,7 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.UserResiInfoDTO;
import com.epmet.dto.form.IssueInitiatorFormDTO;
import com.epmet.dto.form.UserResiInfoFormDTO;
import com.epmet.dto.form.UserResiInfoListFormDTO;
import com.epmet.dto.form.VerificationCodeFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.IssueInitiatorResultDTO;
import com.epmet.dto.result.UserResiInfoResultDTO;
import com.epmet.excel.UserResiInfoExcel;
@ -163,4 +160,17 @@ public class UserResiInfoController {
return new Result<IssueInitiatorResultDTO>().ok(userResiInfoService.selectIssueInitiator(formDTO));
}
/**
* 修改个人信息
* @author zhaoqifeng
* @date 2020/11/3 10:28
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping("edituserinfo")
public Result editUserInfo(@RequestBody EditInfoFormDTO formDTO) {
userResiInfoService.editUserInfo(formDTO);
return new Result();
}
}

54
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/BadgeCertificationConfigDao.java

@ -0,0 +1,54 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.BadgeCertificationConfigEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 徽章认证配置
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-03
*/
@Mapper
public interface BadgeCertificationConfigDao extends BaseDao<BadgeCertificationConfigEntity> {
/**
* 获取认证信息类型
* @author zhaoqifeng
* @date 2020/11/4 14:42
* @param customerId
* @param badgeId
* @return java.util.List<java.lang.String>
*/
List<String> getCertificationType(@Param("customerId") String customerId, @Param("badgeId") String badgeId);
/**
* 删除认证信息
* @author zhaoqifeng
* @date 2020/11/4 14:43
* @param customerId
* @param badgeId
* @return int
*/
int deleteConfig(@Param("customerId") String customerId, @Param("badgeId") String badgeId);
}

162
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/BadgeDao.java

@ -0,0 +1,162 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.BadgeDTO;
import com.epmet.dto.result.*;
import com.epmet.entity.BadgeEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 徽章
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-03
*/
@Mapper
public interface BadgeDao extends BaseDao<BadgeEntity> {
/**
* 获取徽章列表
*
* @param customerId
* @return java.util.List<com.epmet.dto.result.BadgeListResultDTO>
* @author zhaoqifeng
* @date 2020/11/3 17:30
*/
List<BadgeListResultDTO> selectList(@Param("customerId") String customerId);
/**
* 重名校验
*
* @param customerId
* @param badgeName
* @return java.util.List<com.epmet.dto.result.BadgeListResultDTO>
* @author zhaoqifeng
* @date 2020/11/4 10:40
*/
List<BadgeListResultDTO> getDuplicateName(@Param("customerId") String customerId, @Param("badgeName") String badgeName);
/**
* 编辑重名校验
*
* @param customerId
* @param badgeId
* @param badgeName
* @return java.util.List<com.epmet.dto.result.BadgeListResultDTO>
* @author zhaoqifeng
* @date 2020/11/4 15:09
*/
List<BadgeListResultDTO> getDuplicateNameForEdit(@Param("customerId") String customerId, @Param("badgeId") String badgeId,
@Param("badgeName") String badgeName);
/**
* 获取徽章详情
*
* @param customerId
* @param badgeId
* @return com.epmet.dto.result.BadgeDetailResultDTO
* @author zhaoqifeng
* @date 2020/11/4 14:30
*/
BadgeDetailResultDTO selectDetail(@Param("customerId") String customerId, @Param("badgeId") String badgeId);
/**
* 获取徽章信息
*
* @param customerId
* @param badgeId
* @return com.epmet.entity.BadgeEntity
* @author zhaoqifeng
* @date 2020/11/4 15:16
*/
BadgeEntity selectBadgeInfo(@Param("customerId") String customerId, @Param("badgeId") String badgeId);
/**
* 更新徽章信息
*
* @param entity
* @return void
* @author zhaoqifeng
* @date 2020/11/4 15:38
*/
void updateBadge(BadgeEntity entity);
/**
* 删除徽章信息
*
* @param customerId
* @param badgeId
* @return void
* @author zhaoqifeng
* @date 2020/11/4 15:39
*/
void deleteBadge(@Param("customerId") String customerId, @Param("badgeId") String badgeId);
/**
* 待审核列表
*
* @param customerId
* @param pageNo
* @param pageSize
* @param gridId
* @return java.util.List<com.epmet.dto.result.BadgeAuditingResultDTO>
* @author zhaoqifeng
* @date 2020/11/5 10:01
*/
List<BadgeAuditingResultDTO> selectAuditingList(@Param("customerId") String customerId, @Param("pageNo") Integer pageNo,
@Param("pageSize") Integer pageSize, @Param("gridId") String gridId);
/**
* 审核历史列表
*
* @param customerId
* @param pageNo
* @param pageSize
* @param gridId
* @return java.util.List<com.epmet.dto.result.BadgeAuditRecordResultDTO>
* @author zhaoqifeng
* @date 2020/11/5 11:01
*/
List<BadgeAuditRecordResultDTO> selectAuditRecord(@Param("customerId") String customerId, @Param("pageNo") Integer pageNo,
@Param("pageSize") Integer pageSize, @Param("gridId") String gridId);
/**
* @param customerId
* @return java.util.List<com.epmet.dto.result.UserBadgeListResultDTO>
* @Description 查询客户的徽章
* @author wangc
* @date 2020.11.05 15:50
*/
List<UserBadgeListResultDTO> selectCustomerBadgePool(@Param("customerId") String customerId);
/**
* 插入数据
*
* @param entity
* @return void
* @author zhaoqifeng
* @date 2020/11/6 14:46
*/
void insertBadge(BadgeDTO dto);
}

33
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/ResiUserBadgeDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.ResiUserBadgeEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 用户徽章关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-06
*/
@Mapper
public interface ResiUserBadgeDao extends BaseDao<ResiUserBadgeEntity> {
}

37
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserAdviceDao.java

@ -0,0 +1,37 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.UserAdviceEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* user_advice
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-06
*/
@Mapper
public interface UserAdviceDao extends BaseDao<UserAdviceEntity> {
void replyAdvice(@Param("adviceId") String adviceId,
@Param("replyContent") String replyContent,
@Param("govContent") String govContent,
@Param("replyUserId") String loginUserId);
}

33
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserAdviceImgDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.UserAdviceImgEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 用户建议图片
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-04
*/
@Mapper
public interface UserAdviceImgDao extends BaseDao<UserAdviceImgEntity> {
}

33
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBadgeCertificateRecordDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.UserBadgeCertificateRecordEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 用户认证徽章记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-05
*/
@Mapper
public interface UserBadgeCertificateRecordDao extends BaseDao<UserBadgeCertificateRecordEntity> {
}

104
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBadgeDao.java

@ -0,0 +1,104 @@
package com.epmet.dao;
import com.epmet.dto.UserBadgeCertificateRecordDTO;
import com.epmet.dto.form.AuthFieldFormDTO;
import com.epmet.dto.form.OpenedOrClosedFormDTO;
import com.epmet.dto.form.UserBadgeListFormDTO;
import com.epmet.dto.result.AuthFieldResultDTO;
import com.epmet.dto.result.CertificationDetailResultDTO;
import com.epmet.dto.result.UserBadgeListResultDTO;
import com.epmet.dto.result.UserOperListResultDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @Author zxc
* @DateTime 2020/11/3 1:22 下午
*/
@Mapper
public interface UserBadgeDao {
/**
* @Description 查询已经点亮的徽章
* @Param userBadgeListFormDTO
* @author zxc
* @date 2020/11/3 1:33 下午
*/
List<UserBadgeListResultDTO> selectBadgeList(UserBadgeListFormDTO userBadgeListFormDTO);
/**
* @Description 查询默认徽章和改名后的徽章
* @Param userBadgeListFormDTO
* @author zxc
* @date 2020/11/3 3:11 下午
*/
List<UserBadgeListResultDTO> selectAllBadge(@Param("customerId") String customerId);
/**
* @Description 查询单个徽章信息
* @Param customerId
* @Param badgeId
* @author zxc
* @date 2020/11/9 11:17 上午
*/
UserBadgeListResultDTO selectBadgeByBadgeId(@Param("customerId") String customerId,@Param("badgeId") String badgeId);
/**
* @Description 查询徽章认证记录
* @Param userId
* @author zxc
* @date 2020/11/3 5:25 下午
*/
List<UserOperListResultDTO> selectAuthRecord(@Param("userId")String userId);
/**
* @Description 根据UserId查询个人徽章点亮信息
* @Param userId
* @author zxc
* @date 2020/11/4 9:32 上午
*/
List<UserOperListResultDTO> selectBadgeByUserId(@Param("userId")String userId);
/**
* @Description 用户认证徽章记录表插入
* @Param userBadgeCertificateRecordDTO
* @author zxc
* @date 2020/11/4 2:13 下午
*/
void insertUserBadgeCertificateRecord(UserBadgeCertificateRecordDTO userBadgeCertificateRecordDTO);
/**
* @Description 更新认证徽章记录最新
* @Param badgeId
* @Param userId
* @author zxc
* @date 2020/11/4 2:16 下午
*/
void updateCertificateRecordIsLast(@Param("badgeId")String badgeId,@Param("userId")String userId);
/**
* @Description 查询单个徽章的认证记录
* @Param userId
* @Param badgeId
* @author zxc
* @date 2020/11/4 4:09 下午
*/
CertificationDetailResultDTO selectBadgeAuthRecord(@Param("userId")String userId, @Param("badgeId")String badgeId);
/**
* @Description 个人中心-查询徽章要显示的认证信息字段
* @Param authFieldFormDTO
* @author zxc
* @date 2020/11/4 5:05 下午
*/
List<AuthFieldResultDTO> selectAuthField(AuthFieldFormDTO authFieldFormDTO);
/**
* @Description 个人中心-取消/点亮徽章
* @Param openedOrClosedFormDTO
* @author zxc
* @date 2020/11/4 6:04 下午
*/
void updateIsOpen(OpenedOrClosedFormDTO openedOrClosedFormDTO);
}

9
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java

@ -87,4 +87,13 @@ public interface UserResiInfoDao extends BaseDao<UserResiInfoEntity> {
* @Date 2020/7/22 10:58
**/
UserResiInfoDTO selectByUserId(String userId);
/**
* 根据用户ID更新
* @author zhaoqifeng
* @date 2020/11/3 14:16
* @param entity
* @return void
*/
void updateByUserId(UserResiInfoEntity entity);
}

56
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/BadgeCertificationConfigEntity.java

@ -0,0 +1,56 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 徽章认证配置
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-03
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("badge_certification_config")
public class BadgeCertificationConfigEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id 默认配置iddefault
*/
private String customerId;
/**
* 徽章ID
*/
private String badgeId;
/**
* 认证信息类型 手机号:mobile全名:fullname;身份证:idcard;认证证件: certificate;认证说明(备注):remark
*/
private String certificationType;
}

66
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/BadgeEntity.java

@ -0,0 +1,66 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 徽章
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-03
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("badge")
public class BadgeEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id 默认配置iddefault
*/
private String customerId;
/**
* 徽章名称
*/
private String badgeName;
/**
* 徽章图标url
*/
private String badgeIcon;
/**
* 固有徽章类型 前端页面跳转标识党员徽章party;none
*/
private String fixationBadgeType;
/**
* 状态 上线:online;下线:offline;
*/
private String badgeStatus;
}

71
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/ResiUserBadgeEntity.java

@ -0,0 +1,71 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 用户徽章关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("resi_user_badge")
public class ResiUserBadgeEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id 默认配置iddefault
*/
private String customerId;
/**
* 用户注册网格ID
*/
private String gridId;
/**
* 用户ID
*/
private String userId;
/**
* 徽章ID
*/
private String badgeId;
/**
* 是否开启(点亮) 1:点亮0:未点亮
*/
private Integer isOpened;
/**
* 认证(审核)状态 待审核:auditing;审核通过:pass;驳回:rejected;
*/
private String certificationAutidStatus;
}

126
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserAdviceEntity.java

@ -0,0 +1,126 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* user_advice
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("user_advice")
public class UserAdviceEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 客户名
*/
private String customerName;
/**
* 组织ID
*/
private String agencyId;
/**
* 组织名
*/
private String agencyName;
/**
* 网格ID
*/
private String gridId;
/**
* 网格名
*/
private String gridName;
/**
* userid
*/
private String userId;
/**
* 用户姓名
*/
private String userName;
/**
* 用户注册手机号
*/
private String regPhone;
/**
* 建议描述
*/
private String adviceContent;
/**
* 填写手机号
*/
private String phone;
/**
* 问题分类(gov政府software软件,逗号分隔)
*/
private String adviceType;
/**
* 回复内容
*/
private String replyContent;
/**
* 回复人id
*/
private String replyUserId;
/**
* 回复人姓名
*/
private String replyUserName;
/**
* 回复时间
*/
private Date replyTime;
/**
* 政府存证文字
*/
private String govContent;
}

56
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserAdviceImgEntity.java

@ -0,0 +1,56 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 用户建议图片
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-04
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("user_advice_img")
public class UserAdviceImgEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 建议id
*/
private String adviceId;
/**
* 类型resi为用户上传,oper为运营上传
*/
private String type;
/**
* 图片url
*/
private String imgUrl;
}

116
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserBadgeCertificateRecordEntity.java

@ -0,0 +1,116 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 用户认证徽章记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-05
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("user_badge_certificate_record")
public class UserBadgeCertificateRecordEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 用户注册网格ID
*/
private String gridId;
/**
* 用户ID
*/
private String userId;
/**
* 徽章ID
*/
private String badgeId;
/**
*
*/
private String surname;
/**
*
*/
private String name;
/**
* 手机号
*/
private String mobile;
/**
* 身份证号 网格内去重
*/
private String idNum;
/**
* 认证证件图片
*/
private String certificationImg;
/**
* 认证说明(备注)
*/
private String remaek;
/**
* 审核状态 approved:审核通过rejected:审核驳回;auditing:审核中
*/
private String auditStatus;
/**
* 审核意见
*/
private String auditRemark;
/**
* 审核人 审核人Id
*/
private String staffId;
/**
* 审核时间
*/
private Date auditTime;
/**
* 是否是最新纪录yes最新纪录no非最新纪录
*/
private String isLast;
}

107
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/UserAdviceExcel.java

@ -0,0 +1,107 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* user_advice
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-06
*/
@Data
public class UserAdviceExcel {
@Excel(name = "主键")
private String id;
@Excel(name = "客户ID")
private String customerId;
@Excel(name = "客户名")
private String customerName;
@Excel(name = "组织ID")
private String agencyId;
@Excel(name = "组织名")
private String agencyName;
@Excel(name = "网格ID")
private String gridId;
@Excel(name = "网格名")
private String gridName;
@Excel(name = "userid")
private String userId;
@Excel(name = "用户姓名")
private String userName;
@Excel(name = "用户注册手机号")
private String regPhone;
@Excel(name = "建议描述")
private String adviceContent;
@Excel(name = "填写手机号")
private String phone;
@Excel(name = "问题分类(gov政府software软件,逗号分隔)")
private String adviceType;
@Excel(name = "回复内容")
private String replyContent;
@Excel(name = "回复人id")
private String replyUserId;
@Excel(name = "回复人姓名")
private String replyUserName;
@Excel(name = "回复时间")
private Date replyTime;
@Excel(name = "政府存证文字")
private String govContent;
@Excel(name = "删除标志")
private String delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

65
epmet-user/epmet-user-server/src/main/java/com/epmet/excel/UserAdviceImgExcel.java

@ -0,0 +1,65 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 用户建议图片
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-04
*/
@Data
public class UserAdviceImgExcel {
@Excel(name = "主键")
private String id;
@Excel(name = "建议id")
private String adviceId;
@Excel(name = "类型")
private String type;
@Excel(name = "图片url")
private String imgUrl;
@Excel(name = "删除标志")
private String delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

14
epmet-user/epmet-user-server/src/main/java/com/epmet/feign/MessageFeignClient.java

@ -2,12 +2,17 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.UserMessageFormDTO;
import com.epmet.feign.fallback.MessageFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(name = ServiceConstant.EPMET_MESSAGE_SERVER, fallback = MessageFeignClientFallback.class)
public interface MessageFeignClient {
@ -18,4 +23,13 @@ public interface MessageFeignClient {
@GetMapping(value = "message/sms/captcha/{mobile}")
Result sendSmsCaptcha(@PathVariable("mobile") String mobile);
/**
* @param msgList
* @return com.epmet.commons.tools.utils.Result
* @Author sun
* @Description 批量推送消息
**/
@PostMapping(value = "message/usermessage/saveusermessagelist", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
Result saveUserMessageList(List<UserMessageFormDTO> msgList);
}

14
epmet-user/epmet-user-server/src/main/java/com/epmet/feign/fallback/MessageFeignClientFallback.java

@ -3,9 +3,12 @@ package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.UserMessageFormDTO;
import com.epmet.feign.MessageFeignClient;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 消息服务降级
*/
@ -17,4 +20,15 @@ public class MessageFeignClientFallback implements MessageFeignClient {
return ModuleUtils.feignConError(ServiceConstant.EPMET_MESSAGE_SERVER, "sendSmsCaptcha", mobile);
}
/**
* @param msgList
* @return com.epmet.commons.tools.utils.Result
* @Author sun
* @Description 批量推送消息
**/
@Override
public Result saveUserMessageList(List<UserMessageFormDTO> msgList) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_MESSAGE_SERVER, "saveUserMessageList", msgList);
}
}

47
epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserAdviceImgRedis.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 用户建议图片
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-04
*/
@Component
public class UserAdviceImgRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserAdviceRedis.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* user_advice
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-06
*/
@Component
public class UserAdviceRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

150
epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBadgeRedis.java

@ -0,0 +1,150 @@
package com.epmet.redis;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.constant.BadgeConstant;
import com.epmet.constant.UserRedisKeys;
import com.epmet.dao.BadgeDao;
import com.epmet.dto.form.UserBadgeUnitFormDTO;
import com.epmet.dto.result.UserBadgeListResultDTO;
import com.epmet.service.UserBadgeService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Optional;
import static com.epmet.commons.tools.redis.RedisUtils.MINUTE_THIRTY_EXPIRE;
/**
* @Author zxc
* @DateTime 2020/11/3 2:21 下午
*/
@Component
@Slf4j
public class UserBadgeRedis {
@Autowired
private RedisUtils redisUtils;
@Autowired
private BadgeDao badgeDao;
@Autowired
private UserBadgeService badgeService;
/**
* @Description 获取客户徽章信息
* @Param customerId
* @author zxc
* @date 2020/11/3 2:50 下午
*/
public Object getCustomerBadge(String customerId) {
Object userBadge = redisUtils.hGet(BadgeConstant.BADGE_KEY + customerId, BadgeConstant.BADGE);
return userBadge;
}
/**
* @Description 存放客户徽章信息
* @Param userBadge
* @Param customerId
* @author zxc
* @date 2020/11/3 2:51 下午
*/
public void setCustomerBadge(List<UserBadgeListResultDTO> userBadge, String customerId) {
redisUtils.hSet(BadgeConstant.BADGE_KEY + customerId, BadgeConstant.BADGE, JSON.toJSON(userBadge).toString(), -1);
}
/**
* @Description 删除客户徽章信息
* @Param customerId
* @author zxc
* @date 2020/11/5 3:06 下午
*/
public void delCustomerBadge(String customerId) {
redisUtils.hDel(BadgeConstant.BADGE_KEY + customerId, BadgeConstant.BADGE);
}
/**
* @Description 存放徽章审核 手机验证码
* @Param mobile
* @author zxc
* @date 2020/11/5 10:30 上午
*/
public void saveBadgeSmsCode(String mobile, String smsCode) {
String smsCodeKey = BadgeConstant.SMS_CODE_KEY + mobile;
redisUtils.set(smsCodeKey, smsCode, MINUTE_THIRTY_EXPIRE);
}
/**
* @Description 获取徽章审核 手机验证码
* @Param mobile
* @author zxc
* @date 2020/11/5 10:30 上午
*/
public String getBadgeSmsCode(String mobile) {
String smsCodeKey = BadgeConstant.SMS_CODE_KEY + mobile;
String smsCode = (String) redisUtils.get(smsCodeKey);
return smsCode;
}
/**
* @param userId
* @return java.util.List<com.epmet.dto.form.UserBadgeUnitFormDTO>
* @Description 获取用户的全部勋章信息(点亮的 排序从前到后)
* @author wangc
* @date 2020.11.05 13:26
*/
public List<UserBadgeUnitFormDTO> obtainUserBadge2List(String userId,String customerId) {
//TODO 补偿
return redisUtils.lrange(UserRedisKeys.getResiUserBadgeKey(customerId,userId), NumConstant.ZERO, NumConstant.ONE_NEG, UserBadgeUnitFormDTO.class);
}
/**
* 用户点亮或取消徽章
* @param
* @return int
* @Description 入栈时使用lpush 出栈时使用lrem
* @author wangc
* @date 2020.11.05 13:37
*/
public long pushOrRemoveUserBadge4List(String userId, String badgeId, String customerId) {
List<UserBadgeUnitFormDTO> orient = obtainUserBadge2List(userId,customerId);
UserBadgeUnitFormDTO unit = null;
if (!CollectionUtils.isEmpty(orient)) {
Optional<UserBadgeUnitFormDTO> opt = orient.stream().filter(badge -> StringUtils.equals(badgeId, badge.getBadgeId())).findFirst();
if (opt.isPresent()) {
unit = opt.get();
return redisUtils.lrem(UserRedisKeys.getResiUserBadgeKey(customerId, userId), NumConstant.ONE, unit);
}
}
//徽章池
Object badgeObj = getCustomerBadge(customerId);
List<UserBadgeListResultDTO> badgePool =
null == badgeObj ? badgeDao.selectCustomerBadgePool(customerId) : JSON.parseArray(badgeObj.toString(), UserBadgeListResultDTO.class);
if (CollectionUtils.isEmpty(badgePool)) {
log.error("com.epmet.redis.UserBadgeRedis.pushOrRemoveUserBadge4List,缓存中客户{}下的徽章池为空", customerId);
return NumConstant.ZERO;
}
if (null == unit) {
Optional<UserBadgeListResultDTO> poolOpt =
badgePool.stream().filter(badge -> StringUtils.equals(badge.getBadgeId(), badgeId)).findFirst();
if (poolOpt.isPresent()) unit = ConvertUtils.sourceToTarget(poolOpt.get(), UserBadgeUnitFormDTO.class);
else return NumConstant.ZERO;
}
redisUtils.leftPush(UserRedisKeys.getResiUserBadgeKey(customerId, userId), unit);
return NumConstant.ONE;
}
}

127
epmet-user/epmet-user-server/src/main/java/com/epmet/service/BadgeCertificationConfigService.java

@ -0,0 +1,127 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.BadgeCertificationConfigDTO;
import com.epmet.entity.BadgeCertificationConfigEntity;
import java.util.List;
import java.util.Map;
/**
* 徽章认证配置
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-03
*/
public interface BadgeCertificationConfigService extends BaseService<BadgeCertificationConfigEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<BadgeCertificationConfigDTO>
* @author generator
* @date 2020-11-03
*/
PageData<BadgeCertificationConfigDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<BadgeCertificationConfigDTO>
* @author generator
* @date 2020-11-03
*/
List<BadgeCertificationConfigDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return BadgeCertificationConfigDTO
* @author generator
* @date 2020-11-03
*/
BadgeCertificationConfigDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-11-03
*/
void save(BadgeCertificationConfigDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-11-03
*/
void update(BadgeCertificationConfigDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-11-03
*/
void delete(String[] ids);
/**
* 获取认证信息类型
* @author zhaoqifeng
* @date 2020/11/4 14:39
* @param customerId
* @param badgeId
* @return java.util.List<java.lang.String>
*/
List<String> getCertificationType(String customerId, String badgeId);
/**
* 保存认证信息配置
* @author zhaoqifeng
* @date 2020/11/4 15:29
* @param customerId
* @param badgeId
* @param list
* @return void
*/
void saveConfig(String customerId, String badgeId, List<BadgeCertificationConfigEntity> list);
/**
* 删除配置
* @author zhaoqifeng
* @date 2020/11/4 15:41
* @param customerId
* @param badgeId
* @return void
*/
void deleteConfig(String customerId, String badgeId);
}

185
epmet-user/epmet-user-server/src/main/java/com/epmet/service/BadgeService.java

@ -0,0 +1,185 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.BadgeDTO;
import com.epmet.dto.form.AddBadgeFormDTO;
import com.epmet.dto.form.BadgeAuditFormDTO;
import com.epmet.dto.form.BadgeFormDTO;
import com.epmet.dto.form.EditBadgeFormDTO;
import com.epmet.dto.result.BadgeAuditRecordResultDTO;
import com.epmet.dto.result.BadgeAuditingResultDTO;
import com.epmet.dto.result.BadgeDetailResultDTO;
import com.epmet.dto.result.BadgeListResultDTO;
import com.epmet.entity.BadgeEntity;
import java.util.List;
import java.util.Map;
/**
* 徽章
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-03
*/
public interface BadgeService extends BaseService<BadgeEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<BadgeDTO>
* @author generator
* @date 2020-11-03
*/
PageData<BadgeDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<BadgeDTO>
* @author generator
* @date 2020-11-03
*/
List<BadgeDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return BadgeDTO
* @author generator
* @date 2020-11-03
*/
BadgeDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-11-03
*/
void save(BadgeDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-11-03
*/
void update(BadgeDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-11-03
*/
void delete(String[] ids);
/**
* 获取徽章列表
* @author zhaoqifeng
* @date 2020/11/3 17:04
* @param customerId
* @return java.util.List<com.epmet.dto.result.BadgeListResultDTO>
*/
List<BadgeListResultDTO> getList(String customerId);
/**
* 添加徽章
* @author zhaoqifeng
* @date 2020/11/4 10:09
* @param tokenDto
* @param formDTO
* @return void
*/
void add(TokenDto tokenDto, AddBadgeFormDTO formDTO);
/**
* 徽章详情
* @author zhaoqifeng
* @date 2020/11/4 14:25
* @param tokenDto
* @param formDTO
* @return com.epmet.dto.result.BadgeDetailResultDTO
*/
BadgeDetailResultDTO detail(TokenDto tokenDto, BadgeFormDTO formDTO);
/**
* 编辑徽章
* @author zhaoqifeng
* @date 2020/11/4 14:28
* @param tokenDto
* @param formDTO
* @return void
*/
void edit(TokenDto tokenDto, EditBadgeFormDTO formDTO);
/**
* 删除徽章
* @author zhaoqifeng
* @date 2020/11/4 15:34
* @param tokenDto
* @param formDTO
* @return void
*/
void deleteBadge(TokenDto tokenDto, BadgeFormDTO formDTO);
/**
* 待审核列表
* @author zhaoqifeng
* @date 2020/11/5 9:50
* @param tokenDto
* @param formDTO
* @return java.util.List<com.epmet.dto.result.BadgeAuditingResultDTO>
*/
List<BadgeAuditingResultDTO> auditingList(TokenDto tokenDto, BadgeFormDTO formDTO);
/**
* 审核历史列表
* @author zhaoqifeng
* @date 2020/11/5 10:59
* @param tokenDto
* @param formDTO
* @return java.util.List<com.epmet.dto.result.BadgeAuditRecordResultDTO>
*/
List<BadgeAuditRecordResultDTO> auditRecord(TokenDto tokenDto, BadgeFormDTO formDTO);
/**
* 审核
* @author zhaoqifeng
* @date 2020/11/5 11:08
* @param tokenDto
* @param formDTO
* @return void
*/
void audit(TokenDto tokenDto, BadgeAuditFormDTO formDTO);
void testCache();
}

95
epmet-user/epmet-user-server/src/main/java/com/epmet/service/ResiUserBadgeService.java

@ -0,0 +1,95 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.ResiUserBadgeDTO;
import com.epmet.entity.ResiUserBadgeEntity;
import java.util.List;
import java.util.Map;
/**
* 用户徽章关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-06
*/
public interface ResiUserBadgeService extends BaseService<ResiUserBadgeEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ResiUserBadgeDTO>
* @author generator
* @date 2020-11-06
*/
PageData<ResiUserBadgeDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ResiUserBadgeDTO>
* @author generator
* @date 2020-11-06
*/
List<ResiUserBadgeDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return ResiUserBadgeDTO
* @author generator
* @date 2020-11-06
*/
ResiUserBadgeDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-11-06
*/
void save(ResiUserBadgeDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-11-06
*/
void update(ResiUserBadgeDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-11-06
*/
void delete(String[] ids);
}

104
epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserAdviceImgService.java

@ -0,0 +1,104 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.UserAdviceImgDTO;
import com.epmet.entity.UserAdviceImgEntity;
import java.util.List;
import java.util.Map;
/**
* 用户建议图片
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-04
*/
public interface UserAdviceImgService extends BaseService<UserAdviceImgEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<UserAdviceImgDTO>
* @author generator
* @date 2020-11-04
*/
PageData<UserAdviceImgDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<UserAdviceImgDTO>
* @author generator
* @date 2020-11-04
*/
List<UserAdviceImgDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return UserAdviceImgDTO
* @author generator
* @date 2020-11-04
*/
UserAdviceImgDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-11-04
*/
void save(UserAdviceImgDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-11-04
*/
void update(UserAdviceImgDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-11-04
*/
void delete(String[] ids);
/**
* @Description 根据adviceId获取关联的图片
* @param adviceId
* @return void
* @Author liushaowen
* @Date 2020/11/9 9:59
*/
List<UserAdviceImgEntity> getImgsByAdviceId(String adviceId);
}

126
epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserAdviceService.java

@ -0,0 +1,126 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.UserAdviceDTO;
import com.epmet.dto.form.AdviceListFormDTO;
import com.epmet.dto.form.ReplyAdviceFormDTO;
import com.epmet.dto.result.AdviceDetailResultDTO;
import com.epmet.entity.UserAdviceEntity;
import java.util.List;
import java.util.Map;
/**
* user_advice
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-11-06
*/
public interface UserAdviceService extends BaseService<UserAdviceEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<UserAdviceDTO>
* @author generator
* @date 2020-11-06
*/
PageData<UserAdviceDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<UserAdviceDTO>
* @author generator
* @date 2020-11-06
*/
List<UserAdviceDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return UserAdviceDTO
* @author generator
* @date 2020-11-06
*/
UserAdviceDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-11-06
*/
void save(UserAdviceDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-11-06
*/
void update(UserAdviceDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-11-06
*/
void delete(String[] ids);
/**
* @Description 回复建议
* @param dto
* @param loginUserId
* @return void
* @Author liushaowen
* @Date 2020/11/6 16:44
*/
void replyAdvice(ReplyAdviceFormDTO dto, String loginUserId);
/**
* @Description 建议详情
* @param adviceId
* @return com.epmet.dto.result.AdviceDetailResultDTO
* @Author liushaowen
* @Date 2020/11/6 17:19
*/
AdviceDetailResultDTO adviceDetail(String adviceId);
/**
* @Description 查询建议列表
* @param dto
* @return com.epmet.commons.tools.page.PageData<com.epmet.dto.UserAdviceDTO>
* @Author liushaowen
* @Date 2020/11/9 10:41
*/
PageData<UserAdviceDTO> adviceList(AdviceListFormDTO dto);
}

95
epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBadgeCertificateRecordService.java

@ -0,0 +1,95 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.UserBadgeCertificateRecordDTO;
import com.epmet.entity.UserBadgeCertificateRecordEntity;
import java.util.List;
import java.util.Map;
/**
* 用户认证徽章记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-05
*/
public interface UserBadgeCertificateRecordService extends BaseService<UserBadgeCertificateRecordEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<UserBadgeCertificateRecordDTO>
* @author generator
* @date 2020-11-05
*/
PageData<UserBadgeCertificateRecordDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<UserBadgeCertificateRecordDTO>
* @author generator
* @date 2020-11-05
*/
List<UserBadgeCertificateRecordDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return UserBadgeCertificateRecordDTO
* @author generator
* @date 2020-11-05
*/
UserBadgeCertificateRecordDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-11-05
*/
void save(UserBadgeCertificateRecordDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-11-05
*/
void update(UserBadgeCertificateRecordDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-11-05
*/
void delete(String[] ids);
}

84
epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBadgeService.java

@ -0,0 +1,84 @@
package com.epmet.service;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.*;
import com.epmet.dto.result.AuthFieldResultDTO;
import com.epmet.dto.result.CertificationDetailResultDTO;
import com.epmet.dto.result.UserBadgeListResultDTO;
import com.epmet.dto.result.UserOperListResultDTO;
import java.util.List;
/**
* @Author zxc
* @DateTime 2020/11/3 11:18 上午
*/
public interface UserBadgeService {
/**
* @Description 查询已经点亮的徽章
* @Param userBadgeListFormDTO
* @author zxc
* @date 2020/11/3 1:33 下午
*/
List<UserBadgeListResultDTO> selectBadgeList(UserBadgeListFormDTO userBadgeListFormDTO);
/**
* @Description 个人中心-获取徽章可操作列表点亮取消认证
* @Param userOperListFormDTO
* @author zxc
* @date 2020/11/3 4:42 下午
*/
List<UserOperListResultDTO> selectOperList(UserOperListFormDTO userOperListFormDTO);
/**
* @Description 个人中心-提交徽章认证
* @Param certificationAddFormDTO
* @author zxc
* @date 2020/11/4 1:36 下午
*/
Result authBadgeRecord(CertificationAddFormDTO certificationAddFormDTO);
/**
* @Description 发送验证码
* @Param badgeSendCodeFormDTO
* @author zxc
* @date 2020/11/4 3:14 下午
*/
void badgeSendCode(BadgeSendCodeFormDTO badgeSendCodeFormDTO);
/**
* @Description 个人中心-获取徽章认证页面详情
* @Param tokenDto
* @Param certificationDetailFormDTO
* @author zxc
* @date 2020/11/4 4:03 下午
*/
CertificationDetailResultDTO certificationDetail(TokenDto tokenDto, CertificationDetailFormDTO certificationDetailFormDTO);
/**
* @Description 个人中心-查询徽章要显示的认证信息字段
* @Param authFieldFormDTO
* @author zxc
* @date 2020/11/4 5:05 下午
*/
List<AuthFieldResultDTO> authField(AuthFieldFormDTO authFieldFormDTO);
/**
* @Description 个人中心-取消/点亮徽章
* @Param openedOrClosedFormDTO
* @author zxc
* @date 2020/11/4 5:47 下午
*/
void openedOrClosed(OpenedOrClosedFormDTO openedOrClosedFormDTO);
/**
* @Description 客户徽章缓存初始化
* @Param customerId
* @author zxc
* @date 2020/11/5 3:12 下午
*/
void reloadCustomerBadge(String customerId);
}

14
epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserResiInfoService.java

@ -21,10 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.UserResiInfoDTO;
import com.epmet.dto.form.IssueInitiatorFormDTO;
import com.epmet.dto.form.UserResiInfoFormDTO;
import com.epmet.dto.form.UserResiInfoListFormDTO;
import com.epmet.dto.form.VerificationCodeFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.IssueInitiatorResultDTO;
import com.epmet.dto.result.UserResiInfoResultDTO;
import com.epmet.entity.UserResiInfoEntity;
@ -151,4 +148,13 @@ public interface UserResiInfoService extends BaseService<UserResiInfoEntity> {
* @date 2020/5/11 10:59
*/
IssueInitiatorResultDTO selectIssueInitiator(IssueInitiatorFormDTO formDTO);
/**
* 修改个人信息
* @author zhaoqifeng
* @date 2020/11/3 10:29
* @param formDTO
* @return void
*/
void editUserInfo(EditInfoFormDTO formDTO);
}

149
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/BadgeCertificationConfigServiceImpl.java

@ -0,0 +1,149 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.BadgeCertificationConfigDao;
import com.epmet.dto.BadgeCertificationConfigDTO;
import com.epmet.entity.BadgeCertificationConfigEntity;
import com.epmet.service.BadgeCertificationConfigService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 徽章认证配置
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-11-03
*/
@Service
public class BadgeCertificationConfigServiceImpl extends BaseServiceImpl<BadgeCertificationConfigDao, BadgeCertificationConfigEntity> implements BadgeCertificationConfigService {
@Override
public PageData<BadgeCertificationConfigDTO> page(Map<String, Object> params) {
IPage<BadgeCertificationConfigEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, BadgeCertificationConfigDTO.class);
}
@Override
public List<BadgeCertificationConfigDTO> list(Map<String, Object> params) {
List<BadgeCertificationConfigEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, BadgeCertificationConfigDTO.class);
}
private QueryWrapper<BadgeCertificationConfigEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<BadgeCertificationConfigEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public BadgeCertificationConfigDTO get(String id) {
BadgeCertificationConfigEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, BadgeCertificationConfigDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(BadgeCertificationConfigDTO dto) {
BadgeCertificationConfigEntity entity = ConvertUtils.sourceToTarget(dto, BadgeCertificationConfigEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(BadgeCertificationConfigDTO dto) {
BadgeCertificationConfigEntity entity = ConvertUtils.sourceToTarget(dto, BadgeCertificationConfigEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* 获取认证信息类型
*
* @param customerId
* @param badgeId
* @return java.util.List<java.lang.String>
* @author zhaoqifeng
* @date 2020/11/4 14:39
*/
@Override
public List<String> getCertificationType(String customerId, String badgeId) {
List<String> list = baseDao.getCertificationType(customerId, badgeId);
if (CollectionUtils.isEmpty(list)) {
list = baseDao.getCertificationType("default", badgeId);
}
return list;
}
/**
* 保存认证信息配置
*
* @param list
* @return void
* @author zhaoqifeng
* @date 2020/11/4 15:28
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void saveConfig(String customerId, String badgeId, List<BadgeCertificationConfigEntity> list) {
baseDao.deleteConfig(customerId, badgeId);
insertBatch(list);
}
/**
* 删除配置
*
* @param customerId
* @param badgeId
* @return void
* @author zhaoqifeng
* @date 2020/11/4 15:41
*/
@Override
public void deleteConfig(String customerId, String badgeId) {
baseDao.deleteConfig(customerId, badgeId);
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save