Browse Source

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

master
yinzuomei 5 years ago
parent
commit
05e6b91079
  1. 8
      epmet-admin/epmet-admin-server/pom.xml
  2. 15
      epmet-auth/pom.xml
  3. 42
      epmet-auth/src/main/java/com/epmet/controller/LoginController.java
  4. 2
      epmet-auth/src/main/java/com/epmet/dto/form/LoginByPassWordFormDTO.java
  5. 27
      epmet-auth/src/main/java/com/epmet/dto/form/LoginByPhoneFormDTO.java
  6. 2
      epmet-auth/src/main/java/com/epmet/dto/form/LoginByWxCodeFormDTO.java
  7. 2
      epmet-auth/src/main/java/com/epmet/dto/form/LoginCommonFormDTO.java
  8. 19
      epmet-auth/src/main/java/com/epmet/dto/form/SendSmsCodeFormDTO.java
  9. 2
      epmet-auth/src/main/java/com/epmet/dto/result/UserTokenResultDTO.java
  10. 26
      epmet-auth/src/main/java/com/epmet/feign/EpmetUserFeignClient.java
  11. 12
      epmet-auth/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallback.java
  12. 34
      epmet-auth/src/main/java/com/epmet/redis/CaptchaRedis.java
  13. 39
      epmet-auth/src/main/java/com/epmet/service/LoginService.java
  14. 232
      epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java
  15. 12
      epmet-auth/src/main/resources/bootstrap.yml
  16. 2
      epmet-cloud-generator/src/main/resources/application.yml
  17. 2
      epmet-cloud-generator/src/main/resources/generator.properties
  18. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/Constant.java
  19. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  20. 12
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java
  21. 27
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/PhoneValidatorUtils.java
  22. 4
      epmet-gateway/pom.xml
  23. 8
      epmet-module/epmet-activiti/epmet-activiti-server/pom.xml
  24. 8
      epmet-module/epmet-demo/epmet-demo-server/pom.xml
  25. 10
      epmet-module/epmet-job/epmet-job-server/pom.xml
  26. 8
      epmet-module/epmet-message/epmet-message-server/pom.xml
  27. 8
      epmet-module/epmet-oss/epmet-oss-server/pom.xml
  28. 40
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerAgencyDTO.java
  29. 23
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerDepartmentDTO.java
  30. 58
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerGridDTO.java
  31. 17
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffAgencyDTO.java
  32. 12
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffDepartmentDTO.java
  33. 16
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffGridDTO.java
  34. 81
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffRoleDTO.java
  35. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/OrgTreeNode.java
  36. 8
      epmet-module/gov-org/gov-org-server/pom.xml
  37. 42
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
  38. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerDepartmentController.java
  39. 94
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerOrganizationController.java
  40. 94
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerRelevantDepartmentController.java
  41. 42
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffAgencyController.java
  42. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffDepartmentController.java
  43. 18
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java
  44. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  45. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerDepartmentDao.java
  46. 33
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerRelevantDepartmentDao.java
  47. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java
  48. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffDepartmentDao.java
  49. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java
  50. 39
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerAgencyEntity.java
  51. 21
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerDepartmentEntity.java
  52. 62
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerGridEntity.java
  53. 21
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerStaffAgencyEntity.java
  54. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerStaffDepartmentEntity.java
  55. 16
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerStaffGridEntity.java
  56. 51
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerStaffRoleEntity.java
  57. 30
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerAgencyExcel.java
  58. 21
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerDepartmentExcel.java
  59. 62
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerRelevantDepartmentExcel.java
  60. 15
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffAgencyExcel.java
  61. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffDepartmentExcel.java
  62. 16
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffGridExcel.java
  63. 62
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffRoleExcel.java
  64. 0
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/.gitkeep
  65. 25
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java
  66. 21
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/fallback/ResiPartymemberFeignClientFallBack.java
  67. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerAgencyRedis.java
  68. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerDepartmentRedis.java
  69. 47
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerRelevantDepartmentRedis.java
  70. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffAgencyRedis.java
  71. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffDepartmentRedis.java
  72. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffGridRedis.java
  73. 47
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffOrganizationRedis.java
  74. 38
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
  75. 16
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerDepartmentService.java
  76. 38
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffAgencyService.java
  77. 16
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffDepartmentService.java
  78. 29
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java
  79. 95
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffOrganizationService.java
  80. 48
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  81. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerDepartmentServiceImpl.java
  82. 104
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerOrganizationServiceImpl.java
  83. 104
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerRelevantDepartmentServiceImpl.java
  84. 48
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java
  85. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffDepartmentServiceImpl.java
  86. 40
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java
  87. 104
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffOrganizationServiceImpl.java
  88. 108
      epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/epmet_gov_org.sql
  89. 10
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  90. 7
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml
  91. 23
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml
  92. 19
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerRelevantDepartmentDao.xml
  93. 9
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml
  94. 4
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffDepartmentDao.xml
  95. 4
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml
  96. 21
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffOrganizationDao.xml
  97. 19
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffRoleDao.xml
  98. 16
      epmet-module/oper-access/oper-access-server/pom.xml
  99. 8
      epmet-module/oper-crm/oper-crm-server/pom.xml
  100. 8
      epmet-module/oper-customize/oper-customize-server/pom.xml

8
epmet-admin/epmet-admin-server/pom.xml

@ -93,13 +93,13 @@
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://localhost:3306/epmet_admin?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_admin?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet</spring.datasource.druid.username>
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<spring.datasource.druid.username>epmet_admin_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>127.0.0.1</spring.redis.host>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->

15
epmet-auth/pom.xml

@ -86,6 +86,12 @@
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-message-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
@ -143,6 +149,9 @@
<!--居民端小程序配置-->
<resi.wx.ma.appId>wx9b6102a8ee5add65</resi.wx.ma.appId>
<resi.wx.ma.secret>16fdb68bc2b3e732324ba5d8b8a9b5e2</resi.wx.ma.secret>
<!--政府端小程序配置-->
<resi.wx.ma.appId>wx3d1372029eb816a3</resi.wx.ma.appId>
<resi.wx.ma.secret>651f02d71ed3f123dfb584b8bf0f4d8b</resi.wx.ma.secret>
</properties>
</profile>
@ -177,6 +186,9 @@
<!--居民端小程序配置-->
<resi.wx.ma.appId>wx9b6102a8ee5add65</resi.wx.ma.appId>
<resi.wx.ma.secret>16fdb68bc2b3e732324ba5d8b8a9b5e2</resi.wx.ma.secret>
<!--政府端小程序配置-->
<resi.wx.ma.appId>wx3d1372029eb816a3</resi.wx.ma.appId>
<resi.wx.ma.secret>651f02d71ed3f123dfb584b8bf0f4d8b</resi.wx.ma.secret>
</properties>
</profile>
@ -211,6 +223,9 @@
<!--居民端小程序配置-->
<resi.wx.ma.appId>wx9b6102a8ee5add65</resi.wx.ma.appId>
<resi.wx.ma.secret>16fdb68bc2b3e732324ba5d8b8a9b5e2</resi.wx.ma.secret>
<!--政府端小程序配置-->
<resi.wx.ma.appId>wx3d1372029eb816a3</resi.wx.ma.appId>
<resi.wx.ma.secret>651f02d71ed3f123dfb584b8bf0f4d8b</resi.wx.ma.secret>
</properties>
</profile>
</profiles>

42
epmet-auth/src/main/java/com/epmet/controller/LoginController.java

@ -1,15 +1,16 @@
package com.epmet.controller;
import com.epmet.common.token.dto.form.LoginByPassWordFormDTO;
import com.epmet.common.token.dto.form.LoginByWxCodeFormDTO;
import com.epmet.common.token.dto.result.UserTokenResultDTO;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.constant.Constant;
import com.epmet.commons.tools.exception.ErrorCode;
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.dto.form.LoginByPassWordFormDTO;
import com.epmet.dto.form.LoginByPhoneFormDTO;
import com.epmet.dto.form.LoginByWxCodeFormDTO;
import com.epmet.dto.form.SendSmsCodeFormDTO;
import com.epmet.dto.result.UserTokenResultDTO;
import com.epmet.service.CaptchaService;
import com.epmet.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
@ -41,7 +42,7 @@ public class LoginController {
* @param response
* @param uuid
* @Author yinzuomei
* @Description 生成验证码
* @Description 运营端管理后台-生成验证码
* @Date 2020/3/17 16:08
**/
@GetMapping("captcha")
@ -61,10 +62,10 @@ public class LoginController {
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.lang.String>
* @Author yinzuomei
* @Description 微信小程序登录
* @Description 居民端微信小程序登录
* @Date 2020/3/14 14:35
**/
@PostMapping("loginbywxcode")
@PostMapping("/resiwxmp/loginbywxcode")
public Result<UserTokenResultDTO> loginByWxCode(@RequestBody LoginByWxCodeFormDTO formDTO) {
//效验数据
ValidatorUtils.validateEntity(formDTO);
@ -78,7 +79,7 @@ public class LoginController {
* @Description 手机号+密码登录接口
* @Date 2020/3/14 19:46
**/
@PostMapping("loginbypassword")
@PostMapping("/operweb/loginbypassword")
public Result<UserTokenResultDTO> loginByPassword(@RequestBody LoginByPassWordFormDTO formDTO) {
//效验数据
ValidatorUtils.validateEntity(formDTO);
@ -99,4 +100,29 @@ public class LoginController {
return loginService.logoutByToken(tokenDto);
}
/**
* @param formDTO 手机号
* @return com.epmet.commons.tools.utils.Result
* @Author yinzuomei
* @Description 政府端微信小程序登录-发送验证码
* @Date 2020/4/18 10:58
**/
@PostMapping(value = "/govwxmp/sendsmscode")
public Result sendSmsCode(@RequestBody SendSmsCodeFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return loginService.sendSmsCode(formDTO);
}
/**
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.common.token.dto.result.UserTokenResultDTO>
* @Author yinzuomei
* @Description 政府端微信小程序登录-手机验证码登录
* @Date 2020/4/18 21:14
**/
@PostMapping(value = "/govwxmp/loginbyphone")
public Result<UserTokenResultDTO> loginByPhone(LoginByPhoneFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return loginService.loginByPhone(formDTO);
}
}

2
epmet-commons/epmet-common-clienttoken/src/main/java/com/epmet/common/token/dto/form/LoginByPassWordFormDTO.java → epmet-auth/src/main/java/com/epmet/dto/form/LoginByPassWordFormDTO.java

@ -1,4 +1,4 @@
package com.epmet.common.token.dto.form;
package com.epmet.dto.form;
import lombok.Data;

27
epmet-auth/src/main/java/com/epmet/dto/form/LoginByPhoneFormDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 政府端手机号+验证码登录接口入参
* @Author yinzuomei
* @Date 2020/4/18 10:38
*/
@Data
public class LoginByPhoneFormDTO extends LoginCommonFormDTO implements Serializable {
private static final long serialVersionUID = 4193133227120225342L;
@NotBlank(message = "wxCode不能为空")
private String wxCode;
@NotBlank(message = "手机号不能为空")
private String phone;
@NotBlank(message="验证码不能为空")
private String smsCode;
}

2
epmet-commons/epmet-common-clienttoken/src/main/java/com/epmet/common/token/dto/form/LoginByWxCodeFormDTO.java → epmet-auth/src/main/java/com/epmet/dto/form/LoginByWxCodeFormDTO.java

@ -1,4 +1,4 @@
package com.epmet.common.token.dto.form;
package com.epmet.dto.form;
import lombok.Data;

2
epmet-commons/epmet-common-clienttoken/src/main/java/com/epmet/common/token/dto/form/LoginCommonFormDTO.java → epmet-auth/src/main/java/com/epmet/dto/form/LoginCommonFormDTO.java

@ -1,4 +1,4 @@
package com.epmet.common.token.dto.form;
package com.epmet.dto.form;
import lombok.Data;

19
epmet-auth/src/main/java/com/epmet/dto/form/SendSmsCodeFormDTO.java

@ -0,0 +1,19 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 政府端手机号+验证码登录接口入参
* @Author yinzuomei
* @Date 2020/04/18 10:26
*/
@Data
public class SendSmsCodeFormDTO extends LoginCommonFormDTO implements Serializable {
private static final long serialVersionUID = -1852541457359282018L;
@NotBlank(message = "手机号不能为空")
private String phone;
}

2
epmet-commons/epmet-common-clienttoken/src/main/java/com/epmet/common/token/dto/result/UserTokenResultDTO.java → epmet-auth/src/main/java/com/epmet/dto/result/UserTokenResultDTO.java

@ -1,4 +1,4 @@
package com.epmet.common.token.dto.result;
package com.epmet.dto.result;
import lombok.Data;

26
epmet-auth/src/main/java/com/epmet/feign/EpmetUserFeignClient.java

@ -2,14 +2,18 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.UserDTO;
import com.epmet.dto.UserWechatDTO;
import com.epmet.dto.form.PasswordLoginUserInfoFormDTO;
import com.epmet.dto.form.StaffWechatFormDTO;
import com.epmet.dto.form.WxLoginUserInfoFormDTO;
import com.epmet.dto.result.PasswordLoginUserInfoResultDTO;
import com.epmet.feign.fallback.EpmetUserFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -18,7 +22,7 @@ import org.springframework.web.bind.annotation.RequestBody;
* @Author yinzuomei
* @Date 2020/3/16 14:48
*/
@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserFeignClientFallback.class )
@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserFeignClientFallback.class)
public interface EpmetUserFeignClient {
/**
@ -52,4 +56,24 @@ public interface EpmetUserFeignClient {
**/
@PostMapping(value = "epmetuser/user/selectLoginUserInfoByPassword", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<PasswordLoginUserInfoResultDTO> selectLoginUserInfoByPassword(@RequestBody PasswordLoginUserInfoFormDTO passwordLoginUserInfoFormDTO);
/**
* @param phone
* @return com.epmet.commons.tools.utils.Result
* @Author yinzuomei
* @Description 根据手机号查询政府端工作人员基本信息校验用户是否存在
* @Date 2020/4/18 14:03
**/
@GetMapping(value = "epmetuser/customerstaff/getcustsomerstaffbyphone/{phone}")
Result<CustomerStaffDTO> checkCustomerStaff(@PathVariable("phone") String phone);
/**
* @param staffWechatFormDTO
* @return com.epmet.commons.tools.utils.Result
* @Author yinzuomei
* @Description 机验证码登录时记录微信openId与当前用户的关系
* @Date 2020/4/18 22:44
**/
@PostMapping(value = "epmetuser/staffwechat/savestaffwechat", consumes = MediaType.APPLICATION_JSON_VALUE)
Result savestaffwechat(@RequestBody StaffWechatFormDTO staffWechatFormDTO);
}

12
epmet-auth/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallback.java

@ -3,9 +3,11 @@ package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.UserDTO;
import com.epmet.dto.UserWechatDTO;
import com.epmet.dto.form.PasswordLoginUserInfoFormDTO;
import com.epmet.dto.form.StaffWechatFormDTO;
import com.epmet.dto.form.WxLoginUserInfoFormDTO;
import com.epmet.dto.result.PasswordLoginUserInfoResultDTO;
import com.epmet.feign.EpmetUserFeignClient;
@ -34,4 +36,14 @@ public class EpmetUserFeignClientFallback implements EpmetUserFeignClient {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "selectLoginUserInfoByPassword", passwordLoginUserInfoFormDTO);
}
@Override
public Result<CustomerStaffDTO> checkCustomerStaff(String phone) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getCustsomerStaffByPhone", phone);
}
@Override
public Result savestaffwechat(StaffWechatFormDTO staffWechatFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "saveStaffWechat", staffWechatFormDTO);
}
}

