Browse Source

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

master
sunyuchao 5 years ago
parent
commit
1e303d5dc5
  1. 2
      epmet-auth/deploy/docker-compose-dev.yml
  2. 2
      epmet-auth/deploy/docker-compose-prod.yml
  3. 2
      epmet-auth/deploy/docker-compose-test.yml
  4. 8
      epmet-auth/pom.xml
  5. 5
      epmet-auth/src/main/java/com/epmet/dto/form/GovWxmpEnteOrgFormDTO.java
  6. 4
      epmet-auth/src/main/java/com/epmet/dto/form/GovWxmpFormDTO.java
  7. 2
      epmet-auth/src/main/java/com/epmet/dto/form/LoginByWxCodeFormDTO.java
  8. 2
      epmet-auth/src/main/java/com/epmet/dto/form/ResiWxPhoneFormDTO.java
  9. 124
      epmet-auth/src/main/java/com/epmet/redis/CustomerAppWxServiceUtil.java
  10. 3
      epmet-auth/src/main/java/com/epmet/service/LoginService.java
  11. 5
      epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java
  12. 37
      epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java
  13. 4
      epmet-commons/epmet-commons-tools/pom.xml
  14. 21
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/config/ApplicationConfig.java
  15. 30
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/config/MqConfig.java
  16. 20
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/MqConstant.java
  17. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java
  18. 10
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/ServiceConstant.java
  19. 25
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java
  20. 41
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/EventClassDto.java
  21. 35
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/MqBaseMsgDTO.java
  22. 18
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/MqBaseParamDTO.java
  23. 19
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/MqReturnBaseResult.java
  24. 36
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/MqSubscribeFormDTO.java
  25. 21
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/ReceiveMqMsg.java
  26. 18
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/ActPointEventMsg.java
  27. 45
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/BasePointEventMsg.java
  28. 42
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/CommonOperateTypeEnum.java
  29. 47
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EventEnum.java
  30. 43
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/MqMethodPathEnum.java
  31. 18
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  32. 17
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java
  33. 11
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisUtils.java
  34. 22
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java
  35. 110
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java
  36. 149
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Md5Util.java
  37. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java
  38. 114
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/SendMqMsgUtils.java
  39. 2
      epmet-gateway/deploy/docker-compose-dev.yml
  40. 19
      epmet-gateway/pom.xml
  41. 22
      epmet-gateway/src/main/resources/bootstrap.yml
  42. 119
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/EventFormDTO.java
  43. 112
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/EventDTO.java
  44. 10
      epmet-module/epmet-common-service/common-service-server/pom.xml
  45. 11
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/constant/ProjectConstant.java
  46. 99
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/EventController.java
  47. 35
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/EventDao.java
  48. 78
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/entity/EventEntity.java
  49. 41
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/enu/SysResponseEnum.java
  50. 41
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/EventService.java
  51. 72
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/EventServiceImpl.java
  52. 10
      epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml
  53. 21
      epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/epmet_common_service.sql
  54. 28
      epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/EventDao.xml
  55. 41
      epmet-module/epmet-heart/epmet-heart-client/pom.xml
  56. 92
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActContentDTO.java
  57. 106
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActCustomizedDTO.java
  58. 257
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java
  59. 86
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActLivePicDTO.java
  60. 102
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActLiveRecDTO.java
  61. 95
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActOperationRecDTO.java
  62. 97
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActPointLogDTO.java
  63. 86
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActSignInPicDTO.java
  64. 112
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActSignInRecDTO.java
  65. 117
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActStatisticalDTO.java
  66. 91
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActSummaryDTO.java
  67. 99
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActUserLogDTO.java
  68. 136
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActUserRelationDTO.java
  69. 103
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/HeartUserInfoDTO.java
  70. 91
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActContentDTO.java
  71. 212
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActInfoDTO.java
  72. 91
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/VolunteerInfoDTO.java
  73. 0
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/.gitkeep
  74. 68
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActBaseFormDTO.java
  75. 45
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActCaculateDistanceFormDTO.java
  76. 46
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActContentFormDTO.java
  77. 38
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActDetailFormDTO.java
  78. 104
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActInsertLiveFormDTO.java
  79. 61
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActRegistrationFormDTO.java
  80. 105
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActSignInFormDTO.java
  81. 71
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActUserCancelSignUpFormDTO.java
  82. 57
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiLatestActFormDTO.java
  83. 61
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiMyActFormDTO.java
  84. 117
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiVolunteerAuthenticateFormDTO.java
  85. 27
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/AactUserDetailFormDTO.java
  86. 23
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActCustomizedFormDTO.java
  87. 24
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActIdFormDTO.java
  88. 23
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActListCommonFormDTO.java
  89. 26
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActPreviewFormDTO.java
  90. 31
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/AuditUserFormDTO.java
  91. 32
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/CancelActFormDTO.java
  92. 36
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/DraftActContentFormDTO.java
  93. 164
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/DraftActInfoFormDTO.java
  94. 30
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/GrantPointsFormDTO.java
  95. 36
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActContentFormDTO.java
  96. 193
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java
  97. 194
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java
  98. 62
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/SaveActCustomizedFormDTO.java
  99. 40
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/SaveActualTimeFormDTO.java
  100. 33
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/SummaryActFormDTO.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.50
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-auth:0.3.55
ports:
- "8081:8081"
network_mode: host # 使用现有网络

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

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-auth-server:
container_name: epmet-auth-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-auth:0.3.36
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-auth:0.3.55
ports:
- "8081:8081"
network_mode: host # 使用现有网络

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

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-auth-server:
container_name: epmet-auth-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-auth:0.3.36
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-auth:0.3.55
ports:
- "8081:8081"
network_mode: host # 使用现有网络

8
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.50</version>
<version>0.3.55</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-cloud</artifactId>
@ -122,6 +122,12 @@
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>oper-crm-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

5
epmet-auth/src/main/java/com/epmet/dto/form/GovWxmpEnteOrgFormDTO.java

@ -39,5 +39,10 @@ public class GovWxmpEnteOrgFormDTO implements Serializable {
@NotBlank(message = "组织id不能为空",groups = {AddUserInternalGroup.class})
private String rootAgencyId;
/**
* desc:小程序appId
*/
private String appId;
}

4
epmet-auth/src/main/java/com/epmet/dto/form/GovWxmpFormDTO.java

@ -19,5 +19,9 @@ public class GovWxmpFormDTO extends LoginCommonFormDTO implements Serializable {
*/
@NotBlank(message = "wxCode不能为空",groups = {AddUserInternalGroup.class})
private String wxCode;
/**
* appId
*/
private String appId;
}

2
epmet-auth/src/main/java/com/epmet/dto/form/LoginByWxCodeFormDTO.java

@ -29,4 +29,6 @@ public class LoginByWxCodeFormDTO extends LoginCommonFormDTO implements Serializ
* 加密算法的初始向量
*/
private String iv;
private String appId;
}

2
epmet-auth/src/main/java/com/epmet/dto/form/ResiWxPhoneFormDTO.java

@ -32,4 +32,6 @@ public class ResiWxPhoneFormDTO implements Serializable {
*/
@NotBlank(message = "iv不能为空",groups = {AddUserInternalGroup.class})
private String iv;
private String appId;
}

124
epmet-auth/src/main/java/com/epmet/redis/CustomerAppWxServiceUtil.java

@ -0,0 +1,124 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
package com.epmet.redis;
import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerAppDTO;
import com.epmet.feign.OperCrmOpenFeignClient;
import com.google.common.collect.Maps;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.SetOperations;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
/**
* 客户app Redis
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Component
public class CustomerAppWxServiceUtil implements ApplicationRunner {
private static Logger logger = LogManager.getLogger(CustomerAppWxServiceUtil.class);
/**
* 过期时长为30分钟单位
*/
private final static long MINUTE_THIRTY_EXPIRE = 60 * 60 * 24 * 7L;
private final static String JSON_STR = "JSON";
@Autowired
private RedisUtils redisUtils;
@Autowired
private RedisTemplate<String,String> redisTemplate;
@Autowired
private OperCrmOpenFeignClient operCrmOpenFeignClient;
private static Map<String, WxMaService> maServices = Maps.newHashMap();
public static WxMaService getWxMaService(String appId) {
WxMaService wxMaService = maServices.get(appId);
if (wxMaService == null){
logger.error("getMaService appId:{} is not config from customer_app",appId);
}
return wxMaService;
}
/*public String get(String appId) {
String key = RedisKeys.getAppSecretKey(appId);
String secret = (String) redisUtils.get(key);
if (StringUtils.isBlank(secret)) {
CustomerAppSecretFormDTO param = new CustomerAppSecretFormDTO();
param.setAppId(appId);
Result<String> result = operCrmOpenFeignClient.getSecretByAppId(param);
if (result.success()) {
secret = result.getData();
if (StringUtils.isNotBlank(secret)) {
redisUtils.set(key, secret, MINUTE_THIRTY_EXPIRE);
}
}
}
return secret;
}*/
@Override
public void run(ApplicationArguments args) {
try {
Result<List<CustomerAppDTO>> configAllAppResult = operCrmOpenFeignClient.getConfigAllApp();
logger.info("initWxMa operCrmOpenFeignClient.getConfigAllApp result:{}", JSON.toJSONString(configAllAppResult));
if (configAllAppResult == null || !configAllAppResult.success()){
logger.info("initWxMa operCrmOpenFeignClient.getConfigAllApp fail");
return;
}
String appKey = RedisKeys.getCustomerAppKey();
SetOperations<String, String> appSet = redisTemplate.opsForSet();
Set<String> members = appSet.members(appKey);
if ( !CollectionUtils.isEmpty(configAllAppResult.getData())) {
//if (!CollectionUtils.isEmpty(members) && CollectionUtils.isEmpty()){
//todo
//}
maServices = configAllAppResult.getData().stream()
.map(a -> {
WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl();
config.setAppid(a.getAppId());
config.setSecret(a.getSecret());
config.setMsgDataFormat(JSON_STR);
WxMaService service = new WxMaServiceImpl();
service.setWxMaConfig(config);
redisTemplate.opsForSet().add(appKey,a.getSecret());
return service;
}).collect(Collectors.toMap(s -> s.getWxMaConfig().getAppid(), a -> a));
}
} catch (Exception e) {
logger.error("init wxMaservice exception",e);
} finally {
logger.info("init wxMaservice end");
}
}
}

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

