Browse Source

Merge branches 'dev' and 'dev_voice' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_voice

dev_shibei_match
yinzuomei 5 years ago
parent
commit
0b0f05f8ad
  1. 3
      epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java
  2. 7
      epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java
  3. 4
      epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/annotation/DataFilter.java
  4. 26
      epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/aspect/DataFilterAspect.java
  5. 5
      epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/dto/form/GetSQLFilterFormDTO.java
  6. 2
      epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/feign/MybatisGovAccessFeignClient.java
  7. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/EpmetRoleKeyConstant.java
  8. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java
  9. 5
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java
  10. 45
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java
  11. 21
      epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java
  12. 31
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java
  13. 25
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java
  14. 4
      epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/service/impl/DemoServiceImpl.java
  15. 22
      epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/EpmetMessageOpenFeignClient.java
  16. 14
      epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/fallback/EpmetMessageOpenFeignClientFallback.java
  17. 10
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SysSmsServiceImpl.java
  18. 21
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
  19. 5
      epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/GetSQLFilterFormDTO.java
  20. 54
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java
  21. 16
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  22. 14
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  23. 6
      epmet-module/gov-org/gov-org-client/pom.xml
  24. 40
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/GovOrgSelfFeignClient.java
  25. 29
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/fallback/GovOrgSelfFeignClientFallBack.java
  26. 44
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyDeptList.java
  27. 44
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyGridList.java
  28. 41
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyGridListResultDTO.java
  29. 66
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ArticleGridResultDTO.java
  30. 53
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PublishAgencyListResultDTO.java
  31. 27
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
  32. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
  33. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java
  34. 26
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
  35. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  36. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerDepartmentDao.java
  37. 16
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java
  38. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java
  39. 7
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java
  40. 21
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
  41. 180
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  42. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java
  43. 13
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  44. 17
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml
  45. 26
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml
  46. 12
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml
  47. 11
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml
  48. 16
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java
  49. 14
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java
  50. 23
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/CommonFeignClient.java
  51. 24
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/fallback/CommonFeignClientFallBack.java
  52. 3
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java
  53. 6
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  54. 106
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleContentDTO.java
  55. 96
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleCoverDTO.java
  56. 157
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleDTO.java
  57. 101
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleOperateRecordDTO.java
  58. 117
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticlePublishRangeDTO.java
  59. 91
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleTagsDTO.java
  60. 91
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleVisitRecordDTO.java
  61. 106
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftContentDTO.java
  62. 96
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftCoverDTO.java
  63. 147
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftDTO.java
  64. 117
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftPublishRangeDTO.java
  65. 86
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/TagCustomerDTO.java
  66. 76
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/TagDefaultDTO.java
  67. 96
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/TagGridDTO.java
  68. 25
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/ArticleOperationFormDTO.java
  69. 43
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/ArticlePageFormDTO.java
  70. 34
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/CommonArticleListFormDTO.java
  71. 22
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/CorrelationTagListFormDTO.java
  72. 25
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DeleteDraftFormDTO.java
  73. 86
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftAttrFromDTO.java
  74. 80
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java
  75. 25
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftDetailFormDTO.java
  76. 23
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftListFormDTO.java
  77. 24
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GovArticleDetailFormDTO.java
  78. 33
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/OffLineArticleFormDTO.java
  79. 23
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/OfflineListFormDTO.java
  80. 29
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/PublishGridListFormDTO.java
  81. 30
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/PublishedListFormDTO.java
  82. 37
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/ResiArticleDetailFormDTO.java
  83. 37
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/ResiTagListFormDTO.java
  84. 37
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/TagCascadeListFormDTO.java
  85. 0
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/.gitkeep
  86. 31
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleBannerResultDTO.java
  87. 26
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleContentResultDTO.java
  88. 59
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleDetailResultDTO.java
  89. 41
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleLatestResultDTO.java
  90. 46
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleListResultDTO.java
  91. 19
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleOperationResultDTO.java
  92. 27
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/CorrelationTagListResultDTO.java
  93. 35
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/CoverImgDTO.java
  94. 79
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftAttrResultDTO.java
  95. 45
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftContentDetailDTO.java
  96. 30
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftContentResultDTO.java
  97. 62
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftDetailResultDTO.java
  98. 34
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftListResultDTO.java
  99. 25
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovArticleContentDTO.java
  100. 69
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovArticleDetailResultDTO.java

3
epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java

