Browse Source

Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/EpmetUserService.java
#	epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
#	epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/ThirdOpenFeignClient.java
master
jianjun 4 years ago
parent
commit
b7156d618a
  1. 3
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  2. 12
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java
  3. 12
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/GridInfoCache.java
  4. 2
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/OrgStaffListFormDTO.java
  5. 14
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
  6. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml
  7. 1
      epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/config/ScheduleConfig.java
  8. 46
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/AllPartyFormDTO.java
  9. 13
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.java
  10. 49
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/AllPartyResultDTO.java
  11. 12
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/GroupPointRankingResultDTO.java
  12. 43
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/GroupPointController.java
  13. 12
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java
  14. 3
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java
  15. 14
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/BizPointTotalDetailService.java
  16. 10
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java
  17. 185
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/BizPointTotalDetailServiceImpl.java
  18. 34
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java
  19. 43
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml
  20. 17
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/OrgFormDTO.java
  21. 10
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
  22. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
  23. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
  24. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
  25. 14
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  26. 22
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/AttachmentDTO.java
  27. 56
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ExternalLinkDTO.java
  28. 117
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideAttachmentDTO.java
  29. 91
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCategoryDTO.java
  30. 91
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideCollectionDTO.java
  31. 112
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideDTO.java
  32. 96
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideExternalLinkDTO.java
  33. 91
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDTO.java
  34. 96
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDictDTO.java
  35. 91
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideModuleDictDefaultDTO.java
  36. 58
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ModuleDTO.java
  37. 61
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideAddFormDTO.java
  38. 70
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideEditFormDTO.java
  39. 39
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideFormDTO.java
  40. 31
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideListFormDTO.java
  41. 17
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GetCategoryResultDTO.java
  42. 67
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDetailResultDTO.java
  43. 35
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideListResultDTO.java
  44. 84
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java
  45. 84
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCollectionController.java
  46. 172
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java
  47. 84
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleController.java
  48. 84
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleDictController.java
  49. 33
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideAttachmentDao.java
  50. 33
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java
  51. 33
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCollectionDao.java
  52. 59
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideDao.java
  53. 33
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideExternalLinkDao.java
  54. 45
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDao.java
  55. 33
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDictDao.java
  56. 33
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDictDefaultDao.java
  57. 83
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideAttachmentEntity.java
  58. 61
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCategoryEntity.java
  59. 61
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCollectionEntity.java
  60. 78
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideEntity.java
  61. 63
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideExternalLinkEntity.java
  62. 61
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleDictDefaultEntity.java
  63. 66
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleDictEntity.java
  64. 61
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleEntity.java
  65. 114
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideAttachmentService.java
  66. 95
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java
  67. 95
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCollectionService.java
  68. 114
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideExternalLinkService.java
  69. 95
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictDefaultService.java
  70. 95
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictService.java
  71. 115
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleService.java
  72. 153
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideService.java
  73. 149
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideAttachmentServiceImpl.java
  74. 100
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java
  75. 100
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCollectionServiceImpl.java
  76. 145
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideExternalLinkServiceImpl.java
  77. 100
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictDefaultServiceImpl.java
  78. 100
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictServiceImpl.java
  79. 132
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleServiceImpl.java
  80. 382
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java
  81. 26
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideAttachmentDao.xml
  82. 21
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml
  83. 21
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCollectionDao.xml
  84. 61
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml
  85. 21
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideExternalLinkDao.xml
  86. 34
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDao.xml
  87. 22
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDictDao.xml
  88. 21
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDictDefaultDao.xml
  89. 17
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/constant/ActConstant.java
  90. 126
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActCommentAttachmentDTO.java
  91. 44
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/OrganizationalLifeLineChartDTO.java
  92. 6
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CommentFormDTO.java
  93. 22
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/OrganizationalLifeFormDTO.java
  94. 10
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CommentResultDTO.java
  95. 47
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/OrganizationalLifeResultDTO.java
  96. 8
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/comment/result/ResiCommentResultDTO.java
  97. 74
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/GroupFormDTO.java
  98. 4
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/AllGroupListResultDTO.java
  99. 28
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/CommentFileDTO.java
  100. 4
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupDetailResultDTO.java

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

@ -155,7 +155,8 @@ public enum EpmetErrorCode {
EXISTED_SPECIAL_PROJECT(8807, "已经添加过此专题"),
CAN_NOT_DEL_SPECIAL_PROJECT(8808, "您没有权限删除此专题"),
TAG_NOT_EXIST(8809,"标签不存在"),
GUIDE_IS_NULL(8810,"指南内容不能为空"),
GUIDE_IS_NOT_YOURS(8811,"只能删除自己创建的指南"),
//公众号 865..开头的码
PUBLIC_NOT_EXISTS(8651,"手机号未注册,请先完成信息注册"),
SELECT_CUSTOMER_ERROR(8652,"未查询到注册客户信息"),

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

@ -523,4 +523,16 @@ public class RedisKeys {
public static String getCustomerStaffInfoKey(String customerId, String staffId) {
return rootPrefix.concat("gov:staff:").concat(customerId).concat(StrConstant.COLON).concat(staffId);
}
/**
* @description 网格信息
*
* @param gridId
* @return
* @author wxz
* @date 2021.09.08 11:03:48
*/
public static String getGridInfoKey(String gridId) {
return rootPrefix.concat("gov:grid:").concat(gridId);
}
}

12
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/GridInfoCache.java

@ -0,0 +1,12 @@
package com.epmet.commons.tools.redis.common.bean;
import lombok.Data;
@Data
public class GridInfoCache {
private String gridId;
private String gridNamePath;
private String customerId;
private String pid;
private String pids;
}

2
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/form/OrgStaffListFormDTO.java

@ -45,6 +45,8 @@ public class OrgStaffListFormDTO implements Serializable {
private List<String> staffIds;
//token中用户Id
private String staffId;
//人员是否禁用【未禁用enable,已禁用disabled】
private String enableFlag = "enable";
public interface OrgStaff extends CustomerClientShowGroup {}
}

14
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java

@ -3,8 +3,10 @@ package com.epmet.dataaggre.service.govorg.impl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.govorg.*;
@ -28,10 +30,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
/**
@ -393,6 +392,13 @@ public class GovOrgServiceImpl implements GovOrgService {
staffIds.removeIf(s->s.equals(formDTO.getStaffId()));
}
//是否具有超级管理员或管理员角色
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
Map<String,String> roleMap = staffInfoCache.getRoleMap();
if (roleMap.containsKey("root_manager") || roleMap.containsKey("manager")) {
formDTO.setEnableFlag("disabled");
}
//2.分页查询工作人员基础信息、角色信息【组织人员单位领导角色人员在前;部门人员部门领导角色人员在前;网格人员网格长角色人员在前】
List<ListStaffResultDTO> staffList = epmetUserService.getStaffInfoList(formDTO);

11
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml

@ -61,7 +61,7 @@
SELECT DISTINCT<!-- 没有这个去重会改变最终的结果顺序,至于为什么还不清楚 -->
sr.staff_id,
cs.created_time,
case when gsr.role_key =
case when cs.enable_flag = 'enable' AND gsr.role_key =
<choose>
<when test="orgType != null and orgType == 'agency' ">
'agency_leader'
@ -73,9 +73,14 @@
'grid_manager'
</otherwise>
</choose>
then 1 else 0 end is_first<!-- 有单位领导角色的人赋值为1,没有的赋值为0 -->
then 0
when cs.enable_flag = 'enable' AND gsr.role_key != 'agency_leader'
then 1 else 2 end is_first<!-- 未禁用有相应角色人员赋值0,未禁用无相应角色人员赋值1,禁用人员赋值2 -->
FROM staff_role sr
INNER JOIN customer_staff cs ON sr.staff_id = cs.user_id
<if test="enableFlag != null and enableFlag != '' and enableFlag == 'enable' ">
AND cs.enable_flag = 'enable' <!-- 非超级管理员、管理员只允许查看未禁用人员信息 -->
</if>
INNER JOIN gov_staff_role gsr ON sr.role_id = gsr.id AND gsr.customer_id = #{customerId}
WHERE
sr.del_flag = '0'
@ -100,7 +105,7 @@
</choose>
) t
GROUP BY t.staff_id
ORDER BY t.is_first <![CDATA[<>]]> 1, t.created_time desc<!-- 标注有单位领导角色的人不参与排序也就是默认拍在前边,再按创建时间降序 -->
ORDER BY t.is_first <![CDATA[<>]]> 0, t.is_first asc, t.created_time desc<!-- 标注有相应角色的人不参与排序也就是默认拍在前边,没有相对于角色的排在后边,禁用人员排在最后 -->
LIMIT #{pageNo}, #{pageSize}
</select>

1
epmet-module/epmet-job/epmet-job-server/src/main/java/com/epmet/config/ScheduleConfig.java

@ -46,6 +46,7 @@ public class ScheduleConfig {
prop.put("org.quartz.jobStore.misfireThreshold", "12000");
prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_");
prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?");
prop.put("org.quartz.jobStore.acquireTriggersWithinLock", "true");
//PostgreSQL数据库,需要打开此注释
//prop.put("org.quartz.jobStore.driverDelegateClass", "org.quartz.impl.jdbcjobstore.PostgreSQLDelegate");

46
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/AllPartyFormDTO.java

@ -0,0 +1,46 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import javax.validation.constraints.Min;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2021/9/6 3:13 下午
* @DESC
*/
@Data
public class AllPartyFormDTO implements Serializable {
private static final long serialVersionUID = -600409785611581009L;
/**
* 页码
**/
private Integer pageNo = NumConstant.ONE;
/**
* 每页数据条数
**/
private Integer pageSize = NumConstant.TEN;
/**
* 本月 monthly 总排行 all;
* */
private String type;
/**
* 认证成功的党员 的用户ID
* */
private List<String> userIds;
/**
* 客户ID
*/
private String customerId;
}

13
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/GroupPointFormDTO.java

@ -1,6 +1,7 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import com.sun.webkit.LoadListenerClient;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@ -17,8 +18,18 @@ public class GroupPointFormDTO implements Serializable {
public interface GroupPoint extends CustomerClientShowGroup {}
public interface GridRank extends CustomerClientShowGroup {}
public interface GridScopeRank extends CustomerClientShowGroup {}
public interface CustomerScopeRank extends CustomerClientShowGroup {}
@NotBlank(message = "小组Id不能为空", groups = {GroupPoint.class, GridRank.class})
private String groupId;
@NotBlank(message = "网格Id不能为空", groups = {GridRank.class})
@NotBlank(message = "网格Id不能为空", groups = {GridRank.class, GridScopeRank.class})
private String gridId;
@NotBlank(message = "客户Id不能为空", groups = {CustomerScopeRank.class})
private String customerId;
/** 页码 */
private Integer pageNo = 1;
/** 单页条数 */
private Integer pageSize = 10;
}

49
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/AllPartyResultDTO.java

@ -0,0 +1,49 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/9/6 3:12 下午
* @DESC
*/
@Data
public class AllPartyResultDTO implements Serializable {
private static final long serialVersionUID = -5889648842876122793L;
/**
* 排序
**/
private Integer ranking;
/**
* 积分
**/
private Integer point;
/**
* 头像
**/
private String userHeadPhoto;
/**
* 名称
**/
private String realName;
/**
* 用户id
**/
private String userId;
public AllPartyResultDTO() {
this.point = NumConstant.ZERO;
this.userHeadPhoto = "";
this.realName = "";
this.userId = "";
}
}

12
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/GroupPointRankingResultDTO.java

@ -35,4 +35,16 @@ public class GroupPointRankingResultDTO implements Serializable {
* 小组ID
*/
private String groupId;
/** 头像 */
private String groupHeadPhoto;
/** 类型 branch 支部小组;o */
private String groupType;
/** 所属网格id */
private String gridId;
/** 所属网格名称 */
private String gridNamePath;
}

43
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/GroupPointController.java

@ -1,6 +1,7 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
@ -10,16 +11,20 @@ import com.epmet.dto.result.GroupPointRankingResultDTO;
import com.epmet.dto.result.GroupPointRuleResultDTO;
import com.epmet.dto.result.PointRankingResultDTO;
import com.epmet.resi.group.dto.group.result.GroupPointDetailResultDTO;
import com.epmet.resi.group.enums.SearchScopeTypeEnum;
import com.epmet.service.BizPointTotalDetailService;
import com.epmet.service.BizPointUserTotalDetailService;
import com.epmet.service.PointRuleService;
import com.epmet.utils.ModuleConstant;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.constraints.NotBlank;
import java.lang.management.MemoryManagerMXBean;
import java.util.List;
/**
@ -113,4 +118,42 @@ public class GroupPointController {
return new Result<BizPointTotalDetailDTO>().ok(result);
}
/**
* @description 小组排名- 网格范围内
*
* @param formDTO
* @return
* @author wxz
* @date 2021.09.07 13:35:45
*/
@PostMapping("grouppointranking/gridscope")
public Result<PageData<GroupPointRankingResultDTO>> listGroupPointRandingInGridScope(@RequestBody GroupPointFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, GroupPointFormDTO.GridScopeRank.class);
String gridId = formDTO.getGridId();
Integer pageNo = formDTO.getPageNo();
Integer pageSize = formDTO.getPageSize();
PageData<GroupPointRankingResultDTO> page = bizPointTotalDetailService.listGroupPointRandingInGridScope(SearchScopeTypeEnum.GRID, gridId,pageNo, pageSize);
return new Result<PageData<GroupPointRankingResultDTO>>().ok(page);
}
/**
* @description 小组排名- 客户范围内
*
* @param formDTO
* @return
* @author wxz
* @date 2021.09.08 09:18:37
*/
@PostMapping("grouppointranking/customerscope")
public Result<PageData<GroupPointRankingResultDTO>> listGroupPointRandingInCustomerScope(@RequestBody GroupPointFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, GroupPointFormDTO.CustomerScopeRank.class);
String customerId = formDTO.getCustomerId();
Integer pageNo = formDTO.getPageNo();
Integer pageSize = formDTO.getPageSize();
PageData<GroupPointRankingResultDTO> page = bizPointTotalDetailService.listGroupPointRandingInGridScope(SearchScopeTypeEnum.CUSTOMER, customerId, pageNo, pageSize);
return new Result<PageData<GroupPointRankingResultDTO>>().ok(page);
}
}

