Browse Source

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

dev_shibei_match
jianjun 6 years ago
parent
commit
8e54ef6fb0
  1. 2
      epmet-auth/deploy/docker-compose-dev.yml
  2. 44
      epmet-auth/pom.xml
  3. 30
      epmet-auth/src/main/java/com/epmet/constant/PublicUserLoginConstant.java
  4. 74
      epmet-auth/src/main/java/com/epmet/controller/PublicUserLoginController.java
  5. 38
      epmet-auth/src/main/java/com/epmet/dto/form/LoginByPhoneFormDTO.java
  6. 23
      epmet-auth/src/main/java/com/epmet/dto/form/PaWxCodeFormDTO.java
  7. 33
      epmet-auth/src/main/java/com/epmet/dto/form/PublicSendSmsCodeFormDTO.java
  8. 25
      epmet-auth/src/main/java/com/epmet/redis/CaptchaRedis.java
  9. 41
      epmet-auth/src/main/java/com/epmet/service/PublicUserLoginService.java
  10. 237
      epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java
  11. 10
      epmet-commons/epmet-common-clienttoken/src/main/java/com/epmet/common/token/constant/LoginConstant.java
  12. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java
  13. 5
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java
  14. 65
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java
  15. 2
      epmet-gateway/deploy/docker-compose-dev.yml
  16. 10
      epmet-gateway/pom.xml
  17. 11
      epmet-gateway/src/main/resources/bootstrap.yml
  18. 35
      epmet-module/epmet-third/epmet-third-client/pom.xml
  19. 86
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/AuthCodeDTO.java
  20. 91
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/AuthorizationInfoDTO.java
  21. 76
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/AuthorizerRefreshTokenDTO.java
  22. 96
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeAuditResultDTO.java
  23. 121
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeCustomerDTO.java
  24. 91
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeMediaDTO.java
  25. 76
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/ComponentAccessTokenDTO.java
  26. 81
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/ComponentVerifyTicketDTO.java
  27. 96
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CustomerCodeOperationHistoryDTO.java
  28. 91
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CustomerMpDTO.java
  29. 86
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/FuncInfoDTO.java
  30. 111
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaCustomerAgencyDTO.java
  31. 76
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaCustomerDTO.java
  32. 86
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaCustomerUserAgencyDTO.java
  33. 86
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserDTO.java
  34. 91
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserVisitedDTO.java
  35. 121
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserWechatDTO.java
  36. 76
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PreAuthTokenDTO.java
  37. 91
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/RefreshAuthorizerAccessTokenDTO.java
  38. 50
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/AuthCodeFormDTO.java
  39. 49
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/AuthorizationInfoFormDTO.java
  40. 47
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/AuthorizerAccessTokenFormDTO.java
  41. 46
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CodeUploadFormDTO.java
  42. 40
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ComponentAccessTokenFormDTO.java
  43. 51
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ComponentVerifyTicketFormDTO.java
  44. 56
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CreateAgencyFormDTO.java
  45. 41
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/FuncInfoFormDTO.java
  46. 26
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/MyInfoFormDTO.java
  47. 41
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/PreAuthTokenFormDTO.java
  48. 54
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/RegisterFormDTO.java
  49. 34
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/SaveUserVisitedFormDTO.java
  50. 44
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformEventFormDTO.java
  51. 25
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/WeChatPlatformAuthCodeFormDTO.java
  52. 25
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/AgencyLevelListResultDTO.java
  53. 44
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/AuthorizationInfoResultDTO.java
  54. 27
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CreateAgencyResultDTO.java
  55. 25
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CustomerUserResultDTO.java
  56. 53
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/MyInfoResultDTO.java
  57. 24
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/ResultBean.java
  58. 21
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/SaveUserResultDTO.java
  59. 37
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/WillOverDueResultDTO.java
  60. 52
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/EpmetThirdFeignClient.java
  61. 34
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/EpmetThirdFeignClientFallback.java
  62. 31
      epmet-module/epmet-third/epmet-third-server/.gitignore
  63. 11
      epmet-module/epmet-third/epmet-third-server/Dockerfile
  64. 17
      epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml
  65. 17
      epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml
  66. 224
      epmet-module/epmet-third/epmet-third-server/pom.xml
  67. 17
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/EpmetThirdApplication.java
  68. 40
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/aspect/RequestLogAspect.java
  69. 26
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/config/ModuleConfigImpl.java
  70. 45
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ModuleConstant.java
  71. 63
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/PaConstant.java
  72. 26
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ThirdApiConstant.java
  73. 29
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ThirdPlatformConstant.java
  74. 45
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ThirdRedisKeyConstant.java
  75. 49
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ThirdRunTimeInfoConstant.java
  76. 36
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/AuthRedirectController.java
  77. 84
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeAuditResultController.java
  78. 30
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeController.java
  79. 84
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeCustomerController.java
  80. 84
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeMediaController.java
  81. 32
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ComponentVerifyTicketController.java
  82. 84
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CustomerCodeOperationHistoryController.java
  83. 94
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CustomerMpController.java
  84. 94
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerAgencyController.java
  85. 93
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java
  86. 94
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerUserAgencyController.java
  87. 119
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserController.java
  88. 107
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserVisitedController.java
  89. 94
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserWechatController.java
  90. 66
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PublicAccountCallBackController.java
  91. 34
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/WarrantController.java
  92. 52
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/WeChatNotifyController.java
  93. 36
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthCodeDao.java
  94. 49
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthorizationInfoDao.java
  95. 33
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthorizerRefreshTokenDao.java
  96. 33
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeAuditResultDao.java
  97. 33
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeCustomerDao.java
  98. 33
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeMediaDao.java
  99. 43
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ComponentAccessTokenDao.java
  100. 36
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ComponentVerifyTicketDao.java

2
epmet-auth/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-auth-server:
container_name: epmet-auth-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-auth:0.3.36
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-auth:0.3.40
ports:
- "8081:8081"
network_mode: host # 使用现有网络

44
epmet-auth/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.36</version>
<version>0.3.40</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-cloud</artifactId>
@ -80,6 +80,12 @@
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-tools-wx-mp</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-user-client</artifactId>
@ -104,6 +110,18 @@
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-mp</artifactId>
<version>3.6.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-third-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
@ -154,10 +172,10 @@
<nacos.ip/>
<!--公众号配置-->
<wx.mp.configs.appId>wx67fdf7da3fee1890</wx.mp.configs.appId>
<wx.mp.configs.secret>ae15094f485af9e5c6b5a8a55945332a</wx.mp.configs.secret>
<wx.mp.configs.token>111</wx.mp.configs.token>
<wx.mp.configs.aesKey>111</wx.mp.configs.aesKey>
<wx.mp.configs.appId>wxcb6ce2ed0c5ae54c</wx.mp.configs.appId>
<wx.mp.configs.secret>c7f74941ee97fa9b2e1065772d34c397</wx.mp.configs.secret>
<wx.mp.configs.token>12345678Yzm</wx.mp.configs.token>
<wx.mp.configs.aesKey>jiKrJoPQsUIP9ayAwmuJQeAVPBjFOh5D1JxFDd7ZSU3</wx.mp.configs.aesKey>
<!--居民端小程序配置-->
<resi.wx.ma.appId>wx07674c23af51b521</resi.wx.ma.appId>
<resi.wx.ma.secret>a2fd0d29b007cbbcf8c8dda8c693d99b</resi.wx.ma.secret>
@ -191,10 +209,10 @@
<nacos.ip/>
<!--公众号配置-->
<wx.mp.configs.appId>wx67fdf7da3fee1890</wx.mp.configs.appId>
<wx.mp.configs.secret>ae15094f485af9e5c6b5a8a55945332a</wx.mp.configs.secret>
<wx.mp.configs.token>111</wx.mp.configs.token>
<wx.mp.configs.aesKey>111</wx.mp.configs.aesKey>
<wx.mp.configs.appId>wxcb6ce2ed0c5ae54c</wx.mp.configs.appId>
<wx.mp.configs.secret>c7f74941ee97fa9b2e1065772d34c397</wx.mp.configs.secret>
<wx.mp.configs.token>12345678Yzm</wx.mp.configs.token>
<wx.mp.configs.aesKey>jiKrJoPQsUIP9ayAwmuJQeAVPBjFOh5D1JxFDd7ZSU3</wx.mp.configs.aesKey>
<!--居民端小程序配置-->
<resi.wx.ma.appId>wx07674c23af51b521</resi.wx.ma.appId>
<resi.wx.ma.secret>a2fd0d29b007cbbcf8c8dda8c693d99b</resi.wx.ma.secret>
@ -228,10 +246,10 @@
<nacos.ip/>
<!--公众号配置-->
<wx.mp.configs.appId>wx67fdf7da3fee1890</wx.mp.configs.appId>
<wx.mp.configs.secret>ae15094f485af9e5c6b5a8a55945332a</wx.mp.configs.secret>
<wx.mp.configs.token>111</wx.mp.configs.token>
<wx.mp.configs.aesKey>111</wx.mp.configs.aesKey>
<wx.mp.configs.appId>wxcb6ce2ed0c5ae54c</wx.mp.configs.appId>
<wx.mp.configs.secret>c7f74941ee97fa9b2e1065772d34c397</wx.mp.configs.secret>
<wx.mp.configs.token>12345678Yzm</wx.mp.configs.token>
<wx.mp.configs.aesKey>jiKrJoPQsUIP9ayAwmuJQeAVPBjFOh5D1JxFDd7ZSU3</wx.mp.configs.aesKey>
<!--居民端小程序配置-->
<resi.wx.ma.appId>wx07674c23af51b521</resi.wx.ma.appId>
<resi.wx.ma.secret>a2fd0d29b007cbbcf8c8dda8c693d99b</resi.wx.ma.secret>

30
epmet-auth/src/main/java/com/epmet/constant/PublicUserLoginConstant.java

@ -0,0 +1,30 @@
package com.epmet.constant;
/**
* @author sun
* @dscription
*/
public interface PublicUserLoginConstant {
/**
* 初始化用户信息失败
*/
String SAVE_USER_EXCEPTION = "初始化用户信息失败";
/**
* 是否登陆true false
*/
String PARAMETER_EXCEPTION = "是否登陆值错误";
/**
* 登陆验证
*/
String LOGON_EXCEPTION = "该手机号未注册";
/**
* 注册验证
*/
String ZHU_CE_EXCEPTION = "该手机号已注册";
/**
* 用户登陆 新增访问记录
*/
String SAVE_VISITED_EXCEPTION = "用户登陆,新增访问记录失败";
}

74
epmet-auth/src/main/java/com/epmet/controller/PublicUserLoginController.java