@ -20,7 +20,6 @@ import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.feign.GovOrgFeignClient;
import com.epmet.feign.MessageFeignClient;
import com.epmet.jwt.JwtTokenProperties;
import com.epmet.jwt.JwtTokenUtils;
import com.epmet.redis.CaptchaRedis;
@ -51,8 +50,6 @@ public class GovLoginServiceImpl implements GovLoginService {
@Autowired
private CaptchaRedis captchaRedis;
@Autowired
private MessageFeignClient messageFeignClient;
@Autowired
private JwtTokenUtils jwtTokenUtils;
@Autowired
private JwtTokenProperties jwtTokenProperties;

7
epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java

@ -4,7 +4,6 @@ import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
import cn.binarywang.wx.miniapp.bean.WxMaUserInfo;
import com.epmet.common.token.constant.LoginConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.ErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.password.PasswordUtils;
@ -17,7 +16,7 @@ import com.epmet.dto.form.*;
import com.epmet.dto.result.PasswordLoginUserInfoResultDTO;
import com.epmet.dto.result.UserTokenResultDTO;
import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.feign.OperAccessFeignClient;
import com.epmet.feign.OperAccessOpenFeignClient;
import com.epmet.jwt.JwtTokenProperties;
import com.epmet.jwt.JwtTokenUtils;
import com.epmet.service.CaptchaService;
@ -63,7 +62,7 @@ public class LoginServiceImpl implements LoginService {
private CaptchaService captchaService;
@Autowired
private OperAccessFeignClient operAccessFeignClient;
private OperAccessOpenFeignClient operAccessOpenFeignClient;
/**
* 居民端微信小程序登录
@ -321,7 +320,7 @@ public class LoginServiceImpl implements LoginService {
}
cpUserDetailRedis.logout(tokenDto.getApp(), tokenDto.getClient(), tokenDto.getUserId());
//web端清空菜单栏和权限
Result operAccessResult = operAccessFeignClient.clearOperUserAccess();
Result operAccessResult = operAccessOpenFeignClient.clearOperUserAccess();
if (operAccessResult.success()) {
logger.info(String.format("运营人员%s退出成功,清空菜单和权限redis成功", tokenDto.getUserId()));
} else {

4
epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/annotation/DataFilter.java

@ -32,12 +32,12 @@ public @interface DataFilter {
* public void test(String a, String b, String gridId) {...}
* @return
*/
String gridIdsArgName() default "";
String gridIdArgName() default "";
/**
* 部门ID参数名
* @return
*/
String deptIdsArgName() default "";
String deptIdArgName() default "";
}

26
epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/aspect/DataFilterAspect.java

@ -19,8 +19,6 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Set;
/**
* 数据过滤切面处理类
*
@ -59,24 +57,24 @@ public class DataFilterAspect {
MethodSignature methodSignature = (MethodSignature) point.getSignature();
DataFilter dataFilterAnno = methodSignature.getMethod().getAnnotation(DataFilter.class);
String tableAlias = dataFilterAnno.tableAliases()[0];
String gridIdsArgName = dataFilterAnno.gridIdsArgName();
String deptIdsArgName = dataFilterAnno.deptIdsArgName();
String gridIdArgName = dataFilterAnno.gridIdArgName();
String deptIdArgName = dataFilterAnno.deptIdArgName();
String[] parameterNames = methodSignature.getParameterNames();
// 取出注解参数中指定的gridId和deptId的入参的值
Set<String> gridIds = null;
Set<String> deptIds = null;
if (StringUtils.isNotBlank(gridIdsArgName)) {
int gridIdArgIndex = ArrayUtils.indexOf(parameterNames, gridIdsArgName);
String gridId = null;
String deptId = null;
if (StringUtils.isNotBlank(gridIdArgName)) {
int gridIdArgIndex = ArrayUtils.indexOf(parameterNames, gridIdArgName);
if (gridIdArgIndex >-1){
gridIds = (Set<String>) point.getArgs()[gridIdArgIndex];
gridId = (String) point.getArgs()[gridIdArgIndex];
}
}
if (StringUtils.isNotBlank(deptIdsArgName)) {
int deptArgIndex = ArrayUtils.indexOf(parameterNames, deptIdsArgName);
if (StringUtils.isNotBlank(deptIdArgName)) {
int deptArgIndex = ArrayUtils.indexOf(parameterNames, deptIdArgName);
if (deptArgIndex > -1) {
deptIds = (Set<String>) point.getArgs()[deptArgIndex];
deptId = (String) point.getArgs()[deptArgIndex];
}
}
@ -86,8 +84,8 @@ public class DataFilterAspect {
form.setApp(loginUserUtil.getLoginUserApp());
form.setClient(loginUserUtil.getLoginUserClient());
form.setUserId(loginUserUtil.getLoginUserId());
form.setDepartmentIds(deptIds);
form.setGridIds(gridIds);
form.setDepartmentId(deptId);
form.setGridId(gridId);
form.setOperationKey(requirePermission);
form.setTableAlias(tableAlias);
Result<String> sqlFilterSegmentRst = mybatisGovAccessFeignClient.getSqlFilterSegment(form);

5
epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/dto/form/GetSQLFilterFormDTO.java

@ -3,7 +3,6 @@ package com.epmet.commons.mybatis.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.Set;
@Data
public class GetSQLFilterFormDTO {
@ -22,8 +21,8 @@ public class GetSQLFilterFormDTO {
private String tableAlias;
private Set<String> gridIds;
private String gridId;
private Set<String> departmentIds;
private String departmentId;
}

2
epmet-commons/epmet-commons-mybatis/src/main/java/com/epmet/commons/mybatis/feign/MybatisGovAccessFeignClient.java

@ -16,7 +16,7 @@ import java.util.Set;
* @Description
* @Author sun
*/
//@FeignClient(name = ServiceConstant.GOV_ACCESS_SERVER, fallback = MybatisGovAccessFeignClientFallback.class, url = "localhost:8099")
//, url = "localhost:8099"
@FeignClient(name = ServiceConstant.GOV_ACCESS_SERVER, fallback = MybatisGovAccessFeignClientFallback.class)
public interface MybatisGovAccessFeignClient {

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/EpmetRoleKeyConstant.java

@ -1,7 +1,7 @@
package com.epmet.commons.tools.constant;
/**
* @Description
* @Description 居民端角色key
* @Author yinzuomei
* @Date 2020/3/30 16:38
*/

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java

@ -16,6 +16,7 @@ public interface NumConstant {
int TWO = 2;
int THREE = 3;
int FOUR = 4;
int FIVE = 5;
int SIX = 6;
int SEVEN = 7;
int EIGHT = 8;

5
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java

@ -100,12 +100,13 @@ public enum RequirePermissionEnum {
WORK_PARTY_VOICE_PUBLISHED_LIST("work_party_voice_published_list", "党建声音:已发布列表", "已发布文章列表查询"),
WORK_PARTY_VOICE_DETAIL("work_party_voice_detail", "党建声音:文章详情", "已发布详情、已下线详情"),
WORK_PARTY_VOICE_DRAFT_LIST("work_party_voice_draft_list", "党建声音:草稿箱列表", "草稿箱列表"),
WORK_PARTY_VOICE_DRAFT_EDIT("work_party_voice_draft_edit", "党建声音:编辑草稿", "编辑草稿"),
WORK_PARTY_VOICE_DRAFT_DELETE("work_party_voice_draft_delete", "党建声音:删除草稿", "删除草稿"),
WORK_PARTY_VOICE_OFFLINE_LIST("work_party_voice_offline_list", "党建声音:已下线列表", "已下线文章列表"),
WORK_PARTY_VOICE_PUBLISH("work_party_voice_publish", "党建声音:创建文章", ""),
WORK_PARTY_VOICE_EDIT("work_party_voice_edit", "党建声音:重新编辑", ""),
WORK_PARTY_VOICE_OFFLINE("work_party_voice_offline", "党建声音:下线文章", "");
WORK_PARTY_VOICE_OFFLINE("work_party_voice_offline", "党建声音:下线文章", ""),
WORK_PARTY_VOICE_OPERATION_LIST("work_party_voice_operation_list","党建声音:查看文章操作记录","");
private String key;

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

@ -9,15 +9,18 @@
package com.epmet.commons.tools.redis;
import com.epmet.commons.tools.constant.NumConstant;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.ZSetOperations;
import org.springframework.data.redis.support.atomic.RedisAtomicLong;
import org.springframework.stereotype.Component;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
@ -262,4 +265,46 @@ public class RedisUtils {
return hGetAll(key);
}
/**
* @Description 获取集合的元素, 从大到小排序
* @param key
* @param start
* @param end
* @author zxc
*/
public Set<Object> zRevRange(String key, long start, long end) {
return redisTemplate.opsForZSet().reverseRange(key, start, end);
}
/**
* @Description 获取key集合与多个集合的交集
* @param key
* @param otherKeys
* @author zxc
*/
public Set<Object> intersect(String key, Collection<String> otherKeys) {
return redisTemplate.opsForSet().intersect(key, otherKeys);
}
/**
* @Description 获取集合set
* @param key
* @author zxc
*/
public Set<Object> sMembers(String key){
return redisTemplate.opsForSet().members(key);
}
/**
* @Description 获取 zset 中带score的集合
* @param key
* @param start
* @param end
* @author zxc
*/
public Set<ZSetOperations.TypedTuple<Object>> zReverseRangeWithScores(String key, long start, long end) {
Set<ZSetOperations.TypedTuple<Object>> typedTuples = redisTemplate.opsForZSet().reverseRangeWithScores(key, start, end);
return typedTuples;
}
}

21
epmet-gateway/src/main/java/com/epmet/filter/CpAuthGatewayFilterFactory.java

@ -72,7 +72,17 @@ public class CpAuthGatewayFilterFactory extends AbstractGatewayFilterFactory<CpA
logger.info("CpAuthGatewayFilterFactory当前requestUri=[" + requestUri + "]CpAuthGatewayFilterFactory拦截成功");
String token = getTokenFromRequest(request);
BaseTokenDto baseTokenDto = StringUtils.isNotBlank(token) ? getBaseTokenDto(token, jwtTokenUtils) : null;
//BaseTokenDto baseTokenDto = StringUtils.isNotBlank(token) ? getBaseTokenDto(token, jwtTokenUtils) : null;
BaseTokenDto baseTokenDto;
if(StringUtils.isNotBlank(token)){
try{
baseTokenDto = getBaseTokenDto(token, jwtTokenUtils);
}catch(RenException e){
return response(exchange,new Result<>().error(e.getCode(),e.getMsg()));
}
}else{
baseTokenDto = null;
}
String customerId = "";
@ -117,14 +127,17 @@ public class CpAuthGatewayFilterFactory extends AbstractGatewayFilterFactory<CpA
if (baseTokenDto != null) {
String redisKey = baseTokenDto.getApp() + "-" + baseTokenDto.getClient() + "-" + baseTokenDto.getUserId();
logger.info("redisKey=" + redisKey);
ServerHttpRequest build = exchange.getRequest().mutate()
exchange.getRequest().mutate()
.header(Constant.APP_USER_KEY, redisKey)
.header(AppClientConstant.APP,baseTokenDto.getApp())
.header(AppClientConstant.CLIENT,baseTokenDto.getClient())
.header(AppClientConstant.USER_ID,baseTokenDto.getUserId())
.header(AppClientConstant.CUSTOMER_ID,customerId)
.header(AppClientConstant.TRANSACTION_SERIAL_KEY, new String[]{getTransactionSerial()})
.build();
;
if(StringUtils.equals(baseTokenDto.getApp(),"gov")){
exchange.getRequest().mutate().header(AppClientConstant.CUSTOMER_ID,customerId);
}
ServerHttpRequest build = exchange.getRequest().mutate().build();
return chain.filter(exchange.mutate().request(build).build());
}

31
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/EpmetCommonServiceOpenFeignClient.java

@ -0,0 +1,31 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.WorkDayFormDTO;
import com.epmet.dto.result.WorkDayResultDTO;
import com.epmet.feign.fallback.EpmetCommonServiceOpenFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
* 本服务对外开放的API,其他服务通过引用此client调用该服务
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 10:28
*/
@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = EpmetCommonServiceOpenFeignClientFallback.class)
public interface EpmetCommonServiceOpenFeignClient {
/**
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.WorkDayResultDTO>>
* @author yinzuomei@elink-cn.com
* @description 根据起止时间计算工作日
* @date 2020/6/4 10:44
**/
@PostMapping("commonservice/workday/detentiondays")
Result<List<WorkDayResultDTO>> detentionDays(@RequestBody List<WorkDayFormDTO> formDTO);
}

25
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/feign/fallback/EpmetCommonServiceOpenFeignClientFallback.java

@ -0,0 +1,25 @@
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.WorkDayFormDTO;
import com.epmet.dto.result.WorkDayResultDTO;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 本服务对外开放的API,其他服务通过引用此client调用该服务
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 10:32
*/
@Component
public class EpmetCommonServiceOpenFeignClientFallback implements EpmetCommonServiceOpenFeignClient {
@Override
public Result<List<WorkDayResultDTO>> detentionDays(List<WorkDayFormDTO> formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_COMMON_SERVICE, "detentionDays", formDTO);
}
}

4
epmet-module/epmet-demo/epmet-demo-server/src/main/java/com/epmet/service/impl/DemoServiceImpl.java

@ -34,8 +34,8 @@ import com.epmet.dto.form.SaveCustomerFormDTO;
import com.epmet.dto.result.ValidCustomerResultDTO;
import com.epmet.entity.DemoEntity;
import com.epmet.feign.AdminFeignClient;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.GovOrgFeignClient;
import com.epmet.feign.MessageFeignClient;
import com.epmet.feign.OperCrmFeignClient;
import com.epmet.redis.DemoRedis;
import com.epmet.service.DemoService;
@ -70,7 +70,7 @@ public class DemoServiceImpl extends BaseServiceImpl<DemoDao, DemoEntity> implem
@Autowired
private AdminFeignClient adminFeignClient;
@Autowired
private MessageFeignClient messageFeignClient;
private EpmetMessageOpenFeignClient messageFeignClient;
@Override
public PageData<DemoDTO> page(Map<String, Object> params) {

22
epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/MessageFeignClient.java → epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/EpmetMessageOpenFeignClient.java

@ -1,10 +1,5 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.SysSmsDTO;
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;
@ -12,9 +7,20 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(name = ServiceConstant.EPMET_MESSAGE_SERVER, fallback = MessageFeignClientFallback.class)
public interface MessageFeignClient {
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.SysSmsDTO;
import com.epmet.dto.form.UserMessageFormDTO;
import com.epmet.feign.fallback.EpmetMessageOpenFeignClientFallback;
/**
* 本服务对外开放的API,其他服务通过引用此client调用该服务
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:47
*/
@FeignClient(name = ServiceConstant.EPMET_MESSAGE_SERVER, fallback = EpmetMessageOpenFeignClientFallback.class)
public interface EpmetMessageOpenFeignClient {
/**
* 发送短信
* @return
@ -37,5 +43,5 @@ public interface MessageFeignClient {
* @Date 2020/4/7 15:36
**/
@PostMapping(value = "message/usermessage/saveusermessage", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
Result saveUserMessage(UserMessageFormDTO formDto);
Result saveUserMessage(@RequestBody UserMessageFormDTO formDto);
}

14
epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/fallback/MessageFeignClientFallback.java → epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/fallback/EpmetMessageOpenFeignClientFallback.java

@ -1,19 +1,22 @@
package com.epmet.feign.fallback;
import org.springframework.stereotype.Component;
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.SysSmsDTO;
import com.epmet.dto.form.UserMessageFormDTO;
import com.epmet.feign.MessageFeignClient;
import org.springframework.stereotype.Component;
import com.epmet.feign.EpmetMessageOpenFeignClient;
/**
* 消息服务降级
* 本服务对外开放的API,其他服务通过引用此client调用该服务
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:48
*/
@Component
public class MessageFeignClientFallback implements MessageFeignClient {
public class EpmetMessageOpenFeignClientFallback implements EpmetMessageOpenFeignClient {
@Override
public Result send(SysSmsDTO smsDTO) {
@ -29,5 +32,4 @@ public class MessageFeignClientFallback implements MessageFeignClient {
public Result saveUserMessage(UserMessageFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_MESSAGE_SERVER, "saveUserMessage", formDto);
}
}

10
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SysSmsServiceImpl.java

@ -22,7 +22,7 @@ import com.epmet.dao.SysSmsDao;
import com.epmet.dto.SysSmsDTO;
import com.epmet.entity.SysSmsEntity;
import com.epmet.exception.ModuleErrorCode;
import com.epmet.feign.MessageFeignClient;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.service.SysSmsService;
import com.epmet.sms.AbstractSmsService;
import com.epmet.sms.SmsFactory;
@ -34,7 +34,9 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
@Service
public class SysSmsServiceImpl extends BaseServiceImpl<SysSmsDao, SysSmsEntity> implements SysSmsService {
@ -42,7 +44,7 @@ public class SysSmsServiceImpl extends BaseServiceImpl<SysSmsDao, SysSmsEntity>
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private MessageFeignClient messageFeignClient;
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient;
@Override
public PageData<SysSmsDTO> page(Map<String, Object> params) {
@ -125,7 +127,7 @@ public class SysSmsServiceImpl extends BaseServiceImpl<SysSmsDao, SysSmsEntity>
sysSmsDTO.setMobile(mobile);
sysSmsDTO.setParams(paramJson);
Result result = messageFeignClient.send(sysSmsDTO);
Result result = epmetMessageOpenFeignClient.send(sysSmsDTO);
if (result != null && result.success()) {
HashMap<String, String> data = new HashMap<>();
data.put("code", codeStr);

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

@ -55,6 +55,7 @@ public class OssController {
private ParamsRemoteService paramsRemoteService;
private final static String KEY = ModuleConstant.CLOUD_STORAGE_CONFIG_KEY;
public static final String IMAGE_JPG_VALUE = "image/jpg";
@GetMapping("page")
@ApiOperation(value = "分页")
@ -186,4 +187,24 @@ public class OssController {
return ossService.uploadImg(file);
}
@PostMapping("article/upload")
public Result uploadArticleImg(@RequestParam("file") MultipartFile file) {
// 校验文件类型
if (!MediaType.IMAGE_PNG_VALUE.equals(file.getContentType()) && !IMAGE_JPG_VALUE.equals(file.getContentType())) {
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getCode()
, EpmetErrorCode.OPER_UPLOAD_FILE_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());
}
return ossService.uploadImg(file);
}
}

5
epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/GetSQLFilterFormDTO.java

@ -3,7 +3,6 @@ package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.Set;
@Data
public class GetSQLFilterFormDTO {
@ -22,8 +21,8 @@ public class GetSQLFilterFormDTO {
private String tableAlias;
private Set<String> gridIds;
private String gridId;
private Set<String> departmentIds;
private String departmentId;
}

54
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessServiceImpl.java

@ -139,7 +139,7 @@ public class AccessServiceImpl implements AccessService {
// 生成开关范围的sql过滤器
if (!CollectionUtil.isEmpty(switchScopes)) {
genSwitchScopeSqlFilter(switchScopes, sb, form.getTableAlias(), userDetails.getUserId(), form.getGridIds(), form.getDepartmentIds());
genSwitchScopeSqlFilter(switchScopes, sb, form.getTableAlias(), userDetails.getUserId(), form.getGridId(), form.getDepartmentId());
}
return sb.toString();
@ -153,29 +153,29 @@ public class AccessServiceImpl implements AccessService {
StringBuilder sb,
String tableAlias,
String userId,
Set<String> gridIds,
Set<String> departmentIds) {
String gridId,
String departmentId) {
if (switchScopes.contains(OperationScopeConstant.SCOPE_I_CREATED)) {
genICreatedSql(sb, userId, tableAlias);
}
if (switchScopes.contains(OperationScopeConstant.SCOPE_IN_GRID)) {
if (CollectionUtils.isEmpty(gridIds)) {
String error = String.format("DataFilter:拼接SQL语句出错:需要in grid权限,但是代码中没有获取到gridIds");
if (StringUtils.isBlank(gridId)) {
String error = String.format("DataFilter:拼接SQL语句出错:需要in grid权限,但是代码中没有获取到,GridId:%s", gridId);
logger.error(error);
throw new RenException(error);
}
genInGrid(sb, gridIds, tableAlias);
genInGrid(sb, gridId, tableAlias);
}
if (switchScopes.contains(OperationScopeConstant.SCOPE_IN_DEPARTMENT)) {
if (CollectionUtils.isEmpty(departmentIds)) {
String error = String.format("DataFilter:拼接SQL语句出错:需要in department权限,但是代码中没有获取到, departmentIds");
if (StringUtils.isBlank(departmentId)) {
String error = String.format("DataFilter:拼接SQL语句出错:需要in department权限,但是代码中没有获取到, departmentId:%s", departmentId);
logger.error(error);
throw new RenException(error);
}
genDepartmentFilterSql(sb, departmentIds, tableAlias);
genDepartmentFilterSql(sb, departmentId, tableAlias);
}
}
@ -199,25 +199,18 @@ public class AccessServiceImpl implements AccessService {
* @param sb
* @param tableAlias
*/
private void genInGrid(StringBuilder sb, Set<String> gridIds, String tableAlias) {
private void genInGrid(StringBuilder sb, String gridId, String tableAlias) {
if (hasConditions.get()) {
// 之前没有条件
sb.append(" OR ");
}
// OR GRID_ID = 'XXX' OR GRID_ID = 'QQQ' OR
for (String gridId : gridIds) {
if (StringUtils.isBlank(tableAlias)) {
sb.append(" GRID_ID = '").append(gridId).append("' OR ");
} else {
sb.append(" ").append(tableAlias).append(".GRID_ID ='").append(gridId).append("' OR ");
}
// OR GRID_ID = 'XXX' OR GRID_ID = 'QQQ'
if (StringUtils.isBlank(tableAlias)) {
sb.append(" GRID_ID = '").append(gridId).append("' ");
} else {
sb.append(" ").append(tableAlias).append(".GRID_ID ='").append(gridId).append("' ");
}
int lastOrIndex = sb.lastIndexOf("OR");
sb.replace(lastOrIndex, lastOrIndex + "OR".length(), "" );
hasConditions.set(true);
}
@ -226,24 +219,17 @@ public class AccessServiceImpl implements AccessService {
*
* @param sb
*/
private void genDepartmentFilterSql(StringBuilder sb, Set<String> deptIds, String tableAlias) {
private void genDepartmentFilterSql(StringBuilder sb, String deptId, String tableAlias) {
//Result<List<DepartmentListResultDTO>> deptListResult = govOrgFeignClient.getDepartmentListByStaffId(staffId);
if (hasConditions.get()) {
// 之前没有条件
sb.append(" OR ");
}
for (String deptId : deptIds) {
if (StringUtils.isBlank(tableAlias)) {
sb.append(" DEPARTMENT_ID = '").append(deptId).append("' OR ");
} else {
sb.append(" ").append(tableAlias).append(".DEPARTMENT_ID ='").append(deptId).append("' OR ");
}
if (StringUtils.isBlank(tableAlias)) {
sb.append(" DEPARTMENT_ID = '").append(deptId).append("' ");
} else {
sb.append(" ").append(tableAlias).append(".DEPARTMENT_ID ='").append(deptId).append("' ");
}
int lastOrIndex = sb.lastIndexOf("OR");
sb.replace(lastOrIndex, lastOrIndex + "OR".length(), "" );
hasConditions.set(true);
}

16
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java

@ -0,0 +1,16 @@
package com.epmet.feign;
import org.springframework.cloud.openfeign.FeignClient;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.feign.fallback.GovIssueOpenFeignClientFallBack;
/**
* 本服务对外开放的API,其他服务通过引用此client调用该服务
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:37
*/
@FeignClient(name = ServiceConstant.GOV_ISSUE_SERVER, fallback = GovIssueOpenFeignClientFallBack.class)
public interface GovIssueOpenFeignClient {
}

14
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java

@ -0,0 +1,14 @@
package com.epmet.feign.fallback;
import com.epmet.feign.GovIssueOpenFeignClient;
import org.springframework.stereotype.Component;
/**
* 本服务对外开放的API,其他服务通过引用此client调用该服务
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:43
*/
@Component
public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient {
}

6
epmet-module/gov-org/gov-org-client/pom.xml

@ -32,6 +32,12 @@
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>gov-voice-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

40
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/GovOrgSelfFeignClient.java

@ -0,0 +1,40 @@
package com.epmet.dto.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.feign.fallback.GovOrgSelfFeignClientFallBack;
import com.epmet.dto.form.PublishGridListFormDTO;
import com.epmet.dto.result.ArticleGridResultDTO;
import com.epmet.dto.result.PublishAgencyListResultDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* @Description gov-org服务
* @Author sun
*/
@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgSelfFeignClientFallBack.class)
public interface GovOrgSelfFeignClient {
/**
* @param staffId
* @return
* @Author sun
* @Description 党建声音-政府端-可选发布范围接口调用
**/
@PostMapping(value = "gov/org/customeragency/getagencygridlist/{staffId}", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
Result<ArticleGridResultDTO> getAgencyGridList(@PathVariable("staffId") String staffId);
/**
* @param staffId
* @return
* @Author sun
* @Description 党建声音-政府端-可选发布单位接口调用
**/
@PostMapping(value = "gov/org/customeragency/getpublishagencylist/{staffId}", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
Result<PublishAgencyListResultDTO> getPublishAgencyList(@PathVariable("staffId") String staffId);
}

29
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/feign/fallback/GovOrgSelfFeignClientFallBack.java

@ -0,0 +1,29 @@
package com.epmet.dto.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.feign.GovOrgSelfFeignClient;
import com.epmet.dto.form.PublishGridListFormDTO;
import com.epmet.dto.result.ArticleGridResultDTO;
import com.epmet.dto.result.PublishAgencyListResultDTO;
import org.springframework.stereotype.Component;
/**
* @Description gov-org服务
* @Author sun
*/
@Component
public class GovOrgSelfFeignClientFallBack implements GovOrgSelfFeignClient {
@Override
public Result<ArticleGridResultDTO> getAgencyGridList(String staffId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAgencyGridList", staffId);
}
@Override
public Result<PublishAgencyListResultDTO> getPublishAgencyList(String staffId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getPublishAgencyList", staffId);
}
}

44
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyDeptList.java

@ -0,0 +1,44 @@
/**
* 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.result;
import lombok.Data;
import java.io.Serializable;
/**
* 添加组织-接口返参
*
* @author sun
*/
@Data
public class AgencyDeptList implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 部门Id
*/
private String departmentId = "";
/**
* 机关-部门名称
*/
private String agencyDeptName = "";
}

44
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyGridList.java

@ -0,0 +1,44 @@
/**
* 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.result;
import lombok.Data;
import java.io.Serializable;
/**
* 添加组织-接口返参
*
* @author sun
*/
@Data
public class AgencyGridList implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 网格Id
*/
private String gridId = "";
/**
* 机关-网格名称
*/
private String agencyGridName = "";
}

41
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencyGridListResultDTO.java

@ -0,0 +1,41 @@
/**
* 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.result;
import lombok.Data;
import java.io.Serializable;
/**
* 党建声音-可选发布范围-接口返参
*
* @author sun
*/
@Data
public class AgencyGridListResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 机关组织Id
*/
private String gridId = "";
private String gridName = "";
}

66
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ArticleGridResultDTO.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.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* 党建声音-可选发布范围可下线网格列表-接口返参
*
* @author sun
*/
@Data
public class ArticleGridResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 机关组织Id
*/
private String agencyId = "";
/**
* 机关组织名称
*/
private String agencyName = "";
/**
* 当前机关的下属网格列表
*/
private List<AgencyGridListResultDTO> gridList = new ArrayList<>();
/**
* 当前组织的所有下级组织信息(递归)
*/
private List<ArticleGridResultDTO> subAgencyGridList = new ArrayList<>();
/**
* 上级组织机构ID
*/
private String pid = "";
/**
* 所有上级组织机构ID(以英文:隔开)
*/
private String pids = "";
/**
* 所有上级名称,-连接
*/
private String allParentName = "";
}

53
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PublishAgencyListResultDTO.java

@ -0,0 +1,53 @@
/**
* 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.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 党建声音-可选发布单位-接口返参
*
* @author sun
*/
@Data
public class PublishAgencyListResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 机关组织Id
*/
private String agencyId = "";
/**
* 机关组织名称
*/
private String agencyName = "";
/**
* 机关下部门列表信息
*/
private List<AgencyDeptList> agencyDeptList;
/**
* 机关下网格列表信息
*/
private List<AgencyGridList> agencyGridList;
}

27
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java

@ -1,23 +1,40 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.feign.callback.GovOrgOpenFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
//@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgOpenFeignClientFallback.class, url = "localhost:8092")
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.feign.fallback.GovOrgOpenFeignClientFallback;
/**
* 本服务对外开放的API,其他服务通过引用此client调用该服务
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:37
*/
// @FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgOpenFeignClientFallback.class, url =
// "localhost:8092")
@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgOpenFeignClientFallback.class)
public interface GovOrgOpenFeignClient {
/**
* 根据Id查询agency
*
* @param agencyId
* @return
*/
@PostMapping("/gov/org/agency/agencybyid/{agencyId}")
Result<CustomerAgencyDTO> getAgencyById(@PathVariable("agencyId") String agencyId);
/**
* 根据staffId查询所属的组织机构
*
* @param staffId
* @return
*/
@PostMapping("/gov/org/agency/agencybystaff/{staffId}")
Result<CustomerAgencyDTO> getAgencyByStaff(@PathVariable("staffId") String staffId);
}

13
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/callback/GovOrgOpenFeignClientFallback.java → epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java

@ -1,4 +1,4 @@
package com.epmet.feign.callback;
package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
@ -7,10 +7,21 @@ import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.feign.GovOrgOpenFeignClient;
import org.springframework.stereotype.Component;
/**
* 本服务对外开放的API,其他服务通过引用此client调用该服务
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:37
*/
@Component
public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
@Override
public Result<CustomerAgencyDTO> getAgencyById(String agencyId) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getAgencyById", agencyId);
}
@Override
public Result<CustomerAgencyDTO> getAgencyByStaff(String staffId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAgencyByStaff", staffId);
}
}

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerAgencyConstant.java

@ -55,4 +55,16 @@ public interface CustomerAgencyConstant {
* 调用epmet-user服务查询用户基础信息失败
*/
String SELECT_USER_EXCEPTION = "获取用户基本信息失败";
/**
* 获取组织人员关系表数据失败
*/
String SELECT_AGENCY_STAFF_EXCEPTION = "获取机关下人员信息失败";
/**
* 党建负责人角色
*/
String PARTY_PRINCIPALS = "party_principals";
/**
* 网格党建指导员角色
*/
String GRID_PARTY_DIRECTOR = "grid_party_director";
}

26
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.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.CustomerAgencyDTO;
import com.epmet.dto.form.AgencyDeptGridFormDTO;
import com.epmet.dto.form.CanTickStaffListFormDTO;
import com.epmet.dto.form.StaffOrgFormDTO;
import com.epmet.dto.form.TransferOptionalStaffListFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.excel.CustomerAgencyExcel;
import com.epmet.service.CustomerAgencyService;
@ -163,4 +160,25 @@ public class CustomerAgencyController {
return new Result<ProcessorListResultDTO>().ok(customerAgencyService.getProcessorList(agencyId));
}
/**
* @param staffId
* @return
* @Author sun
* @Description 党建声音-政府端-可选发布范围接口调用-根据人员角色查询对应的不同发布范围
**/
@PostMapping("getagencygridlist/{staffId}")
public Result<ArticleGridResultDTO> getAgencyGridList(@PathVariable("staffId") String staffId) {
return new Result<ArticleGridResultDTO>().ok(customerAgencyService.getAgencyGridList(staffId));
}
/**
* @param staffId
* @return
* @Author sun
* @Description 党建声音-政府端-可选发布单位接口调用-根据人员角色查询对应的不同发布单位
**/
@PostMapping("getpublishagencylist/{staffId}")
public Result<PublishAgencyListResultDTO> getPublishAgencyList(@PathVariable("staffId") String staffId) {
return new Result<PublishAgencyListResultDTO>().ok(customerAgencyService.getPublishAgencyList(staffId));
}
}

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

@ -116,4 +116,12 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
* @return java.lang.String
*/
String selectAgencyName(@Param("agencyId") String agencyId);
/**
* @param subAgencyPids
* @return
* @Author sun
* @Description 递归查询当前机关的下一级机关列表
**/
List<ArticleGridResultDTO> selectAllSubAgency(@Param("subAgencyPids") String subAgencyPids);
}

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerDepartmentDao.java

@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerDepartmentDTO;
import com.epmet.dto.CustomerIdDTO;
import com.epmet.dto.result.AgencyDeptList;
import com.epmet.dto.result.DepartmentListResultDTO;
import com.epmet.dto.result.SubListResultDTO;
import com.epmet.entity.CustomerDepartmentEntity;
@ -75,4 +76,12 @@ public interface CustomerDepartmentDao extends BaseDao<CustomerDepartmentEntity>
* @Description 批量查询部门信息
**/
List<CustomerDepartmentDTO> selectDeptListByIds(@Param("deptIdList") List<String> deptIdList);
/**
* @param agencyId
* @return
* @Author sun
* @Description 查询机关下部门列表信息
**/
List<AgencyDeptList> selectAgencyDeptMsgList(@Param("agencyId") String agencyId);
}

16
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java

@ -184,4 +184,20 @@ public interface CustomerGridDao extends BaseDao<CustomerGridEntity> {
* @date 2020.05.13 11:01
**/
CommonDataFilterResultDTO getGridDataFilterMsg(@Param("gridId")String gridId);
/**
* @param agencyId
* @return
* @Author sun
* @Description 查询组织下网格列表
**/
List<AgencyGridListResultDTO> selectAgencyGridList(@Param("agencyId") String agencyId);
/**
* @param agencyId
* @return
* @Author sun
* @Description 查询机关下网格列表信息
**/
List<AgencyGridList> selectAgencyGridMsgList(@Param("agencyId") String agencyId);
}

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java

@ -72,4 +72,12 @@ public interface CustomerStaffAgencyDao extends BaseDao<CustomerStaffAgencyEntit
* @Author sun
*/
List<StaffListResultDTO> selectAgencyStaffList(@Param("agencyId") String agencyId);
/**
* @param dto
* @return
* @Author sun
* @Description 根据staffId查询数据
**/
CustomerStaffAgencyDTO selectByStaffId(CustomerStaffAgencyDTO dto);
}

7
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java

@ -90,4 +90,11 @@ public interface CustomerStaffGridDao extends BaseDao<CustomerStaffGridEntity> {
* @Description 遍历查询每个部门下人员
*/
List<CustomerStaffGridDTO> selectGridStaffs(@Param("gridIdList") List<String> gridIdList);
/**
*
* @Author sun
* @Description 查询人员在客户下参与的网格列表
*/
List<CustomerStaffGridDTO> selectStaffGridList(CustomerStaffGridDTO staffGridDTO);
}

21
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.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.CustomerAgencyDTO;
import com.epmet.dto.form.AgencyDeptGridFormDTO;
import com.epmet.dto.form.CanTickStaffListFormDTO;
import com.epmet.dto.form.StaffOrgFormDTO;
import com.epmet.dto.form.TransferOptionalStaffListFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.entity.CustomerAgencyEntity;
@ -156,4 +153,20 @@ public interface CustomerAgencyService extends BaseService<CustomerAgencyEntity>
* @return java.lang.String
*/
String getAgencyName(String agencyId);
/**
* @param staffId
* @return
* @Author sun
* @Description 党建声音-政府端-可选发布范围接口调用-根据人员角色查询对应的不同发布范围
**/
ArticleGridResultDTO getAgencyGridList(String staffId);
/**
* @param staffId
* @return
* @Author sun
* @Description 党建声音-政府端-可选发布单位接口调用-根据人员角色查询对应的不同发布单位
**/
PublishAgencyListResultDTO getPublishAgencyList(String staffId);
}

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

@ -35,6 +35,8 @@ import com.epmet.dto.result.*;
import com.epmet.entity.CustomerAgencyEntity;
import com.epmet.entity.CustomerGridEntity;
import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.EpmetUserSelfFeignClient;
import com.epmet.feign.OperCrmFeignClient;
import com.epmet.redis.CustomerAgencyRedis;
import com.epmet.service.CustomerAgencyService;
@ -75,6 +77,8 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
private CustomerStaffGridDao customerStaffGridDao;
@Autowired
private EpmetUserFeignClient epmetUserFeignClient;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Override
public PageData<CustomerAgencyDTO> page(Map<String, Object> params) {
@ -628,4 +632,180 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
return subAgencyList;
}
/**
* @param staffId
* @return
* @Author sun
* @Description 党建声音-政府端-可选发布范围接口调用-根据人员角色查询对应的不同发布范围
**/
@Override
public ArticleGridResultDTO getAgencyGridList(String staffId) {
ArticleGridResultDTO returnDTO = new ArticleGridResultDTO();
//1:根据staffId查询该工作人员对应的机关Id、客户Id
CustomerStaffAgencyDTO staffAgencyDTO = new CustomerStaffAgencyDTO();
staffAgencyDTO.setUserId(staffId);
staffAgencyDTO = customerStaffAgencyDao.selectByStaffId(staffAgencyDTO);
if (null == staffAgencyDTO.getId()) {
throw new RenException(CustomerAgencyConstant.SELECT_AGENCY_STAFF_EXCEPTION);
}
//2:调用epmet-user服务,根据客户Id、staffId获取该人员在该客户下的角色列表
CustomerStaffRoleListFormDTO formDTO = new CustomerStaffRoleListFormDTO();
formDTO.setCustomerId(staffAgencyDTO.getCustomerId());
formDTO.setStaffId(staffId);
Result<List<CustomerStaffRoleListResultDTO>> listResult = epmetUserOpenFeignClient.getCustomerStaffRoleList(formDTO);
if (null == listResult.getData() || listResult.getData().size() < NumConstant.ONE) {
return returnDTO;
}
List<CustomerStaffRoleListResultDTO> RoleList = listResult.getData();
//3:判断用户是否具有机关党建负责人或网格指导员角色
//机关党建负责人角色
boolean party = false;
//网格指导员角色
boolean gridParty = false;
for (CustomerStaffRoleListResultDTO role : RoleList) {
if (CustomerAgencyConstant.PARTY_PRINCIPALS.equals(role.getRoleKey())) {
party = true;
}
if (CustomerAgencyConstant.GRID_PARTY_DIRECTOR.equals(role.getRoleKey())) {
gridParty = true;
}
}
if (!party && !gridParty) {
return returnDTO;
}
//4:根据不同角色查询不同数据
CustomerAgencyEntity agencyEntity = baseDao.selectById(staffAgencyDTO.getAgencyId());
if (party) {
//4.1:查询当前机关的网格列表以及所有下级机关的网格列表
//当前机关信息
returnDTO.setAgencyId(agencyEntity.getId());
returnDTO.setAgencyName(agencyEntity.getOrganizationName());
//当前机关下网格列表
List<AgencyGridListResultDTO> gridList = customerGridDao.selectAgencyGridList(agencyEntity.getId());
returnDTO.setGridList(gridList);
//递归查询当前组织的下级组织以及每个下级组织对应的网格列表
List<ArticleGridResultDTO> subAgencyGridList = getGridList(agencyEntity.getPids() + ":" + agencyEntity.getId());
returnDTO.setSubAgencyGridList(subAgencyGridList);
} else if (gridParty) {
//4.2:查询人员在当前机关下参与的网格列表
//查询当前组织下的网格列表
List<AgencyGridListResultDTO> gridList = customerGridDao.selectAgencyGridList(agencyEntity.getId());
//查询该工作人员在该客户下参与的网格列表
CustomerStaffGridDTO staffGridDTO = new CustomerStaffGridDTO();
staffGridDTO.setCustomerId(staffAgencyDTO.getCustomerId());
staffGridDTO.setUserId(staffId);
List<CustomerStaffGridDTO> gridDTOList = customerStaffGridDao.selectStaffGridList(staffGridDTO);
//遍历取出该人员在该组织下参与的网格列表
List<AgencyGridListResultDTO> resultList = gridList.stream().flatMap(agencyGrid -> gridDTOList.stream().filter(staffGrid ->
agencyGrid.getGridId().equals(staffGrid.getGridId())).map(grid -> {
AgencyGridListResultDTO resultDTO = ConvertUtils.sourceToTarget(agencyGrid, AgencyGridListResultDTO.class);
return resultDTO;
})).collect(Collectors.toList());
returnDTO.setGridList(resultList);
}
return returnDTO;
}
/**
* @Author sun
* @Description 递归查询当前机关的下一级机关列表
**/
private List<ArticleGridResultDTO> getGridList(String subAgencyPids) {
List<ArticleGridResultDTO> subAgencyList = baseDao.selectAllSubAgency(subAgencyPids);
if (subAgencyList.size() > NumConstant.ZERO) {
for (ArticleGridResultDTO sub : subAgencyList) {
List<AgencyGridListResultDTO> gridList = customerGridDao.selectAgencyGridList(sub.getAgencyId());
sub.setGridList(gridList);
List<ArticleGridResultDTO> subAgency = getGridList(sub.getPids() + ":" + sub.getAgencyId());
sub.setSubAgencyGridList(subAgency);
}
}
return subAgencyList;
}
/**
* @param staffId
* @return
* @Author sun
* @Description 党建声音-政府端-可选发布单位接口调用-根据人员角色查询对应的不同发布单位
**/
@Override
public PublishAgencyListResultDTO getPublishAgencyList(String staffId) {
PublishAgencyListResultDTO returnDTO = new PublishAgencyListResultDTO();
//1:根据staffId查询该工作人员对应的机关Id、客户Id
CustomerStaffAgencyDTO staffAgencyDTO = new CustomerStaffAgencyDTO();
staffAgencyDTO.setUserId(staffId);
staffAgencyDTO = customerStaffAgencyDao.selectByStaffId(staffAgencyDTO);
if (null == staffAgencyDTO.getId()) {
throw new RenException(CustomerAgencyConstant.SELECT_AGENCY_STAFF_EXCEPTION);
}
//2:调用epmet-user服务,根据客户Id、staffId获取该人员在该客户下的角色列表
CustomerStaffRoleListFormDTO formDTO = new CustomerStaffRoleListFormDTO();
formDTO.setCustomerId(staffAgencyDTO.getCustomerId());
formDTO.setStaffId(staffId);
Result<List<CustomerStaffRoleListResultDTO>> listResult = epmetUserOpenFeignClient.getCustomerStaffRoleList(formDTO);
if (null == listResult.getData() || listResult.getData().size() < NumConstant.ONE) {
return returnDTO;
}
List<CustomerStaffRoleListResultDTO> RoleList = listResult.getData();
//3:判断用户是否具有机关党建负责人或网格指导员角色
//机关党建负责人角色
boolean party = false;
//网格指导员角色
boolean gridParty = false;
for (CustomerStaffRoleListResultDTO role : RoleList) {
if (CustomerAgencyConstant.PARTY_PRINCIPALS.equals(role.getRoleKey())) {
party = true;
}
if (CustomerAgencyConstant.GRID_PARTY_DIRECTOR.equals(role.getRoleKey())) {
gridParty = true;
}
}
if (!party && !gridParty) {
return returnDTO;
}
//4:根据不同角色查询不同数据
CustomerAgencyEntity agencyEntity = baseDao.selectById(staffAgencyDTO.getAgencyId());
if (party) {
//4.1:查询当前机关的网格列表以及所有下级机关的网格列表
//当前机关信息
returnDTO.setAgencyId(agencyEntity.getId());
returnDTO.setAgencyName(agencyEntity.getOrganizationName());
//当前机关下部门列表信息
List<AgencyDeptList> agencyDeptList = customerDepartmentDao.selectAgencyDeptMsgList(agencyEntity.getId());
returnDTO.setAgencyDeptList(agencyDeptList);
//当前机关下网格列表
List<AgencyGridList> agencyGridList = customerGridDao.selectAgencyGridMsgList(agencyEntity.getId());
returnDTO.setAgencyGridList(agencyGridList);
} else if (gridParty) {
//4.2:查询人员在当前机关下参与的网格列表
//查询当前组织下的网格列表
List<AgencyGridListResultDTO> gridList = customerGridDao.selectAgencyGridList(agencyEntity.getId());
//查询该工作人员在该客户下参与的网格列表
CustomerStaffGridDTO staffGridDTO = new CustomerStaffGridDTO();
staffGridDTO.setCustomerId(staffAgencyDTO.getCustomerId());
staffGridDTO.setUserId(staffId);
List<CustomerStaffGridDTO> gridDTOList = customerStaffGridDao.selectStaffGridList(staffGridDTO);
//遍历取出该人员在该组织下参与的网格列表
List<AgencyGridList> resultList = gridList.stream().flatMap(agencyGrid -> gridDTOList.stream().filter(staffGrid ->
agencyGrid.getGridId().equals(staffGrid.getGridId())).map(grid -> {
AgencyGridList resultDTO = new AgencyGridList();
resultDTO.setGridId(agencyGrid.getGridId());
resultDTO.setAgencyGridName(agencyEntity.getOrganizationName() + "-" + agencyGrid.getGridName());
return resultDTO;
})).collect(Collectors.toList());
returnDTO.setAgencyGridList(resultList);
}
return returnDTO;
}
}

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

@ -20,17 +20,17 @@ 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.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.CustomerStaffAgencyDao;
import com.epmet.dto.*;
import com.epmet.dto.form.CommonDepartmentFormDTO;
import com.epmet.dto.form.CommonGridIdFormDTO;
import com.epmet.dto.form.CommonUserIdListFormDTO;
import com.epmet.dto.form.StaffsInAgencyFromDTO;
import com.epmet.dto.form.CommonGridIdFormDTO;
import com.epmet.dto.result.CommonStaffInfoResultDTO;
import com.epmet.dto.result.LatestCustomerResultDTO;
import com.epmet.entity.CustomerStaffAgencyEntity;

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

@ -156,4 +156,17 @@
WHERE a.ID = #{agencyId}
</select>
<select id="selectAllSubAgency" resultType="com.epmet.dto.result.ArticleGridResultDTO">
SELECT
id AS "agencyId",
organization_name AS "agencyName",
pid AS "pid",
pids AS "pids",
all_parent_name AS "allParentName"
FROM customer_agency
WHERE del_flag = '0'
AND pids = #{subAgencyPids}
ORDER BY created_time DESC
</select>
</mapper>

17
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml

@ -54,4 +54,21 @@
id = #{departmentId}
</foreach>
</select>
<select id="selectAgencyDeptMsgList" resultType="com.epmet.dto.result.AgencyDeptList">
SELECT
cd.id AS "departmentId",
CONCAT(
ca.organization_name,
"-",
cd.department_name
) "agencyDeptName"
FROM
customer_department cd
INNER JOIN customer_agency ca ON cd.agency_id = ca.id
WHERE
cd.del_flag = '0'
AND ca.del_flag = '0'
AND cd.agency_id = #{agencyId}
</select>
</mapper>

26
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml

@ -320,4 +320,30 @@
AND agency.DEL_FLAG = '0'
AND grid.ID = #{gridId}
</select>
<select id="selectAgencyGridList" resultType="com.epmet.dto.result.AgencyGridListResultDTO">
SELECT
id AS "gridId",
grid_name AS "gridName"
FROM customer_grid
WHERE del_flag = '0'
AND pid = #{agencyId}
</select>
<select id="selectAgencyGridMsgList" resultType="com.epmet.dto.result.AgencyGridList">
SELECT
cg.id AS "gridId",
CONCAT(
ca.organization_name,
"-",
cg.grid_name
) "agencyGridName"
FROM
customer_grid cg
INNER JOIN customer_agency ca ON cg.pid = ca.id
WHERE
cg.del_flag = '0'
AND ca.del_flag = '0'
AND cg.pid = #{agencyId}
</select>
</mapper>

12
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml

@ -105,4 +105,16 @@
AND agency_id =#{agencyId}
</select>
<select id="selectByStaffId" resultType="com.epmet.dto.CustomerStaffAgencyDTO">
SELECT
*
FROM
customer_staff_agency
WHERE
del_flag = '0'
<if test='null != userId and "" != userId'>
AND user_id = #{userId}
</if>
</select>
</mapper>

11
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml

@ -77,6 +77,17 @@
</foreach>
</select>
<select id="selectStaffGridList" resultType="com.epmet.dto.CustomerStaffGridDTO">
SELECT
*
FROM
customer_staff_grid
WHERE
del_flag = '0'
AND user_id = #{userId}
AND customer_id = #{customerId}
</select>
<!-- 批量插入网格工作人员 -->
<insert id="insertBatch" parameterType="java.util.List">
insert into customer_staff_grid

16
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java

@ -0,0 +1,16 @@
package com.epmet.feign;
import org.springframework.cloud.openfeign.FeignClient;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.feign.fallback.GovProjectOpenFeignClientFallback;
/**
* 本服务对外开放的API,其他服务通过引用此client调用该服务
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:32
*/
@FeignClient(name = ServiceConstant.GOV_PROJECT_SERVER, fallback = GovProjectOpenFeignClientFallback.class)
public interface GovProjectOpenFeignClient {
}

14
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java

@ -0,0 +1,14 @@
package com.epmet.feign.fallback;
import com.epmet.feign.GovProjectOpenFeignClient;
import org.springframework.stereotype.Component;
/**
* 本服务对外开放的API,其他服务通过引用此client调用该服务
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/4 13:33
*/
@Component
public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignClient {
}

23
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/CommonFeignClient.java

@ -1,23 +0,0 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.WorkDayFormDTO;
import com.epmet.dto.result.WorkDayResultDTO;
import com.epmet.feign.fallback.CommonFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/5/12 15:48
*/
@FeignClient(name = ServiceConstant.EPMET_COMMON_SERVICE, fallback = CommonFeignClientFallBack.class)
public interface CommonFeignClient {
@PostMapping("commonservice/workday/detentiondays")
Result<List<WorkDayResultDTO>> detentionDays(@RequestBody List<WorkDayFormDTO> formDTO);
}

24
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/feign/fallback/CommonFeignClientFallBack.java

@ -1,24 +0,0 @@
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.WorkDayFormDTO;
import com.epmet.dto.result.WorkDayResultDTO;
import com.epmet.feign.CommonFeignClient;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/5/12 15:51
*/
@Component
public class CommonFeignClientFallBack implements CommonFeignClient {
@Override
public Result<List<WorkDayResultDTO>> detentionDays(List<WorkDayFormDTO> formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_COMMON_SERVICE, "detentionDays", formDTO);
}
}

3
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectProcessServiceImpl.java

@ -32,7 +32,6 @@ import com.epmet.constant.ReadFlagConstant;
import com.epmet.constant.UserMessageConstant;
import com.epmet.dao.ProjectProcessDao;
import com.epmet.dao.ProjectStaffDao;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.ProjectProcessDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
@ -41,7 +40,6 @@ import com.epmet.entity.ProjectProcessEntity;
import com.epmet.entity.ProjectStaffEntity;
import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.feign.GovOrgFeignClient;
import com.epmet.feign.MessageFeignClient;
import com.epmet.redis.ProjectProcessRedis;
import com.epmet.service.ProjectProcessService;
import com.epmet.service.ProjectService;
@ -52,7 +50,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
/**

6
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -40,7 +40,7 @@ import com.epmet.entity.ProjectEntity;
import com.epmet.entity.ProjectProcessEntity;
import com.epmet.entity.ProjectRelatedPersonnelEntity;
import com.epmet.entity.ProjectStaffEntity;
import com.epmet.feign.CommonFeignClient;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.feign.GovOrgFeignClient;
import com.epmet.feign.MessageFeignClient;
@ -69,7 +69,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
@Autowired
private CustomerProjectParameterService parameterService;
@Autowired
private CommonFeignClient commonFeignClient;
private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient;
@Autowired
private ProjectStaffService projectStaffService;
@Autowired
@ -451,7 +451,7 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
workDayFormDTO.setStartDate(format.format(projectDTO.getUpdatedTime()));
workDayFormDTO.setEndDate(format.format(new Date()));
list.add(workDayFormDTO);
Result<List<WorkDayResultDTO>> detentionDays = commonFeignClient.detentionDays(list);
Result<List<WorkDayResultDTO>> detentionDays = epmetCommonServiceOpenFeignClient.detentionDays(list);
return detentionDays.getData().get(NumConstant.ZERO).getDetentionDays();
}

106
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleContentDTO.java

@ -0,0 +1,106 @@
/**
* 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-06-02
*/
@Data
public class ArticleContentDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID 主键ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 文章ID
*/
private String articleId;
/**
* 内容
*/
private String content;
/**
* 内容类型 图片img文字text
*/
private String contentType;
/**
* 审核状态 通过:pass失败:fail审核中auditing
*/
private String auditStatus;
/**
* 审核理由
*/
private String auditReason;
/**
* 内容顺序 从1开始
*/
private Integer orderNum;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

96
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleCoverDTO.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-06-02
*/
@Data
public class ArticleCoverDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 文章ID
*/
private String articleId;
/**
* 封面图片地址 url地址
*/
private String imgUrl;
/**
* 审核状态 通过:pass失败:fail审核中auditing
*/
private String auditStatus;
/**
* 审核理由
*/
private String auditReason;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

157
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleDTO.java

@ -0,0 +1,157 @@
/**
* 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 lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 文章表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-02
*/
@Data
public class ArticleDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 草稿ID
*/
private String draftId;
/**
* 文章标题
*/
private String title;
/**
* 文章内容 精简内容
*/
private String previewContent;
/**
* 是否置顶
*/
private Integer isTop;
/**
* 发布范围描述 所有发布范围集合
*/
private String publishRangeDesc;
/**
* 发布单位ID
*/
private String publisherId;
/**
* 发布单位名称
*/
private String publisherName;
/**
* 发布单位类型 机关:agency部门department网格grid
*/
private String publisherType;
/**
* 发布时间
*/
private Date publishDate;
/**
* 发布状态 已发布:published已下线offline
*/
private String statusFlag;
/**
* 下线时间
*/
private Date offLineTime;
/**
* 文章标签串 竖杠分割的标签名称
*/
private String tags;
/**
* 组织ID
*/
private String orgId;
/**
* 组织ID路径 eg字段为def:abc
*/
private String orgIdPath;
/**
* 网格ID 数据权限使用
*/
private String gridId;
/**
* 部门ID 数据权限使用
*/
private String departmentId;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

101
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleOperateRecordDTO.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-06-02
*/
@Data
public class ArticleOperateRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID 主键ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 文章ID
*/
private String articleId;
/**
* 执行人 xx街道-xx中心-姓名
*/
private String opUser;
/**
* 操作内容 操作内容eg重新编辑文章
*/
private String content;
/**
* 操作类型 发布文章publish取消文章置顶canceltop设置置顶settom下线文章offline修改文章发布范围updatepublishrange
*/
private String opType;
/**
* 操作时间
*/
private Date opTime;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

117
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticlePublishRangeDTO.java

@ -0,0 +1,117 @@
/**
* 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 lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 文章发布范围表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-02
*/
@Data
public class ArticlePublishRangeDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 文章ID
*/
private String articleId;
/**
* 网格ID
*/
private String gridId;
/**
* 组织-网格名称
*/
private String agencyGridName;
/**
* 组织ID
*/
private String agencyId;
/**
* 所有上级组织机构ID 以英文:隔开
*/
private String pids;
/**
* 所有上级名称 以横杠隔开
*/
private String allParentName;
/**
* 下线时间
*/
private Date offLineTime;
/**
* 发布状态
*/
private String publishStatus;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

91
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleTagsDTO.java

@ -0,0 +1,91 @@
/**
* 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-06-02
*/
@Data
public class ArticleTagsDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 文章ID
*/
private String articleId;
/**
* 标签ID
*/
private String tagId;
/**
* 标签名称
*/
private String tagName;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

91
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ArticleVisitRecordDTO.java

@ -0,0 +1,91 @@
/**
* 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-06-02
*/
@Data
public class ArticleVisitRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 网格ID
*/
private String gridId;
/**
* 文章ID
*/
private String articleId;
/**
* 用户ID
*/
private String userId;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

106
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftContentDTO.java

@ -0,0 +1,106 @@
/**
* 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-06-02
*/
@Data
public class DraftContentDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID 主键ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 草稿ID
*/
private String draftId;
/**
* 内容
*/
private String content;
/**
* 内容类型 图片img文字text
*/
private String contentType;
/**
* 审核状态 通过:pass失败:fail
*/
private String auditStatus;
/**
* 审核理由
*/
private String auditReason;
/**
* 内容顺序 从1开始
*/
private Integer orderNum;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

96
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftCoverDTO.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-06-02
*/
@Data
public class DraftCoverDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 草稿ID
*/
private String draftId;
/**
* 封面图片地址 url地址
*/
private String imgUrl;
/**
* 审核状态 通过:pass失败:fail
*/
private String auditStatus;
/**
* 审核理由
*/
private String auditReason;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

147
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftDTO.java

@ -0,0 +1,147 @@
/**
* 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 lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 草稿表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-02
*/
@Data
public class DraftDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 文章标题
*/
private String title;
/**
* 文章内容 精简内容
*/
private String previewContent;
/**
* 是否置顶
*/
private Integer isTop;
/**
* 发布范围描述 所有发布范围集合
*/
private String publishRangeDesc;
/**
* 发布单位ID
*/
private String publisherId;
/**
* 发布单位名称
*/
private String publisherName;
/**
* 发布单位类型 机关:agency部门department网格grid
*/
private String publisherType;
/**
* 发布时间
*/
private Date publishDate;
/**
* 发布状态 未发布unpublish 已发布:published审核中auditing
*/
private String statusFlag;
/**
* 文章标签串 竖杠分割的标签名称
*/
private String tags;
/**
* 组织ID
*/
private String orgId;
/**
* 组织ID路径 eg字段为def:abc
*/
private String orgIdPath;
/**
* 网格ID 数据权限使用
*/
private String gridId;
/**
* 部门ID 数据权限使用
*/
private String departmentId;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

117
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/DraftPublishRangeDTO.java

@ -0,0 +1,117 @@
/**
* 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 lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 草稿发布范围表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-02
*/
@Data
public class DraftPublishRangeDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* ID草稿
*/
private String draftId;
/**
* 网格ID
*/
private String gridId;
/**
* 组织-网格名称
*/
private String agencyGridName;
/**
* 组织ID
*/
private String agencyId;
/**
* 所有上级组织机构ID 以英文:隔开
*/
private String pids;
/**
* 所有上级名称 以横杠隔开
*/
private String allParentName;
/**
* 下线时间
*/
private Date offLineTime;
/**
* 发布状态 未发布unpublish 已发布:published
*/
private String publishStatus;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

86
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/TagCustomerDTO.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-06-02
*/
@Data
public class TagCustomerDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 标签名称
*/
private String tagName;
/**
* 使用计数
*/
private Integer useCount;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

76
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/TagDefaultDTO.java

@ -0,0 +1,76 @@
/**
* 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-06-02
*/
@Data
public class TagDefaultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private String id;
/**
* 标签名称
*/
private String tagName;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

96
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/TagGridDTO.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-06-02
*/
@Data
public class TagGridDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 网格ID
*/
private String gridId;
/**
* 标签ID
*/
private String tagId;
/**
* 标签名称
*/
private String tagName;
/**
* 使用计数
*/
private Integer useCount;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

25
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/ArticleOperationFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 查询文章操作记录
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/2 16:42
*/
@Data
public class ArticleOperationFormDTO implements Serializable {
private static final long serialVersionUID = -6659391832410565077L;
public interface AddUserInternalGroup {}
/**
* 文章id
*/
@NotBlank(message = "文章id不能为空", groups = {ArticleOperationFormDTO.AddUserInternalGroup.class})
private String articleId;
}

43
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/ArticlePageFormDTO.java

@ -0,0 +1,43 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @Description 居民端查看文章列表参数DTO
* @ClassName ArticlePageFormDTO
* @Auth wangc
* @Date 2020-06-03 14:21
*/
@Data
public class ArticlePageFormDTO implements Serializable {
private static final long serialVersionUID = -6201259689082896334L;
public interface ArticlePageInternalGroup{}
/**
* 网格Id
* */
@NotBlank(message = "网格Id不能为空" , groups = {ArticlePageInternalGroup.class})
private String gridId;
/**
* 标签Id集合
* */
private List<String> tagIdList;
/**
* 页码
* */
private Integer pageNo = 1;
/**
* 每页显示量
* */
private Integer pageSize = 10;
}

34
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/CommonArticleListFormDTO.java

@ -0,0 +1,34 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 居民端首页轮播查询接口DTO
* @ClassName ArticleBannerFormDTO
* @Auth wangc
* @Date 2020-06-02 11:20
*/
@Data
public class CommonArticleListFormDTO implements Serializable {
private static final long serialVersionUID = 5996259506950697451L;
/**
* 内部错误分组
* */
public interface ArticleBannerInternalGroup{}
/**
* 网格Id
* */
@NotBlank(message = "网格Id不能为空" , groups = {ArticleBannerInternalGroup.class})
private String gridId;
/**
* 客户定制化条数(高级配置里的参数)
* */
private Integer num;
}

22
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/CorrelationTagListFormDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @CreateTime 2020/6/3 9:39
*/
@Data
public class CorrelationTagListFormDTO implements Serializable {
private static final long serialVersionUID = -1588825995685146967L;
/**
* 标签id集合
*/
private List<String> tagIdList;
}

25
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DeleteDraftFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 政府端工作人员,删除草稿入参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/2 15:25
*/
@Data
public class DeleteDraftFormDTO implements Serializable {
private static final long serialVersionUID = -2424432724401298206L;
public interface AddUserInternalGroup {}
/**
* 草稿id
*/
@NotBlank(message = "草稿id不能为空", groups = {AddUserInternalGroup.class})
private String draftId;
}

86
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftAttrFromDTO.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.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* 文章属性form
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-02
*/
@Data
public class DraftAttrFromDTO implements Serializable {
private static final long serialVersionUID = 6463906402283515172L;
/**
* 草稿ID
*/
@NotBlank(message = "草稿ID不能为空")
private String draftId;
/**
* 封面图片地址
*/
private String coverImg;
/**
* 标签名称数组
*/
private List<String> tagNameList;
/**
* 是否置顶
*/
@NotNull(message = "是否置顶不能为空")
private Integer isTop;
/**
* 网格Id数组
*/
private List<String> gridIdList;
/**
* 发布单位Id 类型不同 id含义不同
*/
private String publisher;
/**
* 发布单位名称
*/
private String publisherName;
/**
* 发布日期
*/
@NotBlank(message = "发布日期不能为空")
private String publishDate;
/**
* 发布者类型 机关:agency发布类型 部门department网格grid
*/
private String publisherType;
}

80
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftContentFromDTO.java

@ -0,0 +1,80 @@
/**
* 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.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* 保存文章内容form
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-02
*/
@Data
public class DraftContentFromDTO implements Serializable {
private static final long serialVersionUID = -4206020151361420221L;
/**
* 草稿ID
*/
private String draftId;
/**
* 文章标题
*/
@NotBlank(message = "文章标题不能为空")
private String title;
/**
* 内容列表
*/
private List<DraftContentDTO> contentList;
@Data
public static class DraftContentDTO {
public DraftContentDTO() {
}
/**
* 内容Id
*/
private String draftContentId;
/**
* 内容
*/
private String content;
/**
* 内容类型 图片img文字text
*/
private String contentType;
/**
* 内容顺序 从1开始
*/
private Integer orderNum;
}
}

25
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftDetailFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 编辑草稿-获取草稿内容属性统一入参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/3 12:58
*/
@Data
public class DraftDetailFormDTO implements Serializable {
private static final long serialVersionUID = 4492335656284426299L;
public interface AddUserInternalGroup {}
/**
* 草稿ID
*/
@NotBlank(message = "草稿id不能为空", groups = {DraftDetailFormDTO.AddUserInternalGroup.class})
private String draftId;
}

23
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/DraftListFormDTO.java

@ -0,0 +1,23 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/6/3 14:43
*/
@Data
public class DraftListFormDTO implements Serializable {
private static final long serialVersionUID = 7957826609741967502L;
/**
* 页码
*/
private Integer pageNo;
/**
* 每页显示数量
*/
private Integer pageSize;
}

24
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GovArticleDetailFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 政府端已发布已下线文章详情 入参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/2 17:21
*/
@Data
public class GovArticleDetailFormDTO implements Serializable {
private static final long serialVersionUID = 2149876964249893025L;
public interface AddUserInternalGroup {}
/**
* 文章id
*/
@NotBlank(message = "文章id不能为空", groups = {GovArticleDetailFormDTO.AddUserInternalGroup.class})
private String articleId;
}

33
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/OffLineArticleFormDTO.java

@ -0,0 +1,33 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;
/**
* @Description 党建声音-政府端-下线文章-接口入参
* @Author sun
*/
@Data
public class OffLineArticleFormDTO implements Serializable {
private static final long serialVersionUID = 4859779755214502427L;
/**
* 添加用户操作的内部异常分组
* 出现错误会提示给前端7000错误码返回信息为服务器开小差...
*/
public interface AddUserInternalGroup {}
@NotBlank(message = "文章Id不能为空", groups = { AddUserInternalGroup.class })
private String articleId;
@Size(min = 1, message = "项目人员关联Id不能为空", groups = {AddUserInternalGroup.class})
private List<String> gridIdList;
private String staffId;
}

23
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/OfflineListFormDTO.java

@ -0,0 +1,23 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/6/3 14:47
*/
@Data
public class OfflineListFormDTO implements Serializable {
private static final long serialVersionUID = -5928134434874117068L;
/**
* 页码
*/
private Integer pageNo;
/**
* 每页显示数量
*/
private Integer pageSize;
}

29
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/PublishGridListFormDTO.java

@ -0,0 +1,29 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* 党建声音-可下线网格列表-接口入参
*
* @author sun
*/
@Data
public class PublishGridListFormDTO implements Serializable {
private static final long serialVersionUID = -6659391832410565077L;
public interface AddUserInternalGroup {}
/**
* 文章Id
*/
@NotBlank(message = "文章id不能为空", groups = {PublishGridListFormDTO.AddUserInternalGroup.class})
private String articleId;
/**
* token中人员Id
*/
private String staffId;
}

30
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/PublishedListFormDTO.java

@ -0,0 +1,30 @@
package com.epmet.dto.form;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/6/2 14:09
*/
@Data
public class PublishedListFormDTO implements Serializable {
private static final long serialVersionUID = -8377558773628524229L;
/**
* 页码
*/
private Integer pageNo;
/**
* 每页显示数量
*/
private Integer pageSize;
/**
* 标签
*/
private List<String> tagIdList;
}

37
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/ResiArticleDetailFormDTO.java

@ -0,0 +1,37 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 居民端查看文章详情传参DTO
* @ClassName ResiArticleDetailFormDTO
* @Auth wangc
* @Date 2020-06-04 09:20
*/
@Data
public class ResiArticleDetailFormDTO implements Serializable {
private static final long serialVersionUID = -7197489284630455909L;
public interface ResiArticleDetailInternalGroup{}
/**
* 网格Id
* */
@NotBlank(message = "网格Id不能为空",groups = ResiArticleDetailInternalGroup.class)
private String gridId;
/**
* 文章Id
* */
@NotBlank(message = "文章Id不能为空",groups = ResiArticleDetailInternalGroup.class)
private String articleId;
/**
* 用户Id
* */
@NotBlank(message = "用户Id不能为空",groups = ResiArticleDetailInternalGroup.class)
private String userId;
}

37
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/ResiTagListFormDTO.java

@ -0,0 +1,37 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @CreateTime 2020/6/2 15:50
*/
@Data
public class ResiTagListFormDTO implements Serializable {
private static final long serialVersionUID = 4337657473061285656L;
public interface ResiTagListForm{}
public interface ResiTagListFormWeb extends CustomerClientShowGroup{}
/**
* 网格id
*/
@NotBlank(message = "网格id不能为空",groups = {ResiTagListForm.class})
private String gridId;
/**
* 用户id
*/
@NotBlank(message = "客户id不能为空",groups = {ResiTagListForm.class})
private String customerId;
/**
* 用户id
*/
private String userId;
}

37
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/TagCascadeListFormDTO.java

@ -0,0 +1,37 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @CreateTime 2020/6/3 13:16
*/
@Data
public class TagCascadeListFormDTO implements Serializable {
private static final long serialVersionUID = -727325750715567406L;
public interface TagCascadeList{}
public interface TagCascadeListWeb extends CustomerClientShowGroup {}
/**
* 网格id
*/
@NotBlank(message = "网格id不能为空",groups = {TagCascadeList.class})
private String gridId;
/**
* 标签id集合
*/
private List<String> tagIdList;
/**
* 客户id
*/
private String customerId;
}

0
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/.gitkeep

31
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleBannerResultDTO.java

@ -0,0 +1,31 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @ClassName ArticleBannerResultDTO
* @Auth wangc
* @Date 2020-06-02 13:55
*/
@Data
public class ArticleBannerResultDTO implements Serializable {
private static final long serialVersionUID = 7764443348626371305L;
/**
* 文章Id
* */
private String articleId;
/**
* 封面图url
* */
private String coverImg;
/**
* 标题
* */
private String title;
}

26
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleContentResultDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @ClassName ArticleContentResultDTO
* @Auth wangc
* @Date 2020-06-03 16:41
*/
@Data
public class ArticleContentResultDTO implements Serializable {
private static final long serialVersionUID = 2853197212163051558L;
/**
* 内容类型图片img文字text
* */
private String contentType;
/**
* 内容
* */
private String content;
}

59
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleDetailResultDTO.java

@ -0,0 +1,59 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @ClassName ArticleDetailResultDTO
* @Auth wangc
* @Date 2020-06-03 16:36
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class ArticleDetailResultDTO implements Serializable {
private static final long serialVersionUID = 4659147595194692686L;
/**
* 文章Id
* */
private String articleId;
/**
* 文章标题
* */
private String articleTitle;
/**
* 文章发布单位名称
* */
private String publishUnitDesc;
/**
* 发布时间
* */
private String publishDate;
/**
* 文章当前网格阅读量article_visit_record统计数
* */
private Integer visitRecordCount;
/**
* 标签名称集合(竖线分隔)
* */
private String tags;
/**
* 文章内容
* */
private List<ArticleContentResultDTO> articleContentList;
/**
* 客户Id
* */
private String customerId;
}

41
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleLatestResultDTO.java

@ -0,0 +1,41 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @ClassName ArticleLatestResultDTO
* @Auth wangc
* @Date 2020-06-02 17:11
*/
@Data
public class ArticleLatestResultDTO implements Serializable {
private static final long serialVersionUID = 6953266228209247094L;
/**
* 文章Id
* */
private String articleId;
/**
* 文章封面图片url
* */
private String articleCoverImg;
/**
* 文章标题
* */
private String articleTitle;
/**
* 发布单位名称
* */
private String publishName;
/**
* 发布时间天级别 时间戳
* */
private String publishDate;
}

46
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleListResultDTO.java

@ -0,0 +1,46 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @ClassName ArticleListResultDTO
* @Auth wangc
* @Date 2020-06-03 10:59
*/
@Data
public class ArticleListResultDTO implements Serializable {
private static final long serialVersionUID = 293527138997974861L;
/**
* 文章Id
* */
private String articleId;
/**
* 文章标题
* */
private String articleTitle;
/**
* 发布单位名称
* */
private String publishName;
/**
* 发布时间(天级别)
* */
private String publishDate;
/**
* 文章发布内容(只截取前50字)
* */
private String articleContent;
/**
* 标签名称集合(竖线分隔)
* */
private String tagName;
}

19
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/ArticleOperationResultDTO.java

@ -0,0 +1,19 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/2 16:44
*/
@Data
public class ArticleOperationResultDTO implements Serializable {
private static final long serialVersionUID = -436748500797911121L;
private String id;
private String content;
private Long createdTime;
}

27
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/CorrelationTagListResultDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @CreateTime 2020/6/3 9:41
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class CorrelationTagListResultDTO implements Serializable {
private static final long serialVersionUID = 5536953304816455733L;
/**
* 标签id
*/
private String tagId;
/**
* 标签名称
*/
private String tagName;
}

35
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/CoverImgDTO.java

@ -0,0 +1,35 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 政府端选中草稿编辑获取草稿属性-封面图片
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/3 14:26
*/
@Data
public class CoverImgDTO implements Serializable {
private static final long serialVersionUID = -6735712590479867385L;
/**
* 封面Id
*/
private String coverId;
/**
* 封面url
*/
private String url;
/**
* 审核状态
*/
private String auditStatus;
/**
* 审核理由
*/
private String auditReason;
}

79
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftAttrResultDTO.java

@ -0,0 +1,79 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 政府端选中草稿编辑获取草稿属性
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/3 14:15
*/
@Data
public class DraftAttrResultDTO implements Serializable {
private static final long serialVersionUID = 6999941497971286747L;
/**
* 草稿Id
*/
private String draftId;
/**
* 封面图片
*/
private CoverImgDTO coverImg;
/**
* 标签名称数组 竖杠分割的标签名称
*/
private String[] tagNameList;
/**
* 是否置顶 1是0
*/
private Integer isTop;
/**
* 网格Id数组
*/
private List<String> gridIdList;
/**
* 发布单位Id
*/
private String publisher;
/**
* 发布单位名称
*/
private String publisherName;
/**
* 发布日期
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date publishDate;
/**
* 标题
*/
private String title;
/**
* 发布范围拼接的字符串顿号隔开
*/
private String publishRangeDesc;
/**
* 机关:agency部门department网格grid
*/
private String publisherType;
@JsonIgnore
private String tags;
}

45
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftContentDetailDTO.java

@ -0,0 +1,45 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 政府端选中草稿编辑获取草稿内容返参明细
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/3 13:14
*/
@Data
public class DraftContentDetailDTO implements Serializable {
private static final long serialVersionUID = -415892498226389295L;
/**
*内容Id
*/
private String id;
/**
* 具体内容
*/
private String content;
/**
* 内容类型 图片img文字text
*/
private String contentType;
/**
* 内容序号
*/
private Integer orderNum;
/**
* 审核状态 通过:pass失败:fail
*/
private String auditStatus;
/**
* 审核理由
*/
private String auditReason;
}

30
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftContentResultDTO.java

@ -0,0 +1,30 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 政府端选中草稿编辑获取草稿内容返参
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/3 13:01
*/
@Data
public class DraftContentResultDTO implements Serializable {
private static final long serialVersionUID = -1310987373261903935L;
/**
*
*/
private String draftId;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private List<DraftContentDetailDTO> contentList;
}

62
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftDetailResultDTO.java

@ -0,0 +1,62 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 政府端文章预览接口返参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/5 10:56
*/
@Data
public class DraftDetailResultDTO implements Serializable {
private static final long serialVersionUID = 6156947260878857897L;
/**
* 草稿Id
*/
private String draftId;
/**
* 标题
*/
private String title;
/**
* 发布单位名称
*/
private String publisherName;
/**
* 发布日期
*/
@JsonFormat(pattern="yyyy-MM-dd")
private Date publishDate;
/**
* 访问量
*/
private Integer visitRecordCount;
/**
* 标签字符串 已废弃
*/
@JsonIgnore
private String tags;
/**
* 内容列表
*/
private List<GovDraftContentDTO> articleContentList;
/**
* 标签名称数组
*/
private String[] tagNameList;
}

34
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftListResultDTO.java

@ -0,0 +1,34 @@
package com.epmet.dto.result;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/6/3 14:44
*/
@NoArgsConstructor
@Data
public class DraftListResultDTO implements Serializable {
private static final long serialVersionUID = -3596277149943610099L;
/**
* 文章ID
*/
private String draftId;
/**
* 文章标题
*/
private String title;
/**
* 文章内容
*/
private String content;
/**
* 创建时间
*/
private Long createdTime;
}

25
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovArticleContentDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 政府端已发布已下线文章内容详情
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/3 9:39
*/
@Data
public class GovArticleContentDTO implements Serializable {
private static final long serialVersionUID = 1519014754254863006L;
/**
* 内容类型图片img文字text
*/
private String contentType;
/**
* 内容
*/
private String content;
}

69
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GovArticleDetailResultDTO.java

@ -0,0 +1,69 @@
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;
/**
* 政府端已发布已下线文章详情 返参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2020/6/3 9:29
*/
@Data
public class GovArticleDetailResultDTO implements Serializable {
private static final long serialVersionUID = -8328304788721564622L;
/**
* 文章id
*/
private String articleId;
/**
* 标题
*/
private String title;
/**
* 发布单位名称
*/
private String publisherName;
/**
* 发布日期
*/
@JsonFormat(pattern="yyyy-MM-dd")
private Date publishDate;
/**
* 访问量
*/
private Integer visitRecordCount;
/**
* 发布范围字符串
*/
private String publishRangeDesc;
/**
* 标签字符串
*/
private String tags;
/**
* 发布状态 已发布:published已下线offline
*/
private String statusFlag;
/**
* 草稿Id重新编辑时使用
*/
private String draftId;
/**
* 内容列表
*/
private List<GovArticleContentDTO> articleContentList;
}

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

Loading…
Cancel
Save