12
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java

@ -159,6 +159,18 @@ public class ResiPointController {
return new Result<List<ResiAroundPartyPointRankResultDTO>>().ok(resultDTOS);
}
/**
* @Description 全部党员积分排行
* @Param formDTO
* @author zxc
* @date 2021/9/6 3:30 下午
*/
@PostMapping("allparty")
public Result<List<AllPartyResultDTO>> allParty(@RequestBody AllPartyFormDTO formDTO,@LoginUser TokenDto tokenDto){
formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<List<AllPartyResultDTO>>().ok(userPointStatisticalDailyService.allParty(formDTO));
}
/**
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.MyPointTaskResultDTO>>
* @param tokenDto

3
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java

@ -19,6 +19,7 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.ResiAroundPartyPointRankFormDTO;
import com.epmet.dto.result.AllPartyResultDTO;
import com.epmet.dto.result.ResiAroundPartyPointRankResultDTO;
import com.epmet.dto.result.ResiPointRankResultDTO;
import com.epmet.entity.UserPointStatisticalDailyEntity;
@ -73,6 +74,7 @@ public interface UserPointStatisticalDailyDao extends BaseDao<UserPointStatistic
* @Date 09:24 2020-12-29
**/
List<ResiAroundPartyPointRankResultDTO> selectListGridPartyRankByUsablePoint(ResiAroundPartyPointRankFormDTO formDTO);
List<AllPartyResultDTO> selectListGridPartyNewRankByUsablePoint(ResiAroundPartyPointRankFormDTO formDTO);
/**
* 身边党员-积分排行 按网格统计对本月党员增加的积分 进行排序
@ -82,4 +84,5 @@ public interface UserPointStatisticalDailyDao extends BaseDao<UserPointStatistic
* @Date 09:24 2020-12-29
**/
List<ResiAroundPartyPointRankResultDTO> selectListGridPartyRankByMonth(ResiAroundPartyPointRankFormDTO formDTO);
List<AllPartyResultDTO> selectListGridPartyNewRankByMonth(ResiAroundPartyPointRankFormDTO formDTO);
}

14
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/BizPointTotalDetailService.java

@ -24,6 +24,7 @@ import com.epmet.dto.form.GroupPointFormDTO;
import com.epmet.resi.group.dto.group.result.GroupPointDetailResultDTO;
import com.epmet.dto.result.GroupPointRankingResultDTO;
import com.epmet.entity.BizPointTotalDetailEntity;
import com.epmet.resi.group.enums.SearchScopeTypeEnum;
import java.util.List;
import java.util.Map;
@ -135,4 +136,17 @@ public interface BizPointTotalDetailService extends BaseService<BizPointTotalDet
* @return com.epmet.dto.BizPointTotalDetailDTO
*/
BizPointTotalDetailDTO getGroupPoint(GroupPointFormDTO formDTO);
/**
* @description 网格范围内查询小组排名
*
* @param searchScopeType 搜索小组的范围类型:GroupFormDTO.SearchScopeTypeEnum.GRID/GroupFormDTO.SearchScopeTypeEnum.CUSTOMER
* @param searchScopeId 搜索小组的范围id
* @param pageNo 页码默认0
* @param pageSize 单页条数默认10
* @return
* @author wxz
* @date 2021.09.07 14:18:08
*/
PageData<GroupPointRankingResultDTO> listGroupPointRandingInGridScope(SearchScopeTypeEnum searchScopeType, String searchScopeId, Integer pageNo, Integer pageSize);
}

10
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java

@ -20,8 +20,10 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.UserPointStatisticalDailyDTO;
import com.epmet.dto.form.AllPartyFormDTO;
import com.epmet.dto.form.ResiAroundPartyPointRankFormDTO;
import com.epmet.dto.form.ResiPointRankFormDTO;
import com.epmet.dto.result.AllPartyResultDTO;
import com.epmet.dto.result.ResiAroundPartyPointRankResultDTO;
import com.epmet.dto.result.ResiPointRankListResultDTO;
import com.epmet.entity.UserPointStatisticalDailyEntity;
@ -125,4 +127,12 @@ public interface UserPointStatisticalDailyService extends BaseService<UserPointS
* @Date 16:17 2020-12-28
**/
List<ResiAroundPartyPointRankResultDTO> listAroundPartyPointRank(ResiAroundPartyPointRankFormDTO formDTO);
/**
* @Description 全部党员积分排行
* @Param formDTO
* @author zxc
* @date 2021/9/6 3:30 下午
*/
List<AllPartyResultDTO> allParty(AllPartyFormDTO formDTO);
}

185
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/BizPointTotalDetailServiceImpl.java