34
epmet-auth/src/main/java/com/epmet/redis/CaptchaRedis.java

@ -10,6 +10,8 @@ package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.dto.form.LoginByPhoneFormDTO;
import com.epmet.dto.form.SendSmsCodeFormDTO;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -28,6 +30,11 @@ public class CaptchaRedis {
* 验证码5分钟过期
*/
private final static long EXPIRE = 60 * 5L;
/**
* 过期时长为30分钟单位
*/
private final static long MINUTE_THIRTY_EXPIRE = 60 * 30 * 1L;
@Autowired
private RedisUtils redisUtils;
@ -48,4 +55,31 @@ public class CaptchaRedis {
return captcha;
}
/**
* @param sendSmsCodeFormDTO appclientphone
* @param smsCode 验证码
* @return void
* @Author yinzuomei
* @Description
* @Date 2020/4/18 13:53
**/
public void saveSmsCode(SendSmsCodeFormDTO sendSmsCodeFormDTO, String smsCode) {
String smsCodeKey = RedisKeys.getLoginSmsCodeKey(sendSmsCodeFormDTO.getApp(), sendSmsCodeFormDTO.getClient(), sendSmsCodeFormDTO.getPhone());
logger.info(String.format("短信验证码key=%s", smsCodeKey));
redisUtils.set(smsCodeKey, smsCode, MINUTE_THIRTY_EXPIRE);
}
/**
* @param formDTO
* @return java.lang.String
* @Author yinzuomei
* @Description 获取登录时发送的验证码
* @Date 2020/4/18 21:33
**/
public String getSmsCode(LoginByPhoneFormDTO formDTO) {
String smsCodeKey = RedisKeys.getLoginSmsCodeKey(formDTO.getApp(), formDTO.getClient(), formDTO.getPhone());
String smsCode = (String) redisUtils.get(smsCodeKey);
return smsCode;
}
}

39
epmet-auth/src/main/java/com/epmet/service/LoginService.java

@ -1,10 +1,13 @@
package com.epmet.service;
import com.epmet.common.token.dto.form.LoginByPassWordFormDTO;
import com.epmet.common.token.dto.form.LoginByWxCodeFormDTO;
import com.epmet.common.token.dto.result.UserTokenResultDTO;
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.LoginByPassWordFormDTO;
import com.epmet.dto.form.LoginByPhoneFormDTO;
import com.epmet.dto.form.LoginByWxCodeFormDTO;
import com.epmet.dto.form.SendSmsCodeFormDTO;
import com.epmet.dto.result.UserTokenResultDTO;
/**
* @Description
@ -16,7 +19,7 @@ public interface LoginService {
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.UserTokenResultDTO>
* @Author yinzuomei
* @Description 微信小程序登录
* @Description 居民端微信小程序登录
* @Date 2020/3/14 19:34
**/
Result<UserTokenResultDTO> loginByWxCode(LoginByWxCodeFormDTO formDTO);
@ -38,4 +41,32 @@ public interface LoginService {
* @Date 2020/3/18 22:44
**/
Result logoutByToken(TokenDto tokenDto);
/**
* @return cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult
* @param app
* @param wxCode
* @Author yinzuomei
* @Description 解析wxCode
* @Date 2020/4/19 0:24
**/
WxMaJscode2SessionResult getWxMaUser(String app, String wxCode);
/**
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author yinzuomei
* @Description 政府端微信小程序登录-发送验证码
* @Date 2020/4/18 10:59
**/
Result sendSmsCode(SendSmsCodeFormDTO formDTO);
/**
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.common.token.dto.result.UserTokenResultDTO>
* @Author yinzuomei
* @Description 政府端微信小程序登录-手机验证码登录
* @Date 2020/4/18 21:11
**/
Result<UserTokenResultDTO> loginByPhone(LoginByPhoneFormDTO formDTO);
}

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