@ -0,0 +1,74 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.PublicUserLoginConstant;
import com.epmet.dto.form.LoginByPhoneFormDTO;
import com.epmet.dto.form.PaWxCodeFormDTO;
import com.epmet.dto.form.PublicSendSmsCodeFormDTO;
import com.epmet.dto.result.UserTokenResultDTO;
import com.epmet.service.PublicUserLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/8 18:29
*/
@RestController
@RequestMapping("publicuser")
public class PublicUserLoginController {
@Autowired
private PublicUserLoginService publicUserLoginService;
/**
* @return com.epmet.commons.tools.utils.Result
* @param formDTO
* @author sun
* @description 解析wxcode获取用户信息并生成token
**/
@PostMapping(value = "/wxcodetotoken")
public Result<UserTokenResultDTO> wxCodeToToken(@RequestBody PaWxCodeFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, PaWxCodeFormDTO.AddUserInternalGroup.class);
return new Result<UserTokenResultDTO>().ok(publicUserLoginService.wxCodeToToken(formDTO));
}
/**
* @param formDTO 手机号
* @return com.epmet.commons.tools.utils.Result
* @Author sun
* @Description 公众号登录-发送验证码
**/
@PostMapping(value = "/sendsmscode")
public Result sendSmsCode(@RequestBody PublicSendSmsCodeFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO,PublicSendSmsCodeFormDTO.AddUserShowGroup.class);
if(formDTO.getIsLogon()!=true&&formDTO.getIsLogon()!=false){
throw new RenException(PublicUserLoginConstant.PARAMETER_EXCEPTION);
}
publicUserLoginService.sendSmsCode(formDTO);
return new Result();
}
/**
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author sun
* @Description 公众号-手机验证码登陆
**/
@PostMapping(value = "/loginbyphone")
public Result<UserTokenResultDTO> loginByPhone(@LoginUser TokenDto tokenDTO, @RequestBody LoginByPhoneFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, LoginByPhoneFormDTO.AddUserShowGroup.class, LoginByPhoneFormDTO.LoginByPhone.class);
return new Result<UserTokenResultDTO>().ok(publicUserLoginService.loginByPhone(tokenDTO, formDTO));
}
}

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

@ -0,0 +1,38 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 手机验证码登陆接口入参
* @Author sun
*/
@Data
public class LoginByPhoneFormDTO implements Serializable {
private static final long serialVersionUID = 4193133227120225342L;
/**
* 添加用户操作的用户可见异常分组
* 该分组用于校验需要返回给前端错误信息提示的列需要继承CustomerClientShowGroup
* 返回错误码为8999提示信息为DTO中具体的列的校验注解message的内容
*/
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
public interface LoginByPhone extends CustomerClientShowGroup{}
/**
* 手机号
*/
@NotBlank(message = "手机号不能为空", groups = {AddUserShowGroup.class})
private String phone;
/**
* 验证码
*/
@NotBlank(message="验证码不能为空", groups = {LoginByPhone.class})
private String smsCode;
}

23
epmet-auth/src/main/java/com/epmet/dto/form/PaWxCodeFormDTO.java

@ -0,0 +1,23 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/8 18:32
*/
@Data
public class PaWxCodeFormDTO implements Serializable {
private static final long serialVersionUID = -207861963128774742L;
public interface AddUserInternalGroup {}
/**
* wxCode
*/
@NotBlank(message = "wxCode不能为空",groups = {AddUserInternalGroup.class})
private String wxCode;
}

33
epmet-auth/src/main/java/com/epmet/dto/form/PublicSendSmsCodeFormDTO.java

@ -0,0 +1,33 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Description 公众号手机号+验证码登录接口入参
* @Author sun
*/
@Data
public class PublicSendSmsCodeFormDTO implements Serializable {
private static final long serialVersionUID = -1852541457359282018L;
/**
* 添加用户操作的用户可见异常分组
* 该分组用于校验需要返回给前端错误信息提示的列需要继承CustomerClientShowGroup
* 返回错误码为8999提示信息为DTO中具体的列的校验注解message的内容
*/
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
/**
* 手机号
*/
@NotBlank(message = "手机号不能为空", groups = {AddUserShowGroup.class})
private String phone;
/**
* 是否登陆登陆true 注册false
*/
private Boolean isLogon;
}

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

@ -11,6 +11,7 @@ package com.epmet.redis;
import com.epmet.common.token.constant.LoginConstant;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.dto.form.PublicSendSmsCodeFormDTO;
import com.epmet.dto.form.SendSmsCodeFormDTO;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -82,4 +83,28 @@ public class CaptchaRedis {
String smsCode = (String) redisUtils.get(smsCodeKey);
return smsCode;
}
/**
* @param sendSmsCodeFormDTO appclientphone
* @param smsCode 验证码
* @return void
* @Author sun
* @Description 公众号-短信验证码存入redis
**/
public void savePublicSmsCode(PublicSendSmsCodeFormDTO sendSmsCodeFormDTO, String smsCode) {
String smsCodeKey = RedisKeys.getLoginSmsCodeKey(LoginConstant.APP_PUBLIC, LoginConstant.CLIENT_MP, sendSmsCodeFormDTO.getPhone());
logger.info(String.format("短信验证码key=%s", smsCodeKey));
redisUtils.set(smsCodeKey, smsCode, MINUTE_THIRTY_EXPIRE);
}
/**
* @param phone
* @return java.lang.String
* @Author sun
* @Description 公众号-获取登录时发送的验证码
**/
public String getPublicSmsCode(String phone) {
String smsCodeKey = RedisKeys.getLoginSmsCodeKey(LoginConstant.APP_PUBLIC, LoginConstant.CLIENT_MP, phone);
String smsCode = (String) redisUtils.get(smsCodeKey);
return smsCode;
}
}

41
epmet-auth/src/main/java/com/epmet/service/PublicUserLoginService.java

@ -0,0 +1,41 @@
package com.epmet.service;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dto.form.LoginByPhoneFormDTO;
import com.epmet.dto.form.PaWxCodeFormDTO;
import com.epmet.dto.form.PublicSendSmsCodeFormDTO;
import com.epmet.dto.result.UserTokenResultDTO;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/8 18:31
*/
public interface PublicUserLoginService {
/**
* @return
* @param formDTO
* @author sun
* @description 解析wxcode获取用户信息并生成token
**/
UserTokenResultDTO wxCodeToToken(PaWxCodeFormDTO formDTO);
/**
* @param formDTO 手机号
* @return com.epmet.commons.tools.utils.Result
* @Author sun
* @Description 公众号登录-发送验证码
**/
void sendSmsCode(PublicSendSmsCodeFormDTO formDTO);
/**
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author sun
* @Description 公众号-手机验证码登陆
**/
UserTokenResultDTO loginByPhone(TokenDto tokenDTO, LoginByPhoneFormDTO formDTO);
}

237
epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java

