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
f976f9e26a
  1. 2
      epmet-auth/deploy/docker-compose-test.yml
  2. 8
      epmet-auth/src/main/java/com/epmet/redis/CustomerAppWxServiceUtil.java
  3. 2
      epmet-auth/src/main/resources/bootstrap.yml
  4. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java
  5. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml
  6. 3
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java
  7. 3
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java
  8. 2
      epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml
  9. 2
      epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-test.yml
  10. 2
      epmet-module/epmet-heart/epmet-heart-server/pom.xml
  11. 22
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java
  12. 7
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java
  13. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java
  14. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/bootstrap.yml
  15. 1
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.2__updateactinfo.sql
  16. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml
  17. 2
      epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml
  18. 2
      epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-test.yml
  19. 2
      epmet-module/epmet-point/epmet-point-server/pom.xml
  20. 2
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/redis/PointRedis.java
  21. 5
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java
  22. 2
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/utils/ModuleConstant.java
  23. 2
      epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml
  24. 4
      epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/epmet_point.sql
  25. 5
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/SubmitAuditFormDTO.java
  26. 129
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/AccountBasicInfoResultDTO.java
  27. 69
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/GetCategoryResultDTO.java
  28. 2
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/SupportVersionResultDTO.java
  29. 2
      epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml
  30. 2
      epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml
  31. 2
      epmet-module/epmet-third/epmet-third-server/pom.xml
  32. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ModuleConstant.java
  33. 12
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeController.java
  34. 30
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java
  35. 9
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/AuthorizationInfoDao.java
  36. 9
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeService.java
  37. 18
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerService.java
  38. 44
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java
  39. 39
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java
  40. 13
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java
  41. 21
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/param/WxMaSpeedUpAuditReq.java
  42. 66
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxBasicInfoResult.java
  43. 44
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxOpenGetCategoryResult.java
  44. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxSupportVersionResult.java
  45. 30
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/WxMaCodeService.java
  46. 59
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java
  47. 8
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/AuthorizationInfoDao.xml
  48. 2
      epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml
  49. 2
      epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-test.yml
  50. 8
      epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java
  51. 2
      epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-test.yml
  52. 2
      epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-test.yml
  53. 2
      epmet-user/epmet-user-server/deploy/docker-compose-dev.yml
  54. 2
      epmet-user/epmet-user-server/pom.xml
  55. 14
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserBaseInfoController.java
  56. 17
      epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java
  57. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java
  58. 15
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java
  59. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java

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.67
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-auth:0.3.68
ports:
- "8081:8081"
network_mode: host # 使用现有网络

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

@ -13,6 +13,7 @@ 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.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerAppDTO;
import com.epmet.dto.CustomerAppRedisDTO;
@ -115,7 +116,12 @@ public class CustomerAppWxServiceUtil implements ApplicationRunner {
maServices = maServicesNew;
if (appSet != null && result != null) {
for (CustomerAppDTO app : result) {
appSet.add(appKey, app);
CustomerAppRedisDTO appRedis = ConvertUtils.sourceToTarget(app, CustomerAppRedisDTO.class);
if(appRedis == null){
logger.warn("init CustomerAppRedis fail,convert return null,appDB:{}",JSON.toJSONString(app));
continue;
}
appSet.add(appKey, appRedis);
}
}
}

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

@ -10,7 +10,7 @@ spring:
allow-bean-definition-overriding: true
#环境 dev|test|prod
profiles:
active: dev
active: @spring.profiles.active@
messages:
encoding: UTF-8
basename: i18n/messages_common

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

@ -75,4 +75,6 @@ public interface StrConstant {
String EPMETY_STR="";
String NULL_STR="null";
String NOT_FILLED = "无";
}

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml

@ -53,7 +53,7 @@ spring:
# 数据迁移工具flyway
flyway:
enabled: false
enabled: @spring.flyway.enabled@
locations: classpath:db/migration
url: @datasource.druid.stats.url@
user: @datasource.druid.stats.username@

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