@ -45,11 +45,12 @@ public interface LoginService {
* @return cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult
* @param app
* @param wxCode
* @param appId 非必填
* @Author yinzuomei
* @Description 解析wxCode
* @Date 2020/4/19 0:24
**/
WxMaJscode2SessionResult getWxMaUser(String app, String wxCode);
WxMaJscode2SessionResult getWxMaUser(String app, String wxCode, String appId);
/**
* @return java.lang.String

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

@ -19,7 +19,6 @@ import com.epmet.constant.SmsTemplateConstant;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.GovStaffRoleDTO;
import com.epmet.dto.UserWechatDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.feign.*;
@ -141,7 +140,7 @@ public class GovLoginServiceImpl implements GovLoginService {
@Override
public UserTokenResultDTO loginByWxCode(GovWxmpFormDTO formDTO) {
//1、解析微信用户
WxMaJscode2SessionResult wxMaJscode2SessionResult = loginService.getWxMaUser(formDTO.getApp(), formDTO.getWxCode());
WxMaJscode2SessionResult wxMaJscode2SessionResult = loginService.getWxMaUser(formDTO.getApp(), formDTO.getWxCode(), formDTO.getAppId());
if(null!=wxMaJscode2SessionResult){
logger.info(String.format("app=%s,wxCode=%s,openId=%s",formDTO.getApp(),formDTO.getWxCode(),wxMaJscode2SessionResult.getOpenid()));
}
@ -273,7 +272,7 @@ public class GovLoginServiceImpl implements GovLoginService {
}
CustomerStaffDTO customerStaff = customerStaffDTOResult.getData();
//2、解析微信用户
WxMaJscode2SessionResult wxMaJscode2SessionResult = loginService.getWxMaUser(LoginConstant.APP_GOV, formDTO.getWxCode());
WxMaJscode2SessionResult wxMaJscode2SessionResult = loginService.getWxMaUser(LoginConstant.APP_GOV, formDTO.getWxCode(), formDTO.getAppId());
//3、记录staff_wechat,并记录用户激活状态,激活时间
this.savestaffwechat(customerStaff.getUserId(), wxMaJscode2SessionResult.getOpenid());

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

@ -4,6 +4,7 @@ import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo;
import cn.binarywang.wx.miniapp.bean.WxMaUserInfo;
import com.alibaba.fastjson.JSON;
import com.epmet.common.token.constant.LoginConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
@ -22,6 +23,7 @@ import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.feign.OperAccessOpenFeignClient;
import com.epmet.jwt.JwtTokenProperties;
import com.epmet.jwt.JwtTokenUtils;
import com.epmet.redis.CustomerAppWxServiceUtil;
import com.epmet.service.CaptchaService;
import com.epmet.service.LoginService;
import com.epmet.utils.WxMaServiceUtils;
@ -82,7 +84,7 @@ public class LoginServiceImpl implements LoginService {
throw new RenException("参数错误");
}
//1、根据wxCode获取微信信息
WxMaJscode2SessionResult wxMaJscode2SessionResult = this.getWxMaUser(formDTO.getApp(),formDTO.getWxCode());
WxMaJscode2SessionResult wxMaJscode2SessionResult = this.getWxMaUser(formDTO.getApp(),formDTO.getWxCode(),formDTO.getAppId());
logger.info("openId=[" + wxMaJscode2SessionResult.getOpenid() + "]unionId=[" + wxMaJscode2SessionResult.getUnionid() + "]");
//2、根据openId查询数据库,没有则直接插入一条记录
String userId = this.getUserId(formDTO, wxMaJscode2SessionResult);
@ -109,21 +111,29 @@ public class LoginServiceImpl implements LoginService {
* @date 2020/3/14 20:16
*/
@Override
public WxMaJscode2SessionResult getWxMaUser(String app,String wxCode) {
public WxMaJscode2SessionResult getWxMaUser(String app,String wxCode,String appId) {
WxMaJscode2SessionResult wxMaJscode2SessionResult = null;
try {
if (LoginConstant.APP_GOV.equals(app)) {
wxMaJscode2SessionResult = wxMaServiceUtils.govWxMaService().jsCode2SessionInfo(wxCode);
} else if (LoginConstant.APP_OPER.equals(app)) {
wxMaJscode2SessionResult = wxMaServiceUtils.operWxMaService().jsCode2SessionInfo(wxCode);
} else if (LoginConstant.APP_RESI.equals(app)) {
wxMaJscode2SessionResult = wxMaServiceUtils.resiWxMaService().jsCode2SessionInfo(wxCode);
if (StringUtils.isNotBlank(appId)){
WxMaService wxMaService = CustomerAppWxServiceUtil.getWxMaService(appId);
if (wxMaService == null){
throw new RenException("解析微信用户信息失败");
}
wxMaJscode2SessionResult = wxMaService.jsCode2SessionInfo(wxCode);
}else{
if (LoginConstant.APP_GOV.equals(app)) {
wxMaJscode2SessionResult = wxMaServiceUtils.govWxMaService().jsCode2SessionInfo(wxCode);
} else if (LoginConstant.APP_OPER.equals(app)) {
wxMaJscode2SessionResult = wxMaServiceUtils.operWxMaService().jsCode2SessionInfo(wxCode);
} else if (LoginConstant.APP_RESI.equals(app)) {
wxMaJscode2SessionResult = wxMaServiceUtils.resiWxMaService().jsCode2SessionInfo(wxCode);
}
}
} catch (WxErrorException e) {
log.error("->[getMaOpenId]::error[{}]", "解析微信code失败");
log.error("->[getMaOpenId]::error[{}]", "解析微信code失败",e);
}
if (null == wxMaJscode2SessionResult) {
log.error(String.format("解析微信用户信息失败,app[%s],wxCode[%s]",app,wxCode));
log.error(String.format("解析微信用户信息失败,app[%s],wxCode[%s],result:[%S]",app,wxCode, JSON.toJSONString(wxMaJscode2SessionResult)));
throw new RenException("解析微信用户信息失败");
} else if (StringUtils.isBlank(wxMaJscode2SessionResult.getOpenid())) {
log.error(String.format("获取微信openid失败,app[%s],wxCode[%s]",app,wxCode));
@ -137,7 +147,12 @@ public class LoginServiceImpl implements LoginService {
String phone="";
try {
ValidatorUtils.validateEntity(formDTO, ResiWxPhoneFormDTO.AddUserInternalGroup.class);
WxMaService wxMaService = wxMaServiceUtils.resiWxMaService();
WxMaService wxMaService = null;
if (StringUtils.isNotBlank(formDTO.getAppId())){
wxMaService = CustomerAppWxServiceUtil.getWxMaService(formDTO.getAppId());
}else{
wxMaService = wxMaServiceUtils.resiWxMaService();
}
WxMaJscode2SessionResult wxMaJscode2SessionResult = wxMaService.jsCode2SessionInfo(formDTO.getWxCode());
WxMaPhoneNumberInfo phoneNoInfo = wxMaService.getUserService().getPhoneNoInfo(wxMaJscode2SessionResult.getSessionKey(),
formDTO.getEncryptedData(),

4
epmet-commons/epmet-commons-tools/pom.xml

@ -133,10 +133,6 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
</dependency>
</dependencies>
<build>

21
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/config/ApplicationConfig.java

@ -0,0 +1,21 @@
package com.epmet.commons.tools.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
/**
* desc应用配置
* @author lyn
* @date 2020/7/22 14:08
*/
@Configuration
public class ApplicationConfig {
// 设置@Value注解取值不到忽略(不报错)
@Bean
public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() {
PropertySourcesPlaceholderConfigurer c = new PropertySourcesPlaceholderConfigurer();
c.setIgnoreUnresolvablePlaceholders(true);
return c;
}
}

30
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/config/MqConfig.java

@ -0,0 +1,30 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
package com.epmet.commons.tools.config;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
/**
* 消息网关配置信息
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
@Configuration
public class MqConfig {
@Value("${elink.mq.appId}")
private String appId;
@Value("${elink.mq.token}")
private String token;
@Value("${elink.mq.host}")
private String host;
}

20
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/MqConstant.java

@ -0,0 +1,20 @@
package com.epmet.commons.tools.constant;
/**
* 消息常亮
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/27 9:58
*/
public interface MqConstant {
/**
* 加分 plus
*/
String PLUS="plus";
/**
* 减分标识 minus
*/
String MINUS="minus";
}

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

@ -50,5 +50,5 @@ public interface NumConstant {
String FOUR_STR = "4";
String FIVE_STR = "5";
String POSITIVE_EIGHT_STR = "+8";
String EMPTY_STR = "";
}

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

@ -123,4 +123,14 @@ public interface ServiceConstant {
* 微信第三方平台
*/
String EPMET_THIRD_SERVER = "epmet-third-server";
/**
* 爱心互助
*/
String EPMET_HEART_SERVER="epmet-heart-server";
/**
* 积分银行
* */
String EPMET_POINT_SERVER = "epmet-point-server";
}

25
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java

@ -48,4 +48,29 @@ public interface StrConstant {
* 中文顿号
*/
String COMMA_ZH = "、";
/**
* 反斜杠
*/
String SEPARATOR = "/";
/**
* true
*/
String TRUE = "true";
/**
* true
*/
String FALSE = "false";
/**
* *
*/
String STAR="*";
/**
* 空字符串
*/
String EPMETY_STR="";
}

41
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/EventClassDto.java

@ -0,0 +1,41 @@
package com.epmet.commons.tools.dto.form.mq;
import lombok.Data;
import java.io.Serializable;
/**
* desc消息网关事件类型dto
*
* @author lyn
* @date 2020/7/24 18:30
*/
@Data
public class EventClassDto implements Serializable {
private static final long serialVersionUID = 6923860669547819790L;
/**
* appId
*/
private String appId;
/**
* 事件类型Id
*/
private Integer id;
/**
* 事件标识
*/
private String eventClass;
/**
* 事件名称
*/
private String eventClassName;
/**
* 0''未删''1''已删
*/
private Integer delFlag;
/**
* 事件计数
*/
private Integer eventCount;
}

35
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/MqBaseMsgDTO.java

@ -0,0 +1,35 @@
package com.epmet.commons.tools.dto.form.mq;
import lombok.Data;
import org.springframework.stereotype.Component;
import javax.validation.constraints.NotBlank;
/**
* 消息网关基础信息
*
* @author jianjun liu
* @date 2020-07-21 14:33
**/
@Data
@Component
public class MqBaseMsgDTO extends MqBaseParamDTO {
private static final long serialVersionUID = 8176470786428432009L;
/**
* mq的事件类型
*/
@NotBlank(message = "事件类型不能为空")
private String eventClass;
/**
* 事件code
*/
@NotBlank(message = "事件标识不能为空")
private String eventTag;
/**
* 消息体
*/
@NotBlank(message = "消息体不能为空")
private String msg;
}

18
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/MqBaseParamDTO.java

@ -0,0 +1,18 @@
package com.epmet.commons.tools.dto.form.mq;
import lombok.Data;
import java.io.Serializable;
/**
* 消息网关基础信息
*
* @author jianjun liu
* @date 2020-07-21 14:33
**/
@Data
public class MqBaseParamDTO implements Serializable {
private String appId;
private String token;
private String requestUrl;
}

19
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/MqReturnBaseResult.java

@ -0,0 +1,19 @@
package com.epmet.commons.tools.dto.form.mq;
import lombok.Data;
import java.io.Serializable;
/**
* desc消息网关返回结果
*
* @author lyn
* @date 2020/7/21 13:38
*/
@Data
public class MqReturnBaseResult implements Serializable {
private static final long serialVersionUID = -7763308686382363929L;
Integer errCode;
String errMsg;
String data;
}

36
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/MqSubscribeFormDTO.java

@ -0,0 +1,36 @@
package com.epmet.commons.tools.dto.form.mq;
import lombok.Data;
import java.io.Serializable;
/**
* desc: 订阅服务参数 实体类
*
* @date: 2020/6/29 9:06
* @author: jianjun liu
* email:liujianjun@git.elinkit.com.cn
*/
@Data
public class MqSubscribeFormDTO implements Serializable {
/**
* 消息接收者
*/
private String belongAppId;
/**
* 密钥
*/
private String eventClass;
/**
* 发送内容
*/
private String eventTag;
/**
* 是否at所有人
*/
private String callbackUrl;
}

21
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/ReceiveMqMsg.java

@ -0,0 +1,21 @@
package com.epmet.commons.tools.dto.form.mq;
import lombok.Data;
import java.io.Serializable;
/**
* 亿联云消息网关消息回调外层DTO
*
* @author jianjun liu
* @date 2020-07-20 8:58
**/
@Data
public class ReceiveMqMsg implements Serializable {
private static final long serialVersionUID = -2776439983884650701L;
/**
* 消息体 json串
*/
private String msg;
}

18
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/ActPointEventMsg.java

@ -0,0 +1,18 @@
package com.epmet.commons.tools.dto.form.mq.eventmsg;
import lombok.Data;
/**
* 结束活动发放活动积分消息体
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/27 9:26
*/
@Data
public class ActPointEventMsg extends BasePointEventMsg{
/**
* 参与活动的备注
*/
private String remark;
}

45
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/BasePointEventMsg.java

@ -0,0 +1,45 @@
package com.epmet.commons.tools.dto.form.mq.eventmsg;
import lombok.Data;
import java.io.Serializable;
/**
* desc积分相关事件消息体
*
* @author lyn
* @date 2020/7/23 16:34
*/
@Data
public class BasePointEventMsg implements Serializable {
private static final long serialVersionUID = 4037225404113743943L;
/**
* 操作人机关id
*/
private String opAgencyId;
/**
* 客户Id
*/
private String customerId;
/**
* 被操作用户id
*/
private String userId;
/**
* 加减分标识 plus/minus
*/
private String actionFlag;
/**
* 积分值
*/
private Integer point;
/**
* 是否是通用事件通用事件不走规则
*/
private Boolean isCommon;
}

42
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/CommonOperateTypeEnum.java

@ -0,0 +1,42 @@
package com.epmet.commons.tools.enums;
/**
* 通用操作类型 枚举类
* dev|test|prod
*
* @author jianjun liu
* @date 2020-07-03 11:14
**/
public enum CommonOperateTypeEnum {
ADD("add", "添加"),
EDIT("edit", "编辑"),
DEL("del", "删除"),
;
private String code;
private String desc;
CommonOperateTypeEnum(String code, String name) {
this.code = code;
this.desc = name;
}
public static CommonOperateTypeEnum getEnum(String code) {
CommonOperateTypeEnum[] values = CommonOperateTypeEnum.values();
for (CommonOperateTypeEnum value : values) {
if (code != null && value.getCode().equals(code)) {
return value;
}
}
return null;
}
public String getCode() {
return code;
}
public String getDesc() {
return desc;
}
}

47
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/EventEnum.java

@ -0,0 +1,47 @@
package com.epmet.commons.tools.enums;
/**
* 系统支持的事件枚举类
*
* @author jianjun liu
* @date 2020-07-03 11:14
**/
public enum EventEnum {
ACTIVE_SEND_POINT("active_send_point", "epmet_heart", "活动发放积分"),
REGISTER_VOLUNTEER("register_volunteer", "epmet_heart", "认证志愿者"),
ACTIVE_INSERT_LIVE("active_insert_live", "epmet_heart", "添加活动实况"),
;
private String eventClass;
private String eventTag;
private String eventDesc;
EventEnum(String eventTag, String eventClass, String eventDesc) {
this.eventTag = eventTag;
this.eventClass = eventClass;
this.eventDesc = eventDesc;
}
public static EventEnum getEnum(String eventCode) {
EventEnum[] values = EventEnum.values();
for (EventEnum value : values) {
if (eventCode != null && value.getEventTag().equals(eventCode)) {
return value;
}
}
return null;
}
public String getEventTag() {
return eventTag;
}
public String getEventClass() {
return eventClass;
}
public String getEventDesc() {
return eventDesc;
}
}

43
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/MqMethodPathEnum.java

@ -0,0 +1,43 @@
package com.epmet.commons.tools.enums;
/**
* 消息网关方法枚举类
* dev|test|prod
*
* @author jianjun liu
* @date 2020-07-03 11:14
**/
public enum MqMethodPathEnum {
SEND_MSG("producerService/producer/sendMsg", "发送消息"),
GET_EVENT_LIST("eventClass/getList", "获取事件类型列表"),
;
private String code;
private String name;
MqMethodPathEnum(String code, String name) {
this.code = code;
this.name = name;
}
public static MqMethodPathEnum getEnum(String code) {
MqMethodPathEnum[] values = MqMethodPathEnum.values();
for (MqMethodPathEnum value : values) {
if (code != null && value.getCode().equals(code)) {
return value;
}
}
return null;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
}

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

@ -49,6 +49,19 @@ public enum EpmetErrorCode {
CANNOT_DELETE_PARTY_MEMBER(8111,"该用户已注册党员,不允许删除"),
GROUP_LEADER_CAN_EDIT_GROUP_INFO(8112,"只有组长才可以修改小组信息"),
INVITE_NEW_MEMBER(8113,"只有讨论中的小组才可以邀请新成员"),
ACT_TITLE_SCAN_FAILED(8114,"活动标题审核失败,请重新编辑"),
ACT_REQ_SCAN_FAILED(8115,"活动报名条件审核失败,请重新编辑"),
ACT_CONTENT_TEXT_SCAN_FAILED(8116,"活动详情内容审核失败,请重新编辑"),
ACT_CONTENT_IMG_SCAN_FAILED(8117,"活动详情图片失败,请重新编辑"),
ACT_COVER_PIC_SCAN_FAILED(8118,"活动封面图片审核失败,请重新编辑"),
ACT_START_TIME_ERROR(8119,"活动预计开始时间应早于活动预计结束时间"),
ACT_SIGN_IN_START_TIME_ERROR(8120,"签到开始时间应早于签到结束时间"),
ACT_SIGN_UP_END_TIME_ERROR(8121,"活动报名截止时间应早于活动预计开始时间"),
ACT_ACTUAL_START_TIME_ERROR(8122,"实际开始时间应早于实际结束时间"),
HAVE_HANDLE(8123,"存在待处理事项,请先处理"),
ACTUAL_TIME(8124,"请录入实际开始时间,实际结束时间"),
ACTUAL_NOT_FINISHED(8125,"请先结束活动"),
CANNOT_AUDIT_WARM(8201, "请完善居民信息"),
NOT_DEL_AGENCY(8202, "该机关存在下级机关,不允许删除"),
NOT_DEL_AGENCY_PER(8205, "该机关存在工作人员,不允许删除"),
@ -68,6 +81,11 @@ public enum EpmetErrorCode {
IMG_SCAN_FAILED(8504,"图片审核失败,请重新上传"),
PROJECT_IS_CLOSED(8601,"项目已结案"),
// 爱心互助 居民端
NOT_IN_THE_SIGN_IN_RANGE(8510, "您还未进入指定的签到范围~"),
NON_CERTIFIED_VOLUNTEER(8511, "活动报名失败,请先认证志愿者"),
ACT_TIME_CONFLICT(8512, "活动时间冲突"),
// 该错误不会提示给前端,只是后端传输错误信息用。
ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"),
OPER_ADD_CUSTOMER_ROOT_AGENCY_ERROR(8702, "添加客户根级组织失败"),

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

@ -254,4 +254,21 @@ public class RedisKeys {
return rootPrefix.concat("tags:grid:relationTag:").concat(gridId).concat(StrConstant.COLON).concat(tagId);
}
/**
* appId secret 缓存Key
* @return
*/
public static String getCustomerAppKey() {
return rootPrefix.concat("oper:crm:app");
}
/**
* 获取生成的用户标识 缓存Key
* @param shortUserId
* @return
*/
public static String getShortUserIdKey(String shortUserId) {
return rootPrefix.concat("oper:user:shorId:").concat(shortUserId);
}
}

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

@ -10,8 +10,6 @@ package com.epmet.commons.tools.redis;
import com.epmet.commons.tools.constant.NumConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.*;
import org.springframework.data.redis.support.atomic.RedisAtomicLong;
@ -316,4 +314,13 @@ public class RedisUtils {
return redisTemplate.opsForZSet().incrementScore(key, value, delta);
}
/**
* @Description 判断key是否存在
* @param key
* @return
*/
public Boolean hasKey(String key) {
return redisTemplate.hasKey(key);
}
}

22
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/DateUtils.java

@ -488,4 +488,26 @@ public class DateUtils {
return format.format(timestamp * 1000);
}
public static Date minStrToSecondDate(String minStr){
if(StringUtils.isNotBlank(minStr)&&minStr.length()==16){
String date=minStr.concat(":00");
System.out.println(date);
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
return format.parse(date);
} catch (ParseException e) {
e.printStackTrace();
}
}
return null;
}
public static Integer calculateMin(Date startDate,Date endDate){
long start=startDate.getTime();
long end=endDate.getTime();
// 计算差多少分钟
int minutes = (int) ((end - start) / (1000 * 60));
System.out.println("两个时间之间的分钟差为:" + minutes);
return minutes;
}
}

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

@ -17,24 +17,36 @@ import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.config.Registry;
import org.apache.http.config.RegistryBuilder;
import org.apache.http.conn.socket.ConnectionSocketFactory;
import org.apache.http.conn.socket.PlainConnectionSocketFactory;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.entity.mime.HttpMultipartMode;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.springframework.util.CollectionUtils;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@ -54,6 +66,28 @@ public class HttpClientManager {
* HttpClient对象
*/
private static CloseableHttpClient httpclient = HttpClients.custom().disableAutomaticRetries().build();
private static CloseableHttpClient httpsClient;
static {
try {
// 采用绕过验证的方式处理https请求
SSLContext sslcontext = createIgnoreVerifySSL();
// 设置协议http和https对应的处理socket链接工厂的对象
Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder.<ConnectionSocketFactory>create()
.register("http", PlainConnectionSocketFactory.INSTANCE)
.register("https", new SSLConnectionSocketFactory(sslcontext,
SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER))
.build();
PoolingHttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager(
socketFactoryRegistry);
HttpClients.custom().setConnectionManager(connManager);
// 创建自定义的httpclient对象
httpsClient = HttpClients.custom().setConnectionManager(connManager).build();
} catch (Exception e) {
e.printStackTrace();
}
}
/*** 超时设置 ****/
private static RequestConfig requestConfig = RequestConfig.custom()
@ -77,7 +111,7 @@ public class HttpClientManager {
*
* @author: jianjun liu
*/
public Result<String> sendPost(String url, Map<String, String> paramsMap) {
public Result<String> sendPost(String url, Map<String, Object> paramsMap) {
try {
HttpPost httppost = new HttpPost(url);
@ -91,9 +125,8 @@ public class HttpClientManager {
UrlEncodedFormEntity urlEncodedFormEntity = new UrlEncodedFormEntity(list, "utf-8");
httppost.setEntity(urlEncodedFormEntity);
return execute(httppost);
return execute(httppost, false);
} catch (Exception e) {
e.printStackTrace();
log.error("send exception", e);
return new Result<String>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
@ -118,7 +151,7 @@ public class HttpClientManager {
StringEntity se = new StringEntity(jsonStrParam, "utf-8");
httppost.setEntity(se);
}
return execute(httppost);
return execute(httppost, false);
} catch (Exception e) {
log.error("send exception", e);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
@ -152,13 +185,38 @@ public class HttpClientManager {
// HttpEntity reqEntity = MultipartEntityBuilder.create()
// .addPart("media", fileBody).build();
// httppost.setEntity(reqEntity);
return execute(httppost);
return execute(httppost,false);
} catch (Exception e) {
log.error("send exception", e);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
}
/**
* desc: https发送json post 请求
* param: url,jsonStrParam
* return: Result<String>
* date: 2019/2/21 9:12
*
* @author: jianjun liu
*/
public Result<String> sendPostByHttps(String url, String jsonStrParam) {
try {
HttpPost httppost = new HttpPost(url);
httppost.setConfig(requestConfig);
httppost.addHeader("Content-Type", "application/json");
if (StringUtils.isNotEmpty(jsonStrParam)) {
StringEntity se = new StringEntity(jsonStrParam, "utf-8");
httppost.setEntity(se);
}
return execute(httppost, true);
} catch (Exception e) {
log.error("sendPostByHttps exception", e);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
}
/**
* desc: 发送钉钉群消息 简版
* param: url,jsonStrParam
@ -176,10 +234,10 @@ public class HttpClientManager {
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(secret.getBytes("UTF-8"), "HmacSHA256"));
byte[] signData = mac.doFinal(stringToSign.getBytes("UTF-8"));
String sign = URLEncoder.encode(new String(Base64.encodeBase64(signData)),"UTF-8");
String sign = URLEncoder.encode(new String(Base64.encodeBase64(signData)), "UTF-8");
DingTalkTextMsg msg = new DingTalkTextMsg();
msg.setContent(content);
url = url.concat("&timestamp="+timestamp+"&sign="+sign);
url = url.concat("&timestamp=" + timestamp + "&sign=" + sign);
String jsonStrParam = msg.getMsgContent();
return sendPostByJSON(url, jsonStrParam);
} catch (Exception e) {
@ -208,24 +266,28 @@ public class HttpClientManager {
}
HttpGet httpGet = new HttpGet(builder.build());
httpGet.setConfig(requestConfig);
return execute(httpGet);
return execute(httpGet, false);
} catch (Exception e) {
log.error("sendGet exception", e);
return new Result<String>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
}
private Result<String> execute(HttpRequestBase httpMethod) {
private Result<String> execute(HttpRequestBase httpMethod, boolean isHttps) {
CloseableHttpResponse response = null;
try {
response = httpclient.execute(httpMethod);
log.debug("http send response:{}", JSON.toJSONString(response));
if (isHttps) {
response = httpsClient.execute(httpMethod);
} else {
response = httpclient.execute(httpMethod);
}
if (response != null && response.getStatusLine() != null) {
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
String result = EntityUtils.toString(response.getEntity());
return new Result<String>().ok(result);
} else {
log.warn("execute http method fail,httpStatus:{0}", response.getStatusLine().getStatusCode());
log.warn("execute http method fail,httpStatus:{}", response.getStatusLine().getStatusCode());
return new Result<String>().error(EpmetErrorCode.SERVER_ERROR.getCode(), "请求失败httpStatus:" + response.getStatusLine().getStatusCode());
}
}
} catch (Exception e) {
@ -365,6 +427,30 @@ public class HttpClientManager {
return new Result<byte[]>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
private static SSLContext createIgnoreVerifySSL() throws NoSuchAlgorithmException, KeyManagementException {
SSLContext sc = SSLContext.getInstance("SSLv3");
// 实现一个X509TrustManager接口,用于绕过验证,不用修改里面的方法
X509TrustManager trustManager = new X509TrustManager() {
@Override
public void checkClientTrusted(java.security.cert.X509Certificate[] paramArrayOfX509Certificate,
String paramString) throws CertificateException {
}
@Override
public void checkServerTrusted(java.security.cert.X509Certificate[] paramArrayOfX509Certificate,
String paramString) throws CertificateException {
}
@Override
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return null;
}
};
sc.init(null, new TrustManager[]{trustManager}, null);
return sc;
}
}

149
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/Md5Util.java

@ -0,0 +1,149 @@
package com.epmet.commons.tools.utils;
import lombok.extern.slf4j.Slf4j;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
@Slf4j
public class Md5Util {
/**
* 加密盐
*/
public static final String SALT = "EPMET_UMD_SALT";
public static String md5(String string) {
if (string == null || string.trim().length() == 0) {
return null;
}
try {
return getMD5(string.getBytes("GBK"));
} catch (UnsupportedEncodingException e) {
log.error( "md5 is error,msg={0}", e);
return null;
}
}
private static final char hexDigits[] = { // 用来将字节转换成 16 进制表示的字符
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
private static String getMD5(byte[] source) {
String s = null;
try {
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(source);
byte tmp[] = md.digest(); // MD5 的计算结果是一个 128 位的长整数,
// 用字节表示就是 16 个字节
char str[] = new char[16 * 2]; // 每个字节用 16 进制表示的话,使用两个字符,
// 所以表示成 16 进制需要 32 个字符
int k = 0; // 表示转换结果中对应的字符位置
for (int i = 0; i < 16; i++) { // 从第一个字节开始,对 MD5 的每一个字节
// 转换成 16 进制字符的转换
byte byte0 = tmp[i]; // 取第 i 个字节
str[k++] = hexDigits[byte0 >>> 4 & 0xf]; // 取字节中高 4 位的数字转换,
// >>> 为逻辑右移,将符号位一起右移
str[k++] = hexDigits[byte0 & 0xf]; // 取字节中低 4 位的数字转换
}
s = new String(str); // 换后的结果转换为字符串
} catch (Exception e) {
log.error("getMD5 is error,msg={0}", e);
}
return s;
}
private static String byteArrayToHexString(byte b[]) {
StringBuffer resultSb = new StringBuffer();
for (int i = 0; i < b.length; i++)
resultSb.append(byteToHexString(b[i]));
return resultSb.toString();
}
private static String byteToHexString(byte b) {
int n = b;
if (n < 0)
n += 256;
int d1 = n / 16;
int d2 = n % 16;
return hexDigits[d1] + "" + hexDigits[d2];
}
public static String MD5Encode(String origin, String charsetname) {
String resultString = null;
try {
resultString = new String(origin);
MessageDigest md = MessageDigest.getInstance("MD5");
if (charsetname == null || "".equals(charsetname))
resultString = byteArrayToHexString(md.digest(resultString
.getBytes()));
else
resultString = byteArrayToHexString(md.digest(resultString
.getBytes(charsetname)));
} catch (Exception e) {
log.error("MD5Encode is error,msg={0}", e);
}
return resultString;
}
public static void main(String[] args) {
for (int i = 0; i < 5; i++) {
String uuid = "03a1dcd8cb1811eabac1c03fd56f7847";
System.out.println(get12Char(uuid));
}
}
/**
* 获取短字符
*
* @param str
* @return 大写
*/
public static String get12Char(String str) {
String arr[] = ShortText(str);
String rst = (arr[0] + arr[1]).toUpperCase();
return rst.substring(0, 4) + rst.substring(4, 8) + rst.substring(8, 12);
}
private static String[] ShortText(String string) {
String[] chars = new String[]{ // 要使用生成URL的字符
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n",
"o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B",
"C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N",
"O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"};
String hex = "";
MessageDigest md = null;
try {
md = MessageDigest.getInstance("MD5");
hex = byteArrayToHexString(md.digest(SALT.concat(string)
.getBytes("utf-8")));
} catch (Exception e) {
e.printStackTrace();
}
int hexLen = hex.length();
int subHexLen = hexLen / 8;
String[] ShortStr = new String[4];
for (int i = 0; i < subHexLen; i++) {
String outChars = "";
int j = i + 1;
String subHex = hex.substring(i * 8, j * 8);
long idx = Long.valueOf("3FFFFFFF", 16) & Long.valueOf(subHex, 16);
for (int k = 0; k < 6; k++) {
int index = (int) (Long.valueOf("0000003D", 16) & idx);
outChars += chars[index];
idx = idx >> 5;
}
ShortStr[i] = outChars;
}
return ShortStr;
}
}

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ScanContentUtils.java

@ -18,7 +18,6 @@ import java.util.List;
* 扫描内容工具类
*
* @author jianjun liu
* @email liujianjun@yunzongnet.com
* @date 2020-06-08 8:28
**/
@Slf4j

114
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/SendMqMsgUtils.java

@ -0,0 +1,114 @@
package com.epmet.commons.tools.utils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.epmet.commons.tools.config.MqConfig;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.form.mq.EventClassDto;
import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO;
import com.epmet.commons.tools.dto.form.mq.MqReturnBaseResult;
import com.epmet.commons.tools.enums.MqMethodPathEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.ValidateException;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 发送亿联云消息工具类
*
* @author jianjun liu
* @date 2020-06-08 8:28
**/
@Slf4j
@Component
public class SendMqMsgUtils {
private static MqConfig mqConfig;
/**
* desc:发送mq消息
*
* @return
*/
public static Result<String> sendMsg(MqBaseMsgDTO msg) {
if (mqConfig == null) {
mqConfig = SpringContextUtils.getBean(MqConfig.class);
}
log.debug("sendMsg param:{}", JSON.toJSONString(msg));
try {
// TODO
ValidatorUtils.validateEntity(msg, DefaultGroup.class);
} catch (ValidateException e) {
return new Result<String>().error(e.getMsg());
}
msg.setAppId(mqConfig.getAppId());
msg.setRequestUrl(mqConfig.getHost().concat(MqMethodPathEnum.SEND_MSG.getCode()));
msg.setToken(mqConfig.getToken());
try {
Result<String> result = HttpClientManager.getInstance().sendPostByHttps(msg.getRequestUrl(), JSON.toJSONString(msg));
log.debug("sendMsg result:{}", JSON.toJSONString(result));
if (result.success()) {
MqReturnBaseResult resultResult = JSON.parseObject(result.getData(), MqReturnBaseResult.class);
if (resultResult.getErrCode().equals(NumConstant.ZERO)) {
JSONObject jsonObject = JSON.parseObject(resultResult.getData());
return new Result<String>().ok(jsonObject.getString("msgId"));
} else {
log.error("sendMsg fail,resultData:{}", JSON.toJSONString(resultResult));
return new Result<String>().error(EpmetErrorCode.SERVER_ERROR.getCode(), resultResult.getErrMsg());
}
}
Result<String> resultResult = new Result<>();
resultResult.error(result.getCode(), result.getMsg());
resultResult.setInternalMsg(result.getInternalMsg());
return resultResult;
} catch (Exception e) {
log.debug("sendMsg exception", e);
return new Result<String>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
}
/**
* desc:发送mq消息
*
* @return
*/
public static Result<List<EventClassDto>> getEventClassList() {
if (mqConfig == null) {
mqConfig = SpringContextUtils.getBean(MqConfig.class);
}
Map<String, String> param = new HashMap<>();
param.put("appId", mqConfig.getAppId());
param.put("token", mqConfig.getToken());
String requestUrl = mqConfig.getHost().concat(MqMethodPathEnum.GET_EVENT_LIST.getCode());
try {
Result<String> result = HttpClientManager.getInstance().sendPostByHttps(requestUrl, JSON.toJSONString(param));
log.debug("getEventClassList result:{}", JSON.toJSONString(result));
if (result.success()) {
MqReturnBaseResult resultResult = JSON.parseObject(result.getData(), MqReturnBaseResult.class);
if (resultResult.getErrCode().equals(NumConstant.ZERO)) {
List<EventClassDto> eventClassDto = JSON.parseArray(resultResult.getData(), EventClassDto.class);
return new Result<List<EventClassDto>>().ok(eventClassDto);
} else {
log.error("sendMsg fail,resultData:{}", JSON.toJSONString(resultResult));
return new Result<List<EventClassDto>>().error(EpmetErrorCode.SERVER_ERROR.getCode(), resultResult.getErrMsg());
}
}
Result<List<EventClassDto>> resultResult = new Result<>();
resultResult.error(result.getCode(), result.getMsg());
resultResult.setInternalMsg(result.getInternalMsg());
return resultResult;
} catch (Exception e) {
log.debug("sendMsg exception", e);
return new Result<List<EventClassDto>>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
}
}

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.27
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-gateway:0.3.28
ports:
- "8080:8080"
network_mode: host # 使用现有网络

19
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.27</version>
<version>0.3.28</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-cloud</artifactId>
@ -108,7 +108,7 @@
<nacos.ip></nacos.ip>
<!-- gateway routes -->
<!-- 1、认证服务 -->
<!-- <gateway.routes.epmet-auth-server.uri>http://localhost:8081</gateway.routes.epmet-auth-server.uri>-->
<!-- <gateway.routes.epmet-auth-server.uri>http://localhost:8081</gateway.routes.epmet-auth-server.uri>-->
<gateway.routes.epmet-auth-server.uri>lb://epmet-auth-server</gateway.routes.epmet-auth-server.uri>
<!-- 2、Admin服务 -->
<gateway.routes.epmet-admin-server.uri>lb://epmet-admin-server</gateway.routes.epmet-admin-server.uri>
@ -130,6 +130,7 @@
<gateway.routes.oper-customize-server.uri>lb://oper-customize-server</gateway.routes.oper-customize-server.uri>
<!-- 11、运营端客户定制化服务 -->
<gateway.routes.oper-crm-server.uri>lb://oper-crm-server</gateway.routes.oper-crm-server.uri>
<!--<gateway.routes.oper-crm-server.uri>http://localhost:8090</gateway.routes.oper-crm-server.uri>-->
<!-- 12、居民端陌生人导览 -->
<gateway.routes.resi-guide-server.uri>lb://resi-guide-server</gateway.routes.resi-guide-server.uri>
<!-- 13、政府组织管理 -->
@ -189,6 +190,12 @@
<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>-->
<!-- 爱心互助 -->
<gateway.routes.epmet-heart-server.url>lb://epmet-heart-server</gateway.routes.epmet-heart-server.url>
<!-- <gateway.routes.epmet-heart-server.url>http://127.0.0.1:8111</gateway.routes.epmet-heart-server.url>-->
<!-- 32、 积分银行 -->
<gateway.routes.epmet-point-server.url>lb://epmet-point-server</gateway.routes.epmet-point-server.url>
<!-- <gateway.routes.epmet-point-server.url>http://127.0.0.1:8112</gateway.routes.epmet-point-server.url>-->
</properties>
</profile>
<profile>
@ -273,6 +280,10 @@
<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>
<!-- 32、 爱心互助 -->
<gateway.routes.epmet-heart-server.url>lb://epmet-heart-server</gateway.routes.epmet-heart-server.url>
<!-- 33、积分银行 -->
<gateway.routes.epmet-point-server.url>lb://epmet-point-server</gateway.routes.epmet-point-server.url>
</properties>
</profile>
<profile>
@ -354,6 +365,10 @@
<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>
<!-- 32、 爱心互助 -->
<gateway.routes.epmet-heart-server.url>lb://epmet-heart-server</gateway.routes.epmet-heart-server.url>
<!-- 33、 积分银行 -->
<gateway.routes.epmet-point-server.url>lb://epmet-point-server</gateway.routes.epmet-point-server.url>
</properties>
</profile>
</profiles>

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

@ -292,6 +292,24 @@ spring:
order: 31
predicates:
- Path=${server.servlet.context-path}/third/**
filters:
- StripPrefix=1
- CpAuth=true
# 爱心互助
- id: epmet-heart-server
uri: @gateway.routes.epmet-heart-server.url@
order: 32
predicates:
- Path=${server.servlet.context-path}/heart/**
filters:
- StripPrefix=1
- CpAuth=true
# 积分银行
- id: epmet-point-server
uri: @gateway.routes.epmet-point-server.url@
order: 33
predicates:
- Path=${server.servlet.context-path}/point/**
filters:
- StripPrefix=1
- CpAuth=true
@ -335,6 +353,8 @@ renren:
- /resi/group/**
- /resi/partymember/**
- /gov/grid/**
- /heart/**
- /point/**
management:
endpoints:
web:
@ -388,7 +408,7 @@ ribbon:
ConnectTimeout: 300000
epmet:
# 党群e事通(不放行)
# 党群e事通(校验是否登录)
urls:
- /oper/customize/**
- /oper/crm/**

119
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/form/EventFormDTO.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.dto.form;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
/**
* 事件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-16
*/
@Data
public class EventFormDTO implements Serializable {
private static final long serialVersionUID = -5890535035537229696L;
/**
* 主键
*/
private String id;
/**
* 消息网关事件类别ID 从消息网关获取事件类型Id
*/
private String classId;
/**
* 消息网关APP_ID
*/
private String appId;
/**
* 消息网关APP_NAME
*/
private String appName;
/**
* 事件标识 与消息网关事件tag一致
*/
@NotBlank(message = "事件标识不能为空",groups = {AddGroup.class, UpdateGroup.class})
private String eventCode;
/**
* 事件名称
*/
@NotBlank(message = "事件名称不能为空",groups = {AddGroup.class})
private String eventName;
/**
* 事件说明
*/
private String eventDesc;
/**
* 事件功能分组ID 来自oper_customize.customer_function表
*/
@NotBlank(message = "功能分组ID不能为空",groups = {AddGroup.class})
private String functionId;
/**
* 是否是通用事件 0-1-消息体内需要体现该字段通用则说明由业务系统自己计算分值
*/
@NotBlank(message = "是否是通用事件不能为空",groups = {AddGroup.class})
private String isCommon;
/**
* 删除标识 0-1-
*/
private String delFlag;
/**
* 乐观锁 查询时添加版本号新加的事件需要更新版本号
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

112
epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/result/EventDTO.java

@ -0,0 +1,112 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 事件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-16
*/
@Data
public class EventDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 消息网关事件类别ID 从消息网关获取事件类型Id
*/
private String classId;
/**
* 消息网关APP_ID
*/
private String appId;
/**
* 消息网关APP_NAME
*/
private String appName;
/**
* 事件标识 与消息网关事件tag一致
*/
private String eventCode;
/**
* 事件名称
*/
private String eventName;
/**
* 事件说明
*/
private String eventDesc;
/**
* 事件功能分组ID 来自oper_customize.customer_function表
*/
private String functionId;
/**
* 是否是通用事件 0-1-消息体内需要体现该字段通用则说明由业务系统自己计算分值
*/
private String isCommon;
/**
* 删除标识 0-1-
*/
private String delFlag;
/**
* 乐观锁 查询时添加版本号新加的事件需要更新版本号
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

10
epmet-module/epmet-common-service/common-service-server/pom.xml

@ -116,6 +116,11 @@
<nacos.ip/>
<spring.flyway.enabled>false</spring.flyway.enabled>
<!--亿联云消息网关配置-->
<elink.mq.host>https://epmet-dev.elinkservice.cn/estos/</elink.mq.host>
<elink.mq.sendMsgPath>producerService/producer/sendMsg</elink.mq.sendMsgPath>
<elink.mq.appId>202007161443499985fa2d397436d10356542134c8f008c48</elink.mq.appId>
<elink.mq.token>52d9d9b0e7d0eb5b8b81c205b579e07c</elink.mq.token>
</properties>
</profile>
<profile>
@ -177,6 +182,11 @@
<nacos.ip/>
<spring.flyway.enabled>true</spring.flyway.enabled>
<!--亿联云消息网关配置-->
<elink.mq.host>https://epmet-dev.elinkservice.cn/estos/</elink.mq.host>
<elink.mq.sendMsgPath>producerService/producer/sendMsg</elink.mq.sendMsgPath>
<elink.mq.appId>202007161443499985fa2d397436d10356542134c8f008c48</elink.mq.appId>
<elink.mq.token>52d9d9b0e7d0eb5b8b81c205b579e07c</elink.mq.token>
</properties>
</profile>
</profiles>

11
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/constant/ProjectConstant.java

@ -0,0 +1,11 @@
package com.epmet.constant;
/**
* desc:项目常量
*/
public interface ProjectConstant {
/**
* 时间已存在
*/
}

99
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/controller/EventController.java

@ -0,0 +1,99 @@
/**
* 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.config.MqConfig;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.SendMqMsgUtils;
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.dto.form.EventFormDTO;
import com.epmet.dto.result.EventDTO;
import com.epmet.service.EventService;
import lombok.extern.slf4j.Slf4j;
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-16
*/
@Slf4j
@RestController
@RequestMapping("event")
public class EventController {
@Autowired
private EventService eventService;
@Autowired
private MqConfig mqConfig;
@GetMapping("page")
public Result<PageData<EventDTO>> page(@RequestParam Map<String, Object> params){
PageData<EventDTO> page = eventService.page(params);
return new Result<PageData<EventDTO>>().ok(page);
}
@GetMapping("geteventclass")
public Result<?> getEventClass(){
return SendMqMsgUtils.getEventClassList();
}
/**
* desc:添加事件如果已存在则不作任何改动直接返回成功
*
* @param formDTO
* @return
* json:{
* "classId":"epmet_heart",
* "appId":"202007161443499985fa2d397436d10356542134c8f008c48",
* "appName":"党群e事通开发测试",
* "eventCode":"register_volunteer",
* "eventName":"认证志愿者",
* "eventDesc":"给注册志愿者的人发放积分",
* "functionId":"43addd0735230c01eedbb38d721076b0",
* "isCommon":"0"
* }
*/
@PostMapping("addEvent")
public Result<Boolean> addEvent(@RequestBody EventFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, AddGroup.class);
eventService.addEvent(formDTO);
return new Result<Boolean>().ok(true);
}
/**
* desc:修改事件如果已存在则不作任何改动直接返回成功
*
* @param formDTO
* @return
*/
@GetMapping("updateEvent")
public Result<Boolean> updateEvent(@RequestBody EventFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, UpdateGroup.class);
eventService.updateEvent(formDTO);
return new Result<Boolean>().ok(true);
}
}

35
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/dao/EventDao.java

@ -0,0 +1,35 @@
/**
* 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.EventEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 事件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-16
*/
@Mapper
public interface EventDao extends BaseDao<EventEntity> {
int getCountByEventCode(@Param("eventCode") String eventCode);
}

78
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/entity/EventEntity.java

@ -0,0 +1,78 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 事件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-16
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("event")
public class EventEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 消息网关事件类别ID 从消息网关获取事件类型Id
*/
private String classId;
/**
* 消息网关APP_ID
*/
private String appId;
/**
* 消息网关APP_NAME
*/
private String appName;
/**
* 事件标识 与消息网关事件tag一致
*/
private String eventCode;
/**
* 事件名称
*/
private String eventName;
/**
* 事件说明
*/
private String eventDesc;
/**
* 事件功能分组ID 来自oper_customize.customer_function表
*/
private String functionId;
/**
* 是否是通用事件 0-1-消息体内需要体现该字段通用则说明由业务系统自己计算分值
*/
private String isCommon;
}

41
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/enu/SysResponseEnum.java

@ -0,0 +1,41 @@
package com.epmet.enu;
/**
* @author jianjun liu
* @date 2020-06-04 21:39
**/
public enum SysResponseEnum {
/**
*
* 业务代码枚举类
*
* 编码样式CCCBBOOXX
* 编码示例说明
* CCC 中心编码&业务系统 (103-内容扫描服务中心服务)
* BB 业务类型00-默认
* OO 操作类型00-默认
*
*/
/*通用枚举 */
EXCEPTION(10301,"系统异常"),
/*事件 业务 01*/
EVENT_HAS_ALREADY_EXIST(103010001,"事件已存在无需重复添加"),
;
private Integer code;
private String msg;
SysResponseEnum(Integer code, String msg){
this.code = code;
this.msg = msg;
}
public Integer getCode() {
return code;
}
public String getMsg() {
return msg;
}
}

41
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/EventService.java

@ -0,0 +1,41 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.form.EventFormDTO;
import com.epmet.dto.result.EventDTO;
import com.epmet.entity.EventEntity;
import java.util.Map;
/**
* 事件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-16
*/
public interface EventService extends BaseService<EventEntity> {
void addEvent(EventFormDTO formDTO);
void updateEvent(EventFormDTO formDTO);
PageData<EventDTO> page(Map<String, Object> params);
}

72
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/service/impl/EventServiceImpl.java

@ -0,0 +1,72 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.EventDao;
import com.epmet.dto.form.EventFormDTO;
import com.epmet.dto.result.EventDTO;
import com.epmet.entity.EventEntity;
import com.epmet.service.EventService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 事件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-16
*/
@Slf4j
@Service
public class EventServiceImpl extends BaseServiceImpl<EventDao, EventEntity> implements EventService {
@Override
public PageData<EventDTO> page(Map<String, Object> params) {
IPage<EventEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, EventDTO.class);
}
@Override
public void addEvent(EventFormDTO formDTO) {
EventEntity eventEntity = ConvertUtils.sourceToTarget(formDTO, EventEntity.class);
baseDao.insert(eventEntity);
}
@Override
public void updateEvent(EventFormDTO formDTO) {
//baseDao.update(eventEntity);
}
private QueryWrapper<EventEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<EventEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
}

10
epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml

@ -117,4 +117,12 @@ ribbon:
#pageHelper分页插件
pagehelper:
helper-dialect: mysql
reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1
reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1
#亿联云消息网关
elink:
mq:
appId: @elink.mq.appId@ #项目接入亿联云的应用Id
token: @elink.mq.token@ #项目接入亿联云的应用token 相当于secret
host: @elink.mq.host@ #亿联云消息网关服务地址
sendMsgPath: @elink.mq.sendMsgPath@ #发送消息路径

21
epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/epmet_common_service.sql

@ -416,3 +416,24 @@ INSERT INTO `calender` VALUES ('ff7e08ece3008eeb1661a2b1d8b4e20e', 0, '20200711'
INSERT INTO `calender` VALUES ('ffe45e7059c67874f88498cfcfd19b4c', 0, '20200424', '2020-04-24', 5, '', '', '', '1', '工作日', '', 'Friday', '周五', 0, 0, 'APP_USER', '2020-05-12 01:32:25', 'APP_USER', '2020-05-12 10:05:11');
SET FOREIGN_KEY_CHECKS = 1;
#add by liujianjun 2020-07-16
CREATE TABLE `event` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CLASS_ID` varchar(32) DEFAULT NULL COMMENT '消息网关事件类别ID 从消息网关获取事件类型Id',
`APP_ID` varchar(128) DEFAULT NULL COMMENT '消息网关APP_ID',
`APP_NAME` varchar(32) DEFAULT NULL COMMENT '消息网关APP_NAME',
`EVENT_CODE` varchar(32) DEFAULT NULL COMMENT '事件标识 与消息网关事件tag一致',
`EVENT_NAME` varchar(32) DEFAULT NULL COMMENT '事件名称',
`EVENT_DESC` varchar(64) DEFAULT NULL COMMENT '事件说明',
`FUNCTION_ID` varchar(64) DEFAULT NULL COMMENT '功能ID 来自oper_customize.customer_function表',
`IS_COMMON` varchar(1) DEFAULT NULL COMMENT '是否是通用事件 0-否,1-是;消息体内需要体现该字段,通用则说明由业务系统自己计算分值',
`DEL_FLAG` varchar(1) DEFAULT NULL COMMENT '删除标识 0-否,1-是',
`REVISION` int(11) DEFAULT NULL COMMENT '乐观锁 查询时添加版本号,新加的事件需要更新版本号',
`CREATED_BY` varchar(32) DEFAULT NULL COMMENT '创建人',
`CREATED_TIME` datetime DEFAULT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) DEFAULT NULL COMMENT '更新人',
`UPDATED_TIME` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`),
UNIQUE KEY `unx_event_code` (`EVENT_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='事件表';

28
epmet-module/epmet-common-service/common-service-server/src/main/resources/mapper/EventDao.xml

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.EventDao">
<resultMap type="com.epmet.entity.EventEntity" id="eventMap">
<result property="id" column="ID"/>
<result property="classId" column="CLASS_ID"/>
<result property="appId" column="APP_ID"/>
<result property="appName" column="APP_NAME"/>
<result property="eventCode" column="EVENT_CODE"/>
<result property="eventName" column="EVENT_NAME"/>
<result property="eventDesc" column="EVENT_DESC"/>
<result property="functionId" column="FUNCTION_ID"/>
<result property="isCommon" column="IS_COMMON"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getCountByEventCode" resultType="int">
select count(ID) from event where EVENT_CODE = #{eventCode,jdbcType=VARCHAR}
</select>
</mapper>

41
epmet-module/epmet-heart/epmet-heart-client/pom.xml

@ -0,0 +1,41 @@
<?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>
<groupId>com.epmet</groupId>
<artifactId>epmet-heart</artifactId>
<version>2.0.0</version>
</parent>
<artifactId>epmet-heart-client</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-tools</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-user-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
</build>
</project>

92
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActContentDTO.java

@ -0,0 +1,92 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 活动内容
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-19
*/
@Data
public class ActContentDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 活动id:act_info.id
*/
private String actId;
/**
* 内容
*/
private String content;
/**
* 内容类型 图片img文字text
*/
private String contentType;
/**
* 内容顺序 从1开始
*/
private Integer orderNum;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

106
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActCustomizedDTO.java

@ -0,0 +1,106 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 爱心互助首页自定义配置
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-19
*/
@Data
public class ActCustomizedDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键客户如果没配置默认的值写在代码里
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 标题eg: 志愿者去哪儿
*/
private String titleName;
/**
* 咨询热线
*/
private String hotline;
/**
* 活动列表
*/
private String actListName;
/**
* 爱心榜
*/
private String heartRankName;
/**
* 活动回顾
*/
private String actReviewName;
/**
* 我的活动
*/
private String myActName;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 删除标记
*/
private String delFlag;
}

257
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActInfoDTO.java

@ -0,0 +1,257 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 活动信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-19
*/
@Data
public class ActInfoDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 活动标题
*/
private String title;
/**
* 活动封面
*/
private String coverPic;
/**
* 报名开始时间
*/
private Date signUpStartTime;
/**
* 报名截止时间
*/
private Date signUpEndTime;
/**
* 招募要求
*/
private String requirement;
/**
* 活动开始时间
*/
private Date actStartTime;
/**
* 活动结束时间
*/
private Date actEndTime;
/**
* 活动地点
*/
private String actAddress;
/**
* 活动位置经度
*/
private BigDecimal actLongitude;
/**
* 活动位置纬度
*/
private BigDecimal actLatitude;
/**
* 打卡开始时间
*/
private Date signInStartTime;
/**
* 打卡截止时间
*/
private Date signInEndTime;
/**
* 活动签到打卡地点
*/
private String signInAddress;
/**
* 活动签到打卡位置经度
*/
private BigDecimal signInLongitude;
/**
* 活动签到打卡位置纬度
*/
private BigDecimal signInLatitude;
/**
* 活动签到打卡半径(单位)
*/
private Integer signInRadius;
/**
* 活动名额类型(0-不限名额1-固定名额)
*/
private Boolean actQuotaCategory;
/**
* 活动名额
*/
private Integer actQuota;
/**
* 活动状态
已发布/报名中published
已取消canceled;
已结束finished
*/
private String actStatus;
/**
* 活动取消的原因
*/
private String cancelReason;
/**
* 取消活动的时间
*/
private Date cancelTime;
/**
* 联系人
*/
private String sponsorContacts;
/**
* 联系电话
*/
private String sponsorTel;
/**
* 发布名义网格主办grid组织主办agency
*/
private String sponsorType;
/**
* 主办方id机关或网格的id
*/
private String sponsorId;
/**
* 活动主办方名称机关或网格的名称
*/
private String sponsorName;
/**
* 发布单位的上一级组织id如果是以网格发布此列存储的是网格所属机关的上一级机关
*/
private String pid;
/**
* 活动奖励积分
*/
private Integer reward;
/**
* 身份限制:1只有志愿者才可以参加活动0不限制志愿者身份
*/
private Boolean volunteerLimit;
/**
* 审核开关1报名人员需要人工审核0不需要
*/
private Boolean auditSwitch;
/**
* 活动实际开始时间
*/
private Date actualStartTime;
/**
* 活动实际结束时间
*/
private Date actualEndTime;
/**
* 活动共计时长服务时间单位分钟
*/
private Integer serviceMin;
/**
* 1已经总结0未总结
*/
private Boolean summaryFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间活动发布时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 删除标识
*/
private String delFlag;
// 虚字段
/**
* 用户id
*/
private String userId;
}

86
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActLivePicDTO.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-19
*/
@Data
public class ActLivePicDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 实况IDact_live.id
*/
private String liveId;
/**
* 图片地址
*/
private String picUrl;
/**
* 排序从1开始
*/
private Integer sort;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 删除标志
*/
private String delFlag;
}

102
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActLiveRecDTO.java

@ -0,0 +1,102 @@
/**
* 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;
import java.math.BigDecimal;
/**
* 活动实况记录
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-19
*/
@Data
public class ActLiveRecDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 活动id: act_info.id
*/
private String actId;
/**
* 用户id
*/
private String userId;
/**
* 实况打卡位置经度
*/
private BigDecimal longitude;
/**
* 实况打卡位置纬度
*/
private BigDecimal latitude;
/**
* 实况打卡地址
*/
private String address;
/**
* 实况打卡描述
*/
private String desc;
/**
* 删除标记
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

95
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActOperationRecDTO.java

@ -0,0 +1,95 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 活动操作日志表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-19
*/
@Data
public class ActOperationRecDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 活动id
*/
private String actId;
/**
* 发布publish
取消活动cancel;
结束活动finish
重新编辑update
*/
private String type;
/**
* 1通知用户0不通知取消活动时默认true
*/
private Boolean noticeUser;
/**
* 备注取消活动时此列有值
*/
private String remark;
/**
* 删除标记
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 操作人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

97
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActPointLogDTO.java

@ -0,0 +1,97 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 活动发放积分日志表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-19
*/
@Data
public class ActPointLogDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键(给分或者不给分以及重新处理插入本表)
*/
private String id;
/**
* 活动id
*/
private String actId;
/**
* 用户id
*/
private String userId;
/**
* 积分值
*/
private Integer points;
/**
* 操作类型
同意给分agree 不给分deny重新处理: reset
*/
private String operateType;
/**
* 备注:拒绝给分和重新处理时录入的理由
*/
private String remark;
/**
* 删除标识 0-1-
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人工作人员id
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

86
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActSignInPicDTO.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-19
*/
@Data
public class ActSignInPicDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 签到记录IDact_sign_in_record.id
*/
private String signInId;
/**
* 图片地址
*/
private String picUrl;
/**
* 排序从1开始
*/
private Integer sort;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 删除标志
*/
private String delFlag;
}

112
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActSignInRecDTO.java

@ -0,0 +1,112 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import java.math.BigDecimal;
/**
* 活动签到记录
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-19
*/
@Data
public class ActSignInRecDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 活动idact_info.id
*/
private String actId;
/**
* 用户id
*/
private String userId;
/**
* 签到位置经度
*/
private BigDecimal longitude;
/**
* 签到位置纬度
*/
private BigDecimal latitude;
/**
* 签到地址
*/
private String address;
/**
* 签到描述
*/
private String desc;
/**
* 0不同步实况1同步到实况记录
*/
private Integer syncLive;
/**
* 实况id,党sync_live=1时此列有值
*/
private String liveId;
/**
* 删除标记
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

117
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActStatisticalDTO.java

@ -0,0 +1,117 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 活动统计信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-19
*/
@Data
public class ActStatisticalDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键活动结束后插入本表
*/
private String id;
/**
* 活动id
*/
private String actId;
/**
* 报名总人数已报名/待审核auditing审核通过passed审核不通过refused取消报名canceld总人数
*/
private Integer signupNum;
/**
* 待审核
*/
private Integer auditingNum;
/**
* 审核通过
*/
private Integer passedNum;
/**
* 审核不通过总人数
*/
private Integer refusedNum;
/**
* 取消报名的人数
*/
private Integer canceldNum;
/**
* 活动已签到人数
*/
private Integer signedInUserNum;
/**
* 发放积分总人数
*/
private Integer rewardUserNum;
/**
* 拒绝发放积分总人数
*/
private Integer denyRewardUserNum;
/**
* 删除标识
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

91
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActSummaryDTO.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-19
*/
@Data
public class ActSummaryDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
private String id;
/**
* 活动IDact_info.id
*/
private String actId;
/**
* 内容
*/
private String content;
/**
* 内容类型 图片img文字text
*/
private String contentType;
/**
* 内容顺序 从1开始
*/
private Integer orderNum;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

99
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActUserLogDTO.java

@ -0,0 +1,99 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 用户活动关系日志表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-19
*/
@Data
public class ActUserLogDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 活动ID
*/
private String actId;
/**
* 用户ID
*/
private String userId;
/**
* 操作类型已报名/待审核auditing
* 审核通过passed
* 审核不通过refused
* 取消报名canceled
*
*/
private String operationType;
/**
* 操作备注1审核不通过的原因
2取消报名的原因|
3拒绝发放积分的理由
(4)重新处理的理由
*/
private String reason;
/**
* 删除标识 0.未删除 1.已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间操作的时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

136
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/ActUserRelationDTO.java

@ -0,0 +1,136 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 用户活动关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-19
*/
@Data
public class ActUserRelationDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键用户-活动一对一报名取消再报名也只有一条记录
*/
private String id;
/**
* 活动ID
*/
private String actId;
/**
* 用户ID
*/
private String userId;
/**
* 当前状态已报名/待审核auditing
审核通过passed
审核不通过refused
取消报名canceled
*/
private String status;
/**
* 审核通过类型auto, manual
*/
private String passedType;
/**
* 审核时间同意拒绝的时间
*/
private Date auditTime;
/**
* 未通过原因
*/
private String failureReason;
/**
* 取消报名的时间
*/
private Date cancelTime;
/**
* 用户取消报名的原因
*/
private String cancelReason;
/**
* 已处理: handled; 默认"",重新处理时reward_flag置为空字符串
*/
private String processFlag;
/**
* 已签到:signed_in; 默认""
*/
private String signInFlag;
/**
* 已给分agree, 不给分deny 默认""
*/
private String rewardFlag;
/**
* 拒绝发放积分备注
*/
private String denyRewardReason;
/**
* 乐观锁
*/
private Integer revision;
/**
* 删除标记
*/
private String delFlag;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间报名时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

103
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/HeartUserInfoDTO.java

@ -0,0 +1,103 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 用户信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-19
*/
@Data
public class HeartUserInfoDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键用户提交报名成功后插入本表
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 用户id
*/
private String userId;
/**
* 1是志愿者0不是志愿者志愿者注册成功后需要来更新值
*/
private Boolean volunteerFlag;
/**
* 爱心时长(单位分钟)参与并签到了的活动实际结束-实际开始签到的未签到但是有积分的
*/
private Integer kindnessTime;
/**
* 实际参与活动个数签到+1
*/
private Integer participationNum;
/**
* 参与活动并获得积分的次数发放积分+1重新处理如果原来是发放积分需要-1
*/
private Integer obtainPointNum;
/**
* 删除标记
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

91
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActContentDTO.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-19
*/
@Data
public class LatestActContentDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 活动id:latest_act_info.id
*/
private String actId;
/**
* 内容
*/
private String content;
/**
* 内容类型 图片img文字text
*/
private String contentType;
/**
* 内容顺序 从1开始
*/
private Integer orderNum;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

212
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/LatestActInfoDTO.java

@ -0,0 +1,212 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 最近一次编辑的活动信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-19
*/
@Data
public class LatestActInfoDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 活动标题
*/
private String title;
/**
* 活动封面
*/
private String coverPic;
/**
* 报名开始时间
*/
private Date signUpStartTime;
/**
* 报名截止时间
*/
private Date signUpEndTime;
/**
* 招募要求
*/
private String requirement;
/**
* 活动开始时间
*/
private Date actStartTime;
/**
* 活动结束时间
*/
private Date actEndTime;
/**
* 活动地点
*/
private String actAddress;
/**
* 活动位置经度
*/
private BigDecimal actLongitude;
/**
* 活动位置纬度
*/
private BigDecimal actLatitude;
/**
* 打卡开始时间
*/
private Date signInStartTime;
/**
* 打卡截止时间
*/
private Date signInEndTime;
/**
* 活动签到打卡地点
*/
private String signInAddress;
/**
* 活动签到打卡位置经度
*/
private BigDecimal signInLongitude;
/**
* 活动签到打卡位置纬度
*/
private BigDecimal signInLatitude;
/**
* 活动签到打卡半径(单位)
*/
private Integer signInRadius;
/**
* 活动名额类型(0-不限名额1-固定名额)
*/
private Boolean actQuotaCategory;
/**
* 活动名额
*/
private Integer actQuota;
/**
* 联系人
*/
private String sponsorContacts;
/**
* 联系电话
*/
private String sponsorTel;
/**
* 主办方类型网格主办grid组织主办agency
*/
private String sponsorType;
/**
* 主办方id机关或网格的id
*/
private String sponsorId;
/**
* 活动主办方名称机关或网格的名称
*/
private String sponsorName;
/**
* 如果以网格名义发布存储空字符串""
*/
private String pid;
/**
* 活动奖励积分
*/
private Integer reward;
/**
* 身份限制:1只有志愿者才可以参加活动0不限制志愿者身份
*/
private Boolean volunteerLimit;
/**
* 审核开关1报名人员需要人工审核0不需要
*/
private Boolean auditSwitch;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 删除标识
*/
private String delFlag;
}

91
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/VolunteerInfoDTO.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-19
*/
@Data
public class VolunteerInfoDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键志愿者注册后插入本表
*/
private String id;
/**
* 用户id
*/
private String userId;
/**
* 客户id
*/
private String customerId;
/**
* 志愿者自我介绍
*/
private String volunteerIntroduce;
/**
* 志愿者签名
*/
private String volunteerSignature;
/**
* 删除标记
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间(认证志愿者时间)
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

0
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/.gitkeep

68
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActBaseFormDTO.java

@ -0,0 +1,68 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.form.resi;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 活动列表(标准) 入参
*
* @author zhangyong
* @since v1.0.0 2020-07-20
*/
@Data
public class ResiActBaseFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
//>>>>>>>>>>>>>>>>>校验分组开始>>>>>>>>>>>>>>>>>>>>>
/**
* 添加用户操作的内部异常分组
* 出现错误会提示给前端7000错误码返回信息为服务器开小差...
*/
public interface AddUserInternalGroup {}
// <<<<<<<<<<<<<<<<<<<校验分组结束<<<<<<<<<<<<<<<<<<<<<<<<
/**
* 客户Id
*/
@NotBlank(message = "客户Id不能为空", groups = { AddUserInternalGroup.class })
private String customerId;
/**
* 页码从1开始
*/
@Min(value = 1, message = "页码必须大于0", groups = { AddUserInternalGroup.class })
private Integer pageNo;
/**
* 页容量默认20页
*/
@Min(value = 1, message = "每页条数必须大于必须大于0", groups = { AddUserInternalGroup.class })
private Integer pageSize;
/**
* 用户id
*/
private String userId;
}

45
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActCaculateDistanceFormDTO.java

@ -0,0 +1,45 @@
package com.epmet.dto.form.resi;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 重新定位 入参
*
* @author zhangyong
* @since v1.0.0 2020-07-20
*/
@Data
public class ResiActCaculateDistanceFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
//>>>>>>>>>>>>>>>>>校验分组开始>>>>>>>>>>>>>>>>>>>>>
/**
* 添加用户操作的内部异常分组
* 出现错误会提示给前端7000错误码返回信息为服务器开小差...
*/
public interface AddUserInternalGroup {}
// <<<<<<<<<<<<<<<<<<<校验分组结束<<<<<<<<<<<<<<<<<<<<<<<<
/**
* 经度
*/
@NotBlank(message = "经度不能为空", groups = { AddUserInternalGroup.class })
private Double longitude;
/**
* 纬度
*/
@NotBlank(message = "纬度不能为空", groups = { AddUserInternalGroup.class })
private Double latitude;
/**
* 用户id
*/
@NotBlank(message = "活动ID不能为空", groups = { AddUserInternalGroup.class })
private String actId;
}

46
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActContentFormDTO.java

@ -0,0 +1,46 @@
package com.epmet.dto.form.resi;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 活动内容(活动详情-已结束-回顾稿) 入参
*
* @Auther: zhangyong
* @Date: 2020-07-21 18:12
*/
@Data
public class ResiActContentFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
//>>>>>>>>>>>>>>>>>校验分组开始>>>>>>>>>>>>>>>>>>>>>
/**
* 添加用户操作的内部异常分组
* 出现错误会提示给前端7000错误码返回信息为服务器开小差...
*/
public interface AddUserInternalGroup {}
// <<<<<<<<<<<<<<<<<<<校验分组结束<<<<<<<<<<<<<<<<<<<<<<<<
/**
* 活动Id
*/
@NotBlank(message = "活动Id不能为空", groups = { AddUserInternalGroup.class })
private String actId;
/**
* 页码从1开始
*/
@Min(value = 1, message = "页码必须大于0", groups = { AddUserInternalGroup.class })
private Integer pageNo;
/**
* 页容量默认20页
*/
@Min(value = 1, message = "每页条数必须大于必须大于0", groups = { ResiActBaseFormDTO.AddUserInternalGroup.class })
private Integer pageSize;
}

38
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActDetailFormDTO.java

@ -0,0 +1,38 @@
package com.epmet.dto.form.resi;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 活动详情 入参
*
* @Auther: zhangyong
* @Date: 2020-07-21 18:12
*/
@Data
public class ResiActDetailFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
//>>>>>>>>>>>>>>>>>校验分组开始>>>>>>>>>>>>>>>>>>>>>
/**
* 添加用户操作的内部异常分组
* 出现错误会提示给前端7000错误码返回信息为服务器开小差...
*/
public interface AddUserInternalGroup {}
// <<<<<<<<<<<<<<<<<<<校验分组结束<<<<<<<<<<<<<<<<<<<<<<<<
/**
* 活动Id
*/
@NotBlank(message = "活动Id不能为空", groups = { AddUserInternalGroup.class })
private String actId;
/**
* 用户id
*/
private String userId;
}

104
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActInsertLiveFormDTO.java

@ -0,0 +1,104 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.form.resi;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 活动-添加实况 入参
*
* @author zhangyong
* @since v1.0.0 2020-07-23
*/
@Data
public class ResiActInsertLiveFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
//>>>>>>>>>>>>>>>>>校验分组开始>>>>>>>>>>>>>>>>>>>>>
/**
* 添加用户操作的内部异常分组
* 出现错误会提示给前端7000错误码返回信息为服务器开小差...
*/
public interface AddUserInternalGroup {}
/**
* 添加用户操作的用户可见异常分组
* 该分组用于校验需要返回给前端错误信息提示的列需要继承CustomerClientShowGroup
* 返回错误码为8999提示信息为DTO中具体的列的校验注解message的内容
*/
public interface AddUserShowGroup extends CustomerClientShowGroup {}
// <<<<<<<<<<<<<<<<<<<校验分组结束<<<<<<<<<<<<<<<<<<<<<<<<
/**
* 活动ID
*/
@NotBlank(message = "活动ID不能为空", groups = { AddUserInternalGroup.class })
private String actId;
/**
* 活动签到描述
*/
private String desc;
/**
* 活动签到位置经度
*/
@NotBlank(message = "活动签到位置经度不能为空", groups = { AddUserInternalGroup.class })
private BigDecimal longitude;
/**
* 活动签到位置纬度
*/
@NotBlank(message = "活动签到位置纬度不能为空", groups = { AddUserInternalGroup.class })
private BigDecimal latitude;
/**
* 活动签到地址
*/
@NotBlank(message = "活动签到地址不能为空", groups = { AddUserInternalGroup.class, AddUserShowGroup.class})
private String address;
/**
* 图片
*/
private List<String> images;
/**
* 用户id
*/
private String userId;
/**
* id
*/
private String id;
/**
* 客户id
*/
@NotBlank(message = "客户id不能为空", groups = {AddUserShowGroup.class })
private String customerId;
}

61
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActRegistrationFormDTO.java

@ -0,0 +1,61 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.form.resi;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 活动报名参数
*
* @author zhangyong
* @since v1.0.0 2020-07-20
*/
@Data
public class ResiActRegistrationFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
//>>>>>>>>>>>>>>>>>校验分组开始>>>>>>>>>>>>>>>>>>>>>
/**
* 添加用户操作的内部异常分组
* 出现错误会提示给前端7000错误码返回信息为服务器开小差...
*/
public interface AddUserInternalGroup {}
// <<<<<<<<<<<<<<<<<<<校验分组结束<<<<<<<<<<<<<<<<<<<<<<<<
/**
* 用户Id
*/
private String userId;
/**
* 活动ID
*/
@NotBlank(message = "活动ID不能为空", groups = { AddUserInternalGroup.class })
private String actId;
/**
* 客户ID
*/
@NotBlank(message = "客户ID不能为空", groups = { AddUserInternalGroup.class })
private String customerId;
}

105
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActSignInFormDTO.java

@ -0,0 +1,105 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.form.resi;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 活动签到 入参
*
* @author zhangyong
* @since v1.0.0 2020-07-23
*/
@Data
public class ResiActSignInFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
//>>>>>>>>>>>>>>>>>校验分组开始>>>>>>>>>>>>>>>>>>>>>
/**
* 添加用户操作的内部异常分组
* 出现错误会提示给前端7000错误码返回信息为服务器开小差...
*/
public interface AddUserInternalGroup {}
/**
* 添加用户操作的用户可见异常分组
* 该分组用于校验需要返回给前端错误信息提示的列需要继承CustomerClientShowGroup
* 返回错误码为8999提示信息为DTO中具体的列的校验注解message的内容
*/
public interface AddUserShowGroup extends CustomerClientShowGroup {}
// <<<<<<<<<<<<<<<<<<<校验分组结束<<<<<<<<<<<<<<<<<<<<<<<<
/**
* 活动ID
*/
@NotBlank(message = "活动ID不能为空", groups = { AddUserInternalGroup.class })
private String actId;
/**
* 活动签到描述
*/
private String desc;
/**
* 活动签到位置经度
*/
@NotBlank(message = "活动签到位置经度不能为空", groups = { AddUserInternalGroup.class })
private BigDecimal longitude;
/**
* 活动签到位置纬度
*/
@NotBlank(message = "活动签到位置纬度不能为空", groups = { AddUserInternalGroup.class })
private BigDecimal latitude;
/**
* 活动签到地址
*/
@NotBlank(message = "活动签到地址不能为空", groups = { AddUserInternalGroup.class, AddUserShowGroup.class})
private String address;
/**
* 图片
*/
private List<String> images;
/**
* 0不同步实况1同步到实况记录
*/
@NotBlank(message = "是否同步到实况记录不能为空", groups = { AddUserInternalGroup.class, AddUserShowGroup.class})
private Integer syncLive;
/**
* 用户id
*/
private String userId;
/**
* 客户id
*/
@NotBlank(message = "客户id不能为空", groups = {AddUserShowGroup.class })
private String customerId;
}

71
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActUserCancelSignUpFormDTO.java

@ -0,0 +1,71 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.form.resi;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 取消报名参数
*
* @author zhangyong
* @since v1.0.0 2020-07-20
*/
@Data
public class ResiActUserCancelSignUpFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
//>>>>>>>>>>>>>>>>>校验分组开始>>>>>>>>>>>>>>>>>>>>>
/**
* 添加用户操作的内部异常分组
* 出现错误会提示给前端7000错误码返回信息为服务器开小差...
*/
public interface AddUserInternalGroup {}
/**
* 添加用户操作的用户可见异常分组
* 该分组用于校验需要返回给前端错误信息提示的列需要继承CustomerClientShowGroup
* 返回错误码为8999提示信息为DTO中具体的列的校验注解message的内容
*/
public interface AddUserShowGroup extends CustomerClientShowGroup {}
// <<<<<<<<<<<<<<<<<<<校验分组结束<<<<<<<<<<<<<<<<<<<<<<<<
/**
* 用户Id
*/
private String userId;
/**
* 活动ID
*/
@NotBlank(message = "活动ID不能为空", groups = { AddUserInternalGroup.class })
private String actId;
/**
* 取消报名原因
*/
@NotBlank(message = "请输入取消报名原因", groups = { AddUserInternalGroup.class, AddUserShowGroup.class })
@Length(max = 150, message = "取消报名原因不能超过150字", groups = { AddUserInternalGroup.class, AddUserShowGroup.class })
private String failureReason;
}

57
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiLatestActFormDTO.java

@ -0,0 +1,57 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.form.resi;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 最新活动列表 入参
*
* @author zhangyong
* @since v1.0.0 2020-07-21
*/
@Data
public class ResiLatestActFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
//>>>>>>>>>>>>>>>>>校验分组开始>>>>>>>>>>>>>>>>>>>>>
/**
* 添加用户操作的内部异常分组
* 出现错误会提示给前端7000错误码返回信息为服务器开小差...
*/
public interface AddUserInternalGroup {}
// <<<<<<<<<<<<<<<<<<<校验分组结束<<<<<<<<<<<<<<<<<<<<<<<<
/**
* 客户Id
*/
@NotBlank(message = "客户Id不能为空", groups = { AddUserInternalGroup.class })
private String customerId;
/**
* 页容量默认20页
*/
@Min(value = 1, message = "每页条数必须大于必须大于0", groups = { AddUserInternalGroup.class })
private Integer num;
}

61
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiMyActFormDTO.java

@ -0,0 +1,61 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.form.resi;
import lombok.Data;
import javax.validation.constraints.Min;
import java.io.Serializable;
/**
* 我的活动列表 入参
*
* @author zhangyong
* @since v1.0.0 2020-07-20
*/
@Data
public class ResiMyActFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
//>>>>>>>>>>>>>>>>>校验分组开始>>>>>>>>>>>>>>>>>>>>>
/**
* 添加用户操作的内部异常分组
* 出现错误会提示给前端7000错误码返回信息为服务器开小差...
*/
public interface AddUserInternalGroup {}
// <<<<<<<<<<<<<<<<<<<校验分组结束<<<<<<<<<<<<<<<<<<<<<<<<
/**
* 页码从1开始
*/
@Min(value = 1, message = "页码必须大于0", groups = { AddUserInternalGroup.class })
private Integer pageNo;
/**
* 页容量默认20页
*/
@Min(value = 1, message = "每页条数必须大于必须大于0", groups = { AddUserInternalGroup.class })
private Integer pageSize;
/**
* 用户id
*/
private String userId;
}

117
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiVolunteerAuthenticateFormDTO.java

@ -0,0 +1,117 @@
package com.epmet.dto.form.resi;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 志愿者认证 入参
*
* @Auther: zhangyong
* @Date: 2020-07-23 09:57
*/
@Data
public class ResiVolunteerAuthenticateFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
//>>>>>>>>>>>>>>>>>校验分组开始>>>>>>>>>>>>>>>>>>>>>
/**
* 添加用户操作的内部异常分组
* 出现错误会提示给前端7000错误码返回信息为服务器开小差...
*/
public interface AddUserInternalGroup {}
/**
* 添加用户操作的用户可见异常分组
* 该分组用于校验需要返回给前端错误信息提示的列需要继承CustomerClientShowGroup
* 返回错误码为8999提示信息为DTO中具体的列的校验注解message的内容
*/
public interface AddUserShowGroup extends CustomerClientShowGroup {}
// <<<<<<<<<<<<<<<<<<<校验分组结束<<<<<<<<<<<<<<<<<<<<<<<<
/**
* 用户id
*/
private String userId;
/**
* 客户id
*/
@NotBlank(message = "客户id不能为空", groups = {AddUserShowGroup.class })
private String customerId;
/**
*
*/
@NotBlank(message = "姓不能为空", groups = {AddUserInternalGroup.class, AddUserShowGroup.class })
private String surname;
/**
*
*/
@NotBlank(message = "名不能为空", groups = {AddUserInternalGroup.class, AddUserShowGroup.class })
private String name;
/**
* 性别1男2女0未知
*/
@NotBlank(message = "性别不能为空", groups = {AddUserInternalGroup.class, AddUserShowGroup.class })
private String gender;
/**
* 手机号
*/
@NotBlank(message = "手机号不能为空", groups = {AddUserInternalGroup.class, AddUserShowGroup.class })
private String mobile;
/**
* 身份证号码
*/
@NotBlank(message = "身份证号码不能为空", groups = {AddUserInternalGroup.class, AddUserShowGroup.class })
private String idNum;
/**
* 街道
*/
@NotBlank(message = "街道不能为空", groups = {AddUserInternalGroup.class, AddUserShowGroup.class })
private String street;
/**
* 小区名
*/
@NotBlank(message = "小区名不能为空", groups = {AddUserInternalGroup.class, AddUserShowGroup.class })
private String district;
/**
* 楼栋单元
*/
@NotBlank(message = "楼栋单元不能为空", groups = {AddUserInternalGroup.class, AddUserShowGroup.class })
private String buildingAddress;
/**
* 志愿者自我介绍
*/
private String volunteerIntroduce;
/**
* 昵称
*/
@NotBlank(message = "昵称不能为空", groups = {AddUserInternalGroup.class, AddUserShowGroup.class })
private String nickname;
/**
* 头像
*/
@NotBlank(message = "头像不能为空", groups = {AddUserInternalGroup.class, AddUserShowGroup.class })
private String avatarUrl;
/**
* 志愿者签名
*/
private String volunteerSignature;
}

27
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/AactUserDetailFormDTO.java

@ -0,0 +1,27 @@
package com.epmet.dto.form.work;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 报名审核-人员详情-入参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/22 22:22
*/
@Data
public class AactUserDetailFormDTO implements Serializable {
private static final long serialVersionUID = 5791290477143999176L;
public interface AddUserInternalGroup {
}
/**
* 列表页返回的主键
*/
@NotBlank(message = "主键不能为空", groups = {AddUserInternalGroup.class})
private String actUserRelationId;
}

23
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActCustomizedFormDTO.java

@ -0,0 +1,23 @@
package com.epmet.dto.form.work;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 获取自定义配置项-入参
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/20 15:17
*/
@Data
public class ActCustomizedFormDTO implements Serializable {
private static final long serialVersionUID = 7089647420851532829L;
public interface AddUserInternalGroup {}
/**
* 客户id
*/
@NotBlank(message = "客户id不能为空", groups = { AddUserInternalGroup.class })
private String customerId;
}

24
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActIdFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.form.work;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 活动id通用formdto
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/24 11:07
*/
@Data
public class ActIdFormDTO implements Serializable {
private static final long serialVersionUID = 7151533863877527886L;
public interface AddUserInternalGroup {}
/**
* 活动id
*/
@NotBlank(message = "活动id不能为空", groups = { ActIdFormDTO.AddUserInternalGroup.class })
private String actId;
}

23
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActListCommonFormDTO.java

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

26
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActPreviewFormDTO.java

@ -0,0 +1,26 @@
package com.epmet.dto.form.work;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 活动预览-查看活动详情
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/21 17:19
*/
@Data
public class ActPreviewFormDTO implements Serializable {
private static final long serialVersionUID = -1603801389350245626L;
public interface UserInternalGroup {
}
/**
* 活动草稿id
*/
@NotBlank(message = "活动草稿id不能为空", groups = {UserInternalGroup.class})
private String actDraftId;
}

31
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/AuditUserFormDTO.java

@ -0,0 +1,31 @@
package com.epmet.dto.form.work;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 审核通过拒绝入参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/23 17:28
*/
@Data
public class AuditUserFormDTO implements Serializable {
private static final long serialVersionUID = 243279409415285207L;
public interface AddUserInternalGroup {
}
public interface RefusedUserShowGroup extends CustomerClientShowGroup {
}
/**
* 列表页返回的主键
*/
@NotBlank(message = "主键不能为空", groups = {AddUserInternalGroup.class,RefusedUserShowGroup.class})
private String actUserRelationId;
@NotBlank(message = "拒绝理由不能为空", groups = {RefusedUserShowGroup.class})
private String rejectReason;
}

32
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/CancelActFormDTO.java

@ -0,0 +1,32 @@
package com.epmet.dto.form.work;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/26 17:23
*/
@Data
public class CancelActFormDTO implements Serializable {
private static final long serialVersionUID = -5297836691628421645L;
public interface AddUserInternalGroup {}
public interface UserShowGroup extends CustomerClientShowGroup {
}
/**
* 活动id
*/
@NotBlank(message = "活动id不能为空", groups = {AddUserInternalGroup.class })
private String actId;
/**
* 取消原因
*/
@NotBlank(message = "取消原因不能为空", groups = {UserShowGroup.class})
private String cancelReason;
}

36
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/DraftActContentFormDTO.java

@ -0,0 +1,36 @@
package com.epmet.dto.form.work;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 活动内容
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/21 13:18
*/
@Data
public class DraftActContentFormDTO implements Serializable {
private static final long serialVersionUID = 5236509944250440348L;
public interface UserInternalGroup {
}
public interface UserShowGroup extends CustomerClientShowGroup {
}
/**
* 内容
*/
@NotBlank(message = "内容不能为空", groups = {UserShowGroup.class})
private String content;
/**
* 内容类型 图片img文字text
*/
@NotBlank(message = "内容类型不能为空,图片:img;文字:text", groups = {UserInternalGroup.class})
private String contentType;
}

164
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/DraftActInfoFormDTO.java

@ -0,0 +1,164 @@
package com.epmet.dto.form.work;
import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 预览-保存活动草稿入参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/21 13:17
*/
@Data
public class DraftActInfoFormDTO implements Serializable {
private static final long serialVersionUID = -4967079570884814526L;
public interface AddUserInternalGroup {
}
@Valid
private List<DraftActContentFormDTO> actContent;
/**
* 活动草稿id,如果是编辑之前的活动草稿此列是有值的
*/
private String actDraftId;
/**
* 如果是重新发布活动此列是有值的
*/
private String actId;
/**
* 客户id
*/
@NotBlank(message = "客户id不能为空", groups = {AddUserInternalGroup.class})
private String customerId;
/**
* 活动标题
*/
private String title;
/**
* 封面图
*/
private String coverPic;
/**
* 活动地点
*/
private String actAddress;
/**
* 活动地点-经度
*/
private BigDecimal actLongitude;
/**
* 活动地点-纬度
*/
private BigDecimal actLatitude;
/**
* 活动预计开始时间yyyy-MM-dd HH:mm
*/
private String actStartTime;
/**
* 活动预计结束时间yyyy-MM-dd HH:mm
*/
private String actEndTime;
/**
* 活动人数
*/
private Integer actQuota;
/**
* 活动积分
*/
private Integer reward;
/**
* 报名审核true只有志愿者才可以参加活动false: 只要是居民就可以参加活动
*/
private Boolean volunteerLimit;
/**
* 报名审核 true: 需人工审核 false: 无需审核
*/
private Boolean auditSwitch;
/**
* 报名截止时间yyyy-MM-dd HH:mm
*/
private String signUpEndTime;
/**
* 报名条件
*/
private String requirement;
/**
* 签到开始时间yyyy-MM-dd HH:mm
*/
private String signInStartTime;
/**
* 签到结束时间: yyyy-MM-dd HH:mm
*/
private String signInEndTime;
/**
* 签到地址
*/
private String signInAddress;
/**
* 签到地址-纬度
*/
private BigDecimal signInLatitude;
/**
* 签到地址-经度
*/
private BigDecimal signInLongitude;
/**
* 签到有效范围()
*/
private Integer signInRadius;
/**
* 主办方id
*/
private String sponsorId;
/**
* 主办方类型以网格名义grid , 以机关名义 agency
*/
private String sponsorType;
/**
* 主办方名称
*/
private String sponsorName;
/**
* 联系人
*/
private String sponsorContacts;
/**
* 联系电话
*/
private String sponsorTel;
}

30
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/GrantPointsFormDTO.java

@ -0,0 +1,30 @@
package com.epmet.dto.form.work;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 积分发放给分不给分通用入参
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/24 13:10
*/
@Data
public class GrantPointsFormDTO implements Serializable {
private static final long serialVersionUID = 4785107755585941804L;
public interface AddUserInternalGroup {
}
public interface DenyUserShowGroup extends CustomerClientShowGroup {
}
/**
* 积分发放待处理列表返参中的actUserRelationId
*/
@NotBlank(message = "主键不能为空", groups = {AddUserInternalGroup.class,DenyUserShowGroup.class})
private String actUserRelationId;
@NotBlank(message = "理由不能为空", groups = {DenyUserShowGroup.class})
private String denyRewardReason;
}

36
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActContentFormDTO.java

@ -0,0 +1,36 @@
package com.epmet.dto.form.work;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 发布活动入参
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/21 16:21
*/
@Data
public class PublishActContentFormDTO implements Serializable {
private static final long serialVersionUID = 7541780156596764819L;
public interface UserInternalGroup {
}
public interface UserShowGroup extends CustomerClientShowGroup {
}
/**
* 内容
*/
@NotBlank(message = "内容不能为空", groups = {UserShowGroup.class})
private String content;
/**
* 内容类型 图片img文字text
*/
@NotBlank(message = "内容类型不能为空,图片:img;文字:text", groups = {UserInternalGroup.class})
private String contentType;
}

193
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java

@ -0,0 +1,193 @@
package com.epmet.dto.form.work;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 发布活动-入参
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/21 16:15
*/
@Data
public class PublishActInfoFormDTO implements Serializable {
private static final long serialVersionUID = -2066903357493362692L;
public interface AddUserInternalGroup {
}
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
@Valid
@Size(min=1,message = "活动详情不能为空",groups = {AddUserShowGroup.class})
private List<PublishActContentFormDTO> actContent;
/**
* 活动草稿id,如果是编辑之前的活动草稿此列是有值的
*/
private String actDraftId;
/**
* 客户id
*/
@NotBlank(message = "客户id不能为空", groups = {AddUserInternalGroup.class})
private String customerId;
/**
* 活动标题
*/
@NotBlank(message = "活动标题不能为空", groups = {AddUserShowGroup.class})
@Length(min=1, max=50,message = "活动标题限50字以内", groups = {AddUserShowGroup.class})
private String title;
/**
* 封面图
*/
@NotBlank(message = "封面图不能为空", groups = {AddUserShowGroup.class})
private String coverPic;
/**
* 活动地点
*/
@NotBlank(message = "活动地点不能为空", groups = {AddUserShowGroup.class})
private String actAddress;
/**
* 活动地点-经度
*/
@NotNull(message = "活动地点经度不能为空", groups = {AddUserInternalGroup.class})
private BigDecimal actLongitude;
/**
* 活动地点-纬度
*/
@NotNull(message = "活动地点经度不能为空", groups = {AddUserInternalGroup.class})
private BigDecimal actLatitude;
/**
* 活动预计开始时间yyyy-MM-dd HH:mm
*/
@NotBlank(message = "活动预计开始时间不能为空", groups = {AddUserShowGroup.class})
private String actStartTime;
/**
* 活动预计结束时间yyyy-MM-dd HH:mm
*/
@NotBlank(message = "活动预计结束时间不能为空", groups = {AddUserShowGroup.class})
private String actEndTime;
/**
* 活动人数
*/
@Min(0)
private Integer actQuota;
/**
* 活动积分
*/
@Min(0)
private Integer reward;
/**
* 报名审核true只有志愿者才可以参加活动false: 只要是居民就可以参加活动
*/
@NotNull(message = "报名身份不能为空", groups = {AddUserInternalGroup.class})
private Boolean volunteerLimit;
/**
* 报名审核 true: 需人工审核 false: 无需审核
*/
@NotNull(message = "报名审核方式不能为空", groups = {AddUserInternalGroup.class})
private Boolean auditSwitch;
/**
* 报名截止时间yyyy-MM-dd HH:mm
*/
@NotBlank(message = "报名截止时间不能为空", groups = {AddUserShowGroup.class})
private String signUpEndTime;
/**
* 报名条件
*/
@NotBlank(message = "报名条件不能为空", groups = {AddUserShowGroup.class})
@Length(min=1, max=50,message = "报名条件限200字以内", groups = {AddUserShowGroup.class})
private String requirement;
/**
* 签到开始时间yyyy-MM-dd HH:mm
*/
@NotBlank(message = "签到开始时间不能为空", groups = {AddUserShowGroup.class})
private String signInStartTime;
/**
* 签到结束时间: yyyy-MM-dd HH:mm
*/
@NotBlank(message = "签到结束时间不能为空", groups = {AddUserShowGroup.class})
private String signInEndTime;
/**
* 签到地址
*/
@NotBlank(message = "签到地址不能为空", groups = {AddUserShowGroup.class})
private String signInAddress;
/**
* 签到地址-纬度
*/
@NotNull(message = "签到地址-纬度不能为空", groups = {AddUserInternalGroup.class})
private BigDecimal signInLatitude;
/**
* 签到地址-经度
*/
@NotNull(message = "签到地址-经度不能为空", groups = {AddUserInternalGroup.class})
private BigDecimal signInLongitude;
/**
* 签到有效范围()
*/
@Min(0)
@NotNull(message = "签到有效范围不能为空", groups = {AddUserShowGroup.class})
private Integer signInRadius;
/**
* 主办方id
*/
@NotBlank(message = "主办方id不能为空", groups = {AddUserInternalGroup.class})
private String sponsorId;
/**
* 主办方类型以网格名义grid , 以机关名义 agency
*/
@NotBlank(message = "主办方类型不能为空", groups = {AddUserInternalGroup.class})
private String sponsorType;
/**
* 主办方名称
*/
@NotBlank(message = "主办方名称不能为空", groups = {AddUserShowGroup.class})
private String sponsorName;
/**
* 联系人
*/
@NotBlank(message = "联系人不能为空", groups = {AddUserShowGroup.class})
private String sponsorContacts;
/**
* 联系电话
*/
@NotBlank(message = "联系电话不能为空", groups = {AddUserShowGroup.class})
private String sponsorTel;
}

194
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java

@ -0,0 +1,194 @@
package com.epmet.dto.form.work;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* 重新发布活动-入参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/27 13:49
*/
@Data
public class RePublishFormDTO implements Serializable {
private static final long serialVersionUID = -959956652123514886L;
public interface AddUserInternalGroup {
}
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
@Valid
@Size(min=1,message = "活动详情不能为空",groups = {AddUserShowGroup.class})
private List<PublishActContentFormDTO> actContent;
/**
* 活动id
*/
@NotBlank(message = "活动id不能为空", groups = {AddUserInternalGroup.class})
private String actId;
/**
* 是否通知已报名人员true 通知 false 不通知
*/
@NotNull(message = "是否通知已报名人员标志不能为空",groups ={AddUserInternalGroup.class} )
private Boolean noticePassedPeople;
/**
* 活动标题
*/
@NotBlank(message = "活动标题不能为空", groups = {AddUserShowGroup.class})
@Length(min=1, max=50,message = "活动标题限50字以内", groups = {AddUserShowGroup.class})
private String title;
/**
* 封面图
*/
@NotBlank(message = "封面图不能为空", groups = {AddUserShowGroup.class})
private String coverPic;
/**
* 活动地点
*/
@NotBlank(message = "活动地点不能为空", groups = {AddUserShowGroup.class})
private String actAddress;
/**
* 活动地点-经度
*/
@NotNull(message = "活动地点经度不能为空", groups = {AddUserInternalGroup.class})
private BigDecimal actLongitude;
/**
* 活动地点-纬度
*/
@NotNull(message = "活动地点经度不能为空", groups = {AddUserInternalGroup.class})
private BigDecimal actLatitude;
/**
* 活动预计开始时间yyyy-MM-dd HH:mm
*/
@NotBlank(message = "活动预计开始时间不能为空", groups = {AddUserShowGroup.class})
private String actStartTime;
/**
* 活动预计结束时间yyyy-MM-dd HH:mm
*/
@NotBlank(message = "活动预计结束时间不能为空", groups = {AddUserShowGroup.class})
private String actEndTime;
/**
* 活动人数
*/
@Min(0)
private Integer actQuota;
/**
* 活动积分
*/
@Min(0)
private Integer reward;
/**
* 报名审核true只有志愿者才可以参加活动false: 只要是居民就可以参加活动
*/
@NotNull(message = "报名身份不能为空", groups = {AddUserInternalGroup.class})
private Boolean volunteerLimit;
/**
* 报名审核 true: 需人工审核 false: 无需审核
*/
@NotNull(message = "报名审核方式不能为空", groups = {AddUserInternalGroup.class})
private Boolean auditSwitch;
/**
* 报名截止时间yyyy-MM-dd HH:mm
*/
@NotBlank(message = "报名截止时间不能为空", groups = {AddUserShowGroup.class})
private String signUpEndTime;
/**
* 报名条件
*/
@NotBlank(message = "报名条件不能为空", groups = {AddUserShowGroup.class})
@Length(min=1, max=50,message = "报名条件限200字以内", groups = {AddUserShowGroup.class})
private String requirement;
/**
* 签到开始时间yyyy-MM-dd HH:mm
*/
@NotBlank(message = "签到开始时间不能为空", groups = {AddUserShowGroup.class})
private String signInStartTime;
/**
* 签到结束时间: yyyy-MM-dd HH:mm
*/
@NotBlank(message = "签到结束时间不能为空", groups = {AddUserShowGroup.class})
private String signInEndTime;
/**
* 签到地址
*/
@NotBlank(message = "签到地址不能为空", groups = {AddUserShowGroup.class})
private String signInAddress;
/**
* 签到地址-纬度
*/
@NotNull(message = "签到地址-纬度不能为空", groups = {AddUserInternalGroup.class})
private BigDecimal signInLatitude;
/**
* 签到地址-经度
*/
@NotNull(message = "签到地址-经度不能为空", groups = {AddUserInternalGroup.class})
private BigDecimal signInLongitude;
/**
* 签到有效范围()
*/
@Min(0)
@NotNull(message = "签到有效范围不能为空", groups = {AddUserShowGroup.class})
private Integer signInRadius;
/**
* 主办方id
*/
@NotBlank(message = "主办方id不能为空", groups = {AddUserInternalGroup.class})
private String sponsorId;
/**
* 主办方类型以网格名义grid , 以机关名义 agency
*/
@NotBlank(message = "主办方类型不能为空", groups = {AddUserInternalGroup.class})
private String sponsorType;
/**
* 主办方名称
*/
@NotBlank(message = "主办方名称不能为空", groups = {AddUserShowGroup.class})
private String sponsorName;
/**
* 联系人
*/
@NotBlank(message = "联系人不能为空", groups = {AddUserShowGroup.class})
private String sponsorContacts;
/**
* 联系电话
*/
@NotBlank(message = "联系电话不能为空", groups = {AddUserShowGroup.class})
private String sponsorTel;
}

62
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/SaveActCustomizedFormDTO.java

@ -0,0 +1,62 @@
package com.epmet.dto.form.work;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 保存自定义配置-入参
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/20 17:22
*/
@Data
public class SaveActCustomizedFormDTO implements Serializable {
private static final long serialVersionUID = 5571356065160809543L;
public interface AddUserInternalGroup {}
public interface AddUserShowGroup extends CustomerClientShowGroup {}
/**
* act_customized主键
*/
@NotBlank(message = "主键不能为空", groups = { AddUserInternalGroup.class })
private String actCustomizedId;
/**
* 标题志愿者去哪儿
*/
@NotBlank(message = "标题不能为空", groups = { AddUserShowGroup.class })
private String titleName;
/**
* 咨询热线
*/
@NotBlank(message = "咨询热线不能为空", groups = { AddUserShowGroup.class })
private String hotLine;
/**
* 活动列表
*/
@NotBlank(message = "活动列表名称不能为空", groups = { AddUserShowGroup.class })
private String actListName;
/**
* 爱心榜
*/
@NotBlank(message = "爱心榜列表名称不能为空", groups = { AddUserShowGroup.class })
private String heartRankName;
/**
* 活动回顾
*/
@NotBlank(message = "活动回顾列表名称不能为空", groups = { AddUserShowGroup.class })
private String actReviewName;
/**
* 我的活动
*/
@NotBlank(message = "我的回顾列表名称不能为空", groups = { AddUserShowGroup.class })
private String myActName;
}

40
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/SaveActualTimeFormDTO.java

@ -0,0 +1,40 @@
package com.epmet.dto.form.work;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 已结束-保存活动实际开始结束时间
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/26 19:43
*/
@Data
public class SaveActualTimeFormDTO implements Serializable {
private static final long serialVersionUID = -3668309257254318868L;
public interface AddUserInternalGroup {
}
public interface UserShowGroup extends CustomerClientShowGroup {
}
/**
* 活动id
*/
@NotBlank(message = "活动id不能为空", groups = {AddUserInternalGroup.class})
private String actId;
/**
* 实际开始时间yyyy-MM-dd HH:mm
*/
@NotBlank(message = "实际开始时间不能为空", groups = {UserShowGroup.class})
private String actualStartTime;
/**
* 实际结束时间yyyy-MM-dd HH:mm
*/
@NotBlank(message = "实际结束时间不能为空", groups = {UserShowGroup.class})
private String actualEndTime;
}

33
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/SummaryActFormDTO.java

@ -0,0 +1,33 @@
package com.epmet.dto.form.work;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;
/**
* 保存添加回顾入参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/27 10:33
*/
@Data
public class SummaryActFormDTO implements Serializable {
private static final long serialVersionUID = -3610355661618180808L;
public interface AddUserInternalGroup {}
public interface AddUserShowGroup extends CustomerClientShowGroup {
}
/**
* 活动id
*/
@NotBlank(message = "活动id不能为空", groups = {AddUserInternalGroup.class })
private String actId;
@Valid
@Size(min=1,message = "活动详情不能为空",groups = {AddUserShowGroup.class})
private List<PublishActContentFormDTO> actContent;
}

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

Loading…
Cancel
Save