@ -0,0 +1,237 @@
package com.epmet.service.impl;
import com.epmet.common.token.constant.LoginConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
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.constant.PublicUserLoginConstant;
import com.epmet.constant.SmsTemplateConstant;
import com.epmet.dto.PaCustomerDTO;
import com.epmet.dto.PaUserDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.CustomerUserResultDTO;
import com.epmet.dto.result.SaveUserResultDTO;
import com.epmet.dto.result.SendVerificationCodeResultDTO;
import com.epmet.dto.result.UserTokenResultDTO;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.EpmetThirdFeignClient;
import com.epmet.jwt.JwtTokenProperties;
import com.epmet.jwt.JwtTokenUtils;
import com.epmet.redis.CaptchaRedis;
import com.epmet.service.PublicUserLoginService;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.bean.result.WxMpOAuth2AccessToken;
import me.chanjar.weixin.mp.bean.result.WxMpUser;
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 java.util.HashMap;
import java.util.Map;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/8 18:31
*/
@Service
public class PublicUserLoginServiceImpl implements PublicUserLoginService {
private static final Logger logger = LoggerFactory.getLogger(PublicUserLoginServiceImpl.class);
private static final String SEND_SMS_CODE_ERROR = "发送短信验证码异常,手机号[%s],code[%s],msg[%s]";
@Autowired
private WxMpService wxMpService;
@Autowired
private EpmetThirdFeignClient epmetThirdFeignClient;
@Autowired
private JwtTokenUtils jwtTokenUtils;
@Autowired
private JwtTokenProperties jwtTokenProperties;
@Autowired
private CpUserDetailRedis cpUserDetailRedis;
@Autowired
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient;
@Autowired
private CaptchaRedis captchaRedis;
@Override
public UserTokenResultDTO wxCodeToToken(PaWxCodeFormDTO formDTO) {
//1.通过微信code获取用户基本信息
WxMpUser wxMpUser = this.getWxMpUser(formDTO.getWxCode());
//2.将获取的用户基本信息初始化到数据库
Result<SaveUserResultDTO> result = epmetThirdFeignClient.saveUser(wxMpUser);
if (!result.success()) {
throw new RenException(PublicUserLoginConstant.SAVE_USER_EXCEPTION);
}
SaveUserResultDTO resultDTO = result.getData();
//3.获取用户token
String token = this.generateGovWxmpToken(resultDTO.getUserId());
//4.保存到redis
this.saveLatestGovTokenDto(resultDTO, wxMpUser, token);
UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO();
userTokenResultDTO.setToken(token);
return userTokenResultDTO;
}
private WxMpUser getWxMpUser(String wxCode) {
WxMpUser wxMpUser = null;
try {
WxMpOAuth2AccessToken wxMpOAuth2AccessToken = wxMpService.oauth2getAccessToken(wxCode);
wxMpUser = wxMpService.oauth2getUserInfo(wxMpOAuth2AccessToken, null);
} catch (WxErrorException e) {
logger.error("->[getWxMpUser]::error[{}]", "解析微信用户信息失败", e.getMessage());
e.printStackTrace();
throw new RenException("解析微信用户信息失败" + e.getMessage());
}
if (null == wxMpUser ) {
logger.error("wxMpUser is null");
throw new RenException("解析微信用户信息失败 wxMpUser is null");
}
if(StringUtils.isBlank(wxMpUser.getUnionId())){
logger.error("wxMpUser.getUnionId() is null");
// throw new RenException("解析微信用户信息失败");
}
return wxMpUser;
}
/**
* @Description 生成token
**/
private String generateGovWxmpToken(String userId) {
Map<String, Object> map = new HashMap<>();
map.put("app", LoginConstant.APP_PUBLIC);
map.put("client", LoginConstant.CLIENT_MP);
map.put("userId", userId);
String token = jwtTokenUtils.createToken(map);
logger.info("app:" + LoginConstant.APP_PUBLIC + ";client:" + LoginConstant.CLIENT_MP + ";userId:" + userId + ";生成token[" + token + "]");
return token;
}
//保存tokenDto到redis
private void saveLatestGovTokenDto(SaveUserResultDTO resultDTO, WxMpUser wxMpUser, String token) {
TokenDto tokenDTO = new TokenDto();
int expire = jwtTokenProperties.getExpire();
tokenDTO.setOpenId(wxMpUser.getOpenId());
tokenDTO.setUnionId(wxMpUser.getUnionId());
tokenDTO.setToken(token);
//首次初始化时还没有客户
tokenDTO.setCustomerId("");
tokenDTO.setUserId(resultDTO.getUserId());
tokenDTO.setExpireTime(jwtTokenUtils.getExpiration(token).getTime());
tokenDTO.setUpdateTime(System.currentTimeMillis());
cpUserDetailRedis.set(tokenDTO, expire);
logger.info("截止时间:" + DateUtils.format(jwtTokenUtils.getExpiration(token), "yyyy-MM-dd HH:mm:ss"));
}
/**
* @param formDTO 手机号
* @return com.epmet.commons.tools.utils.Result
* @Author sun
* @Description 公众号登录-发送验证码
**/
@Override
public void sendSmsCode(PublicSendSmsCodeFormDTO 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()));
throw new RenException(EpmetErrorCode.ERROR_PHONE.getCode());
}
//2、根据手机号校验用户是否存在
Result<CustomerUserResultDTO> Result = epmetThirdFeignClient.checkPaUser(formDTO.getPhone());
if (!Result.success()) {
logger.error(String.format(SEND_SMS_CODE_ERROR, formDTO.getPhone(), Result.getCode(), Result.getMsg()));
throw new RenException(Result.getCode());
}
CustomerUserResultDTO ResultDTO = Result.getData();
//登陆
if (formDTO.getIsLogon() && null == ResultDTO.getPaUserResult()) {
throw new RenException(PublicUserLoginConstant.LOGON_EXCEPTION);
}
//注册
if (!formDTO.getIsLogon() && null != ResultDTO.getPaUserResult()) {
throw new RenException(PublicUserLoginConstant.ZHU_CE_EXCEPTION);
}
//3、发送短信验证码
SendVerificationCodeFormDTO sendVerificationCodeFormDTO = new SendVerificationCodeFormDTO();
sendVerificationCodeFormDTO.setMobile(formDTO.getPhone());
//登陆或注册对应的短息模板
sendVerificationCodeFormDTO.setAliyunTemplateCode(formDTO.getIsLogon() ? SmsTemplateConstant.LGOIN_CONFIRM : SmsTemplateConstant.USER_REGISTER);
Result<SendVerificationCodeResultDTO> smsCodeResult = epmetMessageOpenFeignClient.sendVerificationCode(sendVerificationCodeFormDTO);
if (!smsCodeResult.success()) {
logger.error(String.format(SEND_SMS_CODE_ERROR, formDTO.getPhone(), smsCodeResult.getCode(), smsCodeResult.getMsg()));
throw new RenException(smsCodeResult.getCode());
}
//4、保存短信验证码(删除现有短信验证码、将新的短信验证码存入Redis)
captchaRedis.savePublicSmsCode(formDTO, smsCodeResult.getData().getCode());
logger.info(String.format("发送短信验证码成功,手机号[%s]", formDTO.getPhone()));
}
/**
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author sun
* @Description 公众号-手机验证码登陆
**/
@Override
public UserTokenResultDTO loginByPhone(TokenDto tokenDTO, LoginByPhoneFormDTO formDTO) {
//1.根据手机号查询到用户、客户信息
Result<CustomerUserResultDTO> result = epmetThirdFeignClient.checkPaUser(formDTO.getPhone());
if (!result.success()) {
logger.error(String.format("手机验证码登录异常,手机号[%s],code[%s],msg[%s]", formDTO.getPhone(), result.getCode(), result.getMsg()));
throw new RenException(result.getCode());
}
CustomerUserResultDTO resultDTO = result.getData();
//2.用户不存在时不允许登陆
PaUserDTO userDTO = resultDTO.getPaUserResult();
if (null == userDTO || StringUtils.isBlank(userDTO.getId())) {
throw new RenException(PublicUserLoginConstant.LOGON_EXCEPTION);
}
//3.校验验证码是否正确
String rightSmsCode = captchaRedis.getPublicSmsCode(formDTO.getPhone());
if (!formDTO.getSmsCode().equals(rightSmsCode)) {
logger.error(String.format("验证码错误code[%s],msg[%s]", EpmetErrorCode.MOBILE_CODE_ERROR.getCode(), EpmetErrorCode.MOBILE_CODE_ERROR.getMsg()));
throw new RenException(EpmetErrorCode.MOBILE_CODE_ERROR.getCode());
}
//获取缓存中的token
TokenDto redisTokenDTO = cpUserDetailRedis.get(LoginConstant.APP_PUBLIC, LoginConstant.CLIENT_MP, userDTO.getId(), TokenDto.class);
if (redisTokenDTO == null) {
return null;
}
//4.判断是否存在客户信息,是否需要生成新的token
PaCustomerDTO customerDTO = resultDTO.getPaCustomerResult();
if (null != customerDTO && !StringUtils.isBlank(customerDTO.getId())) {
redisTokenDTO.setCustomerId(customerDTO.getId());
int expire = jwtTokenProperties.getExpire();
cpUserDetailRedis.set(redisTokenDTO, expire);
}
//5.登陆成功,访问记录表新增访问记录(访问记录新增失败不应影响用户登陆)
SaveUserVisitedFormDTO visited = new SaveUserVisitedFormDTO();
visited.setUserId(userDTO.getId());
visited.setLogonUserId(tokenDTO.getUserId());
visited.setPhone(formDTO.getPhone());
Result visitedResult = epmetThirdFeignClient.saveUserVisited(visited);
if(!visitedResult.success()){
logger.error(PublicUserLoginConstant.SAVE_VISITED_EXCEPTION);
}
//6.返回token
UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO();
userTokenResultDTO.setToken(redisTokenDTO.getToken());
return userTokenResultDTO;
}
}

10
epmet-commons/epmet-common-clienttoken/src/main/java/com/epmet/common/token/constant/LoginConstant.java