@ -17,31 +17,48 @@
package com.epmet.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
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.BizPointTotalDetailDao;
import com.epmet.dto.BizPointTotalDetailDTO;
import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.form.CustomerGridFormDTO;
import com.epmet.dto.form.GroupPointFormDTO;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.resi.group.dto.group.form.GroupFormDTO;
import com.epmet.resi.group.dto.group.form.GroupPointDetailFormDTO;
import com.epmet.resi.group.dto.group.result.GroupDetailResultDTO;
import com.epmet.resi.group.dto.group.result.GroupPointDetailResultDTO;
import com.epmet.dto.result.GroupPointRankingResultDTO;
import com.epmet.entity.BizPointTotalDetailEntity;
import com.epmet.resi.group.dto.group.ResiGroupDTO;
import com.epmet.resi.group.enums.SearchScopeTypeEnum;
import com.epmet.resi.group.feign.ResiGroupOpenFeignClient;
import com.epmet.service.BizPointTotalDetailService;
import com.epmet.service.BizPointUserTotalDetailService;
import com.epmet.service.UserPointActionLogService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -57,7 +74,7 @@ import java.util.stream.Collectors;
* @since v1.0.0 2021-04-20
*/
@Service
public class BizPointTotalDetailServiceImpl extends BaseServiceImpl<BizPointTotalDetailDao, BizPointTotalDetailEntity> implements BizPointTotalDetailService {
public class BizPointTotalDetailServiceImpl extends BaseServiceImpl<BizPointTotalDetailDao, BizPointTotalDetailEntity> implements BizPointTotalDetailService, ResultDataResolver {
@Autowired
private ResiGroupOpenFeignClient resiGroupOpenFeignClient;
@ -65,6 +82,10 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl<BizPointTota
private BizPointUserTotalDetailService bizPointUserTotalDetailService;
@Autowired
private UserPointActionLogService userPointActionLogService;
@Autowired
private RedisTemplate<String, ?> redisTemplate;
@Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Override
public PageData<BizPointTotalDetailDTO> page(Map<String, Object> params) {
@ -239,4 +260,166 @@ public class BizPointTotalDetailServiceImpl extends BaseServiceImpl<BizPointTota
return ConvertUtils.sourceToTarget(entity, BizPointTotalDetailDTO.class);
}
@Override
public PageData<GroupPointRankingResultDTO> listGroupPointRandingInGridScope(SearchScopeTypeEnum searchScopeType, String searchScopeId, Integer pageNo, Integer pageSize) {
// 1.查询有积分的小组得分排名
PageInfo<BizPointTotalDetailEntity> entityPageInfo = PageHelper.startPage(pageNo, pageSize).doSelectPageInfo(() -> {
LambdaQueryWrapper<BizPointTotalDetailEntity> query = new LambdaQueryWrapper<>();
if (SearchScopeTypeEnum.CUSTOMER == searchScopeType) {
query.eq(BizPointTotalDetailEntity::getCustomerId, searchScopeId);
} else if (SearchScopeTypeEnum.GRID == searchScopeType) {
query.eq(BizPointTotalDetailEntity::getGridId, searchScopeId);
}
query.eq(BizPointTotalDetailEntity::getBizType, "group");
query.orderByDesc(BizPointTotalDetailEntity::getTotalPoint);
baseDao.selectList(query);
});
List<BizPointTotalDetailEntity> groupList = entityPageInfo.getList();
List<String> groupIds = groupList.stream().map(g -> g.getObjectId()).collect(Collectors.toList());
// 2.将列表填充基本信息并且转换为dto
List<GroupPointRankingResultDTO> rankingInfoDTOs = convertGroupRankingInfoEntity2DTOs(groupIds, groupList);
Page page = new Page(pageNo, pageSize);
// 3.如果不满一页,则填充分数为0的
if (pageSize > groupIds.size()) {
// 查出网格下已有积分的小组id
LambdaQueryWrapper<BizPointTotalDetailEntity> query = new LambdaQueryWrapper<>();
if (SearchScopeTypeEnum.CUSTOMER == searchScopeType) {
query.eq(BizPointTotalDetailEntity::getCustomerId, searchScopeId);
} else if (SearchScopeTypeEnum.GRID == searchScopeType) {
query.eq(BizPointTotalDetailEntity::getGridId, searchScopeId);
}
query.eq(BizPointTotalDetailEntity::getBizType, "group");
query.select(BizPointTotalDetailEntity::getObjectId);
List<String> existingGroupIds = baseDao.selectObjs(query).stream().map(obj -> obj.toString()).collect(Collectors.toList());
int startRow = page.getStartRow() - existingGroupIds.size();
// 不足0的从0开始
startRow = Math.max(startRow, 0);
List<GroupPointRankingResultDTO> gap;
gap = fillGroupPageGap(existingGroupIds, searchScopeType, searchScopeId, startRow, pageSize - groupList.size());
rankingInfoDTOs.addAll(gap);
}
// 4.排名填充
Integer ranking = page.getStartRow() + 1;
for (GroupPointRankingResultDTO g : rankingInfoDTOs) {
GridInfoCache gridInfo = getGridInfo(g.getGridId());
g.setRanking(String.valueOf(ranking));
g.setGridId(g.getGridId());
g.setGridNamePath(gridInfo.getGridNamePath());
ranking ++;
}
PageData<GroupPointRankingResultDTO> pageData = new PageData<>(rankingInfoDTOs, entityPageInfo.getTotal());
return pageData;
}
/**
* @description 获取分页缺口group ranking信息
*
* @param startRow
* @param rowCount
* @return
* @author wxz
* @date 2021.09.07 16:30:28
*/
private List<GroupPointRankingResultDTO> fillGroupPageGap(List<String> existingGroupIds, SearchScopeTypeEnum searchScopeType, String searchScopeObjectId, Integer startRow, Integer rowCount) {
GroupFormDTO form = new GroupFormDTO();
form.setExcludeGroupIds(existingGroupIds);
form.setOrder(GroupFormDTO.OrderTypeEnum.DESC);
form.setSort(GroupFormDTO.SortTypeEnum.CREATE_TIME);
form.setStartRow(startRow);
form.setRowCount(rowCount);
form.setSearchScopeType(searchScopeType);
form.setSearchScopeObjectId(searchScopeObjectId);
Result<List<GroupDetailResultDTO>> result = resiGroupOpenFeignClient.listGroupDetailsExcludeGroupIds(form);
List<GroupDetailResultDTO> groups = getResultDataOrThrowsException(result, ServiceConstant.RESI_GROUP_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【小组排名】查询积分为0的小组列表失败");
if (CollectionUtils.isEmpty(groups)) {
return new ArrayList<>();
}
return groups.stream().map(g -> {
GroupPointRankingResultDTO dto = new GroupPointRankingResultDTO();
dto.setGroupType(g.getGroupType());
dto.setPoint("0");
dto.setGroupHeadPhoto(g.getGroupHeadPhoto());
dto.setGroupName(g.getGroupName());
dto.setGroupId(g.getGroupId());
dto.setGridId(g.getGridId());
return dto;
}).collect(Collectors.toList());
}
/**
* @description 将小组排名Entity转化为dto
*
* @param groupList
* @return
* @author wxz
* @date 2021.09.07 15:52:17
*/
private List<GroupPointRankingResultDTO> convertGroupRankingInfoEntity2DTOs(List<String> groupIds, List<BizPointTotalDetailEntity> groupList) {
if (CollectionUtils.isEmpty(groupIds)) {
return new ArrayList<>();
}
// 查询这些小组的基本信息
Result<List<GroupDetailResultDTO>> listResult = resiGroupOpenFeignClient.listGroupDetailsByGroupIds(groupIds);
List<GroupDetailResultDTO> groupInfos = getResultDataOrThrowsException(listResult, ServiceConstant.RESI_GROUP_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【小组排行】批量查询小组信息出错");
// 将小组基本信息转化为map
HashMap<String, GroupDetailResultDTO> groupMap = new HashMap<>();
groupInfos.stream().forEach(g -> groupMap.put(g.getGroupId(), g));
// 将小组信息填充到排名列表中
List<GroupPointRankingResultDTO> rankingDTOs = groupList.stream().map(g -> {
GroupDetailResultDTO groupInfo = groupMap.get(g.getObjectId());
GroupPointRankingResultDTO dto = new GroupPointRankingResultDTO();
dto.setGroupId(g.getObjectId());
dto.setGroupName(groupInfo.getGroupName());
dto.setGroupType(groupInfo.getGroupType());
dto.setPoint(g.getTotalPoint().toString());
dto.setGroupHeadPhoto(groupInfo.getGroupHeadPhoto());
dto.setGridId(g.getGridId());
return dto;
}).collect(Collectors.toList());
return rankingDTOs;
}
/**
* @description 查询网格信息
*
* @param gridId
* @return
* @author wxz
* @date 2021.09.08 11:17:17
*/
public GridInfoCache getGridInfo(String gridId) {
HashOperations<String, String, Object> ope = redisTemplate.opsForHash();
Map<String, Object> entries = ope.entries(RedisKeys.getGridInfoKey(gridId));
if (entries.size() != 0) {
return BeanUtil.mapToBean(entries, GridInfoCache.class, true);
}
CustomerGridFormDTO form = new CustomerGridFormDTO();
form.setGridId(gridId);
Result<CustomerGridDTO> result = govOrgOpenFeignClient.getCustomerGridByGridId(form);
if (result == null || !result.success() || result.getData() == null) {
return null;
}
GridInfoCache cache = new GridInfoCache();
cache.setCustomerId(result.getData().getCustomerId());
cache.setGridId(result.getData().getId());
cache.setGridNamePath(result.getData().getGridName());
cache.setPid(result.getData().getPid());
cache.setPids(result.getData().getPids());
ope.putAll(RedisKeys.getGridInfoKey(gridId), BeanUtil.beanToMap(cache));
return cache;
}
}

34
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java

@ -23,11 +23,13 @@ import com.epmet.common.enu.AroundPartyConstant;
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.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.UserPointStatisticalDailyDao;
import com.epmet.dto.UserPointStatisticalDailyDTO;
import com.epmet.dto.form.AllPartyFormDTO;
import com.epmet.dto.form.ResiAroundPartyPointRankFormDTO;
import com.epmet.dto.form.ResiPointRankFormDTO;
import com.epmet.dto.result.*;
@ -45,6 +47,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.*;
import java.util.stream.Collectors;
@ -292,6 +295,37 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl<UserPo
return resultDTOS;
}
/**
* @Description 全部党员积分排行
* @Param formDTO
* @author zxc
* @date 2021/9/6 3:30 下午
*/
@Override
public List<AllPartyResultDTO> allParty(AllPartyFormDTO formDTO) {
formDTO.setPageNo((formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize());
Result<List<PartymemberInfoDTO>> partyMemberInfosResult = resiPartyMemberOpenFeignClient.getPartyMemberInfoByCustomerId(formDTO.getCustomerId());
if (!partyMemberInfosResult.success()){
throw new RenException("查询客户下的党员失败......");
}
if (CollectionUtils.isEmpty(partyMemberInfosResult.getData())){
return new ArrayList<>();
}
List<PartymemberInfoDTO> partyMemberInfos = partyMemberInfosResult.getData();
List<String> userIds = partyMemberInfos.stream().map(m -> m.getUserId()).collect(Collectors.toList());
ResiAroundPartyPointRankFormDTO selDto = ConvertUtils.sourceToTarget(formDTO, ResiAroundPartyPointRankFormDTO.class);
selDto.setUserIds(userIds);
List<AllPartyResultDTO> resultDTOS = new ArrayList<>();
if (AroundPartyConstant.ALL.equals(formDTO.getType())){
resultDTOS = baseDao.selectListGridPartyNewRankByUsablePoint(selDto);
}else if (AroundPartyConstant.MONTHLY.equals(formDTO.getType())){
resultDTOS = baseDao.selectListGridPartyNewRankByMonth(selDto);
}
List<ResiAroundPartyPointRankResultDTO> partyBaseInfo = getPartyBaseInfo(ConvertUtils.sourceToTarget(resultDTOS, ResiAroundPartyPointRankResultDTO.class));
List<AllPartyResultDTO> result = ConvertUtils.sourceToTarget(partyBaseInfo, AllPartyResultDTO.class);
return result;
}
/**
* 获取认证通过的党员的 用户id
*

43
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml

@ -184,4 +184,47 @@
ORDER BY P.point DESC
LIMIT #{pageNo}, #{pageSize}
</select>
<select id="selectListGridPartyNewRankByUsablePoint" resultType="com.epmet.dto.result.AllPartyResultDTO">
SET @curRank = 0;
SELECT
@curRank := @curRank + 1 AS ranking,
@point := IFNULL(p.USABLE_POINT, 0),
IFNULL(p.USABLE_POINT, 0) point,
p.USER_ID userId
FROM user_point_total p
<if test="null != userIds and userIds.size() > 0">
WHERE p.USER_ID IN
<foreach collection="userIds" item="userId" open="(" separator="," close=" )">
#{userId}
</foreach>
</if>
ORDER BY IFNULL(p.USABLE_POINT, 0) DESC
LIMIT #{pageNo}, #{pageSize}
</select>
<select id="selectListGridPartyNewRankByMonth" resultType="com.epmet.dto.result.AllPartyResultDTO">
SET @curRank = 0;
SELECT
@curRank := @curRank + 1 AS ranking,
@point := p.point,
P.userId,
P.point
FROM(
SELECT
pl.USER_ID userId,
SUM(PL.POINT) point
FROM user_point_action_log pl
WHERE pl.DEL_FLAG = '0' AND DATE_FORMAT(pl.CREATED_TIME, '%Y%m')= DATE_FORMAT( CURDATE( ) , '%Y%m' ) AND pl.action_flag = 'plus'
GROUP BY pl.USER_ID
) P
<if test="null != userIds and userIds.size() > 0">
WHERE userId IN
<foreach collection="userIds" item="userId" open="(" separator="," close=" )">
#{userId}
</foreach>
</if>
ORDER BY P.point DESC
LIMIT #{pageNo}, #{pageSize}
</select>
</mapper>

17
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/OrgFormDTO.java

@ -0,0 +1,17 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/7 15:41
*/
@Data
public class OrgFormDTO implements Serializable {
private static final long serialVersionUID = -5975063766883885089L;
private String orgId;
private String orgType;
}

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

@ -417,4 +417,14 @@ public interface GovOrgOpenFeignClient {
*/
@PostMapping("/gov/org/customerstaffagency/queryOrgStaffs")
Result<Set<String>> queryOrgStaffs(@RequestBody OrgStaffFormDTO formDTO);
/**
* @Description 根据组织或网格或吧部门获取组织信息
* @Param formDTO
* @Return {@link Result<OrgResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/7 15:27
*/
@PostMapping("/gov/org/customeragency/getAgencyInfo")
Result<OrgResultDTO> getAgencyInfo(@RequestBody OrgFormDTO formDTO);
}

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

@ -248,6 +248,19 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "queryOrgStaffs", formDTO);
}
/**
* @param formDTO
* @Description 根据组织或网格或吧部门获取组织信息
* @Param formDTO
* @Return {@link Result<OrgResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/7 15:27
*/
@Override
public Result<OrgResultDTO> getAgencyInfo(OrgFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAgencyInfo", formDTO);
}
@Override
public Result<String> selectPidsByGridId(String gridId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "selectPidsByGridId", gridId);

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

@ -312,4 +312,16 @@ public class CustomerAgencyController {
return new Result<ExtStaffPermissionResultDTO>().ok(customerAgencyService.staffPermissionExt(tokenDto.getUserId()));
}
/**
* @Description 根据组织或网格或吧部门获取组织信息
* @Param formDTO
* @Return {@link Result<OrgResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/7 15:27
*/
@PostMapping("getAgencyInfo")
public Result<OrgResultDTO> getAgencyInfo(@RequestBody OrgFormDTO formDTO) {
return new Result<OrgResultDTO>().ok(customerAgencyService.getAgencyInfo(formDTO));
}
}

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

@ -236,4 +236,13 @@ public interface CustomerAgencyService extends BaseService<CustomerAgencyEntity>
OrganizeTreeResultDTO organizeTree(String agencyId);
void checkAgencyName(String agencyName,String customerId,String agencyId,String parentAgencyId);
/**
* 根据组织或网格或吧部门获取组织信息
* @Param formDTO
* @Return {@link OrgResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/7 15:28
*/
OrgResultDTO getAgencyInfo(OrgFormDTO formDTO);
}

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

@ -1075,4 +1075,18 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
}
}
/**
* 根据组织或网格或吧部门获取组织信息
*
* @param formDTO
* @Param formDTO
* @Return {@link OrgResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/7 15:28
*/
@Override
public OrgResultDTO getAgencyInfo(OrgFormDTO formDTO) {
return baseDao.selectAgencyDetail(formDTO.getOrgId(), formDTO.getOrgType());
}
}

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

@ -0,0 +1,22 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/7 16:21
*/
@Data
public class AttachmentDTO implements Serializable {
private static final long serialVersionUID = 6505979559566901869L;
private String name;
private String format;
private String type;
private String url;
private Integer size;
private Integer duration;
}

56
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ExternalLinkDTO.java

@ -0,0 +1,56 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
/**
* 指南外链表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
public class ExternalLinkDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 链接说明
*/
private String description;
/**
* 外部链接
*/
private String externalLink;
/**
* 外部链接
*/
private Integer sort;
}

117
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideAttachmentDTO.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 2021-09-06
*/
@Data
public class GuideAttachmentDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 唯一标识
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 办事指南ID
*/
private String guideId;
/**
* 附件名
*/
private String attachmentName;
/**
* 文件大小 单位byte
*/
private Integer attachmentSize;
/**
* 文件格式 wordexcelpdf
*/
private String attachmentFormat;
/**
* 类型
*/
private String attachmentType;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 语音或视频时长
*/
private Integer duration;
/**
* 排序
*/
private Integer sort;
/**
* 删除标识 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/GuideCategoryDTO.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 2021-09-06
*/
@Data
public class GuideCategoryDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 分类名
*/
private String categoryName;
/**
* 排序
*/
private Integer sort;
/**
* 状态 禁用disable 启用enable
*/
private String status;
/**
* 删除标识 0未删除1已删除
*/
private String 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/GuideCollectionDTO.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 2021-09-06
*/
@Data
public class GuideCollectionDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 指南ID
*/
private String guideId;
/**
* 用户ID
*/
private String userId;
/**
* 用户所属客户端 居民端resi 工作端gov
*/
private String app;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

112
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/GuideDTO.java