@ -3,23 +3,26 @@ package com.epmet.service.impl;
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
import cn.binarywang.wx.miniapp.bean.WxMaUserInfo;
import com.epmet.common.token.constant.LoginConstant;
import com.epmet.common.token.dto.form.LoginByPassWordFormDTO;
import com.epmet.common.token.dto.form.LoginByWxCodeFormDTO;
import com.epmet.common.token.dto.result.UserTokenResultDTO;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.ErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.password.PasswordUtils;
import com.epmet.commons.tools.utils.CpUserDetailRedis;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.PhoneValidatorUtils;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.UserDTO;
import com.epmet.dto.UserWechatDTO;
import com.epmet.dto.form.PasswordLoginUserInfoFormDTO;
import com.epmet.dto.form.WxLoginUserInfoFormDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.PasswordLoginUserInfoResultDTO;
import com.epmet.dto.result.UserTokenResultDTO;
import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.feign.MessageFeignClient;
import com.epmet.jwt.JwtTokenProperties;
import com.epmet.jwt.JwtTokenUtils;
import com.epmet.redis.CaptchaRedis;
import com.epmet.service.CaptchaService;
import com.epmet.service.LoginService;
import com.epmet.utils.WxMaServiceUtils;
@ -62,8 +65,14 @@ public class LoginServiceImpl implements LoginService {
@Autowired
private CaptchaService captchaService;
@Autowired
private CaptchaRedis captchaRedis;
@Autowired
private MessageFeignClient messageFeignClient;
/**
* 微信小程序登录
* 居民端微信小程序登录
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.UserTokenResultDTO>
@ -72,15 +81,21 @@ public class LoginServiceImpl implements LoginService {
*/
@Override
public Result<UserTokenResultDTO> loginByWxCode(LoginByWxCodeFormDTO formDTO) {
if(!(LoginConstant.APP_RESI.equals(formDTO.getApp())&&LoginConstant.CLIENT_WXMP.equals(formDTO.getClient()))){
logger.error("当前接口只适用于居民端微信小程序登录");
throw new RenException("参数错误");
}
//1、根据wxCode获取微信信息
WxMaJscode2SessionResult wxMaJscode2SessionResult = this.getWxMaUser(formDTO);
WxMaJscode2SessionResult wxMaJscode2SessionResult = this.getWxMaUser(formDTO.getApp(),formDTO.getWxCode());
logger.info("openId=[" + wxMaJscode2SessionResult.getOpenid() + "]unionId=[" + wxMaJscode2SessionResult.getUnionid() + "]");
//2、根据openId查询数据库,没有则直接插入一条记录
String userId = this.getUserId(formDTO, wxMaJscode2SessionResult);
if (StringUtils.isNotBlank(userId)) {
//3、封装token且存到redis
String token=this.generateToken(formDTO,userId);
this.saveTokenDto(formDTO,userId,wxMaJscode2SessionResult,token);
UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO();
userTokenResultDTO.setToken(this.packagingUserToken(formDTO, userId, wxMaJscode2SessionResult));
userTokenResultDTO.setToken(token);
return new Result<UserTokenResultDTO>().ok(userTokenResultDTO);
}else{
logger.error("登录失败userId为空");
@ -91,27 +106,31 @@ public class LoginServiceImpl implements LoginService {
/**
* 解析微信code获取小程序用户信息
*
* @param formDTO
* @param app
* @param wxCode
* @return cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult
* @author yinzuomei
* @date 2020/3/14 20:16
*/
private WxMaJscode2SessionResult getWxMaUser(LoginByWxCodeFormDTO formDTO) {
@Override
public WxMaJscode2SessionResult getWxMaUser(String app,String wxCode) {
WxMaJscode2SessionResult wxMaJscode2SessionResult = null;
try {
if (LoginConstant.APP_GOV.equals(formDTO.getApp())) {
wxMaJscode2SessionResult = wxMaServiceUtils.govWxMaService().jsCode2SessionInfo(formDTO.getWxCode());
} else if (LoginConstant.APP_OPER.equals(formDTO.getApp())) {
wxMaJscode2SessionResult = wxMaServiceUtils.operWxMaService().jsCode2SessionInfo(formDTO.getWxCode());
} else if (LoginConstant.APP_RESI.equals(formDTO.getApp())) {
wxMaJscode2SessionResult = wxMaServiceUtils.resiWxMaService().jsCode2SessionInfo(formDTO.getWxCode());
if (LoginConstant.APP_GOV.equals(app)) {
wxMaJscode2SessionResult = wxMaServiceUtils.govWxMaService().jsCode2SessionInfo(wxCode);
} else if (LoginConstant.APP_OPER.equals(app)) {
wxMaJscode2SessionResult = wxMaServiceUtils.operWxMaService().jsCode2SessionInfo(wxCode);
} else if (LoginConstant.APP_RESI.equals(app)) {
wxMaJscode2SessionResult = wxMaServiceUtils.resiWxMaService().jsCode2SessionInfo(wxCode);
}
} catch (WxErrorException e) {
log.error("->[getMaOpenId]::error[{}]", "解析微信code失败");
}
if (null == wxMaJscode2SessionResult) {
log.error(String.format("解析微信用户信息失败,app[%s],wxCode[%s]",app,wxCode));
throw new RenException("解析微信用户信息失败");
} else if (StringUtils.isBlank(wxMaJscode2SessionResult.getOpenid())) {
log.error(String.format("获取微信openid失败,app[%s],wxCode[%s]",app,wxCode));
throw new RenException("获取微信openid失败");
}
return wxMaJscode2SessionResult;
@ -134,6 +153,7 @@ public class LoginServiceImpl implements LoginService {
Result<UserDTO> userResult = epmetUserFeignClient.selecWxLoginUserInfo(wxLoginUserInfoFormDTO);
String userId = "";
if (!userResult.success()) {
logger.error("根据openId、app获取用户信息失败" + userResult.getMsg());
throw new RenException("获取用户信息失败" + userResult.getMsg());
}
if(null!=userResult.getData()&&StringUtils.isNotBlank(userResult.getData().getId())){
@ -221,42 +241,6 @@ public class LoginServiceImpl implements LoginService {
return userWechatDTO;
}
/**
* 封装用户token值
*
* @param formDTO
* @param userId
* @param wxMaJscode2SessionResult
* @return java.lang.String
* @author yinzuomei
* @since 2020/3/14 19:34
*/
private String packagingUserToken(LoginByWxCodeFormDTO formDTO,
String userId,
WxMaJscode2SessionResult wxMaJscode2SessionResult) {
// 生成token
Map<String, Object> map = new HashMap<>();
map.put("app", formDTO.getApp());
map.put("client", formDTO.getClient());
map.put("userId", userId);
String token = jwtTokenUtils.createToken(map);
// logger.info("app:"+formDTO.getApp()+";client:"+formDTO.getClient()+";userId:"+userId+";生成token["+token+"]");
int expire = jwtTokenProperties.getExpire();
TokenDto tokenDto = new TokenDto();
tokenDto.setApp(formDTO.getApp());
tokenDto.setClient(formDTO.getClient());
tokenDto.setUserId(userId);
tokenDto.setOpenId(wxMaJscode2SessionResult.getOpenid());
tokenDto.setSessionKey(wxMaJscode2SessionResult.getSessionKey());
tokenDto.setUnionId(wxMaJscode2SessionResult.getUnionid());
tokenDto.setToken(token);
tokenDto.setUpdateTime(System.currentTimeMillis());
tokenDto.setExpireTime(jwtTokenUtils.getExpiration(token).getTime());
cpUserDetailRedis.set(tokenDto, expire);
// logger.info("token过期时间:"+tokenUtil.getExpire(tokenDto.getApp(),tokenDto.getClient(),tokenDto.getUserId()));
// logger.info("截止时间:"+ DateUtils.format(jwtTokenUtils.getExpiration(token),"yyyy-MM-dd HH:mm:ss"));
return token;
}
/**
* 手机号+密码登录接口
@ -268,9 +252,9 @@ public class LoginServiceImpl implements LoginService {
*/
@Override
public Result<UserTokenResultDTO> loginByPassword(LoginByPassWordFormDTO formDTO) {
if(LoginConstant.APP_RESI.equals(formDTO.getApp())){
logger.error("居民端请使用微信登录");
throw new RenException("居民端请使用微信登录");
if(!(LoginConstant.APP_OPER.equals(formDTO.getApp())&&LoginConstant.CLIENT_WEB.equals(formDTO.getClient()))){
logger.error("当前接口只适用于运营端管理后台");
throw new RenException("当前接口只适用于运营端管理后台");
}
//1、验证码是否正确
boolean flag = captchaService.validate(formDTO.getUuid(), formDTO.getCaptcha());
@ -283,9 +267,8 @@ public class LoginServiceImpl implements LoginService {
passwordLoginUserInfoFormDTO.setApp(formDTO.getApp());
passwordLoginUserInfoFormDTO.setPhone(formDTO.getPhone());
Result<PasswordLoginUserInfoResultDTO> userInfoResult = epmetUserFeignClient.selectLoginUserInfoByPassword(passwordLoginUserInfoFormDTO);
logger.info(userInfoResult.getCode() + userInfoResult.getMsg());
if (!userInfoResult.success() || null == userInfoResult.getData()) {
logger.error("账号不存在");
logger.error("根据手机号查询运营人员信息失败");
throw new RenException("账号不存在");
}
//3、密码是否正确
@ -316,7 +299,7 @@ public class LoginServiceImpl implements LoginService {
map.put("client", formDTO.getClient());
map.put("userId", userId);
String token = jwtTokenUtils.createToken(map);
// logger.info("app:"+formDTO.getApp()+";client:"+formDTO.getClient()+";userId:"+userId+";生成token["+token+"]");
logger.info("app:"+formDTO.getApp()+";client:"+formDTO.getClient()+";userId:"+userId+";生成token["+token+"]");
int expire = jwtTokenProperties.getExpire();
TokenDto tokenDto = new TokenDto();
tokenDto.setApp(formDTO.getApp());
@ -326,8 +309,7 @@ public class LoginServiceImpl implements LoginService {
tokenDto.setUpdateTime(System.currentTimeMillis());
tokenDto.setExpireTime(jwtTokenUtils.getExpiration(token).getTime());
cpUserDetailRedis.set(tokenDto, expire);
// logger.info("token过期时间:"+tokenUtil.getExpire(tokenDto.getApp(),tokenDto.getClient(),tokenDto.getUserId()));
// logger.info("截止时间:"+ DateUtils.format(jwtTokenUtils.getExpiration(token),"yyyy-MM-dd HH:mm:ss"));
logger.info("截止时间:"+ DateUtils.format(jwtTokenUtils.getExpiration(token),"yyyy-MM-dd HH:mm:ss"));
return token;
}
@ -340,10 +322,134 @@ public class LoginServiceImpl implements LoginService {
logger.error("账号不存在");
throw new RenException("当前用户信息获取失败");
}
cpUserDetailRedis.logout(tokenDto.getApp() , tokenDto.getClient() , tokenDto.getUserId());
//web端清空菜单栏和权限,小程序目前又
//web端清空菜单栏和权限
return new Result().ok("退出登录!");
}
private static final String SEND_SMS_CODE_ERROR="发送短信验证码异常,手机号[%s],code[%s],msg[%s]";
/**
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author yinzuomei
* @Description 政府端微信小程序登录-发送验证码
* @Date 2020/4/18 10:59
**/
@Override
public Result sendSmsCode(SendSmsCodeFormDTO formDTO) {
//1、校验手机号是否符合规范
if(!PhoneValidatorUtils.isMobile(formDTO.getPhone())){
logger.error(String.format(SEND_SMS_CODE_ERROR,formDTO.getPhone(), EpmetErrorCode.ERROR_PHONE.getCode(),EpmetErrorCode.ERROR_PHONE.getMsg()));
return new Result().error(EpmetErrorCode.ERROR_PHONE.getCode());
}
//2、根据手机号校验用户是否存在
Result<CustomerStaffDTO> customerStaffResult=epmetUserFeignClient.checkCustomerStaff(formDTO.getPhone());
if(!customerStaffResult.success()){
logger.error(String.format(SEND_SMS_CODE_ERROR,formDTO.getPhone(),customerStaffResult.getCode(),customerStaffResult.getMsg()));
return new Result().error(customerStaffResult.getCode());
}
//3、发送短信验证码
Result<Map<String, String>> smsCodeResult=messageFeignClient.sendSmsCaptcha(formDTO.getPhone());
if(!smsCodeResult.success()){
logger.error(String.format(SEND_SMS_CODE_ERROR,formDTO.getPhone(),smsCodeResult.getCode(),smsCodeResult.getMsg()));
return new Result().error(smsCodeResult.getCode());
}
//4、保存短信验证码(删除现有短信验证码、将新的短信验证码存入Redis)
captchaRedis.saveSmsCode(formDTO,smsCodeResult.getData().get("code"));
logger.info(String.format("发送短信验证码成功,手机号[%s]",formDTO.getPhone()));
return new Result();
}
/**
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.common.token.dto.result.UserTokenResultDTO>
* @Author yinzuomei
* @Description 政府端微信小程序登录-手机验证码登录
* @Date 2020/4/18 21:11
**/
@Override
public Result<UserTokenResultDTO> loginByPhone(LoginByPhoneFormDTO formDTO) {
//1、根据手机号查询到用户信息
Result<CustomerStaffDTO> customerStaffResult=epmetUserFeignClient.checkCustomerStaff(formDTO.getPhone());
if(!customerStaffResult.success()){
logger.error(String.format("手机验证码登录异常,手机号[%s],code[%s],msg[%s]",formDTO.getPhone(),customerStaffResult.getCode(),customerStaffResult.getMsg()));
return new Result().error(customerStaffResult.getCode());
}
//2、验证码是否正确
String rightSmsCode=captchaRedis.getSmsCode(formDTO);
if(!formDTO.getSmsCode().equals(rightSmsCode)){
return new Result<UserTokenResultDTO>().error(EpmetErrorCode.MOBILE_CODE_ERROR.getCode());
}
//3、解析wxCode
UserTokenResultDTO userTokenResultDTO=this.getAuthorizationInfo(formDTO,customerStaffResult.getData());
return new Result<UserTokenResultDTO>().ok(userTokenResultDTO);
}
private UserTokenResultDTO getAuthorizationInfo(LoginByPhoneFormDTO formDTO, CustomerStaffDTO customerStaff) {
//1、解析微信用户
WxMaJscode2SessionResult wxMaJscode2SessionResult=this.getWxMaUser(formDTO.getApp(),formDTO.getWxCode());
//2、记录staff_wechat
this.savestaffwechat(customerStaff.getUserId(),wxMaJscode2SessionResult.getOpenid());
//3、获取用户token
String token=this.generateToken(formDTO,customerStaff.getUserId());
//4、保存到redis
this.saveTokenDto(formDTO,customerStaff.getUserId(),wxMaJscode2SessionResult,token);
UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO();
userTokenResultDTO.setToken(token);
return userTokenResultDTO;
}
/**
* @return com.epmet.commons.tools.utils.Result
* @param userId
* @param openid
* @Author yinzuomei
* @Description 保存微信和当前登录用户关系
* @Date 2020/4/18 22:54
**/
private Result savestaffwechat(String userId, String openid) {
StaffWechatFormDTO staffWechatFormDTO = new StaffWechatFormDTO();
staffWechatFormDTO.setUserId(userId);
staffWechatFormDTO.setWxOpenId(openid);
return epmetUserFeignClient.savestaffwechat(staffWechatFormDTO);
}
/**
* @Description 生成token
* @Date 2020/4/18 23:04
**/
private String generateToken(LoginCommonFormDTO formDTO,String userId){
Map<String, Object> map = new HashMap<>();
map.put("app", formDTO.getApp());
map.put("client", formDTO.getClient());
map.put("userId", userId);
String token = jwtTokenUtils.createToken(map);
logger.info("app:"+formDTO.getApp()+";client:"+formDTO.getClient()+";userId:"+userId+";生成token["+token+"]");
return token;
}
/**
* @Description 生成token
* @Date 2020/4/18 23:04
**/
private String saveTokenDto(LoginCommonFormDTO formDTO,
String userId,
WxMaJscode2SessionResult wxMaJscode2SessionResult,
String token) {
int expire = jwtTokenProperties.getExpire();
TokenDto tokenDto = new TokenDto();
tokenDto.setApp(formDTO.getApp());
tokenDto.setClient(formDTO.getClient());
tokenDto.setUserId(userId);
tokenDto.setOpenId(wxMaJscode2SessionResult.getOpenid());
tokenDto.setSessionKey(wxMaJscode2SessionResult.getSessionKey());
tokenDto.setUnionId(wxMaJscode2SessionResult.getUnionid());
tokenDto.setToken(token);
tokenDto.setUpdateTime(System.currentTimeMillis());
tokenDto.setExpireTime(jwtTokenUtils.getExpiration(token).getTime());
cpUserDetailRedis.set(tokenDto, expire);
logger.info("截止时间:"+ DateUtils.format(jwtTokenUtils.getExpiration(token),"yyyy-MM-dd HH:mm:ss"));
return token;
}
}

12
epmet-auth/src/main/resources/bootstrap.yml

@ -104,11 +104,11 @@ wx:
token: #微信小程序消息服务器配置的token
aesKey: #微信小程序消息服务器配置的EncodingAESKey
msgDataFormat: JSON
# - appid: @gov.wx.ma.appId@
# secret: @gov.wx.ma.secret@
# token: #微信小程序消息服务器配置的token
# aesKey: #微信小程序消息服务器配置的EncodingAESKey
# msgDataFormat: JSON
- appid: @gov.wx.ma.appId@
secret: @gov.wx.ma.secret@
token: #微信小程序消息服务器配置的token
aesKey: #微信小程序消息服务器配置的EncodingAESKey
msgDataFormat: JSON
# - appid: @oper.wx.ma.appId@
# secret: @oper.wx.ma.secret@
# token: #微信小程序消息服务器配置的token
@ -118,6 +118,6 @@ wx:
# 党群e事通-居民端小程序配置appId
resi: @resi.wx.ma.appId@
# 党群e事通-政府端小程序配置的appId
#gov: @gov.wx.ma.appId@
gov: @gov.wx.ma.appId@
# 党群e事通-运营端小程序配置的appId
#oper: @oper.wx.ma.appId@

2
epmet-cloud-generator/src/main/resources/application.yml

@ -9,7 +9,7 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
#MySQL配置
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://47.104.224.45:3308/epmet_user?useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://localhost:3306/epmet_user?useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: epmet
password: elink@833066
#oracle配置

2
epmet-cloud-generator/src/main/resources/generator.properties

@ -3,7 +3,7 @@
main=
#관츰
package=com.epmet
moduleName=customer
moduleName=
#鱗諒
author=generator
#경굶뵀

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

@ -118,4 +118,5 @@ public interface Constant {
*
*/
String NO="no";
}

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

@ -10,8 +10,10 @@ public enum EpmetErrorCode {
CANNOT_JOIN_GROUP(8001, "只有认证党员和居民才可以加入小组,请选择您的身份"),
CANNOT_CREATE_GROUP(8002, "只有党员和热心居民才能创建小组,请选择您的身份"),
GROUP_ALREADY_EXISTED(8003,"组名已存在"),
GOV_STAFF_NOT_EXISTS(8004,"未找到您所属的组织,请联系您单位的管理员,确认其录入的手机号和您注册的号码一致。"),
GOV_STAFF_DISABLED(8005,"您好,您的账户已被冻结,请联系管理员。"),
LOSE_EFFICACY(8006,"此邀请链接已过期"),
ERROR_PHONE(8007,"请输入正确的手机号"),
MOBILE_HAS_BEEN_USED(8101, "该手机号已注册,请更换手机号或使用原绑定的微信账号登录"),
MOBILE_CODE_ERROR(8102, "验证码错误"),
AUTO_CONFIRM_FAILED(8103, "党员注册失败"),

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

@ -195,4 +195,16 @@ public class RedisKeys {
public static String getResiGroupMemberInfoKey(String groupId, String userId){
return rootPrefix.concat("resi:group:member:").concat(groupId).concat(":").concat(userId);
}
/**
* @param phone 手机号
* @param smsCode 短信验证码
* @return java.lang.String
* @Author yinzuomei
* @Description 政府端登录发送验证码 epmet:app:client:phone
* @Date 2020/4/18 13:54
**/
public static String getLoginSmsCodeKey(String app, String client, String phone) {
return String.format(rootPrefix+"smsCode:login:%s:%s:%s",app,client,phone);
}
}

27
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/validator/PhoneValidatorUtils.java

@ -0,0 +1,27 @@
package com.epmet.commons.tools.validator;
import org.apache.commons.lang3.StringUtils;
import java.util.regex.Pattern;
/**
* @Description 手机号验证工具类
* @Author yinzuomei
* @Date 2020/4/18 15:04
*/
public class PhoneValidatorUtils {
private static final String REGEX_MOBILE ="((\\+86|0086)?\\s*)((134[0-8]\\d{7})|(((13([0-3]|[5-9]))|(14[5-9])|15([0-3]|[5-9])|(16(2|[5-7]))|17([0-3]|[5-8])|18[0-9]|19(1|[8-9]))\\d{8})|(14(0|1|4)0\\d{7})|(1740([0-5]|[6-9]|[10-12])\\d{7}))";
/**
* 判断是否是手机号
* @param tel 手机号
* @return boolean true: false:
*/
public static boolean isMobile(String tel) {
if (StringUtils.isEmpty(tel)){
return false;
}
return Pattern.matches(REGEX_MOBILE, tel);
}
}

4
epmet-gateway/pom.xml

@ -144,13 +144,17 @@
<!-- <gateway.routes.gov-org-server.uri>lb://gov-org-server</gateway.routes.gov-org-server.uri>-->
<gateway.routes.gov-org-server.uri>http://127.0.0.1:8092</gateway.routes.gov-org-server.uri>
<!-- 14、#运营端访问权限控制 -->
<!-- <gateway.routes.oper-access-server.uri>lb://oper-access-server</gateway.routes.oper-access-server.uri>-->
<gateway.routes.oper-access-server.uri>http://127.0.0.1:8093</gateway.routes.oper-access-server.uri>
<!-- 15、居民端个人信息 -->
<!-- <gateway.routes.resi-mine-server.uri>lb://resi-mine-server</gateway.routes.resi-mine-server.uri>-->
<gateway.routes.resi-mine-server.uri>http://127.0.0.1:8094</gateway.routes.resi-mine-server.uri>
<!-- 16、居民端楼院校组 -->
<!-- <gateway.routes.resi-group-server.uri>lb://resi-group-server</gateway.routes.resi-group-server.uri>-->
<gateway.routes.resi-group-server.uri>http://127.0.0.1:8095</gateway.routes.resi-group-server.uri>
<!-- 17、党员认证、热心居民申请 -->
<gateway.routes.resi-partymember-server.uri>http://127.0.0.1:8096</gateway.routes.resi-partymember-server.uri>
<!-- <gateway.routes.resi-partymember-server.uri>lb://resi-partymember-server</gateway.routes.resi-partymember-server.uri>-->
</properties>
</profile>
<profile>

8
epmet-module/epmet-activiti/epmet-activiti-server/pom.xml

@ -167,13 +167,13 @@
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://localhost:3306/epmet_activiti?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_activiti?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet</spring.datasource.druid.username>
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<spring.datasource.druid.username>epmet_activiti_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>127.0.0.1</spring.redis.host>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->

8
epmet-module/epmet-demo/epmet-demo-server/pom.xml

@ -110,13 +110,13 @@
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://localhost:3306/epmet_demo?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_demo?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet</spring.datasource.druid.username>
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<spring.datasource.druid.username>epmet_demo_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>127.0.0.1</spring.redis.host>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->

10
epmet-module/epmet-job/epmet-job-server/pom.xml

@ -106,13 +106,13 @@
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://localhost:3306/epmet_job?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_job?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet</spring.datasource.druid.username>
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<spring.datasource.druid.username>epmet_job_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.host>127.0.0.1</spring.redis.host>
<spring.redis.host>10.10.10.248</spring.redis.host>
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->

8
epmet-module/epmet-message/epmet-message-server/pom.xml

@ -127,13 +127,13 @@
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://localhost:3306/epmet_message?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_message?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet</spring.datasource.druid.username>
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<spring.datasource.druid.username>epmet_message_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>127.0.0.1</spring.redis.host>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->

8
epmet-module/epmet-oss/epmet-oss-server/pom.xml

@ -129,13 +129,13 @@
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://localhost:3306/epmet_oss?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_oss?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet</spring.datasource.druid.username>
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<spring.datasource.druid.username>epmet_oss_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>127.0.0.1</spring.redis.host>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->

40
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerOrganizationDTO.java → epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerAgencyDTO.java

@ -23,13 +23,13 @@ import lombok.Data;
/**
* 客户组织表
* 机关单位信息表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Data
public class CustomerOrganizationDTO implements Serializable {
public class CustomerAgencyDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ -44,44 +44,43 @@ public class CustomerOrganizationDTO implements Serializable {
private String customerId;
/**
* 上级组织ID
* 上级组织机构ID
*/
private String pid;
/**
* 所有上级组织ID
* 所有上级组织机构ID(以英文:隔开)
*/
private String pids;
/**
* 组织名称
* 所有上级名称,-连接
*/
private String organizationName;
private String allParentName;
/**
* 组织编码
* 组织名称
*/
private String organizationCode;
private String organizationName;
/**
* 级别 字典表keylevel
* 机关级别社区级community
街道:street,
区县级: district,
市级: city
省级:province 机关级别社区级community街道:street,区县级: district,市级: city省级:province
*/
private Integer level;
private String level;
/**
* 地区码 阿里云公共api
* 地区
*/
private Integer areaCode;
/**
* 排序
*/
private Integer sort;
/**
* 删除标识
*/
private Integer delFlag;
private String delFlag;
/**
* 乐观锁
@ -108,4 +107,9 @@ public class CustomerOrganizationDTO implements Serializable {
*/
private Date updatedTime;
/**
* 总人数
*/
private Integer totalUser;
}

23
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerDepartmentDTO.java

@ -23,10 +23,10 @@ import lombok.Data;
/**
* 客户部门表
* 客户部门表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Data
public class CustomerDepartmentDTO implements Serializable {
@ -44,34 +44,29 @@ public class CustomerDepartmentDTO implements Serializable {
private String customerId;
/**
* 所属组织ID
* 所属组织机构IDcustomer_organization.id
*/
private String orgId;
/**
* 上级组织ID 用于查找归口部门
*/
private String orgPid;
/**
* 部门名称
*/
private String depatmentName;
private String departmentName;
/**
* 部门编码
* 部门职责
*/
private String depatmentCode;
private String departmentDuty;
/**
* 排序
* 总人数
*/
private Integer sort;
private Integer totalUser;
/**
* 删除标识:0.未删除 1.已删除
*/
private Integer delFlag;
private String delFlag;
/**
* 乐观锁

58
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerGridDTO.java

@ -17,13 +17,14 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 客户网格表
* 客户网格表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
@ -49,68 +50,67 @@ public class CustomerGridDTO implements Serializable {
private String gridName;
/**
* 网格编码
* 中心位置经度
*/
private String gridCode;
private String longitude;
/**
* 上级组织ID
* 中心位置纬度
*/
private String pid;
private String latitude;
/**
* 有上级组织ID
* 属地区码所属组织地区码
*/
private String pids;
private String areaCode;
/**
* 排序
* 删除标识:0.未删除 1.已删除
*/
private Integer sort;
private Integer delFlag;
/**
* 中心位置经度
* 乐观锁
*/
private String longitude;
private Integer revision;
/**
* 中心位置纬度
* 创建人
*/
private String latitude;
private String createdBy;
/**
* 所属地区码
* 创建时间
*/
private String areaCode;
private Date createdTime;
/**
* 删除标识:0.未删除 1.已删除
* 更新人
*/
private Integer delFlag;
private String updatedBy;
/**
* 乐观锁
* 更新时间
*/
private Integer revision;
private Date updatedTime;
/**
* 创建人
* 管辖区域
*/
private String createdBy;
private String manageDistrict;
/**
* 创建时间
* 当前网格总人数
*/
private Date createdTime;
private Integer totalUser;
/**
* 更新人
* 所属组织机构IDcustomer_organization.id
*/
private String updatedBy;
private String pid;
/**
* 更新时间
* 所有上级组织ID
*/
private Date updatedTime;
private String pids;
}

17
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffOrganizationDTO.java → epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffAgencyDTO.java

@ -23,13 +23,13 @@ import lombok.Data;
/**
* 客户人员组织表
* 人员-机关单位关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Data
public class CustomerStaffOrganizationDTO implements Serializable {
public class CustomerStaffAgencyDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ -46,17 +46,12 @@ public class CustomerStaffOrganizationDTO implements Serializable {
/**
* 用户ID
*/
private String staffId;
private String userId;
/**
* 组织ID
* 组织机构ID customer_agency.id
*/
private String orgId;
/**
* 级别
*/
private Integer level;
private String agencyId;
/**
* 删除标识

12
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffDepartmentDTO.java

@ -23,10 +23,10 @@ import lombok.Data;
/**
* 客户人员部门表
* 部门人员关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Data
public class CustomerStaffDepartmentDTO implements Serializable {
@ -46,17 +46,17 @@ public class CustomerStaffDepartmentDTO implements Serializable {
/**
* 用户ID
*/
private String staffId;
private String userId;
/**
* 部门ID
* 部门ID customer_department.id
*/
private String departmentiD;
private String departmentId;
/**
* 删除标识
*/
private Integer delFlag;
private String delFlag;
/**
* 乐观锁

16
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffGridDTO.java

@ -23,10 +23,10 @@ import lombok.Data;
/**
* 客户人员网格表
* 网格人员关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Data
public class CustomerStaffGridDTO implements Serializable {
@ -39,19 +39,19 @@ public class CustomerStaffGridDTO implements Serializable {
private String id;
/**
* 客户ID
* 用户id, user.id
*/
private String customerId;
private String userId;
/**
* 用户ID
* 网格ID customer_grid.id
*/
private String staffId;
private String gridId;
/**
* 网格ID
* 客户ID
*/
private String gridId;
private String customerId;
/**
* 删除标识

81
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffRoleDTO.java

@ -1,81 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 客户人员角色表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
*/
@Data
public class CustomerStaffRoleDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 用户ID
*/
private String staffId;
/**
* 角色ID
*/
private String roleId;
/**
* 删除标识
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

13
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/OrgTreeNode.java

@ -0,0 +1,13 @@
package com.epmet.dto;
import lombok.Data;
import java.util.List;
@Data
public class OrgTreeNode {
private String orgId;
private String orgName;
private String orgType;
private List<OrgTreeNode> subOrgs;
}

8
epmet-module/gov-org/gov-org-server/pom.xml

@ -106,13 +106,13 @@
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://localhost:3306/epmet_gov_org?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_gov_org?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet</spring.datasource.druid.username>
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<spring.datasource.druid.username>epmet_gov_org_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>127.0.0.1</spring.redis.host>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->

42
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerRoleController.java → epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java

@ -25,9 +25,9 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.CustomerRoleDTO;
import com.epmet.excel.CustomerRoleExcel;
import com.epmet.service.CustomerRoleService;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.excel.CustomerAgencyExcel;
import com.epmet.service.CustomerAgencyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -37,43 +37,43 @@ import java.util.Map;
/**
* 客户角色表
* 机关单位信息表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@RestController
@RequestMapping("customerrole")
public class CustomerRoleController {
@RequestMapping("customeragency")
public class CustomerAgencyController {
@Autowired
private CustomerRoleService customerRoleService;
private CustomerAgencyService customerAgencyService;
@GetMapping("page")
public Result<PageData<CustomerRoleDTO>> page(@RequestParam Map<String, Object> params){
PageData<CustomerRoleDTO> page = customerRoleService.page(params);
return new Result<PageData<CustomerRoleDTO>>().ok(page);
public Result<PageData<CustomerAgencyDTO>> page(@RequestParam Map<String, Object> params){
PageData<CustomerAgencyDTO> page = customerAgencyService.page(params);
return new Result<PageData<CustomerAgencyDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<CustomerRoleDTO> get(@PathVariable("id") String id){
CustomerRoleDTO data = customerRoleService.get(id);
return new Result<CustomerRoleDTO>().ok(data);
public Result<CustomerAgencyDTO> get(@PathVariable("id") String id){
CustomerAgencyDTO data = customerAgencyService.get(id);
return new Result<CustomerAgencyDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody CustomerRoleDTO dto){
public Result save(@RequestBody CustomerAgencyDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
customerRoleService.save(dto);
customerAgencyService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody CustomerRoleDTO dto){
public Result update(@RequestBody CustomerAgencyDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
customerRoleService.update(dto);
customerAgencyService.update(dto);
return new Result();
}
@ -81,14 +81,14 @@ public class CustomerRoleController {
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
customerRoleService.delete(ids);
customerAgencyService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<CustomerRoleDTO> list = customerRoleService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, CustomerRoleExcel.class);
List<CustomerAgencyDTO> list = customerAgencyService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, CustomerAgencyExcel.class);
}
}

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerDepartmentController.java

@ -37,10 +37,10 @@ import java.util.Map;
/**
* 客户部门表
* 客户部门表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@RestController
@RequestMapping("customerdepartment")

94
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerOrganizationController.java

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

94
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerRelevantDepartmentController.java

@ -1,94 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.CustomerRelevantDepartmentDTO;
import com.epmet.excel.CustomerRelevantDepartmentExcel;
import com.epmet.service.CustomerRelevantDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 客户归口部门关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
*/
@RestController
@RequestMapping("customerrelevantdepartment")
public class CustomerRelevantDepartmentController {
@Autowired
private CustomerRelevantDepartmentService customerRelevantDepartmentService;
@GetMapping("page")
public Result<PageData<CustomerRelevantDepartmentDTO>> page(@RequestParam Map<String, Object> params){
PageData<CustomerRelevantDepartmentDTO> page = customerRelevantDepartmentService.page(params);
return new Result<PageData<CustomerRelevantDepartmentDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<CustomerRelevantDepartmentDTO> get(@PathVariable("id") String id){
CustomerRelevantDepartmentDTO data = customerRelevantDepartmentService.get(id);
return new Result<CustomerRelevantDepartmentDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody CustomerRelevantDepartmentDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
customerRelevantDepartmentService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody CustomerRelevantDepartmentDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
customerRelevantDepartmentService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
customerRelevantDepartmentService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<CustomerRelevantDepartmentDTO> list = customerRelevantDepartmentService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, CustomerRelevantDepartmentExcel.class);
}
}

42
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffRoleController.java → epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffAgencyController.java

@ -25,9 +25,9 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.CustomerStaffRoleDTO;
import com.epmet.excel.CustomerStaffRoleExcel;
import com.epmet.service.CustomerStaffRoleService;
import com.epmet.dto.CustomerStaffAgencyDTO;
import com.epmet.excel.CustomerStaffAgencyExcel;
import com.epmet.service.CustomerStaffAgencyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -37,43 +37,43 @@ import java.util.Map;
/**
* 客户人员角色表
* 人员-机关单位关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@RestController
@RequestMapping("customerstaffrole")
public class CustomerStaffRoleController {
@RequestMapping("customerstaffagency")
public class CustomerStaffAgencyController {
@Autowired
private CustomerStaffRoleService customerStaffRoleService;
private CustomerStaffAgencyService customerStaffAgencyService;
@GetMapping("page")
public Result<PageData<CustomerStaffRoleDTO>> page(@RequestParam Map<String, Object> params){
PageData<CustomerStaffRoleDTO> page = customerStaffRoleService.page(params);
return new Result<PageData<CustomerStaffRoleDTO>>().ok(page);
public Result<PageData<CustomerStaffAgencyDTO>> page(@RequestParam Map<String, Object> params){
PageData<CustomerStaffAgencyDTO> page = customerStaffAgencyService.page(params);
return new Result<PageData<CustomerStaffAgencyDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<CustomerStaffRoleDTO> get(@PathVariable("id") String id){
CustomerStaffRoleDTO data = customerStaffRoleService.get(id);
return new Result<CustomerStaffRoleDTO>().ok(data);
public Result<CustomerStaffAgencyDTO> get(@PathVariable("id") String id){
CustomerStaffAgencyDTO data = customerStaffAgencyService.get(id);
return new Result<CustomerStaffAgencyDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody CustomerStaffRoleDTO dto){
public Result save(@RequestBody CustomerStaffAgencyDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
customerStaffRoleService.save(dto);
customerStaffAgencyService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody CustomerStaffRoleDTO dto){
public Result update(@RequestBody CustomerStaffAgencyDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
customerStaffRoleService.update(dto);
customerStaffAgencyService.update(dto);
return new Result();
}
@ -81,14 +81,14 @@ public class CustomerStaffRoleController {
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
customerStaffRoleService.delete(ids);
customerStaffAgencyService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<CustomerStaffRoleDTO> list = customerStaffRoleService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, CustomerStaffRoleExcel.class);
List<CustomerStaffAgencyDTO> list = customerStaffAgencyService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, CustomerStaffAgencyExcel.class);
}
}

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffDepartmentController.java

@ -37,10 +37,10 @@ import java.util.Map;
/**
* 客户人员部门表
* 部门人员关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@RestController
@RequestMapping("customerstaffdepartment")

18
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java

@ -17,9 +17,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.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
@ -29,7 +27,6 @@ import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.excel.CustomerStaffGridExcel;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import com.epmet.service.CustomerStaffGridService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -40,10 +37,10 @@ import java.util.Map;
/**
* 客户人员网格表
* 网格人员关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@RestController
@RequestMapping("customerstaffgrid")
@ -94,15 +91,4 @@ public class CustomerStaffGridController {
ExcelUtils.exportExcelToTarget(response, null, list, CustomerStaffGridExcel.class);
}
/**
* @param
* @Author sun
* @Description 政府端-热心居民申请人工审核
**/
@PostMapping("manageaudit")
public Result manageAudit(@LoginUser TokenDto tokenDTO, @RequestBody ResiWarmheartedAuditFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO);
return customerStaffGridService.manageAudit(tokenDTO, formDTO);
}
}

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

@ -18,16 +18,16 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.CustomerStaffRoleEntity;
import com.epmet.entity.CustomerAgencyEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 客户人员角色表
* 机关单位信息表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Mapper
public interface CustomerStaffRoleDao extends BaseDao<CustomerStaffRoleEntity> {
public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
}

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

@ -22,10 +22,10 @@ import com.epmet.entity.CustomerDepartmentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 客户部门表
* 客户部门表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Mapper
public interface CustomerDepartmentDao extends BaseDao<CustomerDepartmentEntity> {

33
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerRelevantDepartmentDao.java

@ -1,33 +0,0 @@
/**
* 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.CustomerRelevantDepartmentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 客户归口部门关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
*/
@Mapper
public interface CustomerRelevantDepartmentDao extends BaseDao<CustomerRelevantDepartmentEntity> {
}

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

@ -18,16 +18,16 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.CustomerOrganizationEntity;
import com.epmet.entity.CustomerStaffAgencyEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 客户组织表
* 人员-机关单位关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Mapper
public interface CustomerOrganizationDao extends BaseDao<CustomerOrganizationEntity> {
public interface CustomerStaffAgencyDao extends BaseDao<CustomerStaffAgencyEntity> {
}

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffDepartmentDao.java

@ -22,10 +22,10 @@ import com.epmet.entity.CustomerStaffDepartmentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 客户人员部门表
* 部门人员关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Mapper
public interface CustomerStaffDepartmentDao extends BaseDao<CustomerStaffDepartmentEntity> {

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

@ -22,10 +22,10 @@ import com.epmet.entity.CustomerStaffGridEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 客户人员网格表
* 网格人员关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Mapper
public interface CustomerStaffGridDao extends BaseDao<CustomerStaffGridEntity> {

39
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerOrganizationEntity.java → epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerAgencyEntity.java

@ -26,61 +26,60 @@ import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 客户组织表
* 机关单位信息表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("customer_organization")
public class CustomerOrganizationEntity extends BaseEpmetEntity {
@TableName("customer_agency")
public class CustomerAgencyEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 上级组织ID
* 上级组织机构ID
*/
private String pid;
/**
* 所有上级组织ID
* 所有上级组织机构ID(以英文:隔开)
*/
private String pids;
/**
* 组织名称
* 所有上级名称,-连接
*/
private String organizationName;
private String allParentName;
/**
* 组织编码
* 组织名称
*/
private String organizationCode;
private String organizationName;
/**
* 级别 字典表keylevel
* 机关级别社区级community
街道:street,
区县级: district,
市级: city
省级:province 机关级别社区级community街道:street,区县级: district,市级: city省级:province
*/
private Integer level;
private String level;
/**
* 地区码 阿里云公共api
* 地区
*/
private Integer areaCode;
/**
* 排序
* 总人数
*/
private Integer sort;
private Integer totalUser;
}

21
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerDepartmentEntity.java

@ -26,10 +26,10 @@ import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 客户部门表
* 客户部门表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Data
@EqualsAndHashCode(callSuper=false)
@ -44,28 +44,23 @@ public class CustomerDepartmentEntity extends BaseEpmetEntity {
private String customerId;
/**
* 所属组织ID
* 所属组织机构IDcustomer_organization.id
*/
private String orgId;
/**
* 上级组织ID 用于查找归口部门
*/
private String orgPid;
/**
* 部门名称
*/
private String depatmentName;
private String departmentName;
/**
* 部门编码
* 部门职责
*/
private String depatmentCode;
private String departmentDuty;
/**
* 排序
* 总人数
*/
private Integer sort;
private Integer totalUser;
}

62
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerGridEntity.java

@ -18,15 +18,12 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 客户网格表
* 客户网格表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
@ -48,39 +45,38 @@ public class CustomerGridEntity extends BaseEpmetEntity {
*/
private String gridName;
/**
* 网格编码
*/
private String gridCode;
/**
* 上级组织ID
*/
private String pid;
/**
* 所有上级组织ID
*/
private String pids;
/**
* 排序
*/
private Integer sort;
/**
* 中心位置经度
*/
/**
* 中心位置经度
*/
private String longitude;
/**
* 中心位置纬度
*/
/**
* 中心位置纬度
*/
private String latitude;
/**
* 所属地区码
*/
/**
* 所属地区码所属组织地区码
*/
private String areaCode;
/**
* 管辖区域
*/
private String manageDistrict;
/**
* 当前网格总人数
*/
private Integer totalUser;
/**
* 所属组织机构IDcustomer_organization.id
*/
private String pid;
/**
* 所有上级组织ID
*/
private String pids;
}

21
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerRoleEntity.java → epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerStaffAgencyEntity.java

@ -26,15 +26,15 @@ import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 客户角色表
* 人员-机关单位关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("customer_role")
public class CustomerRoleEntity extends BaseEpmetEntity {
@TableName("customer_staff_agency")
public class CustomerStaffAgencyEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
@ -44,18 +44,13 @@ public class CustomerRoleEntity extends BaseEpmetEntity {
private String customerId;
/**
* 角色名称
* 用户ID
*/
private String roleName;
private String userId;
/**
* 角色编码
* 组织机构ID customer_agency.id
*/
private String roleCode;
/**
* 排序
*/
private Integer sort;
private String agencyId;
}

10
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerStaffDepartmentEntity.java

@ -26,10 +26,10 @@ import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 客户人员部门表
* 部门人员关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Data
@EqualsAndHashCode(callSuper=false)
@ -46,11 +46,11 @@ public class CustomerStaffDepartmentEntity extends BaseEpmetEntity {
/**
* 用户ID
*/
private String staffId;
private String userId;
/**
* 部门ID
* 部门ID customer_department.id
*/
private String departmentiD;
private String departmentId;
}

16
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerStaffGridEntity.java

@ -26,10 +26,10 @@ import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 客户人员网格表
* 网格人员关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Data
@EqualsAndHashCode(callSuper=false)
@ -39,18 +39,18 @@ public class CustomerStaffGridEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
* 用户id, user.id
*/
private String customerId;
private String userId;
/**
* 用户ID
* 网格ID customer_grid.id
*/
private String staffId;
private String gridId;
/**
* 网格ID
* 客户ID
*/
private String gridId;
private String customerId;
}

51
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerStaffRoleEntity.java

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

30
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerOrganizationExcel.java → epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerAgencyExcel.java

@ -23,13 +23,13 @@ import lombok.Data;
import java.util.Date;
/**
* 客户组织表
* 机关单位信息表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Data
public class CustomerOrganizationExcel {
public class CustomerAgencyExcel {
@Excel(name = "ID")
private String id;
@ -37,29 +37,26 @@ public class CustomerOrganizationExcel {
@Excel(name = "客户ID")
private String customerId;
@Excel(name = "上级组织ID")
@Excel(name = "上级组织机构ID")
private String pid;
@Excel(name = "所有上级组织ID")
@Excel(name = "所有上级组织机构ID(以英文:隔开)")
private String pids;
@Excel(name = "所有上级名称,以-连接")
private String allParentName;
@Excel(name = "组织名称")
private String organizationName;
@Excel(name = "组织编码")
private String organizationCode;
@Excel(name = "级别 字典表key:level")
private Integer level;
@Excel(name = "机关级别(社区级:community, 乡(镇、街道)级:street, 区县级: district, 市级: city 省级:province) 机关级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province)")
private String level;
@Excel(name = "地区码 阿里云公共api")
@Excel(name = "地区编码")
private Integer areaCode;
@Excel(name = "排序")
private Integer sort;
@Excel(name = "删除标识")
private Integer delFlag;
private String delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@ -76,5 +73,8 @@ public class CustomerOrganizationExcel {
@Excel(name = "更新时间")
private Date updatedTime;
@Excel(name = "总人数")
private Integer totalUser;
}

21
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerDepartmentExcel.java

@ -23,10 +23,10 @@ import lombok.Data;
import java.util.Date;
/**
* 客户部门表
* 客户部门表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Data
public class CustomerDepartmentExcel {
@ -37,23 +37,20 @@ public class CustomerDepartmentExcel {
@Excel(name = "客户ID")
private String customerId;
@Excel(name = "所属组织ID")
@Excel(name = "所属组织机构ID(customer_organization.id)")
private String orgId;
@Excel(name = "上级组织ID 用于查找归口部门")
private String orgPid;
@Excel(name = "部门名称")
private String depatmentName;
private String departmentName;
@Excel(name = "部门编码")
private String depatmentCode;
@Excel(name = "部门职责")
private String departmentDuty;
@Excel(name = "排序")
private Integer sort;
@Excel(name = "总人数")
private Integer totalUser;
@Excel(name = "删除标识:0.未删除 1.已删除")
private Integer delFlag;
private String delFlag;
@Excel(name = "乐观锁")
private Integer revision;

62
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerRelevantDepartmentExcel.java

@ -1,62 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 客户归口部门关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
*/
@Data
public class CustomerRelevantDepartmentExcel {
@Excel(name = "ID")
private String id;
@Excel(name = "部门ID")
private String departmentId;
@Excel(name = "归口部门ID")
private String relevantDepartmentId;
@Excel(name = "删除标识")
private Integer delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

15
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffOrganizationExcel.java → epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffAgencyExcel.java

@ -23,13 +23,13 @@ import lombok.Data;
import java.util.Date;
/**
* 客户人员组织表
* 人员-机关单位关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Data
public class CustomerStaffOrganizationExcel {
public class CustomerStaffAgencyExcel {
@Excel(name = "ID")
private String id;
@ -38,13 +38,10 @@ public class CustomerStaffOrganizationExcel {
private String customerId;
@Excel(name = "用户ID")
private String staffId;
private String userId;
@Excel(name = "组织ID")
private String orgId;
@Excel(name = "级别")
private Integer level;
@Excel(name = "组织机构ID customer_agency.id")
private String agencyId;
@Excel(name = "删除标识")
private Integer delFlag;

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffDepartmentExcel.java

@ -23,10 +23,10 @@ import lombok.Data;
import java.util.Date;
/**
* 客户人员部门表
* 部门人员关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Data
public class CustomerStaffDepartmentExcel {
@ -38,13 +38,13 @@ public class CustomerStaffDepartmentExcel {
private String customerId;
@Excel(name = "用户ID")
private String staffId;
private String userId;
@Excel(name = "部门ID")
private String departmentiD;
@Excel(name = "部门ID customer_department.id")
private String departmentId;
@Excel(name = "删除标识")
private Integer delFlag;
private String delFlag;
@Excel(name = "乐观锁")
private Integer revision;

16
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffGridExcel.java

@ -23,10 +23,10 @@ import lombok.Data;
import java.util.Date;
/**
* 客户人员网格表
* 网格人员关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Data
public class CustomerStaffGridExcel {
@ -34,15 +34,15 @@ public class CustomerStaffGridExcel {
@Excel(name = "ID")
private String id;
@Excel(name = "客户ID")
private String customerId;
@Excel(name = "用户ID")
private String staffId;
@Excel(name = "用户id, user.id")
private String userId;
@Excel(name = "网格ID")
@Excel(name = "网格ID customer_grid.id")
private String gridId;
@Excel(name = "客户ID")
private String customerId;
@Excel(name = "删除标识")
private Integer delFlag;

62
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffRoleExcel.java

@ -1,62 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 客户人员角色表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
*/
@Data
public class CustomerStaffRoleExcel {
@Excel(name = "ID")
private String id;
@Excel(name = "用户ID")
private String staffId;
@Excel(name = "角色ID")
private String roleId;
@Excel(name = "删除标识")
private Integer delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建人")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新人")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

0
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/.gitkeep

25
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/ResiPartymemberFeignClient.java

@ -1,25 +0,0 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.feign.fallback.ResiPartymemberFeignClientFallBack;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
/**
* @Description 政府端工作人员审核
* @Author sun
*/
@FeignClient(name = ServiceConstant.RESI_PARTYMEMBER_SERVER, fallback = ResiPartymemberFeignClientFallBack.class)
public interface ResiPartymemberFeignClient {
/**
* @Author sun
* @Description 政府端-热心居民申请人工审核
**/
@PostMapping(value = "resi/partymember/resiwarmheartedapply/manageaudit")
Result manageAudit(ResiWarmheartedAuditFormDTO formDTO);
}

21
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/fallback/ResiPartymemberFeignClientFallBack.java

@ -1,21 +0,0 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.feign.ResiPartymemberFeignClient;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import org.springframework.stereotype.Component;
/**
* @Description 政府端工作人员审核
* @Author sun
*/
@Component
public class ResiPartymemberFeignClientFallBack implements ResiPartymemberFeignClient {
@Override
public Result manageAudit(ResiWarmheartedAuditFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "manageAudit", formDTO);
}
}

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerOrganizationRedis.java → epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerAgencyRedis.java

@ -22,13 +22,13 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 客户组织表
* 机关单位信息表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Component
public class CustomerOrganizationRedis {
public class CustomerAgencyRedis {
@Autowired
private RedisUtils redisUtils;

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerDepartmentRedis.java

@ -22,10 +22,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 客户部门表
* 客户部门表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Component
public class CustomerDepartmentRedis {

47
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerRelevantDepartmentRedis.java

@ -1,47 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 客户归口部门关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
*/
@Component
public class CustomerRelevantDepartmentRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffRoleRedis.java → epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffAgencyRedis.java

@ -22,13 +22,13 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 客户人员角色表
* 人员-机关单位关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Component
public class CustomerStaffRoleRedis {
public class CustomerStaffAgencyRedis {
@Autowired
private RedisUtils redisUtils;

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffDepartmentRedis.java

@ -22,10 +22,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 客户人员部门表
* 部门人员关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Component
public class CustomerStaffDepartmentRedis {

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffGridRedis.java

@ -22,10 +22,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 客户人员网格表
* 网格人员关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Component
public class CustomerStaffGridRedis {

47
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffOrganizationRedis.java

@ -1,47 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 客户人员组织表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
*/
@Component
public class CustomerStaffOrganizationRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

38
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerRoleService.java → epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java

@ -19,49 +19,49 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.CustomerRoleDTO;
import com.epmet.entity.CustomerRoleEntity;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.entity.CustomerAgencyEntity;
import java.util.List;
import java.util.Map;
/**
* 客户角色表
* 机关单位信息表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
public interface CustomerRoleService extends BaseService<CustomerRoleEntity> {
public interface CustomerAgencyService extends BaseService<CustomerAgencyEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<CustomerRoleDTO>
* @return PageData<CustomerAgencyDTO>
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
PageData<CustomerRoleDTO> page(Map<String, Object> params);
PageData<CustomerAgencyDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<CustomerRoleDTO>
* @return java.util.List<CustomerAgencyDTO>
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
List<CustomerRoleDTO> list(Map<String, Object> params);
List<CustomerAgencyDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return CustomerRoleDTO
* @return CustomerAgencyDTO
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
CustomerRoleDTO get(String id);
CustomerAgencyDTO get(String id);
/**
* 默认保存
@ -69,9 +69,9 @@ public interface CustomerRoleService extends BaseService<CustomerRoleEntity> {
* @param dto
* @return void
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
void save(CustomerRoleDTO dto);
void save(CustomerAgencyDTO dto);
/**
* 默认更新
@ -79,9 +79,9 @@ public interface CustomerRoleService extends BaseService<CustomerRoleEntity> {
* @param dto
* @return void
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
void update(CustomerRoleDTO dto);
void update(CustomerAgencyDTO dto);
/**
* 批量删除
@ -89,7 +89,7 @@ public interface CustomerRoleService extends BaseService<CustomerRoleEntity> {
* @param ids
* @return void
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
void delete(String[] ids);
}

16
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerDepartmentService.java

@ -26,10 +26,10 @@ import java.util.List;
import java.util.Map;
/**
* 客户部门表
* 客户部门表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
public interface CustomerDepartmentService extends BaseService<CustomerDepartmentEntity> {
@ -39,7 +39,7 @@ public interface CustomerDepartmentService extends BaseService<CustomerDepartmen
* @param params
* @return PageData<CustomerDepartmentDTO>
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
PageData<CustomerDepartmentDTO> page(Map<String, Object> params);
@ -49,7 +49,7 @@ public interface CustomerDepartmentService extends BaseService<CustomerDepartmen
* @param params
* @return java.util.List<CustomerDepartmentDTO>
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
List<CustomerDepartmentDTO> list(Map<String, Object> params);
@ -59,7 +59,7 @@ public interface CustomerDepartmentService extends BaseService<CustomerDepartmen
* @param id
* @return CustomerDepartmentDTO
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
CustomerDepartmentDTO get(String id);
@ -69,7 +69,7 @@ public interface CustomerDepartmentService extends BaseService<CustomerDepartmen
* @param dto
* @return void
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
void save(CustomerDepartmentDTO dto);
@ -79,7 +79,7 @@ public interface CustomerDepartmentService extends BaseService<CustomerDepartmen
* @param dto
* @return void
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
void update(CustomerDepartmentDTO dto);
@ -89,7 +89,7 @@ public interface CustomerDepartmentService extends BaseService<CustomerDepartmen
* @param ids
* @return void
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
void delete(String[] ids);
}

38
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerOrganizationService.java → epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffAgencyService.java

@ -19,49 +19,49 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.CustomerOrganizationDTO;
import com.epmet.entity.CustomerOrganizationEntity;
import com.epmet.dto.CustomerStaffAgencyDTO;
import com.epmet.entity.CustomerStaffAgencyEntity;
import java.util.List;
import java.util.Map;
/**
* 客户组织表
* 人员-机关单位关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
public interface CustomerOrganizationService extends BaseService<CustomerOrganizationEntity> {
public interface CustomerStaffAgencyService extends BaseService<CustomerStaffAgencyEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<CustomerOrganizationDTO>
* @return PageData<CustomerStaffAgencyDTO>
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
PageData<CustomerOrganizationDTO> page(Map<String, Object> params);
PageData<CustomerStaffAgencyDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<CustomerOrganizationDTO>
* @return java.util.List<CustomerStaffAgencyDTO>
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
List<CustomerOrganizationDTO> list(Map<String, Object> params);
List<CustomerStaffAgencyDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return CustomerOrganizationDTO
* @return CustomerStaffAgencyDTO
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
CustomerOrganizationDTO get(String id);
CustomerStaffAgencyDTO get(String id);
/**
* 默认保存
@ -69,9 +69,9 @@ public interface CustomerOrganizationService extends BaseService<CustomerOrganiz
* @param dto
* @return void
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
void save(CustomerOrganizationDTO dto);
void save(CustomerStaffAgencyDTO dto);
/**
* 默认更新
@ -79,9 +79,9 @@ public interface CustomerOrganizationService extends BaseService<CustomerOrganiz
* @param dto
* @return void
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
void update(CustomerOrganizationDTO dto);
void update(CustomerStaffAgencyDTO dto);
/**
* 批量删除
@ -89,7 +89,7 @@ public interface CustomerOrganizationService extends BaseService<CustomerOrganiz
* @param ids
* @return void
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
void delete(String[] ids);
}

16
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffDepartmentService.java

@ -26,10 +26,10 @@ import java.util.List;
import java.util.Map;
/**
* 客户人员部门表
* 部门人员关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
public interface CustomerStaffDepartmentService extends BaseService<CustomerStaffDepartmentEntity> {
@ -39,7 +39,7 @@ public interface CustomerStaffDepartmentService extends BaseService<CustomerStaf
* @param params
* @return PageData<CustomerStaffDepartmentDTO>
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
PageData<CustomerStaffDepartmentDTO> page(Map<String, Object> params);
@ -49,7 +49,7 @@ public interface CustomerStaffDepartmentService extends BaseService<CustomerStaf
* @param params
* @return java.util.List<CustomerStaffDepartmentDTO>
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
List<CustomerStaffDepartmentDTO> list(Map<String, Object> params);
@ -59,7 +59,7 @@ public interface CustomerStaffDepartmentService extends BaseService<CustomerStaf
* @param id
* @return CustomerStaffDepartmentDTO
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
CustomerStaffDepartmentDTO get(String id);
@ -69,7 +69,7 @@ public interface CustomerStaffDepartmentService extends BaseService<CustomerStaf
* @param dto
* @return void
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
void save(CustomerStaffDepartmentDTO dto);
@ -79,7 +79,7 @@ public interface CustomerStaffDepartmentService extends BaseService<CustomerStaf
* @param dto
* @return void
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
void update(CustomerStaffDepartmentDTO dto);
@ -89,7 +89,7 @@ public interface CustomerStaffDepartmentService extends BaseService<CustomerStaf
* @param ids
* @return void
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
void delete(String[] ids);
}

29
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java

@ -19,20 +19,17 @@ 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.commons.tools.utils.Result;
import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.entity.CustomerStaffGridEntity;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import java.util.List;
import java.util.Map;
/**
* 客户人员网格表
* 网格人员关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
public interface CustomerStaffGridService extends BaseService<CustomerStaffGridEntity> {
@ -42,7 +39,7 @@ public interface CustomerStaffGridService extends BaseService<CustomerStaffGridE
* @param params
* @return PageData<CustomerStaffGridDTO>
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
PageData<CustomerStaffGridDTO> page(Map<String, Object> params);
@ -52,7 +49,7 @@ public interface CustomerStaffGridService extends BaseService<CustomerStaffGridE
* @param params
* @return java.util.List<CustomerStaffGridDTO>
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
List<CustomerStaffGridDTO> list(Map<String, Object> params);
@ -62,7 +59,7 @@ public interface CustomerStaffGridService extends BaseService<CustomerStaffGridE
* @param id
* @return CustomerStaffGridDTO
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
CustomerStaffGridDTO get(String id);
@ -72,7 +69,7 @@ public interface CustomerStaffGridService extends BaseService<CustomerStaffGridE
* @param dto
* @return void
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
void save(CustomerStaffGridDTO dto);
@ -82,7 +79,7 @@ public interface CustomerStaffGridService extends BaseService<CustomerStaffGridE
* @param dto
* @return void
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
void update(CustomerStaffGridDTO dto);
@ -92,17 +89,7 @@ public interface CustomerStaffGridService extends BaseService<CustomerStaffGridE
* @param ids
* @return void
* @author generator
* @date 2020-03-16
* @date 2020-04-20
*/
void delete(String[] ids);
/**
* 政府端-热心居民申请人工审核
*
* @param
* @return void
* @author sun
*/
Result manageAudit(TokenDto tokenDTO, ResiWarmheartedAuditFormDTO formDTO);
}

95
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffOrganizationService.java

@ -1,95 +0,0 @@
/**
* 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.CustomerStaffOrganizationDTO;
import com.epmet.entity.CustomerStaffOrganizationEntity;
import java.util.List;
import java.util.Map;
/**
* 客户人员组织表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
*/
public interface CustomerStaffOrganizationService extends BaseService<CustomerStaffOrganizationEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<CustomerStaffOrganizationDTO>
* @author generator
* @date 2020-03-16
*/
PageData<CustomerStaffOrganizationDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<CustomerStaffOrganizationDTO>
* @author generator
* @date 2020-03-16
*/
List<CustomerStaffOrganizationDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return CustomerStaffOrganizationDTO
* @author generator
* @date 2020-03-16
*/
CustomerStaffOrganizationDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-03-16
*/
void save(CustomerStaffOrganizationDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-03-16
*/
void update(CustomerStaffOrganizationDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-03-16
*/
void delete(String[] ids);
}

48
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerRoleServiceImpl.java → epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

@ -23,11 +23,11 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.CustomerRoleDao;
import com.epmet.dto.CustomerRoleDTO;
import com.epmet.entity.CustomerRoleEntity;
import com.epmet.redis.CustomerRoleRedis;
import com.epmet.service.CustomerRoleService;
import com.epmet.dao.CustomerAgencyDao;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.entity.CustomerAgencyEntity;
import com.epmet.redis.CustomerAgencyRedis;
import com.epmet.service.CustomerAgencyService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -38,59 +38,59 @@ import java.util.List;
import java.util.Map;
/**
* 客户角色表
* 机关单位信息表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Service
public class CustomerRoleServiceImpl extends BaseServiceImpl<CustomerRoleDao, CustomerRoleEntity> implements CustomerRoleService {
public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao, CustomerAgencyEntity> implements CustomerAgencyService {
@Autowired
private CustomerRoleRedis customerRoleRedis;
private CustomerAgencyRedis customerAgencyRedis;
@Override
public PageData<CustomerRoleDTO> page(Map<String, Object> params) {
IPage<CustomerRoleEntity> page = baseDao.selectPage(
public PageData<CustomerAgencyDTO> page(Map<String, Object> params) {
IPage<CustomerAgencyEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, CustomerRoleDTO.class);
return getPageData(page, CustomerAgencyDTO.class);
}
@Override
public List<CustomerRoleDTO> list(Map<String, Object> params) {
List<CustomerRoleEntity> entityList = baseDao.selectList(getWrapper(params));
public List<CustomerAgencyDTO> list(Map<String, Object> params) {
List<CustomerAgencyEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, CustomerRoleDTO.class);
return ConvertUtils.sourceToTarget(entityList, CustomerAgencyDTO.class);
}
private QueryWrapper<CustomerRoleEntity> getWrapper(Map<String, Object> params){
private QueryWrapper<CustomerAgencyEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<CustomerRoleEntity> wrapper = new QueryWrapper<>();
QueryWrapper<CustomerAgencyEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public CustomerRoleDTO get(String id) {
CustomerRoleEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, CustomerRoleDTO.class);
public CustomerAgencyDTO get(String id) {
CustomerAgencyEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, CustomerAgencyDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(CustomerRoleDTO dto) {
CustomerRoleEntity entity = ConvertUtils.sourceToTarget(dto, CustomerRoleEntity.class);
public void save(CustomerAgencyDTO dto) {
CustomerAgencyEntity entity = ConvertUtils.sourceToTarget(dto, CustomerAgencyEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(CustomerRoleDTO dto) {
CustomerRoleEntity entity = ConvertUtils.sourceToTarget(dto, CustomerRoleEntity.class);
public void update(CustomerAgencyDTO dto) {
CustomerAgencyEntity entity = ConvertUtils.sourceToTarget(dto, CustomerAgencyEntity.class);
updateById(entity);
}

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

@ -38,10 +38,10 @@ import java.util.List;
import java.util.Map;
/**
* 客户部门表
* 客户部门表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Service
public class CustomerDepartmentServiceImpl extends BaseServiceImpl<CustomerDepartmentDao, CustomerDepartmentEntity> implements CustomerDepartmentService {

104
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerOrganizationServiceImpl.java

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

104
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerRelevantDepartmentServiceImpl.java

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

48
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffRoleServiceImpl.java → epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java

@ -23,11 +23,11 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.CustomerStaffRoleDao;
import com.epmet.dto.CustomerStaffRoleDTO;
import com.epmet.entity.CustomerStaffRoleEntity;
import com.epmet.redis.CustomerStaffRoleRedis;
import com.epmet.service.CustomerStaffRoleService;
import com.epmet.dao.CustomerStaffAgencyDao;
import com.epmet.dto.CustomerStaffAgencyDTO;
import com.epmet.entity.CustomerStaffAgencyEntity;
import com.epmet.redis.CustomerStaffAgencyRedis;
import com.epmet.service.CustomerStaffAgencyService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -38,59 +38,59 @@ import java.util.List;
import java.util.Map;
/**
* 客户人员角色表
* 人员-机关单位关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Service
public class CustomerStaffRoleServiceImpl extends BaseServiceImpl<CustomerStaffRoleDao, CustomerStaffRoleEntity> implements CustomerStaffRoleService {
public class CustomerStaffAgencyServiceImpl extends BaseServiceImpl<CustomerStaffAgencyDao, CustomerStaffAgencyEntity> implements CustomerStaffAgencyService {
@Autowired
private CustomerStaffRoleRedis customerStaffRoleRedis;
private CustomerStaffAgencyRedis customerStaffAgencyRedis;
@Override
public PageData<CustomerStaffRoleDTO> page(Map<String, Object> params) {
IPage<CustomerStaffRoleEntity> page = baseDao.selectPage(
public PageData<CustomerStaffAgencyDTO> page(Map<String, Object> params) {
IPage<CustomerStaffAgencyEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, CustomerStaffRoleDTO.class);
return getPageData(page, CustomerStaffAgencyDTO.class);
}
@Override
public List<CustomerStaffRoleDTO> list(Map<String, Object> params) {
List<CustomerStaffRoleEntity> entityList = baseDao.selectList(getWrapper(params));
public List<CustomerStaffAgencyDTO> list(Map<String, Object> params) {
List<CustomerStaffAgencyEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, CustomerStaffRoleDTO.class);
return ConvertUtils.sourceToTarget(entityList, CustomerStaffAgencyDTO.class);
}
private QueryWrapper<CustomerStaffRoleEntity> getWrapper(Map<String, Object> params){
private QueryWrapper<CustomerStaffAgencyEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<CustomerStaffRoleEntity> wrapper = new QueryWrapper<>();
QueryWrapper<CustomerStaffAgencyEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public CustomerStaffRoleDTO get(String id) {
CustomerStaffRoleEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, CustomerStaffRoleDTO.class);
public CustomerStaffAgencyDTO get(String id) {
CustomerStaffAgencyEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, CustomerStaffAgencyDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(CustomerStaffRoleDTO dto) {
CustomerStaffRoleEntity entity = ConvertUtils.sourceToTarget(dto, CustomerStaffRoleEntity.class);
public void save(CustomerStaffAgencyDTO dto) {
CustomerStaffAgencyEntity entity = ConvertUtils.sourceToTarget(dto, CustomerStaffAgencyEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(CustomerStaffRoleDTO dto) {
CustomerStaffRoleEntity entity = ConvertUtils.sourceToTarget(dto, CustomerStaffRoleEntity.class);
public void update(CustomerStaffAgencyDTO dto) {
CustomerStaffAgencyEntity entity = ConvertUtils.sourceToTarget(dto, CustomerStaffAgencyEntity.class);
updateById(entity);
}

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

@ -38,10 +38,10 @@ import java.util.List;
import java.util.Map;
/**
* 客户人员部门表
* 部门人员关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Service
public class CustomerStaffDepartmentServiceImpl extends BaseServiceImpl<CustomerStaffDepartmentDao, CustomerStaffDepartmentEntity> implements CustomerStaffDepartmentService {

40
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java

@ -20,25 +20,15 @@ package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.CustomerStaffGridDao;
import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.entity.CustomerStaffGridEntity;
import com.epmet.feign.ResiPartymemberFeignClient;
import com.epmet.redis.CustomerStaffGridRedis;
import com.epmet.resi.partymember.dto.warmhearted.form.ResiWarmheartedAuditFormDTO;
import com.epmet.service.CustomerStaffGridService;
import com.epmet.util.ModuleConstant;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -48,18 +38,16 @@ import java.util.List;
import java.util.Map;
/**
* 客户人员网格表
* 网格人员关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
* @since v1.0.0 2020-04-20
*/
@Service
public class CustomerStaffGridServiceImpl extends BaseServiceImpl<CustomerStaffGridDao, CustomerStaffGridEntity> implements CustomerStaffGridService {
private static final Logger logger = LoggerFactory.getLogger(CustomerStaffGridServiceImpl.class);
@Autowired
private CustomerStaffGridRedis customerStaffGridRedis;
@Autowired
private ResiPartymemberFeignClient resiPartymemberFeignClient;
@Override
public PageData<CustomerStaffGridDTO> page(Map<String, Object> params) {
@ -77,8 +65,8 @@ public class CustomerStaffGridServiceImpl extends BaseServiceImpl<CustomerStaffG
return ConvertUtils.sourceToTarget(entityList, CustomerStaffGridDTO.class);
}
private QueryWrapper<CustomerStaffGridEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
private QueryWrapper<CustomerStaffGridEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<CustomerStaffGridEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
@ -113,20 +101,4 @@ public class CustomerStaffGridServiceImpl extends BaseServiceImpl<CustomerStaffG
baseDao.deleteBatchIds(Arrays.asList(ids));
}
/**
* @param
* @Author sun
* @Description 政府端-热心居民申请人工审核
**/
@Override
public Result manageAudit(TokenDto tokenDTO, ResiWarmheartedAuditFormDTO formDTO) {
if (null == tokenDTO || StringUtils.isBlank(tokenDTO.getUserId())) {
logger.error(ModuleConstant.USER_NOT_NULL);
throw new RenException(ModuleConstant.USER_NOT_NULL);
}
formDTO.setUserId(tokenDTO.getUserId());
return resiPartymemberFeignClient.manageAudit(formDTO);
}
}

104
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffOrganizationServiceImpl.java

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

108
epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/epmet_gov_org.sql

@ -0,0 +1,108 @@
DROP TABLE IF EXISTS `customer_department`;
CREATE TABLE `customer_department` (
`ID` varchar(64) NOT NULL COMMENT 'ID 唯一标识',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`ORG_ID` varchar(64) NOT NULL COMMENT '所属组织机构ID(customer_organization.id)',
`DEPARTMENT_NAME` varchar(128) NOT NULL COMMENT '部门名称',
`DEPARTMENT_DUTY` varchar(255) NOT NULL COMMENT '部门职责',
`TOTAL_USER` int(11) NOT NULL COMMENT '总人数',
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除',
`REVISION` int(10) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='客户部门表 ';
-- -----------------------------------------------------------------------
-- -----------------------------------------------------------------------
DROP TABLE IF EXISTS `customer_organization`;
CREATE TABLE `customer_organization` (
`ID` varchar(64) NOT NULL COMMENT 'ID',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`PID` varchar(64) NOT NULL COMMENT '上级组织机构ID',
`PIDS` varchar(1024) NOT NULL COMMENT '所有上级组织机构ID(以英文:隔开)',
`ALL_PARENT_NAME` varchar(1024) DEFAULT NULL COMMENT '所有上级名称,以-连接',
`ORGANIZATION_NAME` varchar(64) NOT NULL COMMENT '组织名称',
`LEVEL` int(10) NOT NULL COMMENT '机关级别(社区级:community,\r\n乡(镇、街道)级:street,\r\n区县级: district,\r\n市级: city\r\n省级:province) 机关级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province)',
`AREA_CODE` int(10) NOT NULL COMMENT '地区编码',
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识',
`REVISION` int(10) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
`TOTAL_USER` int(11) DEFAULT NULL COMMENT '总人数',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='组织机构表 ';
-- -----------------------------------------------------------------------
-- -----------------------------------------------------------------------
DROP TABLE IF EXISTS `customer_staff_department`;
CREATE TABLE `customer_staff_department` (
`ID` varchar(64) NOT NULL COMMENT 'ID',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`USER_ID` varchar(64) NOT NULL COMMENT '用户ID',
`DEPARTMENT_ID` varchar(64) NOT NULL COMMENT '部门ID customer_department.id',
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识',
`REVISION` int(10) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='部门人员关系表 ';
-- -----------------------------------------------------------------------
-- -----------------------------------------------------------------------
DROP TABLE IF EXISTS `customer_staff_grid`;
CREATE TABLE `customer_staff_grid` (
`ID` varchar(64) NOT NULL COMMENT 'ID',
`USER_ID` varchar(64) NOT NULL COMMENT '用户id, user.id',
`GRID_ID` varchar(64) NOT NULL COMMENT '网格ID customer_grid.id',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`DEL_FLAG` int(10) NOT NULL COMMENT '删除标识',
`REVISION` int(10) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='网格人员关系表 ';
-- -----------------------------------------------------------------------
-- -----------------------------------------------------------------------
DROP TABLE IF EXISTS `customer_staff_organization`;
CREATE TABLE `customer_staff_organization` (
`ID` varchar(64) NOT NULL COMMENT 'ID',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`USER_ID` varchar(64) NOT NULL COMMENT '用户ID',
`ORG_ID` varchar(64) NOT NULL COMMENT '组织机构ID customer_organization.id',
`DEL_FLAG` int(10) NOT NULL COMMENT '删除标识',
`REVISION` int(10) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='组织人员关系表 ';
-- -----------------------------------------------------------------------
-- -----------------------------------------------------------------------
drop table IF EXISTS customer_relevant_department;
drop table IF EXISTS customer_role;
drop table IF EXISTS customer_staff_role;
drop table IF EXISTS pdman_db_version;
-- -----------------------------------------------------------------------
-- -----------------------------------------------------------------------
alter table customer_grid MODIFY column PID VARCHAR(64) NOT NULL COMMENT '所属组织机构ID(customer_organization.id)';
alter table customer_grid MODIFY column PIDS VARCHAR(1024) NOT NULL COMMENT '所有上级组织ID';
ALTER TABLE customer_grid MODIFY COLUMN CUSTOMER_ID VARCHAR(64) NOT NULL COMMENT '客户ID';
ALTER TABLE customer_grid MODIFY COLUMN LONGITUDE VARCHAR(32) DEFAULT NULL COMMENT '中心位置经度';
ALTER TABLE customer_grid MODIFY COLUMN LATITUDE VARCHAR(32) DEFAULT NULL COMMENT '中心位置纬度';
ALTER TABLE customer_grid MODIFY COLUMN AREA_CODE VARCHAR(32) DEFAULT NULL COMMENT '所属地区码(所属组织地区码)';
alter table customer_grid drop column GRID_CODE;
alter table customer_grid drop column SORT;
alter table customer_grid add column ORG_ID varchar(64) NOT NULL COMMENT '所属组织机构ID(customer_organization.id)';
alter table customer_grid add column MANAGE_DISTRICT varchar(255) DEFAULT "" NOT NULL COMMENT '管辖区域';
alter table customer_grid add column TOTAL_USER INT(11) DEFAULT 0 NOT NULL COMMENT '当前网格总人数';

10
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerOrganizationDao.xml → epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -1,24 +1,24 @@
<?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.CustomerOrganizationDao">
<mapper namespace="com.epmet.dao.CustomerAgencyDao">
<resultMap type="com.epmet.entity.CustomerOrganizationEntity" id="customerOrganizationMap">
<result property="id" column="id"/>
<resultMap type="com.epmet.entity.CustomerAgencyEntity" id="customerAgencyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="pid" column="PID"/>
<result property="pids" column="PIDS"/>
<result property="allParentName" column="ALL_PARENT_NAME"/>
<result property="organizationName" column="ORGANIZATION_NAME"/>
<result property="organizationCode" column="ORGANIZATION_CODE"/>
<result property="level" column="LEVEL"/>
<result property="areaCode" column="AREA_CODE"/>
<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"/>
<result property="totalUser" column="TOTAL_USER"/>
</resultMap>

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

@ -7,10 +7,9 @@
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="orgId" column="ORG_ID"/>
<result property="orgPid" column="ORG_PID"/>
<result property="depatmentName" column="DEPATMENT_NAME"/>
<result property="depatmentCode" column="DEPATMENT_CODE"/>
<result property="sort" column="SORT"/>
<result property="departmentName" column="DEPARTMENT_NAME"/>
<result property="departmentDuty" column="DEPARTMENT_DUTY"/>
<result property="totalUser" column="TOTAL_USER"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>

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

@ -2,37 +2,14 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.CustomerGridDao">
<resultMap type="com.epmet.entity.CustomerGridEntity" id="customerGridMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="gridName" column="GRID_NAME"/>
<result property="gridCode" column="GRID_CODE"/>
<result property="pid" column="PID"/>
<result property="pids" column="PIDS"/>
<result property="sort" column="SORT"/>
<result property="longitude" column="LONGITUDE"/>
<result property="latitude" column="LATITUDE"/>
<result property="areaCode" column="AREA_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="getCustomerGridByGridId" parameterType="com.epmet.dto.form.CustomerGridFormDTO"
resultType="com.epmet.dto.CustomerGridDTO">
SELECT
gr.id,
gr.customer_id,
gr.grid_name,
gr.grid_code,
gr.pid,
gr.pids,
gr.sort,
gr.longitude,
gr.latitude,
gr.area_code

19
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerRelevantDepartmentDao.xml

@ -1,19 +0,0 @@
<?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.CustomerRelevantDepartmentDao">
<resultMap type="com.epmet.entity.CustomerRelevantDepartmentEntity" id="customerRelevantDepartmentMap">
<result property="id" column="ID"/>
<result property="departmentId" column="DEPARTMENT_ID"/>
<result property="relevantDepartmentId" column="RELEVANT_DEPARTMENT_ID"/>
<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>

9
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerRoleDao.xml → epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml

@ -1,14 +1,13 @@
<?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.CustomerRoleDao">
<mapper namespace="com.epmet.dao.CustomerStaffAgencyDao">
<resultMap type="com.epmet.entity.CustomerRoleEntity" id="customerRoleMap">
<resultMap type="com.epmet.entity.CustomerStaffAgencyEntity" id="customerStaffAgencyMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="roleName" column="ROLE_NAME"/>
<result property="roleCode" column="ROLE_CODE"/>
<result property="sort" column="SORT"/>
<result property="userId" column="USER_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>

4
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffDepartmentDao.xml

@ -6,8 +6,8 @@
<resultMap type="com.epmet.entity.CustomerStaffDepartmentEntity" id="customerStaffDepartmentMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="staffId" column="STAFF_ID"/>
<result property="departmentiD" column="DEPARTMENTI_D"/>
<result property="userId" column="USER_ID"/>
<result property="departmentId" column="DEPARTMENT_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>

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

@ -5,9 +5,9 @@
<resultMap type="com.epmet.entity.CustomerStaffGridEntity" id="customerStaffGridMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="staffId" column="STAFF_ID"/>
<result property="userId" column="USER_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>

21
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffOrganizationDao.xml

@ -1,21 +0,0 @@
<?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.CustomerStaffOrganizationDao">
<resultMap type="com.epmet.entity.CustomerStaffOrganizationEntity" id="customerStaffOrganizationMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="staffId" column="STAFF_ID"/>
<result property="orgId" column="ORG_ID"/>
<result property="level" column="LEVEL"/>
<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>

19
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffRoleDao.xml

@ -1,19 +0,0 @@
<?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.CustomerStaffRoleDao">
<resultMap type="com.epmet.entity.CustomerStaffRoleEntity" id="customerStaffRoleMap">
<result property="id" column="ID"/>
<result property="staffId" column="STAFF_ID"/>
<result property="roleId" column="ROLE_ID"/>
<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>

16
epmet-module/oper-access/oper-access-server/pom.xml

@ -103,15 +103,15 @@
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://localhost:3306/epmet_oper_access?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_oper_access?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet</spring.datasource.druid.username>
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>127.0.0.1</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<spring.datasource.druid.username>epmet_oper_access_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>false</nacos.register-enabled>
<nacos.server-addr>122.152.200.70:8848</nacos.server-addr>

8
epmet-module/oper-crm/oper-crm-server/pom.xml

@ -101,13 +101,13 @@
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://localhost:3306/epmet_oper_crm?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_oper_crm?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet</spring.datasource.druid.username>
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<spring.datasource.druid.username>epmet_oper_crm_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>127.0.0.1</spring.redis.host>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->

8
epmet-module/oper-customize/oper-customize-server/pom.xml

@ -95,13 +95,13 @@
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://localhost:3306/epmet_oper_customize?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_oper_customize?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet</spring.datasource.druid.username>
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password>
<spring.datasource.druid.username>epmet_oper_customize_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>127.0.0.1</spring.redis.host>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->

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

Loading…
Cancel
Save