@ -21,6 +21,11 @@ public interface LoginConstant {
*/
String APP_OPER = "oper";
/**
* 公众号
*/
String APP_PUBLIC = "public";
/**
* web
*/
@ -30,4 +35,9 @@ public interface LoginConstant {
* 微信小程序
*/
String CLIENT_WXMP = "wxmp";
/**
* E事通服务号
*/
String CLIENT_MP = "mp";
}

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

@ -31,6 +31,7 @@ public interface NumConstant {
int THIRTY = 30;
int FORTY = 40;
int FIFTY = 50;
int SIXTY = 60;
int ONE_HUNDRED = 100;
int ONE_THOUSAND = 1000;
int MAX = 99999999;

5
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java

@ -118,4 +118,9 @@ public interface ServiceConstant {
* 数据统计
*/
String DATA_STATISTICAL_SERVER = "data-statistical-server";
/**
* 微信第三方平台
*/
String EPMET_THIRD_SERVER = "epmet-third-server";
}

65
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java

@ -8,6 +8,7 @@ import com.epmet.commons.tools.scan.param.TextScanParamDTO;
import com.epmet.commons.tools.scan.param.TextTaskDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpStatus;
import org.apache.http.NameValuePair;
@ -27,7 +28,10 @@ import org.springframework.util.CollectionUtils;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
@ -204,6 +208,67 @@ public class HttpClientManager {
return new Result<String>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
/**
* desc: 发送get请求
* param:url, params
* return: CallResult<String>
* date: 2019/2/21 9:16
*
* @author: jianjun liu
*/
public Result<Byte[]> sendGetFile(String url, Map<String, Object> params) {
try {
URIBuilder builder = new URIBuilder(url);
if (!CollectionUtils.isEmpty(params)) {
Set<String> set = params.keySet();
for (String key : set) {
builder.setParameter(key, params.get(key) == null ? "" : String.valueOf(params.get(key)));
}
}
HttpGet httpGet = new HttpGet(builder.build());
httpGet.setConfig(requestConfig);
return executeToByte(httpGet);
} catch (Exception e) {
log.error("sendGet exception", e);
return new Result<Byte[]>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
}
private Result<Byte[]> executeToByte(HttpRequestBase httpMethod) {
CloseableHttpResponse response = null;
try {
response = httpclient.execute(httpMethod);
log.debug("http send response:{}", JSON.toJSONString(response));
if (response != null && response.getStatusLine() != null) {
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
InputStream in = response.getEntity().getContent();
ByteArrayOutputStream output = new ByteArrayOutputStream();
byte[] buffer = new byte[4096];
int n = 0;
while (-1 != (n = in.read(buffer))) {
output.write(buffer, 0, n);
}
return new Result<Byte[]>().ok(ArrayUtils.toObject(output.toByteArray()));
} else {
log.warn("execute http method fail,httpStatus:{0}", response.getStatusLine().getStatusCode());
}
}
} catch (Exception e) {
log.error("execute exception", e);
return new Result<Byte[]>().error(EpmetErrorCode.SERVER_ERROR.getCode(), e.getMessage());
} finally {
httpMethod.releaseConnection();
try {
if (response != null) {
response.close();
}
} catch (IOException e) {
}
}
return new Result<Byte[]>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
public static void main(String[] args) {
String url = "http://localhost:8107/epmetscan/api/textSyncScan";
TextTaskDTO p = new TextTaskDTO();

2
epmet-gateway/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-gateway-server:
container_name: epmet-gateway-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-gateway:0.3.23
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-gateway:0.3.24
ports:
- "8080:8080"
network_mode: host # 使用现有网络

10
epmet-gateway/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.23</version>
<version>0.3.24</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-cloud</artifactId>
@ -185,6 +185,10 @@
<!-- 30、内容审核服务 -->
<gateway.routes.epmet-openapi-scan.uri>lb://epmet-openapi-scan</gateway.routes.epmet-openapi-scan.uri>
<!-- <gateway.routes.epmet-openapi-scan.uri>http://localhost:8107</gateway.routes.epmet-openapi-scan.uri>-->
<!-- 31、微信第三方平台 -->
<gateway.routes.epmet-third-server.uri>lb://epmet-third-server</gateway.routes.epmet-third-server.uri>
<!-- <gateway.routes.epmet-third-server.uri>http://localhost:8110</gateway.routes.epmet-third-server.uri>-->
</properties>
</profile>
<profile>
@ -267,6 +271,8 @@
<gateway.routes.data-statistical-server.uri>lb://data-statistical-server</gateway.routes.data-statistical-server.uri>
<!-- 30、内容审核服务 -->
<gateway.routes.epmet-openapi-scan.uri>lb://epmet-openapi-scan</gateway.routes.epmet-openapi-scan.uri>
<!-- 31、微信第三方平台 -->
<gateway.routes.epmet-third-server.uri>lb://epmet-third-server</gateway.routes.epmet-third-server.uri>
</properties>
</profile>
<profile>
@ -346,6 +352,8 @@
<gateway.routes.data-statistical-server.uri>lb://data-statistical-server</gateway.routes.data-statistical-server.uri>
<!-- 30、内容审核服务 -->
<gateway.routes.epmet-openapi-scan.uri>lb://epmet-openapi-scan</gateway.routes.epmet-openapi-scan.uri>
<!-- 31、微信第三方平台 -->
<gateway.routes.epmet-third-server.uri>lb://epmet-third-server</gateway.routes.epmet-third-server.uri>
</properties>
</profile>
</profiles>

11
epmet-gateway/src/main/resources/bootstrap.yml

@ -280,12 +280,21 @@ spring:
#内容审核服务
- id: epmet-openapi-scan
uri: @gateway.routes.epmet-openapi-scan.uri@
order: 29
order: 30
predicates:
- Path=${server.servlet.context-path}/epmetscan/**
filters:
- StripPrefix=1
- CpAuth=true
#微信第三方平台
- id: epmet-third-server
uri: @gateway.routes.epmet-third-server.uri@
order: 31
predicates:
- Path=${server.servlet.context-path}/third/**
filters:
- StripPrefix=1
- CpAuth=false
nacos:
discovery:
server-addr: @nacos.server-addr@

35
epmet-module/epmet-third/epmet-third-client/pom.xml

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>epmet-third</artifactId>
<groupId>com.epmet</groupId>
<version>2.0.0</version>
</parent>
<artifactId>epmet-third-client</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-tools</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-mp</artifactId>
<version>3.6.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
</build>
</project>

86
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/AuthCodeDTO.java

@ -0,0 +1,86 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 授权回调url反参表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-09
*/
@Data
public class AuthCodeDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 授权方APPID
*/
private String authAppid;
/**
* 授权码
*/
private String authCode;
/**
* 有效期 10min
*/
private Integer expiresIn;
/**
*
*/
private Integer delFlag;
/**
*
*/
private String createdBy;
/**
*
*/
private Date createdTime;
/**
*
*/
private String updatedBy;
/**
*
*/
private Date updatedTime;
}

91
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/AuthorizationInfoDTO.java

@ -0,0 +1,91 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 授权信息表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-09
*/
@Data
public class AuthorizationInfoDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 授权方 appid
*/
private String authorizerAppid;
/**
* 接口调用令牌在授权的公众号/小程序具备 API 权限时才有此返回值
*/
private String authorizerAccessToken;
/**
* authorizer_access_token 的有效期在授权的公众号/小程序具备API权限时才有此返回值单位
*/
private Integer expiresIn;
/**
* 刷新令牌在授权的公众号具备API权限时才有此返回值刷新令牌主要用于第三方平台获取和刷新已授权用户的 authorizer_access_token一旦丢失只能让用户重新授权才能再次拿到新的刷新令牌用户重新授权后之前的刷新令牌会失效
*/
private String authorizerRefreshToken;
/**
*
*/
private Integer delFlag;
/**
*
*/
private String createdBy;
/**
*
*/
private Date createdTime;
/**
*
*/
private String updatedBy;
/**
*
*/
private Date updatedTime;
}

76
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/AuthorizerRefreshTokenDTO.java

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

96
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeAuditResultDTO.java

@ -0,0 +1,96 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 代码审核j结果
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-09
*/
@Data
public class CodeAuditResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 代码ID
*/
private String codeId;
/**
* 审核ID
*/
private String auditId;
/**
* 审核结果 审核中:auditing审核成功audit_success审核被拒绝audit_failed已撤回:withdrawn审核延后:delay
*/
private String result;
/**
* 原因
*/
private String reason;
/**
* 乐观锁
*/
private Integer revision;
/**
* 是否删除
*/
private String delFlag;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

121
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeCustomerDTO.java

@ -0,0 +1,121 @@
/**
* 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-07-09
*/
@Data
public class CodeCustomerDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 客户名
*/
private String customerName;
/**
* 小程序接口调用令牌ID
*/
private String accessTokenId;
/**
* 模板ID
*/
private String templateId;
/**
* 小程序类型 居民端resi,工作端work
*/
private String type;
/**
* APPID
*/
private String appId;
/**
* 自定义配置
*/
private String extJson;
/**
* 代码版本号
*/
private String userVersion;
/**
* 代码描述
*/
private String userDesc;
/**
* 状态 未审核:unaudited审核中:auditing审核成功audit_success审核被拒绝audit_failed已撤回:withdrawn审核延后:delay发布成功release_success, 发布失败release_failed
*/
private String status;
/**
* 乐观锁
*/
private Integer revision;
/**
* 是否删除
*/
private String delFlag;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

91
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeMediaDTO.java

@ -0,0 +1,91 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 代码素材
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-09
*/
@Data
public class CodeMediaDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 代码ID
*/
private String codeId;
/**
* 素材ID
*/
private String mediaId;
/**
* 素材名
*/
private String mediaName;
/**
* 素材类型 图片image语音voice视频video和缩略图thumb
*/
private String mediaType;
/**
* 乐观锁
*/
private Integer revision;
/**
* 更新人
*/
private String updatedBy;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 是否删除
*/
private String delFlag;
/**
* 更新时间
*/
private Date updatedTime;
}

76
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/ComponentAccessTokenDTO.java

@ -0,0 +1,76 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 第三方平台调用凭证
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-09
*/
@Data
public class ComponentAccessTokenDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private String id;
/**
* 令牌 第三方平台接口的调用凭据
*/
private String componentAccessToken;
/**
* 令牌有效期 单位s 最长 60*60*2
*/
private Integer expiresIn;
/**
* 删除状态 0正常 1删除
*/
private Integer delFlag;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

81
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/ComponentVerifyTicketDTO.java

@ -0,0 +1,81 @@
/**
* 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;
/**
* 微信发送的ticket表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-08
*/
@Data
public class ComponentVerifyTicketDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 第三方平台ID
*/
private String appid;
/**
* component_verify_ticket
*/
private String typeInfo;
/**
* 票据内容
*/
private String componentVerifyTicket;
/**
* 删除标识 0-1-
*/
private String delFlag;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

96
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CustomerCodeOperationHistoryDTO.java

@ -0,0 +1,96 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 客户代码操作历史
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-09
*/
@Data
public class CustomerCodeOperationHistoryDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 代码ID
*/
private String codeId;
/**
* 版本
*/
private String version;
/**
* 操作类型 操作 上传upload审核audit撤回undo发布release
*/
private String operation;
/**
* 描述
*/
private String describe;
/**
* 乐观锁
*/
private Integer revision;
/**
* 是否删除
*/
private String delFlag;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

91
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CustomerMpDTO.java

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

86
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/FuncInfoDTO.java

@ -0,0 +1,86 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 授权给开发者的权限集列表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-09
*/
@Data
public class FuncInfoDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private String id;
/**
* 权限类别
*/
private String funcscopeCategory;
/**
* 权限ID
*/
private String funcscopeId;
/**
* 客户ID
*/
private String customerId;
/**
* 授权方APPID
*/
private String authorizationInfoAppid;
/**
*
*/
private Integer delFlag;
/**
*
*/
private String createdBy;
/**
*
*/
private Date createdTime;
/**
*
*/
private String updatedBy;
/**
*
*/
private Date updatedTime;
}

111
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaCustomerAgencyDTO.java

@ -0,0 +1,111 @@
/**
* 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-07-09
*/
@Data
public class PaCustomerAgencyDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id,来源于customer.id
*/
private String customerId;
/**
* 根组织名称
*/
private String agencyName;
/**
* 级别
*/
private String level;
/**
* 地区编码
*/
private String areaCode;
/**
*
*/
private String province;
/**
*
*/
private String city;
/**
*
*/
private String district;
/**
* 党支部数量
*/
private Integer partybranchnum;
/**
* 删除标识
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

76
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaCustomerDTO.java

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

86
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaCustomerUserAgencyDTO.java

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

86
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserDTO.java

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

91
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserVisitedDTO.java

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

121
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserWechatDTO.java

@ -0,0 +1,121 @@
/**
* 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-07-09
*/
@Data
public class PaUserWechatDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* user表的id
*/
private String id;
/**
* 用户Id user.id
*/
private String userId;
/**
* 注册用户的微信openId
*/
private String wxOpenId;
/**
*
*/
private String unionId;
/**
* 1男2女0未知
*/
private String gender;
/**
* 昵称
*/
private String nickname;
/**
* 头像
*/
private String headImgUrl;
/**
* 国家
*/
private String country;
/**
* 省份
*/
private String province;
/**
* 城市
*/
private String city;
/**
* 语言
*/
private String language;
/**
* 删除标识
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

76
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PreAuthTokenDTO.java

@ -0,0 +1,76 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 预授权码历史记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-09
*/
@Data
public class PreAuthTokenDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private String id;
/**
* 预授权码 第三方平台方实现授权托管的必备信息每个预授权码有效期为 10 分钟需要先获取令牌才能调用
*/
private String preAuthToken;
/**
* 预授权码有效期 单位s 最长 60*60*2
*/
private Integer expiresIn;
/**
* 删除状态 0正常 1删除
*/
private Integer delFlag;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

91
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/RefreshAuthorizerAccessTokenDTO.java

@ -0,0 +1,91 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 获取/刷新接口调用令牌记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-09
*/
@Data
public class RefreshAuthorizerAccessTokenDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* 授权方令牌
*/
private String authorizerAccessToken;
/**
* 有效期单位
*/
private Integer expiresIn;
/**
* 刷新令牌
*/
private String authorizerRefreshToken;
/**
* 授权方APPID
*/
private String authAppid;
/**
* 客户ID
*/
private String customerId;
/**
*
*/
private Integer delFlag;
/**
*
*/
private String createdBy;
/**
*
*/
private Date createdTime;
/**
*
*/
private String updatedBy;
/**
*
*/
private Date updatedTime;
}

50
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/AuthCodeFormDTO.java

@ -0,0 +1,50 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @CreateTime 2020/7/8 17:53
*/
@Data
public class AuthCodeFormDTO implements Serializable {
private static final long serialVersionUID = -6163303184086480522L;
/**
* 客户ID
*/
private String customerId;
/**
* 授权方AppId
*/
private String authAppId;
/**
* 授权码
*/
private String authCode;
/**
* 有效期 10min
*/
private Integer expiresIn;
/**
* 删除状态 0正常 1已删除
*/
private Integer delFlag = 0;
/**
* 创建者
*/
private String createdBy = "APP_USER";
/**
* 更新者
*/
private String updatedBy = "APP_USER";
}

49
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/AuthorizationInfoFormDTO.java

@ -0,0 +1,49 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @CreateTime 2020/7/9 10:30
*/
@Data
public class AuthorizationInfoFormDTO implements Serializable {
private static final long serialVersionUID = -1117036477221128930L;
/**
* 客户Id
*/
private String customerId;
/**
* 授权方 appid
*/
private String authorizerAppid;
/**
* 接口调用令牌在授权的公众号/小程序具备 API 权限时才有此返回值
*/
private String authorizerAccessToken;
/**
* authorizer_access_token 的有效期在授权的公众号/小程序具备API权限时才有此返回值单位
*/
private Integer expiresIn;
/**
* 刷新令牌在授权的公众号具备API权限时才有此返回值刷新令牌主要用于第三方平台获取和刷新已授权用户的 authorizer_access_token一旦丢失只能让用户重新授权才能再次拿到新的刷新令牌用户重新授权后之前的刷新令牌会失效
*/
private String authorizerRefreshToken;
/**
*
*/
private Integer delFlag = 0;
private String createdBy = "APP_USER";
private String updatedBy = "APP_USER";
}

47
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/AuthorizerAccessTokenFormDTO.java