@ -0,0 +1,112 @@
/**
* 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 2021-09-06
*/
@Data
public class GuideDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID 唯一标识
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 发布单位类型 机关agency 网格grid 部门dept
*/
private String orgType;
/**
* 发布单位ID
*/
private String orgId;
/**
* 发布单位名称
*/
private String orgName;
/**
* 所属组织机构IDcustomer_agency.id
*/
private String pid;
/**
* 所有上级组织ID,英文:隔开
*/
private String pids;
/**
* 标题
*/
private String title;
/**
* 分类ID
*/
private String categoryCode;
/**
* 删除标识: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/GuideExternalLinkDTO.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 2021-09-06
*/
@Data
public class GuideExternalLinkDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 指南ID
*/
private String guideId;
/**
* 链接说明
*/
private String description;
/**
* 外部链接
*/
private String externalLink;
/**
* 排序
*/
private Integer sort;
/**
* 删除标识 0未删除1已删除
*/
private String 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/GuideModuleDTO.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 2021-09-06
*/
@Data
public class GuideModuleDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 指南ID
*/
private String guideId;
/**
* 模块ID
*/
private String moduleId;
/**
*
*/
private String moduleContent;
/**
* 删除标识 0未删除1已删除
*/
private String 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/GuideModuleDictDTO.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 2021-09-06
*/
@Data
public class GuideModuleDictDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 模块key
*/
private String moduleValue;
/**
* 模块名
*/
private String moduleName;
/**
* 排序
*/
private Integer sort;
/**
* 状态 禁用disable 启用enable
*/
private String status;
/**
* 删除标识 0未删除1已删除
*/
private String 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/GuideModuleDictDefaultDTO.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 2021-09-06
*/
@Data
public class GuideModuleDictDefaultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 模块key
*/
private String moduleValue;
/**
* 模块名
*/
private String moduleName;
/**
* 排序
*/
private Integer sort;
/**
* 状态 禁用disable 启用enable
*/
private String status;
/**
* 删除标识 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

58
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/ModuleDTO.java

@ -0,0 +1,58 @@
/**
* 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;
/**
* 指南模块字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
public class ModuleDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String guideModuleId;
/**
* 主键
*/
private String moduleId;
/**
* 模块key
*/
private String moduleValue;
/**
* 模块名
*/
private String moduleName;
/**
* 模块内容
*/
private String moduleContent;
}

61
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideAddFormDTO.java

@ -0,0 +1,61 @@
package com.epmet.dto.form;
import com.epmet.dto.AttachmentDTO;
import com.epmet.dto.ExternalLinkDTO;
import com.epmet.dto.ModuleDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/7 10:24
*/
@NoArgsConstructor
@Data
public class GuideAddFormDTO implements Serializable {
private static final long serialVersionUID = -7750999102010191460L;
/**
* 标题
*/
@NotBlank(message = "标题不能为空")
private String title;
/**
* 标题
*/
@NotBlank(message = "分类不能为空")
private String categoryCode;
/**
* 机关类型 机关agency 网格grid 部门dept
*/
@NotBlank(message = "所属机关类型不能为空")
private String orgType;
/**
* 所属机关
*/
@NotBlank(message = "所属机关ID不能为空")
private String orgId;
/**
* 所属机关
*/
@NotBlank(message = "所属机关名不能为空")
private String orgName;
/**
* 外部链接
*/
private List<ExternalLinkDTO> externalLinks;
/**
* 内容模块
*/
private List<ModuleDTO> moduleList;
/**
* 附件
*/
private List<AttachmentDTO> attachmentList;
}

70
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideEditFormDTO.java

@ -0,0 +1,70 @@
package com.epmet.dto.form;
import com.epmet.dto.AttachmentDTO;
import com.epmet.dto.ExternalLinkDTO;
import com.epmet.dto.ModuleDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/7 10:24
*/
@NoArgsConstructor
@Data
public class GuideEditFormDTO implements Serializable {
private static final long serialVersionUID = -7750999102010191460L;
/**
* 工作人员ID
*/
private String staffId;
/**
* 指南ID
*/
@NotBlank(message = "指南id不能为空")
private String guideId;
/**
* 标题
*/
@NotBlank(message = "标题不能为空")
private String title;
/**
* 标题
*/
@NotBlank(message = "分类不能为空")
private String categoryCode;
/**
* 机关类型 机关agency 网格grid 部门dept
*/
@NotBlank(message = "所属机关类型不能为空")
private String orgType;
/**
* 所属机关
*/
@NotBlank(message = "所属机关ID不能为空")
private String orgId;
/**
* 所属机关
*/
@NotBlank(message = "所属机关名不能为空")
private String orgName;
/**
* 外部链接
*/
private List<ExternalLinkDTO> externalLinks;
/**
* 内容模块
*/
private List<ModuleDTO> moduleList;
/**
* 附件
*/
private List<AttachmentDTO> attachmentList;
}

39
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideFormDTO.java

@ -0,0 +1,39 @@
package com.epmet.dto.form;
import com.epmet.dto.ExternalLinkDTO;
import com.epmet.dto.GuideAttachmentDTO;
import com.epmet.dto.ModuleDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/7 10:24
*/
@NoArgsConstructor
@Data
public class GuideFormDTO implements Serializable {
private static final long serialVersionUID = -7750999102010191460L;
/**
* 标题
*/
@NotBlank(message = "指南id不能为空")
private String guideId;
/**
* 工作人员
*/
private String staffId;
/**
* 客户ID
*/
private String customerId;
}

31
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/GuideListFormDTO.java

@ -0,0 +1,31 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/7 9:38
*/
@NoArgsConstructor
@Data
public class GuideListFormDTO extends PageFormDTO implements Serializable {
private static final long serialVersionUID = -4471422632936288213L;
/**
* 组织ID
*/
private String agencyId;
/**
* 分类
*/
private String categoryId;
/**
* 标题
*/
private String guideTitle;
}

17
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GetCategoryResultDTO.java

@ -0,0 +1,17 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/7 10:52
*/
@Data
public class GetCategoryResultDTO implements Serializable {
private static final long serialVersionUID = 3527239091132653541L;
private String categoryId;
private String categoryName;
}

67
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/GuideDetailResultDTO.java

@ -0,0 +1,67 @@
package com.epmet.dto.result;
import com.epmet.dto.AttachmentDTO;
import com.epmet.dto.ExternalLinkDTO;
import com.epmet.dto.ModuleDTO;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
* @Date 2021/9/7 10:24
*/
@NoArgsConstructor
@Data
public class GuideDetailResultDTO implements Serializable {
private static final long serialVersionUID = -7750999102010191460L;
/**
* 标题
*/
private String guideId;
/**
* 标题
*/
private String title;
/**
* 分类ID
*/
private String categoryId;
/**
* 分类名
*/
private String categoryName;
/**
* 机关类型 机关agency 网格grid 部门dept
*/
private String orgType;
/**
* 所属机关
*/
private String orgId;
/**
* 所属机关名
*/
private String orgName;
/**
* 是否收藏 1是 0否
*/
private String collectionFlag;
/**
* 外部链接
*/
private List<ExternalLinkDTO> externalLinks;
/**
* 内容模块
*/
private List<ModuleDTO> moduleList;
/**
* 附件
*/
private List<AttachmentDTO> attachmentList;
}

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

@ -0,0 +1,35 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @author Administrator
*/
@Data
public class GuideListResultDTO implements Serializable {
private static final long serialVersionUID = -1360741408368601140L;
private String guideId;
/**
* 标题
*/
private String title;
/**
* 分类
*/
private String categoryName;
/**
* 创建人ID
*/
private String createdId;
/**
* 创建人姓名
*/
private String createdName;
/**
* 更新时间
*/
private Date updatedTime;
}

84
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCategoryController.java

@ -0,0 +1,84 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.GuideCategoryDTO;
import com.epmet.service.GuideCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 指南分类
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@RestController
@RequestMapping("guidecategory")
public class GuideCategoryController {
@Autowired
private GuideCategoryService guideCategoryService;
@GetMapping("page")
public Result<PageData<GuideCategoryDTO>> page(@RequestParam Map<String, Object> params){
PageData<GuideCategoryDTO> page = guideCategoryService.page(params);
return new Result<PageData<GuideCategoryDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GuideCategoryDTO> get(@PathVariable("id") String id){
GuideCategoryDTO data = guideCategoryService.get(id);
return new Result<GuideCategoryDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GuideCategoryDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
guideCategoryService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GuideCategoryDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
guideCategoryService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
guideCategoryService.delete(ids);
return new Result();
}
}

84
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideCollectionController.java

@ -0,0 +1,84 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.GuideCollectionDTO;
import com.epmet.service.GuideCollectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 指南收藏表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@RestController
@RequestMapping("guidecollection")
public class GuideCollectionController {
@Autowired
private GuideCollectionService guideCollectionService;
@GetMapping("page")
public Result<PageData<GuideCollectionDTO>> page(@RequestParam Map<String, Object> params){
PageData<GuideCollectionDTO> page = guideCollectionService.page(params);
return new Result<PageData<GuideCollectionDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GuideCollectionDTO> get(@PathVariable("id") String id){
GuideCollectionDTO data = guideCollectionService.get(id);
return new Result<GuideCollectionDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GuideCollectionDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
guideCollectionService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GuideCollectionDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
guideCollectionService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
guideCollectionService.delete(ids);
return new Result();
}
}

172
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideController.java

@ -0,0 +1,172 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.GuideDTO;
import com.epmet.dto.form.GuideAddFormDTO;
import com.epmet.dto.form.GuideEditFormDTO;
import com.epmet.dto.form.GuideFormDTO;
import com.epmet.dto.form.GuideListFormDTO;
import com.epmet.dto.result.GuideDetailResultDTO;
import com.epmet.dto.result.GuideListResultDTO;
import com.epmet.service.GuideService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 办事指南表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@RestController
@RequestMapping("guide")
public class GuideController {
@Autowired
private GuideService guideService;
@GetMapping("page")
public Result<PageData<GuideDTO>> page(@RequestParam Map<String, Object> params) {
PageData<GuideDTO> page = guideService.page(params);
return new Result<PageData<GuideDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GuideDTO> get(@PathVariable("id") String id) {
GuideDTO data = guideService.get(id);
return new Result<GuideDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GuideDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
guideService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GuideDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
guideService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids) {
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
guideService.delete(ids);
return new Result();
}
/**
* @Description 办事指南列表
* @Param formDTO
* @Return {@link Result< PageData< GuideListResultDTO>>}
* @Author zhaoqifeng
* @Date 2021/9/7 13:59
*/
@PostMapping("list")
public Result<PageData<GuideListResultDTO>> guideList(@LoginUser TokenDto tokenDto, @RequestBody GuideListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserInternalGroup.class);
PageData<GuideListResultDTO> page = guideService.guideList(tokenDto, formDTO);
return new Result<PageData<GuideListResultDTO>>().ok(page);
}
/**
* @Description 添加指南
* @Param tokenDto
* @Param formDTO
* @Return {@link Result}
* @Author zhaoqifeng
* @Date 2021/9/7 14:13
*/
@PostMapping("add")
public Result guideAdd(@LoginUser TokenDto tokenDto, @RequestBody GuideAddFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
guideService.guideAdd(tokenDto, formDTO);
return new Result();
}
/**
* @Description 修改指南
* @Param tokenDto
* @Param formDTO
* @Return {@link Result}
* @Author zhaoqifeng
* @Date 2021/9/7 14:13
*/
@PostMapping("edit")
public Result guideEdit(@LoginUser TokenDto tokenDto, @RequestBody GuideEditFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
formDTO.setStaffId(tokenDto.getUserId());
guideService.guideEdit(formDTO);
return new Result();
}
/**
* @Description 删除指南
* @Param tokenDto
* @Param formDTO
* @Return {@link Result}
* @Author zhaoqifeng
* @Date 2021/9/7 14:13
*/
@PostMapping("del")
public Result guideDel(@LoginUser TokenDto tokenDto, @RequestBody GuideFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
formDTO.setStaffId(tokenDto.getUserId());
guideService.guideDel(formDTO);
return new Result();
}
/**
* @Description 指南详情
* @Param tokenDto
* @Param formDTO
* @Return {@link Result< GuideDetailResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/7 14:13
*/
@PostMapping("detail")
public Result<GuideDetailResultDTO> guideDetail(@LoginUser TokenDto tokenDto, @RequestBody GuideFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
formDTO.setCustomerId(tokenDto.getCustomerId());
GuideDetailResultDTO result = guideService.guideDetail(formDTO);
return new Result<GuideDetailResultDTO>().ok(result);
}
}

84
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleController.java

@ -0,0 +1,84 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.GuideModuleDTO;
import com.epmet.service.GuideModuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 指南模块关联表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@RestController
@RequestMapping("guidemodule")
public class GuideModuleController {
@Autowired
private GuideModuleService guideModuleService;
@GetMapping("page")
public Result<PageData<GuideModuleDTO>> page(@RequestParam Map<String, Object> params){
PageData<GuideModuleDTO> page = guideModuleService.page(params);
return new Result<PageData<GuideModuleDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GuideModuleDTO> get(@PathVariable("id") String id){
GuideModuleDTO data = guideModuleService.get(id);
return new Result<GuideModuleDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GuideModuleDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
guideModuleService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GuideModuleDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
guideModuleService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
guideModuleService.delete(ids);
return new Result();
}
}

84
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/GuideModuleDictController.java

@ -0,0 +1,84 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.GuideModuleDictDTO;
import com.epmet.service.GuideModuleDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 指南模块字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@RestController
@RequestMapping("guidemoduledict")
public class GuideModuleDictController {
@Autowired
private GuideModuleDictService guideModuleDictService;
@GetMapping("page")
public Result<PageData<GuideModuleDictDTO>> page(@RequestParam Map<String, Object> params){
PageData<GuideModuleDictDTO> page = guideModuleDictService.page(params);
return new Result<PageData<GuideModuleDictDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GuideModuleDictDTO> get(@PathVariable("id") String id){
GuideModuleDictDTO data = guideModuleDictService.get(id);
return new Result<GuideModuleDictDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GuideModuleDictDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
guideModuleDictService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GuideModuleDictDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
guideModuleDictService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
guideModuleDictService.delete(ids);
return new Result();
}
}

33
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideAttachmentDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.GuideAttachmentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 办事指南附件
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Mapper
public interface GuideAttachmentDao extends BaseDao<GuideAttachmentEntity> {
}

33
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCategoryDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.GuideCategoryEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 指南分类
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Mapper
public interface GuideCategoryDao extends BaseDao<GuideCategoryEntity> {
}

33
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideCollectionDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.GuideCollectionEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 指南收藏表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Mapper
public interface GuideCollectionDao extends BaseDao<GuideCollectionEntity> {
}

59
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideDao.java

@ -0,0 +1,59 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.GuideListFormDTO;
import com.epmet.dto.result.GuideDetailResultDTO;
import com.epmet.dto.result.GuideListResultDTO;
import com.epmet.entity.GuideEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 办事指南表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Mapper
public interface GuideDao extends BaseDao<GuideEntity> {
/**
* 指南列表
*
* @Param formDTO
* @Return {@link List<GuideListResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/7 14:21
*/
List<GuideListResultDTO> getGuideList(GuideListFormDTO formDTO);
/**
* 指南详情
*
* @Param guideId
* @Return {@link GuideDetailResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/8 9:59
*/
GuideDetailResultDTO getGuideDetail(@Param("guideId") String guideId);
}

33
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideExternalLinkDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.GuideExternalLinkEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 指南外链表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Mapper
public interface GuideExternalLinkDao extends BaseDao<GuideExternalLinkEntity> {
}

45
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDao.java

@ -0,0 +1,45 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.ModuleDTO;
import com.epmet.entity.GuideModuleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 指南模块关联表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Mapper
public interface GuideModuleDao extends BaseDao<GuideModuleEntity> {
/**
* @Description 获取指南的内容模块
* @Param guideId
* @Return {@link List< ModuleDTO>}
* @Author zhaoqifeng
* @Date 2021/9/8 10:18
*/
List<ModuleDTO> selectByGuideId(@Param("customerId") String customerId, @Param("guideId") String guideId);
}

33
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDictDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.GuideModuleDictEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 指南模块字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Mapper
public interface GuideModuleDictDao extends BaseDao<GuideModuleDictEntity> {
}

33
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/GuideModuleDictDefaultDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.GuideModuleDictDefaultEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 指南模块默认字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Mapper
public interface GuideModuleDictDefaultDao extends BaseDao<GuideModuleDictDefaultEntity> {
}

83
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideAttachmentEntity.java

@ -0,0 +1,83 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 办事指南附件
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("guide_attachment")
public class GuideAttachmentEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 办事指南ID
*/
private String guideId;
/**
* 附件名
*/
private String attachmentName;
/**
* 文件大小 单位byte
*/
private Integer attachmentSize;
/**
* 文件格式 wordexcelpdf
*/
private String attachmentFormat;
/**
* 类型
*/
private String attachmentType;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 语音或视频时长
*/
private Integer duration;
/**
* 排序
*/
private Integer sort;
}

61
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCategoryEntity.java

@ -0,0 +1,61 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 指南分类
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("guide_category")
public class GuideCategoryEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 分类名
*/
private String categoryName;
/**
* 排序
*/
private Integer sort;
/**
* 状态 禁用disable 启用enable
*/
private String status;
}

61
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideCollectionEntity.java

@ -0,0 +1,61 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 指南收藏表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("guide_collection")
public class GuideCollectionEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 指南ID
*/
private String guideId;
/**
* 用户ID
*/
private String userId;
/**
* 用户所属客户端 居民端resi 工作端gov
*/
private String app;
}

78
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideEntity.java

@ -0,0 +1,78 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 办事指南表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("guide")
public class GuideEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 发布单位类型 机关agency 网格grid 部门dept
*/
private String orgType;
/**
* 发布单位ID
*/
private String orgId;
/**
* 发布单位名称
*/
private String orgName;
/**
* 所属组织机构IDcustomer_agency.id
*/
private String pid;
/**
* 所有上级组织ID,英文:隔开
*/
private String pids;
/**
* 标题
*/
private String title;
/**
* 分类ID
*/
private String categoryCode;
}