@ -120,8 +120,7 @@ public class PublishActInfoFormDTO implements Serializable {
/**
* 报名条件
*/
@NotBlank(message = "报名条件不能为空", groups = {AddUserShowGroup.class})
@Length(min=1, max=500,message = "报名条件限500字以内", groups = {AddUserShowGroup.class})
@Length(max=500,message = "报名条件限500字以内", groups = {AddUserShowGroup.class})
private String requirement;
/**

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

@ -126,8 +126,7 @@ public class RePublishFormDTO implements Serializable {
/**
* 报名条件
*/
@NotBlank(message = "报名条件不能为空", groups = {AddUserShowGroup.class})
@Length(min=1, max=500,message = "报名条件限500字以内", groups = {AddUserShowGroup.class})
@Length(max=500,message = "报名条件限500字以内", groups = {AddUserShowGroup.class})
private String requirement;
/**

2
epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-heart-server:
container_name: epmet-heart-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.40
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.42
ports:
- "8111:8111"
network_mode: host # 使用现有网络

2
epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-test.yml

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

2
epmet-module/epmet-heart/epmet-heart-server/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.0.40</version>
<version>0.0.42</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-heart</artifactId>

22
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java

@ -23,6 +23,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
@ -399,14 +400,19 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
Date currentTime = new Date();
// 查询 活动信息
ActInfoEntity entity = baseDao.selectById(formDTO.getActId());
if (currentTime.before(entity.getSignInStartTime())){
// 签到时间还未到~
resultDTO.setTip(EpmetErrorCode.SIGN_IN_TIME_NO.getMsg());
resultDTO.setFlag(EpmetErrorCode.SIGN_IN_TIME_NO.getCode());
} else if (currentTime.after(entity.getSignInEndTime())){
// 签到时间已结束~
resultDTO.setTip(EpmetErrorCode.SIGN_IN_TIME_END.getMsg());
resultDTO.setFlag(EpmetErrorCode.SIGN_IN_TIME_END.getCode());
if (null != entity){
if (currentTime.before(entity.getSignInStartTime())){
// 签到时间还未到~
resultDTO.setTip(EpmetErrorCode.SIGN_IN_TIME_NO.getMsg());
resultDTO.setFlag(EpmetErrorCode.SIGN_IN_TIME_NO.getCode());
} else if (currentTime.after(entity.getSignInEndTime())){
// 签到时间已结束~
resultDTO.setTip(EpmetErrorCode.SIGN_IN_TIME_END.getMsg());
resultDTO.setFlag(EpmetErrorCode.SIGN_IN_TIME_END.getCode());
}
} else {
logger.error("签到失败,未查到匹配的活动信息,传参活动ID:" + formDTO.getActId());
throw new RenException("签到失败,未查到匹配的活动信息");
}
return new Result<ResiActRegistrationResultDTO>().ok(resultDTO);
}

7
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java

@ -1,5 +1,6 @@
package com.epmet.service.impl;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.dto.LatestActContentDTO;
@ -182,7 +183,11 @@ public class WorkActDraftServiceImpl implements WorkActDraftService {
latestActInfoDTO.setSignUpEndTime(signUpEndTime);
}
//招募要求
latestActInfoDTO.setRequirement(formDTO.getRequirement());
if(StringUtils.isNotBlank(formDTO.getRequirement())){
latestActInfoDTO.setRequirement(formDTO.getRequirement());
}else{
latestActInfoDTO.setRequirement(StrConstant.NOT_FILLED);
}
//活动预计开始时间
if(StringUtils.isNotBlank(formDTO.getActStartTime())){
Date actStartTime= DateUtils.minStrToSecondDate(formDTO.getActStartTime());

6
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java

@ -332,6 +332,9 @@ public class WorkActServiceImpl implements WorkActService {
}else{
actInfoEntity.setPid(StrConstant.EPMETY_STR);
}
if(StringUtils.isBlank(actInfoEntity.getRequirement())){
actInfoEntity.setRequirement(StrConstant.NOT_FILLED);
}
return actInfoEntity;
}
@ -375,6 +378,9 @@ public class WorkActServiceImpl implements WorkActService {
}else{
actInfoEntity.setPid(StrConstant.EPMETY_STR);
}
if(StringUtils.isBlank(actInfoEntity.getRequirement())){
actInfoEntity.setRequirement(StrConstant.NOT_FILLED);
}
return actInfoEntity;
}

2
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/bootstrap.yml

@ -53,7 +53,7 @@ spring:
# 数据迁移工具flyway
flyway:
enabled: false
enabled: @spring.flyway.enabled@
locations: classpath:db/migration
url: @datasource.druid.url@
user: @datasource.druid.username@

1
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.2__updateactinfo.sql

@ -0,0 +1 @@
alter table act_info MODIFY column REQUIREMENT VARCHAR(512) DEFAULT '' COMMENT '招募要求';

4
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml

@ -351,7 +351,7 @@
AND i.SUMMARY_FLAG = 1 OR r.ID is NOT NULL
AND i.CUSTOMER_ID = #{customerId}
AND i.ACT_STATUS = 'finished'
GROUP BY r.ACT_ID
GROUP BY i.ID
ORDER BY i.CREATED_TIME DESC
LIMIT #{pageNo}, #{pageSize}
</select>
@ -721,7 +721,7 @@
AND i.SUMMARY_FLAG = 1 OR r.ID is NOT NULL
AND i.CUSTOMER_ID = #{customerId}
AND i.ACT_STATUS = 'finished'
GROUP BY r.ACT_ID
GROUP BY i.ID
ORDER BY i.CREATED_TIME DESC
LIMIT 0, #{num}
</select>

2
epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-point-server:
container_name: epmet-point-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.33
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.37
ports:
- "8112:8112"
network_mode: host # 使用现有网络

2
epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-test.yml

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

2
epmet-module/epmet-point/epmet-point-server/pom.xml

@ -3,7 +3,7 @@
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.0.33</version>
<version>0.0.37</version>
<parent>
<artifactId>epmet-point</artifactId>
<groupId>com.epmet</groupId>

2
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/redis/PointRedis.java

@ -20,7 +20,7 @@ public class PointRedis {
public void lpush(String userId , PointExchangeResponseResultDTO verificationResult){
redisUtils.leftPush(RedisKeys.getPointVerificationResultKey(userId),verificationResult);
redisUtils.leftPush(RedisKeys.getPointVerificationResultKey(userId),verificationResult,redisUtils.MINUTE_TEN_EXPIRE);
}
public Object lindex(String userId,Long index){
return redisUtils.lindex(RedisKeys.getPointVerificationResultKey(userId),index);

5
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java

@ -239,6 +239,11 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi
@Transactional(rollbackFor = Exception.class)
public PointVerificationResultDTO verifyPoint(PointVerificationFormDTO verificationParam) {
PointVerificationResultDTO result = new PointVerificationResultDTO();
if(null == verificationParam.getPoint()){
result.setSuccessFlag(false);
result.setFailureReason(ModuleConstant.VERIFICATED_POINT_CAN_NOT_BE_NULL);
return result;
}
String decodedUserId = pointRedis.checkIfQrCodeExpire(verificationParam.getUserId());
if(StringUtils.isNotBlank(decodedUserId)){
verificationParam.setUserId(decodedUserId);

2
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/utils/ModuleConstant.java

@ -121,5 +121,5 @@ public interface ModuleConstant extends Constant {
String EVENT_NAME_ADD_LIVE = "添加活动实况";
String VERIFICATED_POINT_CAN_NOT_BE_NULL = "核销积分不能为空";
}

2
epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml

@ -53,7 +53,7 @@ spring:
# 数据迁移工具flyway
flyway:
enabled: false
enabled: @spring.flyway.enabled@
locations: classpath:db/migration
url: @datasource.druid.url@
user: @datasource.druid.username@

4
epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/epmet_point.sql

@ -76,7 +76,7 @@ CREATE TABLE `point_verification_log` (
`OPERATOR_ID` varchar(64) NOT NULL COMMENT '核销人员ID',
`OPERATOR_NAME` varchar(64) NOT NULL COMMENT '核销人员名称 工作人员的昵称,在和核销记录里显示,兑换人、核销人都要显示,核销人昵称格式【xx机关-xxx】,若工作人员日后修改昵称,此项不变',
`OPERATOR_AGENCY_ID` varchar(64) NOT NULL COMMENT '核销人员所属机关ID',
`EXCHANGED_ITEM` varchar(64) NOT NULL COMMENT '核销物品 目前没有做商城,所以商品的信息统一记录并展示核销人员手动输入的信息,必填项,为商品描述,以后如果开发商城体系,此项关联商品的ID',
`EXCHANGED_ITEM` varchar(512) NOT NULL COMMENT '核销物品 目前没有做商城,所以商品的信息统一记录并展示核销人员手动输入的信息,必填项,为商品描述,以后如果开发商城体系,此项关联商品的ID',
`POINT` int(11) NOT NULL COMMENT '使用积分 需要多少积分',
`LONGITUDE` varchar(32) NOT NULL COMMENT '核销人所在位置经度',
`DIMENSION` varchar(32) NOT NULL COMMENT '核销人所在位置维度',
@ -135,7 +135,7 @@ CREATE TABLE `user_point_action_log` (
`ACTION_FLAG` varchar(64) NOT NULL COMMENT 'event的key【active_send_point】【register_volunteer】【active_insert_live】\r\n\r\n当来源为积分调整时 通过事件Id查找规则ID计算出分数 通过EVENT_ID能查出RUIE_ID',
`EVENT_ID` varchar(64) DEFAULT NULL COMMENT '来源ID 当来源为积分调整时 通过事件Id查找规则ID计算出分数 通过EVENT_ID能查出RUIE_ID',
`SOURCE_ID` varchar(64) DEFAULT NULL COMMENT '来源Id,可以是活动Id',
`EVENT_STATEMENT` varchar(128) DEFAULT NULL COMMENT '活动描述 获取积分的原因,相关内容,用来拼接【用户参加了xxx活动获取?积分】的文案,取活动的名称;【积分调整文案】;其他……\n如果是管理员手动调整扣减积分,ACTION_FLAG为"minus",但是不会生成核销记录,核销记录只保存用户使用积分兑换商品的核销详情',
`EVENT_STATEMENT` varchar(512) DEFAULT NULL COMMENT '活动描述 获取积分的原因,相关内容,用来拼接【用户参加了xxx活动获取?积分】的文案,取活动的名称;【积分调整文案】;其他……\n如果是管理员手动调整扣减积分,ACTION_FLAG为"minus",但是不会生成核销记录,核销记录只保存用户使用积分兑换商品的核销详情',
`EVENT_NAME` varchar(64) NOT NULL COMMENT '事件名称 在积分记录里,对应的每一个明细都有一个标题和备注,该项为【标题】 value:活动、阅读文章、首次注册、评论、积分调整(手动)……',
`POINT` int(11) NOT NULL COMMENT '分值 获取/核销的积分分值',
`OPERATOR_AGENCY_ID` varchar(64) DEFAULT NULL COMMENT '操作人所属机关ID 用户获取/核销积分的途径,1.工作人员手动审核积分发放、2.系统事件自动响应,所以CREATED_BY会可能是SYSTEM和工作人员的ID,当CREATED_BY是工作人员ID时,AGENCY_ID为这个工作人员所属的机关ID',

5
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/SubmitAuditFormDTO.java

@ -20,6 +20,11 @@ public class SubmitAuditFormDTO implements Serializable {
*/
private String codeId;
/**
* 是否加急
*/
private Boolean isSpeed;
/**
* 小程序版本说明和功能解释
*/

129
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/AccountBasicInfoResultDTO.java

@ -0,0 +1,129 @@
package com.epmet.dto.result;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/8/6 10:50
*/
@NoArgsConstructor
@Data
public class AccountBasicInfoResultDTO implements Serializable {
private static final long serialVersionUID = -5111203845293330004L;
/**
* 帐号 appid
*/
@SerializedName("appid")
private String appid;
/**
* 帐号类型1订阅号2服务号3小程序
*/
@SerializedName("account_type")
private Integer accountType;
/**
* 主体类型 0.个人 1.企业 2.媒体 3.政府 4.其他组织
*/
@SerializedName("principal_type")
private Integer principalType;
/**
* 主体名称
*/
@SerializedName("principal_name")
private String principalName;
/**
* 实名验证状态 1.实名验证成功 2.实名验证中 3.实名验证失败
*/
@SerializedName("realname_status")
private Integer realnameStatus;
/**
* 微信认证信息
*/
@SerializedName("wx_verify_info")
private WxVerifyInfoBean wxVerifyInfo;
/**
* 功能介绍信息
*/
@SerializedName("signature_info")
private SignatureInfoBean signatureInfo;
/**
* 头像信息
*/
@SerializedName("head_image_info")
private HeadImageInfoBean headImageInfo;
@NoArgsConstructor
@Data
public static class WxVerifyInfoBean {
/**
* 是否资质认证若是拥有微信认证相关的权限
*/
@SerializedName("qualification_verify")
private Boolean qualificationVerify;
/**
* 是否名称认证
*/
@SerializedName("naming_verify")
private Boolean namingVerify;
/**
* 是否需要年审qualification_verify == true 时才有该字段
*/
@SerializedName("annual_review")
private Boolean annualReview;
/**
* 年审开始时间时间戳qualification_verify == true 时才有该字段
*/
@SerializedName("annual_review_begin_time")
private String annualReviewBeginTime;
/**
* 年审截止时间时间戳qualification_verify == true 时才有该字段
*/
@SerializedName("annual_review_end_time")
private String annualReviewEndTime;
}
@NoArgsConstructor
@Data
public static class SignatureInfoBean {
/**
* 功能介绍
*/
@SerializedName("signature")
private String signature;
/**
* 功能介绍已使用修改次数本月
*/
@SerializedName("modify_used_count")
private Integer modifyUsedCount;
/**
* 功能介绍修改次数总额度本月
*/
@SerializedName("modify_quota")
private Integer modifyQuota;
}
@NoArgsConstructor
@Data
public static class HeadImageInfoBean {
/**
* 头像 url
*/
@SerializedName("head_image_url")
private String headImageUrl;
/**
* 头像已使用修改次数本月
*/
@SerializedName("modify_used_count")
private Integer modifyUsedCount;
/**
* 头像修改次数总额度本月
*/
@SerializedName("modify_quota")
private Integer modifyQuota;
}
}

69
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/GetCategoryResultDTO.java

@ -0,0 +1,69 @@
package com.epmet.dto.result;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/8/6 10:03
*/
@NoArgsConstructor
@Data
public class GetCategoryResultDTO implements Serializable {
private static final long serialVersionUID = -6803569581887971887L;
/**
* 一个更改周期内可以添加类目的次数
*/
private Integer limit;
/**
* 本更改周期内还可以添加类目的次数
*/
private Integer quota;
/**
* 最多可以设置的类目数量
*/
private Integer categoryLimit;
/**
* 已设置的类目信息列表
*/
private List<CategoriesBean> categories;
@NoArgsConstructor
@Data
public static class CategoriesBean {
/**
* 一级类目 ID
*/
private Integer first;
/**
* 一级类目名称
*/
@SerializedName("first_name")
private String firstName;
/**
* 二级类目 ID
*/
private Integer second;
/**
* 二级类目名称
*/
@SerializedName("second_name")
private String secondName;
/**
* 审核状态1 审核中 2 审核不通过 3 审核通过
*/
@SerializedName("audit_status")
private Integer auditStatus;
/**
* 审核不通过的原因
*/
@SerializedName("audit_reason")
private String auditReason;
}
}

2
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/result/SupportVersionResultDTO.java

@ -31,7 +31,7 @@ public class SupportVersionResultDTO implements Serializable {
/**
* 百分比
*/
private int percentage;
private Integer percentage;
/**
* 基础库版本号
*/

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

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-third-server:
container_name: epmet-third-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.105
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.106
ports:
- "8110:8110"
network_mode: host # 使用现有网络

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

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

2
epmet-module/epmet-third/epmet-third-server/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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.0.105</version>
<version>0.0.106</version>
<parent>
<groupId>com.epmet</groupId>

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

@ -91,7 +91,7 @@ public interface ModuleConstant {
String FROM_CALLBACK = "from_callback";
String APPLICATION_JSON = "application/json";
String _FROM_API = "_from_api";
String WE_APP_AUDIT = "we_app_audit";
String WE_APP_AUDIT = "weapp_audit";
String TO_USER_NAME = "ToUserName";
String FROM_USER_NAME = "FromUserName";

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

@ -6,10 +6,8 @@ import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.service.CodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -203,4 +201,10 @@ public class CodeController {
List<CategoryResultDTO> result = codeService.getCategory(formDTO);
return new Result<List<CategoryResultDTO>>().ok(result);
}
@PostMapping("setdomain/{customerId}")
public Result setDomain(@PathVariable("customerId") String customerId) {
codeService.setDomain(customerId);
return new Result<>();
}
}

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

@ -137,7 +137,7 @@ public class PaCustomerController {
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.SupportVersionResultDTO>
*/
@PostMapping(value = "getweappsupportversion")
public Result<SupportVersionResultDTO> getSupportVersion( @RequestBody CustomerClientFormDTO formDTO) {
public Result<SupportVersionResultDTO> getSupportVersion(@RequestBody CustomerClientFormDTO formDTO) {
return new Result<SupportVersionResultDTO>().ok( paCustomerService.getSupportVersion(formDTO));
}
@ -149,9 +149,35 @@ public class PaCustomerController {
* @return com.epmet.commons.tools.utils.Result
*/
@PostMapping(value = "setweappsupportversion")
public Result setSupportVersion( @RequestBody CustomerClientFormDTO formDTO) {
public Result setSupportVersion(@RequestBody CustomerClientFormDTO formDTO) {
paCustomerService.getSupportVersion(formDTO);
return new Result();
}
/**
* 获取已设置的所有类目
* @author zhaoqifeng
* @date 2020/8/6 14:36
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.GetCategoryResultDTO>
*/
@PostMapping(value = "getcategory")
public Result<GetCategoryResultDTO> getSetCategory(@RequestBody CustomerClientFormDTO formDTO) {
return new Result<GetCategoryResultDTO>().ok(paCustomerService.getSetCategory(formDTO));
}
/**
* 获取基本信息
* @author zhaoqifeng
* @date 2020/8/6 14:36
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.AccountBasicInfoResultDTO>
*/
@PostMapping(value = "getaccountbasicinfo")
public Result<AccountBasicInfoResultDTO> getAccountBasicInfo(@RequestBody CustomerClientFormDTO formDTO) {
return new Result<AccountBasicInfoResultDTO>().ok(paCustomerService.getAccountBasicInfo(formDTO));
}
}

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

@ -90,4 +90,13 @@ public interface AuthorizationInfoDao extends BaseDao<AuthorizationInfoEntity> {
*/
AuthCodeResultDTO selectCustomerIdByAuthAppId(@Param("authAppId")String authAppId);
/**
* 根据客户ID客户端类型获取授权信息
* @author zhaoqifeng
* @date 2020/8/6 15:36
* @param customerId
* @return java.util.List<com.epmet.dto.AuthorizationInfoDTO>
*/
List<AuthorizationInfoDTO> getAuthInfoByCustomerId(@Param("customerId") String customerId);
}

9
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeService.java

@ -139,4 +139,13 @@ public interface CodeService {
*/
List<CategoryResultDTO> getCategory(CodeCommonFormDTO formDTO);
/**
* 设置服务器域名和业务域名
* @author zhaoqifeng
* @date 2020/8/6 15:34
* @param customerId
* @return int
*/
void setDomain(String customerId);
}

18
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/PaCustomerService.java

@ -186,4 +186,22 @@ public interface PaCustomerService extends BaseService<PaCustomerEntity> {
* @return void
*/
void setSupportVersion(CustomerClientFormDTO formDTO);
/**
* 获取已设置的所有类目
* @author zhaoqifeng
* @date 2020/8/6 14:36
* @param formDTO
* @return com.epmet.dto.result.GetCategoryResultDTO
*/
GetCategoryResultDTO getSetCategory(CustomerClientFormDTO formDTO);
/**
* 获取基本信息
* @author zhaoqifeng
* @date 2020/8/6 14:36
* @param formDTO
* @return com.epmet.dto.result.AccountBasicInfoResultDTO
*/
AccountBasicInfoResultDTO getAccountBasicInfo(CustomerClientFormDTO formDTO);
}

44
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java

@ -166,19 +166,6 @@ public class CodeServiceImpl implements CodeService {
codeCustomerDTO.setStatus(CodeConstant.UNAUDITED);
String codeId = codeCustomerService.save(codeCustomerDTO);
//设置服务器域名
wxResult = wxMaCodeService.modifyDomain(authInfo.getAuthorizerAccessToken());
if (!wxResult.success()) {
saveOperation(formDTO.getCustomerId(), null, formDTO.getUserVersion(), CodeConstant.OPER_UPLOAD, wxResult.getErrorMsg());
throw new RenException(wxResult.getErrorCode(), wxResult.getErrorMsg());
}
//设置业务域名
wxResult = wxMaCodeService.setWebviewDomain(authInfo.getAuthorizerAccessToken());
if (!wxResult.success()) {
saveOperation(formDTO.getCustomerId(), null, formDTO.getUserVersion(), CodeConstant.OPER_UPLOAD, wxResult.getErrorMsg());
throw new RenException(wxResult.getErrorCode(), wxResult.getErrorMsg());
}
saveOperation(formDTO.getCustomerId(), codeId, formDTO.getUserVersion(), CodeConstant.OPER_UPLOAD, "上传成功");
}
@ -250,6 +237,17 @@ public class CodeServiceImpl implements CodeService {
wxResult.getErrorMsg());
throw new RenException(wxResult.getErrorCode(), wxResult.getErrorMsg());
}
if(formDTO.getIsSpeed()) {
//调用微信API 加急审核
WxMaSpeedUpAuditReq speedRequest = new WxMaSpeedUpAuditReq();
speedRequest.setAuditId(wxResult.getData());
WxResult wxSpeedResult = wxMaCodeService.speedUpAudit(authInfo.getAuthorizerAccessToken(), speedRequest);
if (!wxSpeedResult.success()) {
saveOperation(codeCustomerDTO.getCustomerId(), codeCustomerDTO.getId(), codeCustomerDTO.getUserVersion(), CodeConstant.OPER_SUBMIT,
wxSpeedResult.getErrorMsg());
throw new RenException(wxSpeedResult.getErrorCode(), wxSpeedResult.getErrorMsg());
}
}
//获取审核结果信息
CodeAuditResultDTO codeAuditResultDTO = codeAuditResultService.getAuditResultByCodeId(formDTO.getCodeId());
if (null == codeAuditResultDTO) {
@ -504,6 +502,26 @@ public class CodeServiceImpl implements CodeService {
return ConvertUtils.sourceToTarget(wxResult.getData(), CategoryResultDTO.class);
}
@Override
public void setDomain(String customerId) {
List<AuthorizationInfoDTO> authInfoList = authorizationInfoDao.getAuthInfoByCustomerId(customerId);
if (null == authInfoList || authInfoList.size() == NumConstant.ZERO) {
throw new RenException("没有有效的Access Token");
}
authInfoList.forEach(authInfo -> {
//设置服务器域名
WxResult wxResult = wxMaCodeService.modifyDomain(authInfo.getAuthorizerAccessToken());
if (!wxResult.success()) {
throw new RenException(wxResult.getErrorCode(), wxResult.getErrorMsg());
}
//设置业务域名
wxResult = wxMaCodeService.setWebviewDomain(authInfo.getAuthorizerAccessToken());
if (!wxResult.success()) {
throw new RenException(wxResult.getErrorCode(), wxResult.getErrorMsg());
}
});
}
private void saveOperation(String customerId, String codeId, String version, String operation, String describe) {
CodeOperationHistoryDTO operationDTO = new CodeOperationHistoryDTO();
operationDTO.setCustomerId(customerId);

39
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java

@ -31,7 +31,6 @@ import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.CpUserDetailRedis;
import com.epmet.constant.CodeConstant;
import com.epmet.constant.PaConstant;
import com.epmet.dao.*;
import com.epmet.dto.*;
@ -44,6 +43,8 @@ import com.epmet.service.PaCustomerAgencyService;
import com.epmet.service.PaCustomerService;
import com.epmet.service.PaCustomerUserAgencyService;
import com.epmet.wxapi.param.WxSetWeAppSupportVersionReq;
import com.epmet.wxapi.result.WxBasicInfoResult;
import com.epmet.wxapi.result.WxOpenGetCategoryResult;
import com.epmet.wxapi.result.WxResult;
import com.epmet.wxapi.result.WxSupportVersionResult;
import com.epmet.wxapi.service.WxMaCodeService;
@ -596,4 +597,40 @@ public class PaCustomerServiceImpl extends BaseServiceImpl<PaCustomerDao, PaCust
}
}
@Override
public GetCategoryResultDTO getSetCategory(CustomerClientFormDTO formDTO) {
//获取小程序调用令牌
GetCategoryResultDTO result;
AuthorizationInfoDTO authInfo = authorizationInfoDao.getAuthInfoByCustomer(formDTO.getCustomerId(), formDTO.getClientType());
if (null == authInfo) {
throw new RenException("未授权");
}
//调用微信API
WxResult<WxOpenGetCategoryResult> wxResult = wxMaCodeService.getSetCategory(authInfo.getAuthorizerAccessToken());
if (!wxResult.success()) {
throw new RenException(wxResult.getErrorCode(), wxResult.getErrorMsg());
}
WxOpenGetCategoryResult categoryResult = wxResult.getData();
result = ConvertUtils.sourceToTarget(categoryResult, GetCategoryResultDTO.class);
return result;
}
@Override
public AccountBasicInfoResultDTO getAccountBasicInfo(CustomerClientFormDTO formDTO) {
//获取小程序调用令牌
AccountBasicInfoResultDTO result;
AuthorizationInfoDTO authInfo = authorizationInfoDao.getAuthInfoByCustomer(formDTO.getCustomerId(), formDTO.getClientType());
if (null == authInfo) {
throw new RenException("未授权");
}
//调用微信API
WxResult<WxBasicInfoResult> wxResult = wxMaCodeService.getAccountBasicInfo(authInfo.getAuthorizerAccessToken());
if (!wxResult.success()) {
throw new RenException(wxResult.getErrorCode(), wxResult.getErrorMsg());
}
WxBasicInfoResult basicInfoResult = wxResult.getData();
result = ConvertUtils.sourceToTarget(basicInfoResult, AccountBasicInfoResultDTO.class);
return result;
}
}

13
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java

@ -171,5 +171,18 @@ public interface WxMaCodeConstant {
*/
String GET_TEMPLATE_URL = "https://api.weixin.qq.com/wxa/gettemplatelist";
/**
* 获取基本信息
*/
String GET_BASIC_INFO_URL = "https://api.weixin.qq.com/cgi-bin/account/getaccountbasicinfo";
/**
* 获取已设置的所有类目
*/
String GET_SET_CATEGORY_URL = "https://api.weixin.qq.com/cgi-bin/wxopen/getcategory";
/**
* 加急审核申请
*/
String SPEED_UP_AUDIT_URL = "https://api.weixin.qq.com/wxa/speedupaudit";
}

21
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/param/WxMaSpeedUpAuditReq.java

@ -0,0 +1,21 @@
package com.epmet.wxapi.param;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/8/6 15:10
*/
@Data
public class WxMaSpeedUpAuditReq implements Serializable {
private static final long serialVersionUID = 3042725610534211385L;
/**
* 审核单ID
*/
@SerializedName("auditid")
private String auditId;
}

66
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxBasicInfoResult.java

@ -0,0 +1,66 @@
package com.epmet.wxapi.result;
import com.epmet.dto.result.AccountBasicInfoResultDTO;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/8/6 14:05
*/
@Data
public class WxBasicInfoResult implements Serializable {
private static final long serialVersionUID = -9027187315142350899L;
/**
* 返回码
*/
private Integer errcode;
/**
* 错误信息
*/
private String errmsg;
/**
* 帐号 appid
*/
@SerializedName("appid")
private String appid;
/**
* 帐号类型1订阅号2服务号3小程序
*/
@SerializedName("account_type")
private Integer accountType;
/**
* 主体类型 0.个人 1.企业 2.媒体 3.政府 4.其他组织
*/
@SerializedName("principal_type")
private Integer principalType;
/**
* 主体名称
*/
@SerializedName("principal_name")
private String principalName;
/**
* 实名验证状态 1.实名验证成功 2.实名验证中 3.实名验证失败
*/
@SerializedName("realname_status")
private Integer realnameStatus;
/**
* 微信认证信息
*/
@SerializedName("wx_verify_info")
private AccountBasicInfoResultDTO.WxVerifyInfoBean wxVerifyInfo;
/**
* 功能介绍信息
*/
@SerializedName("signature_info")
private AccountBasicInfoResultDTO.SignatureInfoBean signatureInfo;
/**
* 头像信息
*/
@SerializedName("head_image_info")
private AccountBasicInfoResultDTO.HeadImageInfoBean headImageInfo;
}

44
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxOpenGetCategoryResult.java

@ -0,0 +1,44 @@
package com.epmet.wxapi.result;
import com.epmet.dto.result.GetCategoryResultDTO;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/8/6 10:11
*/
@NoArgsConstructor
@Data
public class WxOpenGetCategoryResult {
/**
* 返回码
*/
private Integer errcode;
/**
* 错误信息
*/
private String errmsg;
/**
* 一个更改周期内可以添加类目的次数
*/
private Integer limit;
/**
* 本更改周期内还可以添加类目的次数
*/
private Integer quota;
/**
* 最多可以设置的类目数量类目信息说明
*/
@SerializedName("category_limit")
private Integer categoryLimit;
/**
* 已设置的类目信息列表
*/
private List<GetCategoryResultDTO.CategoriesBean> categories;
}

2
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxSupportVersionResult.java

@ -48,7 +48,7 @@ public class WxSupportVersionResult implements Serializable {
/**
* 百分比
*/
private int percentage;
private Integer percentage;
/**
* 基础库版本号
*/

30
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/WxMaCodeService.java

@ -72,6 +72,16 @@ public interface WxMaCodeService {
*/
WxResult<String> submitAudit(String accessToken, WxMaCodeSubmitAuditRequest auditRequest);
/**
* 加急审核申请
* @author zhaoqifeng
* @date 2020/8/6 15:11
* @param accessToken
* @param request
* @return com.epmet.wxapi.result.WxResult
*/
WxResult speedUpAudit(String accessToken, WxMaSpeedUpAuditReq request);
/**
* 查询指定版本审核状态仅供第三方代小程序调用.
*
@ -161,4 +171,24 @@ public interface WxMaCodeService {
* @date 2020/8/5 16:06
*/
WxResult setWeAppSupportVersion(String accessToken, WxSetWeAppSupportVersionReq request);
/**
* 获取已设置的所有类目
*
* @param accessToken
* @return com.epmet.wxapi.result.WxResult<com.epmet.wxapi.result.WxOpenGetCategoryResult>
* @author zhaoqifeng
* @date 2020/8/6 10:47
*/
WxResult<WxOpenGetCategoryResult> getSetCategory(String accessToken);
/**
* 获取基本信息
*
* @param accessToken
* @return com.epmet.wxapi.result.WxResult<com.epmet.wxapi.result.WxBasicInfoResult>
* @author zhaoqifeng
* @date 2020/8/6 14:07
*/
WxResult<WxBasicInfoResult> getAccountBasicInfo(String accessToken);
}

59
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java

@ -1,6 +1,7 @@
package com.epmet.wxapi.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result;
import com.epmet.wxapi.constant.WxMaCodeConstant;
@ -147,6 +148,22 @@ public class WxMaCodeServiceImpl implements WxMaCodeService {
return result;
}
@Override
public WxResult speedUpAudit(String accessToken, WxMaSpeedUpAuditReq request) {
WxResult result = new WxResult();
String url = WxMaCodeConstant.SPEED_UP_AUDIT_URL + "?" + "access_token=" + accessToken;
Result<String> submitResult = HttpClientManager.getInstance().sendPostByJSON(url, toJson(request));
if (!submitResult.success()) {
result.setErrorCode(submitResult.getCode());
result.setErrorMsg(submitResult.getMsg());
return result;
}
JSONObject jsonObject = JSONObject.parseObject(submitResult.getData());
result.setErrorCode(jsonObject.getInteger(ERR_CODE));
result.setErrorMsg(WxMaErrorMsgEnum.findMsgByCode(jsonObject.getInteger(ERR_CODE)));
return result;
}
@Override
public WxResult<WxMaAuditStatusResult> getAuditStatus(String accessToken, WxMaCodeAuditStatusReq request) {
WxResult<WxMaAuditStatusResult> result = new WxResult<>();
@ -308,6 +325,48 @@ public class WxMaCodeServiceImpl implements WxMaCodeService {
return result;
}
@Override
public WxResult<WxOpenGetCategoryResult> getSetCategory(String accessToken) {
WxResult<WxOpenGetCategoryResult> result = new WxResult<>();
String url = WxMaCodeConstant.GET_SET_CATEGORY_URL + "?" + "access_token=" + accessToken;
Result<String> statusResult = HttpClientManager.getInstance().sendGet(url, null);
if (!statusResult.success()) {
result.setErrorCode(statusResult.getCode());
result.setErrorMsg(statusResult.getMsg());
return result;
}
Gson gson = new Gson();
WxOpenGetCategoryResult categoryResult = gson.fromJson(statusResult.getData(), WxOpenGetCategoryResult.class);
if (categoryResult.getErrcode() != NumConstant.ZERO) {
result.setErrorCode(categoryResult.getErrcode());
result.setErrorMsg(WxMaErrorMsgEnum.findMsgByCode(categoryResult.getErrcode()));
return result;
}
result.ok(categoryResult);
return result;
}
@Override
public WxResult<WxBasicInfoResult> getAccountBasicInfo(String accessToken) {
WxResult<WxBasicInfoResult> result = new WxResult<>();
String url = WxMaCodeConstant.GET_BASIC_INFO_URL + "?" + "access_token=" + accessToken;
Result<String> statusResult = HttpClientManager.getInstance().sendGet(url, null);
if (!statusResult.success()) {
result.setErrorCode(statusResult.getCode());
result.setErrorMsg(statusResult.getMsg());
return result;
}
Gson gson = new Gson();
WxBasicInfoResult basicInfoResult = gson.fromJson(statusResult.getData(), WxBasicInfoResult.class);
if (basicInfoResult.getErrcode() != NumConstant.ZERO) {
result.setErrorCode(basicInfoResult.getErrcode());
result.setErrorMsg(WxMaErrorMsgEnum.findMsgByCode(basicInfoResult.getErrcode()));
return result;
}
result.ok(basicInfoResult);
return result;
}
private String toJson(Object object) {
GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.setPrettyPrinting();

8
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/AuthorizationInfoDao.xml

@ -90,5 +90,13 @@
del_flag = 0
AND authorizer_appid = #{authAppId}
</select>
<select id="getAuthInfoByCustomerId" resultType="com.epmet.dto.AuthorizationInfoDTO">
SELECT AUTHORIZER_APPID,
AUTHORIZER_ACCESS_TOKEN
FROM authorization_info
WHERE CUSTOMER_ID = #{customerId}
AND DEL_FLAG = 0
AND EXPIRES_IN_TIME > NOW()
</select>
</mapper>

2
epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml

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

2
epmet-module/oper-crm/oper-crm-server/deploy/docker-compose-test.yml

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

8
epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java

@ -526,6 +526,14 @@ public class CustomerServiceImpl extends BaseServiceImpl<CustomerDao, CustomerEn
throw new RenException(customerResult.getCode(), customerResult.getInternalMsg());
}
//7.设置服务器域名,业务域名
String domainUrl = "https://epmet-cloud.elinkservice.cn/api/third/code/setdomain/" + formDTO.getCustomerId();
String domainData = HttpClientManager.getInstance().sendPostByJSON(domainUrl, null).getData();
JSONObject domainObject = JSON.parseObject(domainData);
Result domainResult = ConvertUtils.mapToEntity(domainObject, Result.class);
if (!domainResult.success()) {
throw new RenException(domainResult.getCode(), domainResult.getInternalMsg());
}
}

2
epmet-module/resi-guide/resi-guide-server/deploy/docker-compose-test.yml

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

2
epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-test.yml

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

2
epmet-user/epmet-user-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-user-server:
container_name: epmet-user-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.108
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.110
ports:
- "8087:8087"
network_mode: host # 不会创建新的网络

2
epmet-user/epmet-user-server/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.108</version>
<version>0.3.110</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-user</artifactId>

14
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserBaseInfoController.java

@ -176,4 +176,18 @@ public class UserBaseInfoController {
userBaseInfoService.saveUserBaseInfoWhenAuthVolunteer(param);
return new Result();
}
/**
* @Description 清除用户缓存信息
* @param userIds
* @return
* @author wangc
* @date 2020.08.06 14:41
**/
@PostMapping("clearusercache")
public Result clearUserCache(@RequestBody List<String> userIds){
userBaseInfoService.clearUserCache(userIds);
return new Result();
}
}

17
epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java

@ -83,7 +83,8 @@ public class UserBaseInfoRedis {
String key = UserRedisKeys.getResiUserKey(baseInfo.getUserId());
//bean to map
Map<String, Object> map = BeanUtil.beanToMap(baseInfo, false, true);
redisUtils.hMSet(key, map,NOT_EXPIRE);
//用户缓存的有效期为七天
redisUtils.hMSet(key, map,RedisUtils.DEFAULT_EXPIRE * NumConstant.SEVEN);
}
public String get(String id){
@ -254,6 +255,20 @@ public class UserBaseInfoRedis {
}
/**
* @Description 批量清楚用户缓存信息
* @param userIds
* @return
* @author wangc
* @date 2020.08.06 14:34
**/
public void clearUserCache(List<String> userIds){
userIds.forEach(id ->{
if(StringUtils.isNotBlank(id)) {
redisUtils.delete(UserRedisKeys.getResiUserKey(id));
}
});
}
public <T> void mergeObject(T origin, T destination) {
if (origin == null || destination == null)

9
epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java

@ -152,4 +152,13 @@ public interface UserBaseInfoService extends BaseService<UserBaseInfoEntity> {
* @date 2020.07.31 09:38
**/
void saveUserBaseInfoWhenAuthVolunteer(ResiVolunteerAuthenticateFormDTO param);
/**
* @Description 清除用户缓存信息
* @param ids
* @return
* @author wangc
* @date 2020.08.06 14:38
**/
void clearUserCache(List<String> ids);
}

15
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java

@ -248,7 +248,7 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us
result.setName(userInfo.getRealName());
result.setGender(StringUtils.equals(NumConstant.ZERO_STR,userInfo.getGender()) || StringUtils.isBlank(userInfo.getGender()) ?
ModuleConstant.GENDER_UNKNOWN : (StringUtils.equals(NumConstant.ONE_STR,userInfo.getGender()) ? ModuleConstant.GENDER_MALE : ModuleConstant.GENDER_FEMALE));
result.setAddress(new StringBuilder(userInfo.getDistrict()).append(userInfo.getStreet()).append(userInfo.getBuildingAddress()).toString());
result.setAddress(new StringBuilder(StringUtils.isBlank(userInfo.getDistrict()) ? ModuleConstant.EMPTY_STR : userInfo.getDistrict()).append(StringUtils.isBlank(userInfo.getStreet())? ModuleConstant.EMPTY_STR : userInfo.getStreet()).append(StringUtils.isBlank(userInfo.getBuildingAddress()) ? ModuleConstant.EMPTY_STR : userInfo.getBuildingAddress()).toString());
result.setAssociatedGrid(userInfo.getRegisteredGridName());
return result;
}
@ -283,4 +283,17 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl<UserBaseInfoDao, Us
baseInfo.setHeadImgUrl(param.getAvatarUrl());
insertOrUpdate(baseInfo);
}
/**
* @Description 清除用户缓存信息
* @param ids
* @return
* @author wangc
* @date 2020.08.06 14:38
**/
@Override
public void clearUserCache(List<String> ids) {
if(null == ids || ids.isEmpty()) return;
userBaseInfoRedis.clearUserCache(ids);
}
}

4
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java

@ -175,11 +175,11 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl<UserResiInfoDao, Us
userResiRegisterVisitService.updateResiRegisterVisit(false, userResiInfoDTO);
return new Result().error(EpmetErrorCode.MOBILE_HAS_BEEN_USED.getCode());
}
//3:校验成功 数据存入居民注册表 更新行为记录表数据
saveUserResiInfo(userResiInfoDTO);
userResiRegisterVisitService.updateResiRegisterVisit(true, userResiInfoDTO);
//4:居民注册关系表新增数据 首次注册数加一 注册数加一 参与数加一
registerRelationService.saveRegisterRelation(userResiInfoDTO);
//3:校验成功 数据存入居民注册表 更新行为记录表数据
saveUserResiInfo(userResiInfoDTO);
return result;
}

Loading…
Cancel
Save