@ -0,0 +1,47 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Author zxc
* @CreateTime 2020/7/9 17:29
*/
@Data
public class AuthorizerAccessTokenFormDTO implements Serializable {
private static final long serialVersionUID = 268927093061495006L;
/**
* 授权方令牌
*/
private String authorizerAccessToken;
/**
* 有效期单位
*/
private Integer expiresIn;
/**
* 刷新令牌
*/
private String authorizerRefreshToken;
/**
* 授权方APPID
*/
private String authAppid;
/**
* 客户ID
*/
private String customerId;
private Integer delFlag = 0;
private String createdBy = "APP_USER";
private String updatedBy = "APP_USER";
}

46
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CodeUploadFormDTO.java

@ -0,0 +1,46 @@
package com.epmet.dto.form;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/7/9 14:24
*/
@NoArgsConstructor
@Data
public class CodeUploadFormDTO implements Serializable {
private static final long serialVersionUID = 1295337818281424509L;
/**
* 小程序接口调用令牌ID
*/
private String accessTokenId;
/**
* 小程序类型 居民端resi 工作段work
*/
private String type;
/**
* 客户ID
*/
private String customerId;
/**
* 代码库中的代码模板 ID
*/
private String templateId;
/**
* 第三方自定义的配置
*/
private String extJson;
/**
* 代码版本号
*/
private String userVersion;
/**
* 代码描述
*/
private String userDesc;
}

40
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ComponentAccessTokenFormDTO.java

@ -0,0 +1,40 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @CreateTime 2020/7/9 8:54
*/
@Data
public class ComponentAccessTokenFormDTO implements Serializable {
private static final long serialVersionUID = -2860559047843944065L;
/**
* 令牌 第三方平台接口的调用凭据
*/
private String componentAccessToken;
/**
* 令牌有效期 单位s 最长 60*60*2
*/
private Integer expiresIn;
/**
* 删除状态 0正常 1删除
*/
private Integer delFlag = 0;
/**
* 创建人
*/
private String createdBy = "APP_USER";
/**
* 更新人
*/
private String updatedBy = "APP_USER";
}

51
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ComponentVerifyTicketFormDTO.java

@ -0,0 +1,51 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Author zxc
* @CreateTime 2020/7/7 11:12
*/
@Data
public class ComponentVerifyTicketFormDTO implements Serializable {
private static final long serialVersionUID = -6547893374373422628L;
/**
* 主键
*/
private String id;
/**
* 第三方平台ID
*/
private String appid;
/**
* component_verify_ticket
*/
private String typeInfo = "component_verify_ticket";
/**
* 票据内容
*/
private String componentVerifyTicket;
/**
* 删除标识 0-1-
*/
private String delFlag = "0";
/**
* 创建人
*/
private String createdBy = "APP_USER";
/**
* 更新人
*/
private String updatedBy = "APP_USER";
}

56
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CreateAgencyFormDTO.java

@ -0,0 +1,56 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author sun
* @Description 公众号-创建组织-接口入参
*/
@Data
public class CreateAgencyFormDTO implements Serializable {
private static final long serialVersionUID = -6547893374373422628L;
public interface AddUserInternalGroup {}
/**
* 根组织名称
*/
@NotBlank(message = "组织名称不能为空")
private String agencyName;
/**
* 级别
*/
@NotBlank(message = "组织级别不能为空")
private String level;
/**
* 地区编码
*/
@NotBlank(message = "地区编码不能为空")
private String areaCode;
/**
* 中国字
*/
private String province = "";
/**
* 中国字
*/
private String city = "";
/**
* 中国字
*/
private String district = "";
/**
* 党支部数量
*/
private Integer partyBranchNum = 0;
}

41
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/FuncInfoFormDTO.java

@ -0,0 +1,41 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @CreateTime 2020/7/9 10:43
*/
@Data
public class FuncInfoFormDTO implements Serializable {
private static final long serialVersionUID = 5468844633023377254L;
/**
* 权限类别
*/
private String funcscopeCategory;
/**
* 权限ID
*/
private String funcscopeId;
/**
* 客户ID
*/
private String customerId;
/**
* 授权方APPID
*/
private String authorizationInfoAppid;
private Integer delFlag = 0;
private String createdBy = "APP_USER";
private String updatedBy = "APP_USER";
}

26
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/MyInfoFormDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author sun
* @Description 公众号-查询我的信息-接口入参
*/
@Data
public class MyInfoFormDTO implements Serializable {
private static final long serialVersionUID = -6547893374373422628L;
public interface AddUserInternalGroup {
}
/**
* 客户Id
*/
@NotBlank(message = "客户Id不能为空", groups = {MyInfoFormDTO.AddUserInternalGroup.class})
private String customerId;
}

41
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/PreAuthTokenFormDTO.java

@ -0,0 +1,41 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @CreateTime 2020/7/9 9:15
*/
@Data
public class PreAuthTokenFormDTO implements Serializable {
private static final long serialVersionUID = 2970040842154724385L;
/**
* 预授权码 第三方平台方实现授权托管的必备信息每个预授权码有效期为 10 分钟需要先获取令牌才能调用
*/
private String preAuthToken;
/**
* 预授权码有效期 单位s 最长 60*60*2
*/
private Integer expiresIn;
/**
* 删除状态 0正常 1删除
*/
private Integer delFlag = 0;
/**
* 创建人
*/
private String createdBy = "APP_USER";
/**
* 更新人
*/
private String updatedBy = "APP_USER";
}

54
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/RegisterFormDTO.java

@ -0,0 +1,54 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author sun
* @Description 公众号-手机号注册-接口入参
*/
@Data
public class RegisterFormDTO implements Serializable {
private static final long serialVersionUID = -6547893374373422628L;
public interface AddUserInternalGroup {
}
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
/**
* 手机号
*/
@NotBlank(message = "手机号不能为空", groups = {AddUserInternalGroup.class, AddUserShowGroup.class})
private String phone;
/**
* 手机短信验证码
*/
@NotBlank(message = "验证码不能为空", groups = {AddUserShowGroup.class})
private String smsCode;
/**
* 姓氏
*/
@NotBlank(message = "姓氏不能为空", groups = {AddUserShowGroup.class})
private String surName;
/**
* 性别 1男2女0未知
*/
@NotNull(message = "用户性别不能为空", groups = {AddUserShowGroup.class})
private Integer gender;
/**
* token中userId
*/
private String userId;
}

34
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/SaveUserVisitedFormDTO.java

@ -0,0 +1,34 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author sun
* @Description 公众号-用户登陆新增访问记录-接口入参
*/
@Data
public class SaveUserVisitedFormDTO implements Serializable {
private static final long serialVersionUID = -6547893374373422628L;
public interface AddUserInternalGroup {}
/**
* 登陆手机号对应的userId
*/
private String userId;
/**
* 登陆人userId
*/
private String logonUserId;
/**
* 登陆手机号
*/
private String phone;
}

44
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/ThirdPlatformEventFormDTO.java

@ -0,0 +1,44 @@
package com.epmet.dto.form;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @CreateTime 2020/7/6 9:57
*/
@Data
public class ThirdPlatformEventFormDTO implements Serializable {
private static final long serialVersionUID = -8855993636150332559L;
public interface ThirdPlatForm extends CustomerClientShowGroup{}
/**
* 时间戳
*/
@NotBlank(message = "timeStamp不能为空",groups = {ThirdPlatForm.class})
private String timeStamp;
/**
* 随机数
*/
@NotBlank(message = "nonce不能为空",groups = {ThirdPlatForm.class})
private String nonce;
/**
* 消息体签名
*/@NotBlank(message = "msgSignature不能为空",groups = {ThirdPlatForm.class})
private String msgSignature;
/**
* 消息体
*/
@NotBlank(message = "postData不能为空",groups = {ThirdPlatForm.class})
private String postData;
}

25
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/WeChatPlatformAuthCodeFormDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @CreateTime 2020/7/7 10:28
*/
@Data
public class WeChatPlatformAuthCodeFormDTO implements Serializable {
private static final long serialVersionUID = -9047434066325122697L;
/**
* 预授权码
*/
private String authCode;
/**
* 有效期单位
*/
private Integer expiresIn;
}

25
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/AgencyLevelListResultDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author sun
* @Description 公众号-查询组织级别-接口返参
*/
@Data
public class AgencyLevelListResultDTO implements Serializable {
private static final long serialVersionUID = 3253989119352850315L;
/**
* 机关级别社区级community 街道:street, 区县级: district, 市级: city 省级:province
*/
private String levelKey;
/**
* 级别对应的名称
*/
private String levelName;
}

44
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/AuthorizationInfoResultDTO.java

@ -0,0 +1,44 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
* 权限集列表
* @Author zxc
* @CreateTime 2020/7/8 13:39
*/
@Data
public class AuthorizationInfoResultDTO implements Serializable {
private static final long serialVersionUID = 3253989119352850315L;
/**
* 授权方 appid
*/
private String authorizer_appid;
/**
* 接口调用令牌在授权的公众号/小程序具备 API 权限时才有此返回值
*/
private String authorizer_access_token;
/**
* authorizer_access_token 的有效期在授权的公众号/小程序具备API权限时才有此返回值单位
*/
private Integer expires_in;
/**
* 刷新令牌在授权的公众号具备API权限时才有此返回值刷新令牌主要用于第三方平台获取和刷新已授权用户的 authorizer_access_token
* 一旦丢失只能让用户重新授权才能再次拿到新的刷新令牌用户重新授权后之前的刷新令牌会失效
*/
private String authorizer_refresh_token;
/**
* 授权给开发者的权限集列表
*/
private List<Map> func_info;
}

27
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CreateAgencyResultDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
* @Author sun
* @Description 公众号-创建组织-接口返参
*/
@Data
public class CreateAgencyResultDTO implements Serializable {
private static final long serialVersionUID = 3253989119352850315L;
/**
* 新增客户Id
*/
private String customerId;
/**
* 包含customerId的token
*/
private String token;
}

25
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/CustomerUserResultDTO.java

@ -0,0 +1,25 @@
package com.epmet.dto.result;
import com.epmet.dto.PaCustomerDTO;
import com.epmet.dto.PaUserDTO;
import lombok.Data;
import java.io.Serializable;
/**
* @Description 根据手机号查询用户信息客户信息-接口返参
* @Author sun
*/
@Data
public class CustomerUserResultDTO implements Serializable {
private static final long serialVersionUID = 5214475907074876716L;
/**
* 用户信息
*/
private PaUserDTO paUserResult;
/**
* 用户对应的客户信息
*/
private PaCustomerDTO paCustomerResult;
}

53
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/MyInfoResultDTO.java

@ -0,0 +1,53 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author sun
* @Description 公众号-查询我的信息-接口返参
*/
@Data
public class MyInfoResultDTO implements Serializable {
private static final long serialVersionUID = 3253989119352850315L;
/**
* 客户Id
*/
private String customerId = "";
/**
* 组织名称
*/
private String agencyName = "";
/**
* 组织级别
*/
private String level = "";
/**
*
*/
private String province = "";
/**
*
*/
private String city = "";
/**
*
*/
private String district = "";
/**
* 党支部数量
*/
private Integer partyBranchNum;
/**
* 居民端授权状态(0未授权1已授权)
*/
private Integer resiAuthorization;
/**
* 政府端授权状态(0未授权1已授权)
*/
private Integer workAuthorization;
}

24
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/ResultBean.java