63
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideExternalLinkEntity.java

@ -0,0 +1,63 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 指南外链表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("guide_external_link")
public class GuideExternalLinkEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 指南ID
*/
private String guideId;
/**
* 链接说明
*/
private String description;
/**
* 外部链接
*/
private String externalLink;
/**
* 排序
*/
private Integer sort;
}

61
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleDictDefaultEntity.java

@ -0,0 +1,61 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 指南模块默认字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("guide_module_dict_default")
public class GuideModuleDictDefaultEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 模块key
*/
private String moduleValue;
/**
* 模块名
*/
private String moduleName;
/**
* 排序
*/
private Integer sort;
/**
* 状态 禁用disable 启用enable
*/
private String status;
}

66
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleDictEntity.java

@ -0,0 +1,66 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 指南模块字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("guide_module_dict")
public class GuideModuleDictEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 模块key
*/
private String moduleValue;
/**
* 模块名
*/
private String moduleName;
/**
* 排序
*/
private Integer sort;
/**
* 状态 禁用disable 启用enable
*/
private String status;
}

61
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/GuideModuleEntity.java

@ -0,0 +1,61 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 指南模块关联表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("guide_module")
public class GuideModuleEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 指南ID
*/
private String guideId;
/**
* 模块ID
*/
private String moduleId;
/**
*
*/
private String moduleContent;
}

114
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideAttachmentService.java