@ -0,0 +1,24 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @CreateTime 2020/7/6 9:08
*/
@Data
public class ResultBean implements Serializable {
private static final long serialVersionUID = -1528288965079007980L;
private Object data;
private String msg;
private String errorMsg;
private Integer code;
}

21
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/SaveUserResultDTO.java

@ -0,0 +1,21 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author sun
* @Description 授权用户信息时新增或更新用户信息-接口返参
*/
@Data
public class SaveUserResultDTO implements Serializable {
private static final long serialVersionUID = 3253989119352850315L;
/**
* 新增或已有用户的Id
*/
private String userId;
}

37
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/WillOverDueResultDTO.java

@ -0,0 +1,37 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @CreateTime 2020/7/9 17:01
*/
@Data
public class WillOverDueResultDTO implements Serializable {
private static final long serialVersionUID = -9073227815312384742L;
/**
* 授权方令牌
*/
private String authorizerAccessToken;
/**
* 刷新令牌
*/
private String authorizerRefreshToken;
/**
* 授权方AppId
*/
private String authAppId;
/**
* 客户Id
*/
private String customerId;
}

52
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/EpmetThirdFeignClient.java

@ -0,0 +1,52 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.SaveUserVisitedFormDTO;
import com.epmet.dto.result.CustomerUserResultDTO;
import com.epmet.dto.result.SaveUserResultDTO;
import com.epmet.feign.fallback.EpmetThirdFeignClientFallback;
import me.chanjar.weixin.mp.bean.result.WxMpUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* 本服务对外开放的API,其他服务通过引用此client调用该服务
*
* @Author zxc
* @CreateTime 2020/7/5 14:45
*/
@FeignClient(name = ServiceConstant.EPMET_THIRD_SERVER, fallback = EpmetThirdFeignClientFallback.class)
public interface EpmetThirdFeignClient {
/**
* @param wxMpUser
* @return
* @Author sun
* @Description 根据openId新增或更新用户信息
**/
@PostMapping(value = "third/pauser/saveuser", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
Result<SaveUserResultDTO> saveUser(@RequestBody WxMpUser wxMpUser);
/**
* @param phone
* @return
* @Author sun
* @Description 根据手机号查询公众号用户基本信息校验用户是否存在
**/
@PostMapping(value = "third/pauser/checkpauser/{phone}")
Result<CustomerUserResultDTO> checkPaUser(@PathVariable("phone") String phone);
/**
* @param visited
* @return
* @Author sun
* @Description 用户登陆新增访问记录数据
**/
@PostMapping(value = "third/pauservisited/saveuservisited")
Result saveUserVisited(@RequestBody SaveUserVisitedFormDTO visited);
}

34
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/feign/fallback/EpmetThirdFeignClientFallback.java

@ -0,0 +1,34 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.SaveUserVisitedFormDTO;
import com.epmet.dto.result.CustomerUserResultDTO;
import com.epmet.dto.result.SaveUserResultDTO;
import com.epmet.feign.EpmetThirdFeignClient;
import me.chanjar.weixin.mp.bean.result.WxMpUser;
import org.springframework.stereotype.Component;
/**
* @Author zxc
* @CreateTime 2020/7/5 14:46
*/
@Component
public class EpmetThirdFeignClientFallback implements EpmetThirdFeignClient {
@Override
public Result<SaveUserResultDTO> saveUser(WxMpUser wxMpUser) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_THIRD_SERVER, "saveUser", wxMpUser);
}
@Override
public Result<CustomerUserResultDTO> checkPaUser(String phone) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_THIRD_SERVER, "checkPaUser", phone);
}
@Override
public Result saveUserVisited(SaveUserVisitedFormDTO visited) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_THIRD_SERVER, "saveUserVisited", visited);
}
}

31
epmet-module/epmet-third/epmet-third-server/.gitignore

@ -0,0 +1,31 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
### VS Code ###
.vscode/

11
epmet-module/epmet-third/epmet-third-server/Dockerfile

@ -0,0 +1,11 @@
FROM java:8
RUN export LANG="zh_CN.UTF-8"
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' > /etc/timezone
COPY ./target/*.jar ./app.jar
EXPOSE 8110
ENTRYPOINT ["sh", "-c", "$RUN_INSTRUCT"]

17
epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml

@ -0,0 +1,17 @@
version: "3.7"
services:
epmet-third-server:
container_name: epmet-third-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.6
ports:
- "8110:8110"
network_mode: host # 使用现有网络
volumes:
- "/opt/epmet-cloud-logs/dev:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar"
deploy:
resources:
limits:
cpus: '0.1'
memory: 250M

17
epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml

@ -0,0 +1,17 @@
version: "3.7"
services:
epmet-third-server:
container_name: epmet-third-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-server:0.0.1
ports:
- "8110:8110"
network_mode: host # 使用现有网络
volumes:
- "/opt/epmet-cloud-logs/test:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar"
deploy:
resources:
limits:
cpus: '0.1'
memory: 250M

224
epmet-module/epmet-third/epmet-third-server/pom.xml

@ -0,0 +1,224 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.0.6</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-third</artifactId>
<version>2.0.0</version>
</parent>
<artifactId>epmet-third-server</artifactId>
<packaging>jar</packaging>
<properties>
<aliyun.core.version>3.2.2</aliyun.core.version>
<aliyun.dysmsapi.version>1.1.0</aliyun.dysmsapi.version>
<qcloud.qcloudsms.version>1.0.5</qcloud.qcloudsms.version>
<freemarker.version>2.3.28</freemarker.version>
</properties>
<dependencies>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-third-client</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-tools</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-mybatis</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>${aliyun.core.version}</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
<version>${aliyun.dysmsapi.version}</version>
</dependency>
<dependency>
<groupId>com.github.qcloudsms</groupId>
<artifactId>qcloudsms</artifactId>
<version>${qcloud.qcloudsms.version}</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>${freemarker.version}</version>
</dependency>
<!-- 替换Feign原生httpclient -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>10.3.0</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<!--<version>5.1.1</version>-->
</dependency>
<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>2.1.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-common</artifactId>
<version>3.6.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-common-clienttoken</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<resources>
<resource>
<filtering>true</filtering>
<directory>${basedir}/src/main/resources</directory>
</resource>
</resources>
</build>
<profiles>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<server.port>8110</server.port>
<spring.profiles.active>dev</spring.profiles.active>
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_third?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet_third_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>true</nacos.register-enabled>
<nacos.server-addr>122.152.200.70:8848</nacos.server-addr>
<nacos.discovery.namespace>fcd6fc8f-ca3a-4b01-8026-2b05cdc5976b</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
</properties>
</profile>
<profile>
<id>test</id>
<!--<activation>
<activeByDefault>true</activeByDefault>
</activation>-->
<properties>
<server.port>8110</server.port>
<spring.profiles.active>test</spring.profiles.active>
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://rm-m5ef9t617j6o5eup7.mysql.rds.aliyuncs.com:3306/epmet_third?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>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>true</nacos.register-enabled>
<nacos.server-addr>192.168.10.150:8848</nacos.server-addr>
<nacos.discovery.namespace>67e3c350-533e-4d7c-9f8f-faf1b4aa82ae</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
</properties>
</profile>
</profiles>
</project>

17
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/EpmetThirdApplication.java

@ -0,0 +1,17 @@
package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
public class EpmetThirdApplication {
public static void main(String[] args) {
SpringApplication.run(EpmetThirdApplication.class, args);
}
}

40
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/aspect/RequestLogAspect.java

@ -0,0 +1,40 @@
package com.epmet.aspect;
import com.epmet.commons.tools.aspect.BaseRequestLogAspect;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
* 日志/异常处理切面实现调用父类方法完成日志记录和异常处理
*/
@Aspect
@Component
@Order(0)
public class RequestLogAspect extends BaseRequestLogAspect {
@Override
@Around(value = "execution(* com.epmet.controller.*Controller*.*(..)) ")
public Object proceed(ProceedingJoinPoint point) throws Throwable {
return super.proceed(point, getRequest());
}
/**
* 获取Request对象
*
* @return
*/
private HttpServletRequest getRequest() {
RequestAttributes ra = RequestContextHolder.getRequestAttributes();
ServletRequestAttributes sra = (ServletRequestAttributes) ra;
return sra.getRequest();
}
}

26
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/config/ModuleConfigImpl.java

@ -0,0 +1,26 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.config;
import com.epmet.commons.tools.config.ModuleConfig;
import org.springframework.stereotype.Service;
/**
* 模块配置信息
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Service
public class ModuleConfigImpl implements ModuleConfig {
@Override
public String getName() {
return "epmetthird";
}
}

45
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ModuleConstant.java

@ -0,0 +1,45 @@
package com.epmet.constant;
/**
* @Description
* @author zxc
*/
public interface ModuleConstant {
String FUNC_INFO = "func_info";
//获得授权事件的票据 如下
String UTF8 = "UTF-8";
String MSG_SIGNATURE = "msg_signature";
String TIMESTAMP = "timestamp";
String NONCE = "nonce";
String INFO_TYPE = "InfoType";
String TICKET_UNDERLINE_KEY = "component_verify_ticket";
String TICKET_KEY = "ComponentVerifyTicket";
String UNAUTHORIZED = "unauthorized";
String NULL_CHAR = "";
String SUCCESS = "success";
// 获取 component_access_token 如下
String COMPONENT_APPID = "component_appid";
String COMPONENT_APPSECRET = "component_appsecret";
String COMPONENT_ACCESS_TOKEN = "component_access_token";
String EXPIRES_IN = "expires_in";
//获取预授权码 如下
String PRE_AUTH_CODE = "pre_auth_code";
//使用授权码获取授权信息 如下
String AUTHORIZATION_CODE = "authorization_code";
String AUTHORIZATION_INFO = "authorization_info";
//获取/刷新接口调用令牌 如下
String AUTHORIZER_APPID = "authorizer_appid";
String AUTHORIZER_REFRESH_TOKEN = "authorizer_refresh_token";
String AUTHORIZER_ACCESS_TOKEN = "authorizer_access_token";
//授权回调URL 如下
String AUTH_CODE = "auth_code";
}

63
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/PaConstant.java

@ -0,0 +1,63 @@
package com.epmet.constant;
/**
* @Description 公众号-常量
* @author sun
*/
public interface PaConstant {
/**
* 手机号注册
*/
String PHONE_EXCEPTION = "手机号已存在,不允许再次注册";
/**
* 更新用户信息失败
*/
String UPDATE_USER_EXCEPTION = "更新用户信息失败";
/**
* 根据userId查询pa_user_wechat表失败
*/
String SELECT_WECHAT_EXCEPTION = "获取用户微信信息失败";
/**
* 保存用户访问记录数据失败
*/
String SAVE_VISITED_EXCEPTION = "保存用户访问记录数据失败";
/**
* 组织级别对应的keyname
*/
String PROVINCE_KEY = "province";
String PROVINCE_NAME = "省级";
String CITY_KEY = "city";
String CITY_NAME = "区县级";
String STREET_KEY = "street";
String STREET_NAME = "乡(镇、街道)级";
String COMMUNITY_KEY = "community";
String COMMUNITY_NAME = "社区级";
/**
* 客户小程序关系表小程序所属端
*/
String RESI_CLIENT = "resi";
String WORK_CLIENT = "work";
/**
* 查询客户组织信息失败
*/
String SELECT_AGENCY_EXCEPTION = "获取客户组织信息失败";
/**
* 查询客户小程序授权信息失败
*/
String CUSTOMER_MP_EXCEPTION = "获取客户小程序授权信息失败";
/**
* 客户小程序所属端key值
*/
String CLIENT_RESI = "resi";
String CLIENT_WORK = "work";
/**
* 获取缓存中token信息失败
*/
String TOKEN_EXCEPTION = "token已过期";
}

26
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ThirdApiConstant.java

@ -0,0 +1,26 @@
package com.epmet.constant;
/**
* @Author zxc
* @CreateTime 2020/7/8 17:59
*/
public interface ThirdApiConstant {
/**
*
*/
String API_CREATE_PREAUTHCODE_URL = "https://api.weixin.qq.com/cgi-bin/component/api_create_preauthcode";
/**
* 使用授权码获取授权信息请求地址
*/
String API_QUERY_AUTH_URL = "https://api.weixin.qq.com/cgi-bin/component/api_query_auth";
/**
* 获取令牌请求地址
*/
String API_COMPONENT_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/component/api_component_token";
String API_AUTHORIZER_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/component/api_authorizer_token";
}

29
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ThirdPlatformConstant.java

@ -0,0 +1,29 @@
package com.epmet.constant;
/**
* @Author zxc
* @CreateTime 2020/7/6 9:48
*/
public interface ThirdPlatformConstant {
/**
* 第三方平台appId
*/
String PLATFORM_APP_ID = "****************";
/**
* 第三方平台 secret
*/
String PLATFORM_APP_SECRET = "****************";
/**
* 第三方平台 消息加解密Key
*/
String PLATFORM_AES_KEY = "****************";
/**
* 第三方平台 消息校验Token
*/
String PLATFORM_COMPONENT_TOKEN = "****************";
}

45
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ThirdRedisKeyConstant.java

@ -0,0 +1,45 @@
package com.epmet.constant;
/**
* @Author zxc
* @CreateTime 2020/7/8 18:16
*/
public interface ThirdRedisKeyConstant {
/**
* :
*/
String COLON = ":";
/**
* component_verify_ticket 令牌目录
*/
String TICKET_REDIS_KEY = "epmet:wechartthird:componentverifyticket";
/**
* pre_auth_code 预授权码
*/
String PRE_AUTH_CODE_REDIS_KEY = "epmet:wechartthird:preauthcode";
/**
* component_access_token
*/
String ACCESS_TOKEN_REDIS_KEY = "epmet:wechartthird:componentaccesstoken";
/**
* authorizer_refresh_token 刷新令牌获取授权信息时得到
*/
String AUTHORIZER_REFRESH_TOKEN_REDIS_KEY = "epmet:wechartthird:authorizerrefreshtoken";
/**
* auth_code 授权码
*/
String AUTH_CODE_REDIS_KEY = "epmet:wechartthird:authcode";
/**
* authorization_info 授权信息
*/
String AUTH_INFO_REDIS_KEY = "epmet:wechartthird:authinfo";
}

49
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ThirdRunTimeInfoConstant.java

@ -0,0 +1,49 @@
package com.epmet.constant;
/**
* @Author zxc
* @CreateTime 2020/7/10 9:27
*/
public interface ThirdRunTimeInfoConstant {
String AUTH_TICKET = "====================授权票据【ComponentVerifyTicket】:【%s】====================";
String ERROR_TICKET = "微信开放平台,第三方平台获取【验证票据】失败";
String END_TICKET = "==============================结束授权事件接收URL=================================";
String START_RECEIVE = "==============================开始授权事件接收URL=================================";
String URL_TICKET = "授权事件接收URL,验证票据";
String SUCCESS_TICKET = "第三方平台授权事件接收URL,验证票据成功";
String ERROR_URL_TICKET = "第三方平台授权事件接收URL,验证票据异常";
String SUCCESS_ACCESS_TOKEN = "====================结束执行定时任务获取令牌【component_access_token】====================";
String FAILURE_ACCESS_TOKEN = "微信开放平台,第三方平台获取【令牌】失败";
String ENCRYPT = "Encrypt:%s";
String MSG = "msg:%s";
String START_GET_COMPONENT_ACCESS_TOKEN = "====================开始执行定时任务获取令牌【component_access_token】====================";
String START_DELETE_COMPONENT_ACCESS_TOKEN = "====================开始逻辑删除【component_access_token】====================";
String START_GET_PRE_AUTH_CODE = "====================开始执行定时任务获取预授权码【pre_auth_code】====================";
String POST_RESULT = "====================返回post结果:%s";
String FAILURE_GET_PRE_AUTH_CODE = "微信开放平台,第三方平台获取【预授权码】失败";
String END_GET_PRE_AUTH_CODE = "====================结束获取预授权码【pre_auth_code】====================";
String START_GET_AUTH_INFO = "=====================开始获取【authorization_info】=====================";
String START_INSERT_FUNC_INFO = "================================开始插入【func_info】====================================";
String END_GET_AUTH_INFO = "=====================结束获取【authorization_info】=====================";
}

36
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/AuthRedirectController.java

@ -0,0 +1,36 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.service.ComponentVerifyTicketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @Author zxc
* @CreateTime 2020/7/10 9:04
*/
@RestController
@RequestMapping("redirectauthcode")
public class AuthRedirectController {
@Autowired
private ComponentVerifyTicketService componentVerifyTicketService;
/**
* @Description 授权回调URL
* @param
* @author zxc
*/
public Result redirectUri(HttpServletRequest request, HttpServletResponse response, @LoginUser TokenDto tokenDto, @RequestParam("authAppId")String authAppId){
componentVerifyTicketService.redirectUri(request,response,tokenDto,authAppId);
return new Result();
}
}

84
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeAuditResultController.java

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

30
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeController.java

@ -0,0 +1,30 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.CodeUploadFormDTO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author zhaoqifeng
* @dscription 代码管理
* @date 2020/7/9 11:02
*/
@RestController
@RequestMapping("code")
public class CodeController {
/**
* 代码上传
* @author zhaoqifeng
* @date 2020/7/9 14:23
* @param
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping("upload")
public Result upload(@RequestBody CodeUploadFormDTO formDTO) {
return new Result<>();
}
}

84
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeCustomerController.java

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

84
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeMediaController.java

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

32
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/ComponentVerifyTicketController.java

@ -0,0 +1,32 @@
package com.epmet.controller;
import com.epmet.service.ComponentVerifyTicketService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @Author zxc
* @CreateTime 2020/7/6 9:07
*/
@Slf4j
@RestController
@RequestMapping("verifyticket")
public class ComponentVerifyTicketController {
@Autowired
private ComponentVerifyTicketService componentVerifyTicketService;
/**
* @Description 获取验证票据3
* @author zxc
*/
@PostMapping(value = "/callback")
public String componentVerifyTicket(HttpServletRequest request, HttpServletResponse response) {
return componentVerifyTicketService.componentVerifyTicket(request,response);
}
}

84
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CustomerCodeOperationHistoryController.java

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

94
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CustomerMpController.java

@ -0,0 +1,94 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.CustomerMpDTO;
import com.epmet.excel.CustomerMpExcel;
import com.epmet.service.CustomerMpService;
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-07-09
*/
@RestController
@RequestMapping("customermp")
public class CustomerMpController {
@Autowired
private CustomerMpService customerMpService;
@GetMapping("page")
public Result<PageData<CustomerMpDTO>> page(@RequestParam Map<String, Object> params){
PageData<CustomerMpDTO> page = customerMpService.page(params);
return new Result<PageData<CustomerMpDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<CustomerMpDTO> get(@PathVariable("id") String id){
CustomerMpDTO data = customerMpService.get(id);
return new Result<CustomerMpDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody CustomerMpDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
customerMpService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody CustomerMpDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
customerMpService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
customerMpService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<CustomerMpDTO> list = customerMpService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, CustomerMpExcel.class);
}
}

94
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerAgencyController.java

@ -0,0 +1,94 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.PaCustomerAgencyDTO;
import com.epmet.excel.PaCustomerAgencyExcel;
import com.epmet.service.PaCustomerAgencyService;
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-07-09
*/
@RestController
@RequestMapping("pacustomeragency")
public class PaCustomerAgencyController {
@Autowired
private PaCustomerAgencyService paCustomerAgencyService;
@GetMapping("page")
public Result<PageData<PaCustomerAgencyDTO>> page(@RequestParam Map<String, Object> params){
PageData<PaCustomerAgencyDTO> page = paCustomerAgencyService.page(params);
return new Result<PageData<PaCustomerAgencyDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<PaCustomerAgencyDTO> get(@PathVariable("id") String id){
PaCustomerAgencyDTO data = paCustomerAgencyService.get(id);
return new Result<PaCustomerAgencyDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody PaCustomerAgencyDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
paCustomerAgencyService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody PaCustomerAgencyDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
paCustomerAgencyService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
paCustomerAgencyService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<PaCustomerAgencyDTO> list = paCustomerAgencyService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, PaCustomerAgencyExcel.class);
}
}

93
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java

@ -0,0 +1,93 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.form.CreateAgencyFormDTO;
import com.epmet.dto.form.MyInfoFormDTO;
import com.epmet.dto.form.RegisterFormDTO;
import com.epmet.dto.result.AgencyLevelListResultDTO;
import com.epmet.dto.result.CreateAgencyResultDTO;
import com.epmet.dto.result.MyInfoResultDTO;
import com.epmet.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 公众号用户的注册客户创建跟组织创建 查询我的详情等等...api写在这
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/8 17:18
*/
@RestController
@RequestMapping("pacustomer")
public class PaCustomerController {
@Autowired
private PaUserService paUserService;
@Autowired
private PaCustomerService paCustomerService;
@Autowired
private PaCustomerAgencyService paCustomerAgencyService;
@Autowired
private PaCustomerUserAgencyService paCustomerUserAgencyService;
@Autowired
private CustomerMpService customerMpService;
/**
* @param formDTO
* @return
* @Author sun
* @Description 公众号-手机号注册
**/
@PostMapping("register")
public Result register(@LoginUser TokenDto tokenDTO, @RequestBody RegisterFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, RegisterFormDTO.AddUserInternalGroup.class, RegisterFormDTO.AddUserShowGroup.class);
formDTO.setUserId(tokenDTO.getUserId());
paCustomerService.register(formDTO);
return new Result();
}
/**
* @return
* @Author sun
* @Description 公众号-查询组织级别
**/
@PostMapping("agencylevellist")
public Result<List<AgencyLevelListResultDTO>> agencyLevelList() {
return new Result<List<AgencyLevelListResultDTO>>().ok(paCustomerService.agencyLevelList());
}
/**
* @param formDTO
* @return
* @Author sun
* @Description 公众号-创建组织
**/
@PostMapping("createagency")
public Result<CreateAgencyResultDTO> createAgency(@LoginUser TokenDto tokenDTO, @RequestBody CreateAgencyFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, DefaultGroup.class);
return new Result<CreateAgencyResultDTO>().ok(paCustomerService.createAgency(tokenDTO, formDTO));
}
/**
* @param formDTO
* @return
* @Author sun
* @Description 公众号-查询我的信息
**/
@PostMapping("myinfo")
public Result<MyInfoResultDTO> myInfo(@LoginUser TokenDto tokenDTO, @RequestBody MyInfoFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, MyInfoFormDTO.AddUserInternalGroup.class);
return new Result<MyInfoResultDTO>().ok(paCustomerService.myInfo(formDTO));
}
}