@ -0,0 +1,114 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.AttachmentDTO;
import com.epmet.dto.GuideAttachmentDTO;
import com.epmet.entity.GuideAttachmentEntity;
import java.util.List;
import java.util.Map;
/**
* 办事指南附件
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
public interface GuideAttachmentService extends BaseService<GuideAttachmentEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<GuideAttachmentDTO>
* @author generator
* @date 2021-09-06
*/
PageData<GuideAttachmentDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<GuideAttachmentDTO>
* @author generator
* @date 2021-09-06
*/
List<GuideAttachmentDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return GuideAttachmentDTO
* @author generator
* @date 2021-09-06
*/
GuideAttachmentDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void save(GuideAttachmentDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void update(GuideAttachmentDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-09-06
*/
void delete(String[] ids);
/**
* @Description 删除指南附件
* @Param guideId
* @Return
* @Author zhaoqifeng
* @Date 2021/9/7 17:16
*/
void deleteByGuideId(String guideId);
/**
* @Description 获取指南附件
* @Param guideId
* @Return {@link List< AttachmentDTO>}
* @Author zhaoqifeng
* @Date 2021/9/8 10:49
*/
List<AttachmentDTO> getByGuideId(String guideId);
}

95
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCategoryService.java

@ -0,0 +1,95 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.GuideCategoryDTO;
import com.epmet.entity.GuideCategoryEntity;
import java.util.List;
import java.util.Map;
/**
* 指南分类
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
public interface GuideCategoryService extends BaseService<GuideCategoryEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<GuideCategoryDTO>
* @author generator
* @date 2021-09-06
*/
PageData<GuideCategoryDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<GuideCategoryDTO>
* @author generator
* @date 2021-09-06
*/
List<GuideCategoryDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return GuideCategoryDTO
* @author generator
* @date 2021-09-06
*/
GuideCategoryDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void save(GuideCategoryDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void update(GuideCategoryDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-09-06
*/
void delete(String[] ids);
}

95
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideCollectionService.java

@ -0,0 +1,95 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.GuideCollectionDTO;
import com.epmet.entity.GuideCollectionEntity;
import java.util.List;
import java.util.Map;
/**
* 指南收藏表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
public interface GuideCollectionService extends BaseService<GuideCollectionEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<GuideCollectionDTO>
* @author generator
* @date 2021-09-06
*/
PageData<GuideCollectionDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<GuideCollectionDTO>
* @author generator
* @date 2021-09-06
*/
List<GuideCollectionDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return GuideCollectionDTO
* @author generator
* @date 2021-09-06
*/
GuideCollectionDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void save(GuideCollectionDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void update(GuideCollectionDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-09-06
*/
void delete(String[] ids);
}

114
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideExternalLinkService.java

@ -0,0 +1,114 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.ExternalLinkDTO;
import com.epmet.dto.GuideExternalLinkDTO;
import com.epmet.entity.GuideExternalLinkEntity;
import java.util.List;
import java.util.Map;
/**
* 指南外链表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
public interface GuideExternalLinkService extends BaseService<GuideExternalLinkEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<GuideExternalLinkDTO>
* @author generator
* @date 2021-09-06
*/
PageData<GuideExternalLinkDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<GuideExternalLinkDTO>
* @author generator
* @date 2021-09-06
*/
List<GuideExternalLinkDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return GuideExternalLinkDTO
* @author generator
* @date 2021-09-06
*/
GuideExternalLinkDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void save(GuideExternalLinkDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void update(GuideExternalLinkDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-09-06
*/
void delete(String[] ids);
/**
* @Description 删除指南外链
* @Param guideId
* @Return
* @Author zhaoqifeng
* @Date 2021/9/7 17:20
*/
void deleteByGuideId(String guideId);
/**
* @Description 获取指南外链
* @Param guideId
* @Return {@link List< ExternalLinkDTO>}
* @Author zhaoqifeng
* @Date 2021/9/8 11:05
*/
List<ExternalLinkDTO> getByGuideId(String guideId);
}

95
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictDefaultService.java

@ -0,0 +1,95 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.GuideModuleDictDefaultDTO;
import com.epmet.entity.GuideModuleDictDefaultEntity;
import java.util.List;
import java.util.Map;
/**
* 指南模块默认字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
public interface GuideModuleDictDefaultService extends BaseService<GuideModuleDictDefaultEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<GuideModuleDictDefaultDTO>
* @author generator
* @date 2021-09-06
*/
PageData<GuideModuleDictDefaultDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<GuideModuleDictDefaultDTO>
* @author generator
* @date 2021-09-06
*/
List<GuideModuleDictDefaultDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return GuideModuleDictDefaultDTO
* @author generator
* @date 2021-09-06
*/
GuideModuleDictDefaultDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void save(GuideModuleDictDefaultDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void update(GuideModuleDictDefaultDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-09-06
*/
void delete(String[] ids);
}

95
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleDictService.java

@ -0,0 +1,95 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.GuideModuleDictDTO;
import com.epmet.entity.GuideModuleDictEntity;
import java.util.List;
import java.util.Map;
/**
* 指南模块字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
public interface GuideModuleDictService extends BaseService<GuideModuleDictEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<GuideModuleDictDTO>
* @author generator
* @date 2021-09-06
*/
PageData<GuideModuleDictDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<GuideModuleDictDTO>
* @author generator
* @date 2021-09-06
*/
List<GuideModuleDictDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return GuideModuleDictDTO
* @author generator
* @date 2021-09-06
*/
GuideModuleDictDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void save(GuideModuleDictDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void update(GuideModuleDictDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-09-06
*/
void delete(String[] ids);
}

115
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideModuleService.java

@ -0,0 +1,115 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.GuideModuleDTO;
import com.epmet.dto.ModuleDTO;
import com.epmet.entity.GuideModuleEntity;
import java.util.List;
import java.util.Map;
/**
* 指南模块关联表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
public interface GuideModuleService extends BaseService<GuideModuleEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<GuideModuleDTO>
* @author generator
* @date 2021-09-06
*/
PageData<GuideModuleDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<GuideModuleDTO>
* @author generator
* @date 2021-09-06
*/
List<GuideModuleDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return GuideModuleDTO
* @author generator
* @date 2021-09-06
*/
GuideModuleDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void save(GuideModuleDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void update(GuideModuleDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-09-06
*/
void delete(String[] ids);
/**
* @Description 删除指南的内容模块
* @Param guideId
* @Return
* @Author zhaoqifeng
* @Date 2021/9/7 17:01
*/
void deleteByGuideId(String guideId);
/**
* @Description
* @Param customerId
* @Param guideId
* @Return {@link ModuleDTO}
* @Author zhaoqifeng
* @Date 2021/9/8 10:13
*/
List<ModuleDTO> getByGuideId(String customerId, String guideId);
}

153
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/GuideService.java

@ -0,0 +1,153 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.GuideDTO;
import com.epmet.dto.form.GuideAddFormDTO;
import com.epmet.dto.form.GuideEditFormDTO;
import com.epmet.dto.form.GuideFormDTO;
import com.epmet.dto.form.GuideListFormDTO;
import com.epmet.dto.result.GuideDetailResultDTO;
import com.epmet.dto.result.GuideListResultDTO;
import com.epmet.entity.GuideEntity;
import java.util.List;
import java.util.Map;
/**
* 办事指南表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
public interface GuideService extends BaseService<GuideEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<GuideDTO>
* @author generator
* @date 2021-09-06
*/
PageData<GuideDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<GuideDTO>
* @author generator
* @date 2021-09-06
*/
List<GuideDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return GuideDTO
* @author generator
* @date 2021-09-06
*/
GuideDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void save(GuideDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-09-06
*/
void update(GuideDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-09-06
*/
void delete(String[] ids);
/**
* 办事指南列表
*
* @Param formDTO
* @Return {@link PageData<GuideListResultDTO>}
* @Author zhaoqifeng
* @Date 2021/9/7 14:00
*/
PageData<GuideListResultDTO> guideList(TokenDto tokenDto, GuideListFormDTO formDTO);
/**
* 添加指南
*
* @Param tokenDto
* @Param formDTO
* @Return
* @Author zhaoqifeng
* @Date 2021/9/7 14:12
*/
void guideAdd(TokenDto tokenDto, GuideAddFormDTO formDTO);
/**
* 修改指南
*
* @Param formDTO
* @Return
* @Author zhaoqifeng
* @Date 2021/9/7 14:12
*/
void guideEdit(GuideEditFormDTO formDTO);
/**
* 删除指南
*
* @Param formDTO
* @Return
* @Author zhaoqifeng
* @Date 2021/9/7 14:12
*/
void guideDel(GuideFormDTO formDTO);
/**
* 指南详情
*
* @Param formDTO
* @Return {@link GuideDetailResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/7 14:12
*/
GuideDetailResultDTO guideDetail(GuideFormDTO formDTO);
}

149
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideAttachmentServiceImpl.java

@ -0,0 +1,149 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.GuideAttachmentDao;
import com.epmet.dto.AttachmentDTO;
import com.epmet.dto.GuideAttachmentDTO;
import com.epmet.entity.GuideAttachmentEntity;
import com.epmet.service.GuideAttachmentService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 办事指南附件
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Service
public class GuideAttachmentServiceImpl extends BaseServiceImpl<GuideAttachmentDao, GuideAttachmentEntity> implements GuideAttachmentService {
@Override
public PageData<GuideAttachmentDTO> page(Map<String, Object> params) {
IPage<GuideAttachmentEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, GuideAttachmentDTO.class);
}
@Override
public List<GuideAttachmentDTO> list(Map<String, Object> params) {
List<GuideAttachmentEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, GuideAttachmentDTO.class);
}
private QueryWrapper<GuideAttachmentEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<GuideAttachmentEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public GuideAttachmentDTO get(String id) {
GuideAttachmentEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, GuideAttachmentDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(GuideAttachmentDTO dto) {
GuideAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, GuideAttachmentEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(GuideAttachmentDTO dto) {
GuideAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, GuideAttachmentEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @param guideId
* @Description 删除指南附件
* @Param guideId
* @Return
* @Author zhaoqifeng
* @Date 2021/9/7 17:16
*/
@Override
public void deleteByGuideId(String guideId) {
LambdaQueryWrapper<GuideAttachmentEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(GuideAttachmentEntity::getGuideId, guideId);
baseDao.delete(wrapper);
}
/**
* @param guideId
* @Description 获取指南附件
* @Param guideId
* @Return {@link List< AttachmentDTO >}
* @Author zhaoqifeng
* @Date 2021/9/8 10:49
*/
@Override
public List<AttachmentDTO> getByGuideId(String guideId) {
LambdaQueryWrapper<GuideAttachmentEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(GuideAttachmentEntity::getGuideId, guideId);
wrapper.orderByAsc(GuideAttachmentEntity::getSort);
List<GuideAttachmentEntity> list = baseDao.selectList(wrapper);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyList();
}
return list.stream().map(item -> {
AttachmentDTO dto = new AttachmentDTO();
dto.setName(item.getAttachmentName());
dto.setType(item.getAttachmentType());
dto.setUrl(item.getAttachmentUrl());
dto.setSize(item.getAttachmentSize());
dto.setFormat(item.getAttachmentFormat());
dto.setDuration(item.getDuration());
return dto;
}).collect(Collectors.toList());
}
}

100
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCategoryServiceImpl.java

@ -0,0 +1,100 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.GuideCategoryDao;
import com.epmet.dto.GuideCategoryDTO;
import com.epmet.entity.GuideCategoryEntity;
import com.epmet.service.GuideCategoryService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 指南分类
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Service
public class GuideCategoryServiceImpl extends BaseServiceImpl<GuideCategoryDao, GuideCategoryEntity> implements GuideCategoryService {
@Override
public PageData<GuideCategoryDTO> page(Map<String, Object> params) {
IPage<GuideCategoryEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, GuideCategoryDTO.class);
}
@Override
public List<GuideCategoryDTO> list(Map<String, Object> params) {
List<GuideCategoryEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, GuideCategoryDTO.class);
}
private QueryWrapper<GuideCategoryEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<GuideCategoryEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public GuideCategoryDTO get(String id) {
GuideCategoryEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, GuideCategoryDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(GuideCategoryDTO dto) {
GuideCategoryEntity entity = ConvertUtils.sourceToTarget(dto, GuideCategoryEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(GuideCategoryDTO dto) {
GuideCategoryEntity entity = ConvertUtils.sourceToTarget(dto, GuideCategoryEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

100
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideCollectionServiceImpl.java

@ -0,0 +1,100 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.GuideCollectionDao;
import com.epmet.dto.GuideCollectionDTO;
import com.epmet.entity.GuideCollectionEntity;
import com.epmet.service.GuideCollectionService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 指南收藏表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Service
public class GuideCollectionServiceImpl extends BaseServiceImpl<GuideCollectionDao, GuideCollectionEntity> implements GuideCollectionService {
@Override
public PageData<GuideCollectionDTO> page(Map<String, Object> params) {
IPage<GuideCollectionEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, GuideCollectionDTO.class);
}
@Override
public List<GuideCollectionDTO> list(Map<String, Object> params) {
List<GuideCollectionEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, GuideCollectionDTO.class);
}
private QueryWrapper<GuideCollectionEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<GuideCollectionEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public GuideCollectionDTO get(String id) {
GuideCollectionEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, GuideCollectionDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(GuideCollectionDTO dto) {
GuideCollectionEntity entity = ConvertUtils.sourceToTarget(dto, GuideCollectionEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(GuideCollectionDTO dto) {
GuideCollectionEntity entity = ConvertUtils.sourceToTarget(dto, GuideCollectionEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

145
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideExternalLinkServiceImpl.java

@ -0,0 +1,145 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.GuideExternalLinkDao;
import com.epmet.dto.ExternalLinkDTO;
import com.epmet.dto.GuideExternalLinkDTO;
import com.epmet.entity.GuideExternalLinkEntity;
import com.epmet.service.GuideExternalLinkService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 指南外链表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Service
public class GuideExternalLinkServiceImpl extends BaseServiceImpl<GuideExternalLinkDao, GuideExternalLinkEntity> implements GuideExternalLinkService {
@Override
public PageData<GuideExternalLinkDTO> page(Map<String, Object> params) {
IPage<GuideExternalLinkEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, GuideExternalLinkDTO.class);
}
@Override
public List<GuideExternalLinkDTO> list(Map<String, Object> params) {
List<GuideExternalLinkEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, GuideExternalLinkDTO.class);
}
private QueryWrapper<GuideExternalLinkEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<GuideExternalLinkEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public GuideExternalLinkDTO get(String id) {
GuideExternalLinkEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, GuideExternalLinkDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(GuideExternalLinkDTO dto) {
GuideExternalLinkEntity entity = ConvertUtils.sourceToTarget(dto, GuideExternalLinkEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(GuideExternalLinkDTO dto) {
GuideExternalLinkEntity entity = ConvertUtils.sourceToTarget(dto, GuideExternalLinkEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @param guideId
* @Description 删除指南外链
* @Param guideId
* @Return
* @Author zhaoqifeng
* @Date 2021/9/7 17:20
*/
@Override
public void deleteByGuideId(String guideId) {
LambdaQueryWrapper<GuideExternalLinkEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(GuideExternalLinkEntity::getGuideId, guideId);
baseDao.delete(wrapper);
}
/**
* @param guideId
* @Description 获取指南外链
* @Param guideId
* @Return {@link List< ExternalLinkDTO >}
* @Author zhaoqifeng
* @Date 2021/9/8 11:05
*/
@Override
public List<ExternalLinkDTO> getByGuideId(String guideId) {
LambdaQueryWrapper<GuideExternalLinkEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(GuideExternalLinkEntity::getGuideId, guideId);
wrapper.orderByAsc(GuideExternalLinkEntity::getSort);
List<GuideExternalLinkEntity> list = baseDao.selectList(wrapper);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyList();
}
return list.stream().map(item -> {
ExternalLinkDTO dto = new ExternalLinkDTO();
dto.setExternalLink(item.getExternalLink());
dto.setDescription(item.getDescription());
return dto;
}).collect(Collectors.toList());
}
}

100
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictDefaultServiceImpl.java

@ -0,0 +1,100 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.GuideModuleDictDefaultDao;
import com.epmet.dto.GuideModuleDictDefaultDTO;
import com.epmet.entity.GuideModuleDictDefaultEntity;
import com.epmet.service.GuideModuleDictDefaultService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 指南模块默认字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Service
public class GuideModuleDictDefaultServiceImpl extends BaseServiceImpl<GuideModuleDictDefaultDao, GuideModuleDictDefaultEntity> implements GuideModuleDictDefaultService {
@Override
public PageData<GuideModuleDictDefaultDTO> page(Map<String, Object> params) {
IPage<GuideModuleDictDefaultEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, GuideModuleDictDefaultDTO.class);
}
@Override
public List<GuideModuleDictDefaultDTO> list(Map<String, Object> params) {
List<GuideModuleDictDefaultEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, GuideModuleDictDefaultDTO.class);
}
private QueryWrapper<GuideModuleDictDefaultEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<GuideModuleDictDefaultEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public GuideModuleDictDefaultDTO get(String id) {
GuideModuleDictDefaultEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, GuideModuleDictDefaultDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(GuideModuleDictDefaultDTO dto) {
GuideModuleDictDefaultEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleDictDefaultEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(GuideModuleDictDefaultDTO dto) {
GuideModuleDictDefaultEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleDictDefaultEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

100
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleDictServiceImpl.java

@ -0,0 +1,100 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.GuideModuleDictDao;
import com.epmet.dto.GuideModuleDictDTO;
import com.epmet.entity.GuideModuleDictEntity;
import com.epmet.service.GuideModuleDictService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 指南模块字典表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Service
public class GuideModuleDictServiceImpl extends BaseServiceImpl<GuideModuleDictDao, GuideModuleDictEntity> implements GuideModuleDictService {
@Override
public PageData<GuideModuleDictDTO> page(Map<String, Object> params) {
IPage<GuideModuleDictEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, GuideModuleDictDTO.class);
}
@Override
public List<GuideModuleDictDTO> list(Map<String, Object> params) {
List<GuideModuleDictEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, GuideModuleDictDTO.class);
}
private QueryWrapper<GuideModuleDictEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<GuideModuleDictEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public GuideModuleDictDTO get(String id) {
GuideModuleDictEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, GuideModuleDictDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(GuideModuleDictDTO dto) {
GuideModuleDictEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleDictEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(GuideModuleDictDTO dto) {
GuideModuleDictEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleDictEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

132
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideModuleServiceImpl.java

@ -0,0 +1,132 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.GuideModuleDao;
import com.epmet.dto.GuideModuleDTO;
import com.epmet.dto.ModuleDTO;
import com.epmet.entity.GuideModuleEntity;
import com.epmet.service.GuideModuleService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
* 指南模块关联表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Service
public class GuideModuleServiceImpl extends BaseServiceImpl<GuideModuleDao, GuideModuleEntity> implements GuideModuleService {
@Override
public PageData<GuideModuleDTO> page(Map<String, Object> params) {
IPage<GuideModuleEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, GuideModuleDTO.class);
}
@Override
public List<GuideModuleDTO> list(Map<String, Object> params) {
List<GuideModuleEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, GuideModuleDTO.class);
}
private QueryWrapper<GuideModuleEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<GuideModuleEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public GuideModuleDTO get(String id) {
GuideModuleEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, GuideModuleDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(GuideModuleDTO dto) {
GuideModuleEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(GuideModuleDTO dto) {
GuideModuleEntity entity = ConvertUtils.sourceToTarget(dto, GuideModuleEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @param guideId
* @Description 删除指南的内容模块
* @Param guideId
* @Return
* @Author zhaoqifeng
* @Date 2021/9/7 17:01
*/
@Override
public void deleteByGuideId(String guideId) {
LambdaQueryWrapper<GuideModuleEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(GuideModuleEntity::getGuideId, guideId);
baseDao.delete(wrapper);
}
/**
* @param guideId
* @Description 获取指南的内容模块
* @Param guideId
* @Return {@link ModuleDTO}
* @Author zhaoqifeng
* @Date 2021/9/8 10:13
*/
@Override
public List<ModuleDTO> getByGuideId(String customerId, String guideId) {
return baseDao.selectByGuideId(customerId, guideId);
}
}

382
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/GuideServiceImpl.java

@ -0,0 +1,382 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.OrgInfoConstant;
import com.epmet.dao.GuideDao;
import com.epmet.dto.GuideDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.GuideDetailResultDTO;
import com.epmet.dto.result.GuideListResultDTO;
import com.epmet.dto.result.OrgResultDTO;
import com.epmet.entity.GuideAttachmentEntity;
import com.epmet.entity.GuideEntity;
import com.epmet.entity.GuideExternalLinkEntity;
import com.epmet.entity.GuideModuleEntity;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.GuideAttachmentService;
import com.epmet.service.GuideExternalLinkService;
import com.epmet.service.GuideModuleService;
import com.epmet.service.GuideService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
/**
* 办事指南表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Service
public class GuideServiceImpl extends BaseServiceImpl<GuideDao, GuideEntity> implements GuideService {
@Resource
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Resource
private GuideModuleService guideModuleService;
@Resource
private GuideAttachmentService guideAttachmentService;
@Resource
private GuideExternalLinkService guideExternalLinkService;
@Override
public PageData<GuideDTO> page(Map<String, Object> params) {
IPage<GuideEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, GuideDTO.class);
}
@Override
public List<GuideDTO> list(Map<String, Object> params) {
List<GuideEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, GuideDTO.class);
}
private QueryWrapper<GuideEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<GuideEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public GuideDTO get(String id) {
GuideEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, GuideDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(GuideDTO dto) {
GuideEntity entity = ConvertUtils.sourceToTarget(dto, GuideEntity.class);
insert(entity);
ConvertUtils.sourceToTarget(entity, GuideDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(GuideDTO dto) {
GuideEntity entity = ConvertUtils.sourceToTarget(dto, GuideEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* 办事指南列表
*
* @param formDTO
* @Param formDTO
* @Return {@link PageData< GuideListResultDTO >}
* @Author zhaoqifeng
* @Date 2021/9/7 14:00
*/
@Override
public PageData<GuideListResultDTO> guideList(TokenDto tokenDto, GuideListFormDTO formDTO) {
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<GuideListResultDTO> list = baseDao.getGuideList(formDTO);
list.forEach(item -> {
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), item.getCreatedId());
if (null == staffInfoCache) {
item.setCategoryName("");
} else {
item.setCreatedName(staffInfoCache.getRealName());
}
});
PageInfo<GuideListResultDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal());
}
/**
* 添加指南
*
* @param tokenDto
* @Param formDTO
* @Return
* @Author zhaoqifeng
* @Date 2021/9/7 14:12
*/
@Override
public void guideAdd(TokenDto tokenDto, GuideAddFormDTO formDTO) {
if (CollectionUtils.isEmpty(formDTO.getModuleList()) && CollectionUtils.isEmpty(formDTO.getAttachmentList()) &&
CollectionUtils.isEmpty(formDTO.getExternalLinks())) {
throw new RenException(EpmetErrorCode.GUIDE_IS_NULL.getCode());
}
//保存办事指南表
GuideDTO guideDTO = new GuideDTO();
guideDTO.setCustomerId(tokenDto.getCustomerId());
guideDTO.setOrgId(formDTO.getOrgId());
guideDTO.setOrgType(formDTO.getOrgType());
guideDTO.setOrgName(formDTO.getOrgName());
guideDTO.setCategoryCode(formDTO.getCategoryCode());
guideDTO.setTitle(formDTO.getTitle());
OrgFormDTO orgFormDTO = new OrgFormDTO();
orgFormDTO.setOrgId(formDTO.getOrgId());
orgFormDTO.setOrgType(formDTO.getOrgType());
//获取组织的pId和pIds
Result<OrgResultDTO> result = govOrgOpenFeignClient.getAgencyInfo(orgFormDTO);
if (!result.success() || null == result.getData()) {
throw new RenException(result.getCode(), result.getMsg());
}
if (OrgInfoConstant.AGENCY.equals(formDTO.getOrgType())) {
guideDTO.setPid(result.getData().getPid());
} else {
guideDTO.setPid(result.getData().getAgencyId());
}
guideDTO.setPids(result.getData().getPids().concat(":").concat(result.getData().getAgencyId()));
save(guideDTO);
//保存办事指南内容模块
if (CollectionUtils.isNotEmpty(formDTO.getModuleList())) {
List<GuideModuleEntity> guideModuleList = formDTO.getModuleList().stream().map(item -> {
GuideModuleEntity entity = new GuideModuleEntity();
entity.setCustomerId(tokenDto.getCustomerId());
entity.setGuideId(guideDTO.getId());
entity.setModuleId(item.getModuleId());
entity.setModuleContent(item.getModuleContent());
return entity;
}).collect(Collectors.toList());
guideModuleService.insertBatch(guideModuleList);
}
//保存附件
if (CollectionUtils.isNotEmpty(formDTO.getAttachmentList())) {
AtomicInteger i = new AtomicInteger(1);
List<GuideAttachmentEntity> attachmentList = formDTO.getAttachmentList().stream().map(item -> {
GuideAttachmentEntity entity = new GuideAttachmentEntity();
entity.setCustomerId(tokenDto.getCustomerId());
entity.setGuideId(guideDTO.getId());
entity.setAttachmentName(item.getName());
entity.setAttachmentFormat(item.getFormat());
entity.setAttachmentSize(item.getSize());
entity.setAttachmentType(item.getType());
entity.setAttachmentUrl(item.getUrl());
entity.setDuration(item.getDuration());
entity.setSort(i.getAndIncrement());
return entity;
}).collect(Collectors.toList());
guideAttachmentService.insertBatch(attachmentList);
}
//保存外链地址
if (CollectionUtils.isNotEmpty(formDTO.getExternalLinks())) {
AtomicInteger i = new AtomicInteger(1);
List<GuideExternalLinkEntity> linkList = formDTO.getExternalLinks().stream().map(item -> {
GuideExternalLinkEntity entity = new GuideExternalLinkEntity();
entity.setCustomerId(tokenDto.getCustomerId());
entity.setGuideId(guideDTO.getId());
entity.setExternalLink(item.getExternalLink());
entity.setDescription(item.getDescription());
entity.setSort(i.getAndIncrement());
return entity;
}).collect(Collectors.toList());
guideExternalLinkService.insertBatch(linkList);
}
}
/**
* 修改指南
*
* @param formDTO
* @Param formDTO
* @Return
* @Author zhaoqifeng
* @Date 2021/9/7 14:12
*/
@Override
public void guideEdit(GuideEditFormDTO formDTO) {
if (CollectionUtils.isEmpty(formDTO.getModuleList()) && CollectionUtils.isEmpty(formDTO.getAttachmentList()) &&
CollectionUtils.isEmpty(formDTO.getExternalLinks())) {
throw new RenException(EpmetErrorCode.GUIDE_IS_NULL.getCode());
}
//保存办事指南表
GuideDTO guideDTO = get(formDTO.getGuideId());
if (!formDTO.getStaffId().equals(guideDTO.getCreatedBy())) {
throw new RenException(EpmetErrorCode.GUIDE_IS_NOT_YOURS.getCode());
}
guideDTO.setOrgId(formDTO.getOrgId());
guideDTO.setOrgType(formDTO.getOrgType());
guideDTO.setCategoryCode(formDTO.getCategoryCode());
guideDTO.setTitle(formDTO.getTitle());
OrgFormDTO orgFormDTO = new OrgFormDTO();
orgFormDTO.setOrgId(formDTO.getOrgId());
orgFormDTO.setOrgType(formDTO.getOrgType());
guideDTO.setOrgName(formDTO.getOrgName());
//获取组织的pId和pIds
Result<OrgResultDTO> result = govOrgOpenFeignClient.getAgencyInfo(orgFormDTO);
if (!result.success() || null == result.getData()) {
throw new RenException(result.getCode(), result.getMsg());
}
if (OrgInfoConstant.AGENCY.equals(formDTO.getOrgType())) {
guideDTO.setPid(result.getData().getPid());
} else {
guideDTO.setPid(result.getData().getAgencyId());
}
guideDTO.setPids(result.getData().getPids().concat(":").concat(result.getData().getAgencyId()));
update(guideDTO);
//保存办事指南内容模块
if (CollectionUtils.isNotEmpty(formDTO.getModuleList())) {
List<GuideModuleEntity> guideModuleList = formDTO.getModuleList().stream().map(item -> {
GuideModuleEntity entity = new GuideModuleEntity();
entity.setCustomerId(guideDTO.getCustomerId());
entity.setId(item.getGuideModuleId());
entity.setGuideId(guideDTO.getId());
entity.setModuleId(item.getModuleId());
entity.setModuleContent(item.getModuleContent());
return entity;
}).collect(Collectors.toList());
guideModuleService.insertBatch(guideModuleList.stream().filter(item -> null == item.getId()).collect(Collectors.toList()));
guideModuleService.updateBatchById(guideModuleList.stream().filter(item -> null != item.getId()).collect(Collectors.toList()));
}
//保存附件
guideAttachmentService.deleteByGuideId(formDTO.getGuideId());
if (CollectionUtils.isNotEmpty(formDTO.getAttachmentList())) {
AtomicInteger i = new AtomicInteger(1);
List<GuideAttachmentEntity> attachmentList = formDTO.getAttachmentList().stream().map(item -> {
GuideAttachmentEntity entity = new GuideAttachmentEntity();
entity.setCustomerId(guideDTO.getCustomerId());
entity.setGuideId(guideDTO.getId());
entity.setAttachmentName(item.getName());
entity.setAttachmentFormat(item.getFormat());
entity.setAttachmentSize(item.getSize());
entity.setAttachmentType(item.getType());
entity.setAttachmentUrl(item.getUrl());
entity.setDuration(item.getDuration());
entity.setSort(i.getAndIncrement());
return entity;
}).collect(Collectors.toList());
guideAttachmentService.insertBatch(attachmentList);
}
//保存外链地址
guideExternalLinkService.deleteByGuideId(formDTO.getGuideId());
if (CollectionUtils.isNotEmpty(formDTO.getExternalLinks())) {
AtomicInteger i = new AtomicInteger(1);
List<GuideExternalLinkEntity> linkList = formDTO.getExternalLinks().stream().map(item -> {
GuideExternalLinkEntity entity = new GuideExternalLinkEntity();
entity.setCustomerId(guideDTO.getCustomerId());
entity.setGuideId(guideDTO.getId());
entity.setExternalLink(item.getExternalLink());
entity.setDescription(item.getDescription());
entity.setSort(i.getAndIncrement());
return entity;
}).collect(Collectors.toList());
guideExternalLinkService.insertBatch(linkList);
}
}
/**
* 删除指南
*
* @param formDTO
* @Param formDTO
* @Return
* @Author zhaoqifeng
* @Date 2021/9/7 14:12
*/
@Override
public void guideDel(GuideFormDTO formDTO) {
GuideDTO guide = get(formDTO.getGuideId());
if (!formDTO.getStaffId().equals(guide.getCreatedBy())) {
throw new RenException(EpmetErrorCode.GUIDE_IS_NOT_YOURS.getCode());
}
//删除主表
baseDao.deleteById(formDTO.getGuideId());
//删除内容模块
guideModuleService.deleteByGuideId(formDTO.getGuideId());
//删除附件
guideAttachmentService.deleteByGuideId(formDTO.getGuideId());
//删除外链
guideExternalLinkService.deleteByGuideId(formDTO.getGuideId());
}
/**
* 指南详情
*
* @param formDTO
* @Param formDTO
* @Return {@link GuideDetailResultDTO}
* @Author zhaoqifeng
* @Date 2021/9/7 14:12
*/
@Override
public GuideDetailResultDTO guideDetail(GuideFormDTO formDTO) {
//获取指南详情
GuideDetailResultDTO result = baseDao.getGuideDetail(formDTO.getGuideId());
//获取指南内容模块
result.setModuleList(guideModuleService.getByGuideId(formDTO.getCustomerId(), formDTO.getGuideId()));
//获取指南附件
result.setAttachmentList(guideAttachmentService.getByGuideId(formDTO.getGuideId()));
//获取指南外链地址
result.setExternalLinks(guideExternalLinkService.getByGuideId(formDTO.getGuideId()));
return result;
}
}

26
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideAttachmentDao.xml

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.GuideAttachmentDao">
<resultMap type="com.epmet.entity.GuideAttachmentEntity" id="guideAttachmentMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="guideId" column="GUIDE_ID"/>
<result property="attachmentName" column="ATTACHMENT_NAME"/>
<result property="attachmentSize" column="ATTACHMENT_SIZE"/>
<result property="attachmentFormat" column="ATTACHMENT_FORMAT"/>
<result property="attachmentType" column="ATTACHMENT_TYPE"/>
<result property="attachmentUrl" column="ATTACHMENT_URL"/>
<result property="duration" column="DURATION"/>
<result property="sort" column="SORT"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

21
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCategoryDao.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.GuideCategoryDao">
<resultMap type="com.epmet.entity.GuideCategoryEntity" id="guideCategoryMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="categoryName" column="CATEGORY_NAME"/>
<result property="sort" column="SORT"/>
<result property="status" column="STATUS"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

21
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideCollectionDao.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.GuideCollectionDao">
<resultMap type="com.epmet.entity.GuideCollectionEntity" id="guideCollectionMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="guideId" column="GUIDE_ID"/>
<result property="userId" column="USER_ID"/>
<result property="app" column="APP"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

61
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideDao.xml

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.GuideDao">
<resultMap type="com.epmet.entity.GuideEntity" id="guideMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="orgType" column="ORG_TYPE"/>
<result property="orgId" column="ORG_ID"/>
<result property="pid" column="PID"/>
<result property="pids" column="PIDS"/>
<result property="title" column="TITLE"/>
<result property="categoryCode" column="CATEGORY_CODE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getGuideList" resultType="com.epmet.dto.result.GuideListResultDTO">
SELECT
g.ID AS "guideId",
g.TITLE AS "title",
gc.CATEGORY_NAME AS categoryName,
g.CREATED_BY AS createdId,
g.UPDATED_TIME AS updatedTime,
FROM
guide g
INNER JOIN guide_category gc ON g.CATEGORY_ID = gc.ID
WHERE g.DEL_FLAG = 0
<if test='null != agencyId and "" != agencyId'>
AND g.PIDS LIKE CONCAT( '%', #{agencyId}, '%' )
</if>
<if test='null != guideTitle and "" != guideTitle'>
AND g.TITLE LIKE CONCAT( '%', #{guideTitle}, '%' )
</if>
<if test='null != categoryId and "" != categoryId'>
AND g.CATEGORY_ID = #{categoryId}
</if>
</select>
<select id="getGuideDetail" resultType="com.epmet.dto.result.GuideDetailResultDTO">
SELECT
g.ID AS "guideId",
ORG_TYPE,
ORG_ID,
ORG_NAME,
TITLE,
CATEGORY_CODE
CATEGORY_NAME
FROM
guide g
INNER JOIN guide_category gc ON g.CATEGORY_CODE = gc.CATEGORY_CODE
WHERE
g.ID = #{guideId}
</select>
</mapper>

21
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideExternalLinkDao.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.GuideExternalLinkDao">
<resultMap type="com.epmet.entity.GuideExternalLinkEntity" id="guideExternalLinkMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="guideId" column="GUIDE_ID"/>
<result property="description" column="DESCRIPTION"/>
<result property="externalLink" column="EXTERNAL_LINK"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

34
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDao.xml

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.GuideModuleDao">
<resultMap type="com.epmet.entity.GuideModuleEntity" id="guideModuleMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="guideId" column="GUIDE_ID"/>
<result property="moduleId" column="MODULE_ID"/>
<result property="moduleContent" column="MODULE_CONTENT"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="selectByGuideId" resultType="com.epmet.dto.ModuleDTO">
SELECT
gm.ID AS "guideModuleId",
gmd.ID AS "moduleId",
gmd.MODULE_VALUE,
gmd.MODULE_NAME,
gm.MODULE_CONTENT
FROM guide_module_dict gmd
LEFT JOIN guide_module gm ON gmd.ID = gm.MODULE_ID AND gm.DEL_FLAG = 0 AND gm.GUIDE_ID = #{guideId}
WHERE gmd.DEL_FLAG = 0
AND gmd.CUSTOMER_ID = #{customerId}
ORDER BY gmd.SORT ASC
</select>
</mapper>

22
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDictDao.xml

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.GuideModuleDictDao">
<resultMap type="com.epmet.entity.GuideModuleDictEntity" id="guideModuleDictMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="moduleValue" column="MODULE_VALUE"/>
<result property="moduleName" column="MODULE_NAME"/>
<result property="sort" column="SORT"/>
<result property="status" column="STATUS"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

21
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/GuideModuleDictDefaultDao.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.GuideModuleDictDefaultDao">
<resultMap type="com.epmet.entity.GuideModuleDictDefaultEntity" id="guideModuleDictDefaultMap">
<result property="id" column="ID"/>
<result property="moduleValue" column="MODULE_VALUE"/>
<result property="moduleName" column="MODULE_NAME"/>
<result property="sort" column="SORT"/>
<result property="status" column="STATUS"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

17
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/constant/ActConstant.java

@ -0,0 +1,17 @@
package com.epmet.resi.group.constant;
/**
* @Author zxc
* @DateTime 2021/9/3 4:39 下午
* @DESC
*/
public interface ActConstant {
/**
* 类型组织活动次数orgAct应参加活动次数joinAct活动签到次数signAct
*/
String ORG_ACT = "orgAct";
String JOIN_ACT = "joinAct";
String SIGN_ACT = "signAct";
}

126
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/ActCommentAttachmentDTO.java

@ -0,0 +1,126 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.resi.group.dto.act;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 活动评论附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-09-06
*/
@Data
public class ActCommentAttachmentDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 活动Id[group_act_info.id]
*/
private String groupActId;
/**
* 评论Id
*/
private String actCommentId;
/**
* 文件名
*/
private String fileName;
/**
* 附件名uuid随机生成
*/
private String attachmentName;
/**
* 文件大小单位b
*/
private Integer attachmentSize;
/**
* 文件格式JPGPNGPDFJPEGBMPMP4WMAM4AMP3DOCDOCXXLS
*/
private String attachmentFormat;
/**
* 附件类型图片 - image 视频 - video 语音 - voice 文档 - doc
*/
private String attachmentType;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 排序字段
*/
private Integer sort;
/**
* 语音或视频时长
*/
private Integer duration;
/**
* 删除标记 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

44
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/OrganizationalLifeLineChartDTO.java

@ -0,0 +1,44 @@
package com.epmet.resi.group.dto.act;
import com.epmet.commons.tools.constant.NumConstant;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/9/3 3:35 下午
* @DESC
*/
@Data
public class OrganizationalLifeLineChartDTO implements Serializable {
private static final long serialVersionUID = -4224453421929580053L;
/**
* 月份
*/
private String month;
/**
* 组织活动次数
*/
private Integer organizationalActCount;
/**
* 应参加活动次数
*/
private Integer shouldJoinActCount;
/**
* 活动签到次数
*/
private Integer actSignCount;
public OrganizationalLifeLineChartDTO() {
this.month = "";
this.organizationalActCount = NumConstant.ZERO;
this.shouldJoinActCount = NumConstant.ZERO;
this.actSignCount = NumConstant.ZERO;
}
}

6
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CommentFormDTO.java

@ -1,11 +1,13 @@
package com.epmet.resi.group.dto.act.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import com.epmet.resi.group.dto.notice.form.NoticeFileDTO;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* 005评论活动
@ -27,6 +29,10 @@ public class CommentFormDTO implements Serializable {
@NotBlank(message = "评论内容不能为空", groups = AddUserShowGroup.class)
@Length(max = 500, message = "评论内容最多输入500字", groups = AddUserShowGroup.class)
private String commentContent;
/**
* 图片附件集合
*/
private List<NoticeFileDTO> imageList;
/**
* 当前用户id

22
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/OrganizationalLifeFormDTO.java

@ -0,0 +1,22 @@
package com.epmet.resi.group.dto.act.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/9/3 2:52 下午
* @DESC
*/
@Data
public class OrganizationalLifeFormDTO implements Serializable {
private static final long serialVersionUID = -8611679719504666547L;
private String yearId;
private String userId;
private String customerId;
}

10
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/CommentResultDTO.java

@ -1,10 +1,13 @@
package com.epmet.resi.group.dto.act.result;
import com.epmet.resi.group.dto.group.result.CommentFileDTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 006活动评论列表查询
@ -27,4 +30,11 @@ public class CommentResultDTO implements Serializable {
private Date commentTime;
private String commentUserId;
/**
* 图片附件集合
*/
private List<CommentFileDTO> imageList = new ArrayList<>();
}

47
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/OrganizationalLifeResultDTO.java

@ -0,0 +1,47 @@
package com.epmet.resi.group.dto.act.result;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.resi.group.dto.act.OrganizationalLifeLineChartDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @Author zxc
* @DateTime 2021/9/3 2:35 下午
* @DESC
*/
@Data
public class OrganizationalLifeResultDTO implements Serializable {
private static final long serialVersionUID = 6991638491754890967L;
/**
* 组织活动次数
*/
private Integer organizationalActCount;
/**
* 应参加活动次数
*/
private Integer shouldJoinActCount;
/**
* 活动签到次数
*/
private Integer actSignCount;
/**
* 折线图
*/
private List<OrganizationalLifeLineChartDTO> lineChart;
public OrganizationalLifeResultDTO() {
this.organizationalActCount = NumConstant.ZERO;
this.shouldJoinActCount = NumConstant.ZERO;
this.actSignCount = NumConstant.ZERO;
this.lineChart = new ArrayList<>();
}
}

8
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/comment/result/ResiCommentResultDTO.java

@ -1,11 +1,14 @@
package com.epmet.resi.group.dto.comment.result;
import com.alibaba.fastjson.annotation.JSONField;
import com.epmet.resi.group.dto.group.result.CommentFileDTO;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @Description
@ -54,4 +57,9 @@ public class ResiCommentResultDTO implements Serializable {
* 评论状态
* */
private String commentStatus;
/**
* 图片附件集合
*/
private List<CommentFileDTO> imageList = new ArrayList<>();
}

74
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/form/GroupFormDTO.java

@ -1,8 +1,10 @@
package com.epmet.resi.group.dto.group.form;
import com.epmet.resi.group.enums.SearchScopeTypeEnum;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
@ -11,7 +13,77 @@ import java.io.Serializable;
*/
@Data
public class GroupFormDTO implements Serializable {
private static final long serialVersionUID = 5330629771935235995L;
/** 排除某些指定id之外的组列表 */
public interface GroupDetailsExcludeGroupIds {}
private String groupId;
private String gridId;
/** 小组所属范围:grid网格,customer客户 */
@NotNull(message = "搜索范围类型不能为空", groups = { GroupDetailsExcludeGroupIds.class })
private SearchScopeTypeEnum searchScopeType;
@NotNull(message = "搜索范围对象的ID不能为空", groups = { GroupDetailsExcludeGroupIds.class })
private String searchScopeObjectId;
private List<String> excludeGroupIds;
/** 从第几条开始取 */
private Integer startRow = 0;
/** 取几条数据 */
private Integer rowCount = 10;
@NotNull(message = "排序字段不能为空", groups = { GroupDetailsExcludeGroupIds.class })
private SortTypeEnum sort;
@NotNull(message = "排序方式不能为空", groups = { GroupDetailsExcludeGroupIds.class })
private OrderTypeEnum order;
/**
* @Description 排序类型
* @author wxz
* @date 2021.09.07 17:00:24
*/
public enum SortTypeEnum {
CREATE_TIME("create_time");
private String sortField;
SortTypeEnum(String sortField) {
this.sortField = sortField;
}
public String getSortField() {
return sortField;
}
}
/**
* @Description 排序方式
* @author wxz
* @date 2021.09.07 17:02:05
*/
public enum OrderTypeEnum {
ASC("asc"),
DESC("desc");
private String orderType;
OrderTypeEnum(String orderType) {
this.orderType = orderType;
}
public String getOrderType() {
return orderType;
}
}
}

4
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/AllGroupListResultDTO.java

@ -47,4 +47,8 @@ public class AllGroupListResultDTO implements Serializable {
*/
private String groupType;
/**
* 群介绍
*/
private String groupIntroduction = "";
}

28
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/CommentFileDTO.java

@ -0,0 +1,28 @@
package com.epmet.resi.group.dto.group.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author sun
* @Description 话题通知活动评论附件
*/
@NoArgsConstructor
@Data
public class CommentFileDTO implements Serializable {
private static final long serialVersionUID = -3930520724652521552L;
private String name;
private String url;
private String type;
private String format;
private Integer size;
private Integer duration;
@JsonIgnore
private String commentId;
@JsonIgnore
private String userId;
}

4
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/GroupDetailResultDTO.java

@ -9,7 +9,9 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
public class GroupDetailResultDTO {
private String gridId;
private String groupHeadPhoto;
private String groupId;
private String groupName;
private String groupIntroduction;
private Integer editNumLimit;
@ -17,5 +19,7 @@ public class GroupDetailResultDTO {
private String auditStatus;
private Boolean editable;
private String remark;
/** 群组类型:branch:支部小组,ordinary:楼院小组 */
private String groupType;
}

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

Loading…
Cancel
Save