94
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerUserAgencyController.java

@ -0,0 +1,94 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.PaCustomerUserAgencyDTO;
import com.epmet.excel.PaCustomerUserAgencyExcel;
import com.epmet.service.PaCustomerUserAgencyService;
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-07-09
*/
@RestController
@RequestMapping("pacustomeruseragency")
public class PaCustomerUserAgencyController {
@Autowired
private PaCustomerUserAgencyService paCustomerUserAgencyService;
@GetMapping("page")
public Result<PageData<PaCustomerUserAgencyDTO>> page(@RequestParam Map<String, Object> params){
PageData<PaCustomerUserAgencyDTO> page = paCustomerUserAgencyService.page(params);
return new Result<PageData<PaCustomerUserAgencyDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<PaCustomerUserAgencyDTO> get(@PathVariable("id") String id){
PaCustomerUserAgencyDTO data = paCustomerUserAgencyService.get(id);
return new Result<PaCustomerUserAgencyDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody PaCustomerUserAgencyDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
paCustomerUserAgencyService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody PaCustomerUserAgencyDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
paCustomerUserAgencyService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
paCustomerUserAgencyService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<PaCustomerUserAgencyDTO> list = paCustomerUserAgencyService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, PaCustomerUserAgencyExcel.class);
}
}

119
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserController.java

@ -0,0 +1,119 @@
/**
* 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.PaUserDTO;
import com.epmet.dto.result.CustomerUserResultDTO;
import com.epmet.dto.result.SaveUserResultDTO;
import com.epmet.excel.PaUserExcel;
import com.epmet.service.PaUserService;
import me.chanjar.weixin.mp.bean.result.WxMpUser;
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-07-09
*/
@RestController
@RequestMapping("pauser")
public class PaUserController {
@Autowired
private PaUserService paUserService;
@GetMapping("page")
public Result<PageData<PaUserDTO>> page(@RequestParam Map<String, Object> params) {
PageData<PaUserDTO> page = paUserService.page(params);
return new Result<PageData<PaUserDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<PaUserDTO> get(@PathVariable("id") String id) {
PaUserDTO data = paUserService.get(id);
return new Result<PaUserDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody PaUserDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
paUserService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody PaUserDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
paUserService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids) {
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
paUserService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<PaUserDTO> list = paUserService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, PaUserExcel.class);
}
/**
* @param wxMpUser
* @return
* @Author sun
* @Description 根据openId新增或更新用户信息
**/
@PostMapping(value = "/saveuser")
public Result<SaveUserResultDTO> saveUser(@RequestBody WxMpUser wxMpUser) {
return new Result<SaveUserResultDTO>().ok(paUserService.saveUser(wxMpUser));
}
/**
* @param phone
* @return
* @Author sun
* @Description 根据手机号查询公众号用户基本信息校验用户是否存在
**/
@PostMapping(value = "/checkpauser/{phone}")
public Result<CustomerUserResultDTO> checkPaUser(@PathVariable("phone") String phone) {
return new Result<CustomerUserResultDTO>().ok(paUserService.checkPaUser(phone));
}
}

107
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserVisitedController.java

@ -0,0 +1,107 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.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.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.PaUserVisitedDTO;
import com.epmet.dto.form.SaveUserVisitedFormDTO;
import com.epmet.excel.PaUserVisitedExcel;
import com.epmet.service.PaUserVisitedService;
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-07-09
*/
@RestController
@RequestMapping("pauservisited")
public class PaUserVisitedController {
@Autowired
private PaUserVisitedService paUserVisitedService;
@GetMapping("page")
public Result<PageData<PaUserVisitedDTO>> page(@RequestParam Map<String, Object> params){
PageData<PaUserVisitedDTO> page = paUserVisitedService.page(params);
return new Result<PageData<PaUserVisitedDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<PaUserVisitedDTO> get(@PathVariable("id") String id){
PaUserVisitedDTO data = paUserVisitedService.get(id);
return new Result<PaUserVisitedDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody PaUserVisitedDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
paUserVisitedService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody PaUserVisitedDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
paUserVisitedService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
paUserVisitedService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<PaUserVisitedDTO> list = paUserVisitedService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, PaUserVisitedExcel.class);
}
/**
* @param visited
* @return
* @Author sun
* @Description 用户登陆新增访问记录数据
**/
@PostMapping(value = "/saveuservisited")
public Result saveUserVisited(@RequestBody SaveUserVisitedFormDTO visited) {
paUserVisitedService.saveUserVisited(visited);
return new Result();
}
}

94
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserWechatController.java

@ -0,0 +1,94 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.PaUserWechatDTO;
import com.epmet.excel.PaUserWechatExcel;
import com.epmet.service.PaUserWechatService;
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-07-09
*/
@RestController
@RequestMapping("pauserwechat")
public class PaUserWechatController {
@Autowired
private PaUserWechatService paUserWechatService;
@GetMapping("page")
public Result<PageData<PaUserWechatDTO>> page(@RequestParam Map<String, Object> params){
PageData<PaUserWechatDTO> page = paUserWechatService.page(params);
return new Result<PageData<PaUserWechatDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<PaUserWechatDTO> get(@PathVariable("id") String id){
PaUserWechatDTO data = paUserWechatService.get(id);
return new Result<PaUserWechatDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody PaUserWechatDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
paUserWechatService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody PaUserWechatDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
paUserWechatService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
paUserWechatService.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<PaUserWechatDTO> list = paUserWechatService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, PaUserWechatExcel.class);
}
}

66
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PublicAccountCallBackController.java

@ -0,0 +1,66 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Collections;
/**
* 党群e事通公众号客服号
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/8 12:43
*/
@RestController
@RequestMapping("pa")
public class PublicAccountCallBackController {
private Logger logger = LogManager.getLogger();
/**
* @param signature 微信加密签名signature结合了开发者填写的token参数和请求中的timestamp参数nonce参数
* @param timestamp 时间戳
* @param nonce 随机数
* @param echostr 随机字符串
* @return java.lang.String
* @author yinzuomei
* @description 确认此次GET请求来自微信服务器请原样返回echostr参数内容则接入生效成为开发者成功否则接入失败
* @Date 2020/7/8 12:47
**/
@GetMapping(value = "/callback")
public String wxServerValdation(@RequestParam("signature") String signature,
@RequestParam("timestamp") String timestamp,
@RequestParam("nonce") String nonce,
@RequestParam("echostr") String echostr) {
if (StringUtils.isEmpty(signature) || StringUtils.isEmpty(timestamp) || StringUtils.isEmpty(nonce) || StringUtils.isEmpty(echostr)) {
logger.warn("入参错误");
return "";
}
ArrayList<String> list = new ArrayList<String>();
list.add(nonce);
list.add(timestamp);
//这是第5步中你设置的Token
list.add("12345678Yzm");
Collections.sort(list);
String sha1Singnature = DigestUtils.sha1Hex(list.get(0) + list.get(1) + list.get(2));
if (sha1Singnature.equals(signature)) {
logger.info("校验成功");
return echostr;
} else {
logger.warn("校验失败");
return "";
}
}
@GetMapping(value = "test")
public Result test(){
return new Result<>().ok("test");
}
}

34
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/WarrantController.java

@ -0,0 +1,34 @@
package com.epmet.controller;
import com.epmet.exception.AesException;
import com.epmet.service.WarrantService;
import lombok.extern.slf4j.Slf4j;
import org.dom4j.DocumentException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* @Author zxc
* @CreateTime 2020/7/10 10:41
*/
@Slf4j
@RestController
@RequestMapping("warrant")
public class WarrantController {
@Autowired
private WarrantService warrantService;
@RequestMapping(value ="/{APPID}/callback")
public void acceptMessageAndEvent(HttpServletRequest request, @PathVariable("APPID") String appid,
HttpServletResponse response)throws IOException, DocumentException, AesException {
warrantService.acceptMessageAndEvent(request, appid, response);
}
}

52
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/WeChatNotifyController.java

@ -0,0 +1,52 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.service.ComponentVerifyTicketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* @Author zxc
* @CreateTime 2020/7/8 15:06
*/
@RestController
@RequestMapping("wechatthird")
public class WeChatNotifyController {
@Autowired
private ComponentVerifyTicketService componentVerifyTicketService;
/**
* @Description 定时获取 (令牌component_access_token)
* 令牌component_access_token是第三方平台接口的调用凭据令牌的获取是有限制的每个令牌的有效期为 2 小时
* @param
* @author zxc
*/
@PostMapping("componentaccesstoken")
public Result getComponentAccessToken() {
componentVerifyTicketService.getComponentAccessToken();
return new Result();
}
/**
* @Description 获取预授权码
* @param
* @author zxc
*/
@PostMapping("preauthcode")
public Result preAuthCode(){
componentVerifyTicketService.preAuthCode();
return new Result();
}
/**
* @Description 获取/刷新接口调用令牌
* @author zxc
*/
@PostMapping("refreshtoken")
public Result refreshToken(){
componentVerifyTicketService.refreshToken();
return new Result();
}
}

36
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthCodeDao.java

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

49
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthorizationInfoDao.java

@ -0,0 +1,49 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.AuthorizationInfoFormDTO;
import com.epmet.entity.AuthorizationInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 授权信息表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-08
*/
@Mapper
public interface AuthorizationInfoDao extends BaseDao<AuthorizationInfoEntity> {
/**
* @Description 插入 授权信息
* @param formDTO
* @author zxc
*/
void insertAuthorizationInfo(AuthorizationInfoFormDTO formDTO);
/**
* @Description 逻辑删除授权信息
* @param customerId
* @author zxc
*/
void updateOldAuthorizationInfo(@Param("customerId")String customerId);
}

33
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthorizerRefreshTokenDao.java

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

33
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeAuditResultDao.java

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

33
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeCustomerDao.java

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

33
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeMediaDao.java

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

43
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ComponentAccessTokenDao.java

@ -0,0 +1,43 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.ComponentAccessTokenFormDTO;
import com.epmet.entity.ComponentAccessTokenEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 第三方平台调用凭证
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-08
*/
@Mapper
public interface ComponentAccessTokenDao extends BaseDao<ComponentAccessTokenEntity> {
/**
* @Description 插入component_access_token信息
* @param formDTO
* @author zxc
*/
void insertComponentAccessToken(ComponentAccessTokenFormDTO formDTO);
void updateOldComponentAccessToken();
}

36
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/ComponentVerifyTicketDao.java

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

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

Loading…
Cancel
Save