Browse Source

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

dev_shibei_match
wxz 5 years ago
parent
commit
0d4df40f0c
  1. 18
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/ActPointEventMsg.java
  2. 15
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/mq/eventmsg/BasePointEventMsg.java
  3. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/LatestDraftActInfoResultDTO.java
  4. 2
      epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml
  5. 2
      epmet-module/epmet-heart/epmet-heart-server/pom.xml
  6. 22
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java
  7. 12
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java
  8. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActInfoService.java
  9. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java
  10. 12
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java
  11. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java
  12. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/HeartUserInfoServiceImpl.java
  13. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java
  14. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java
  15. 26
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java
  16. 48
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml
  17. 5
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointActionLogDTO.java
  18. 4
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/ResiPointDetailResultDTO.java
  19. 45
      epmet-module/epmet-point/epmet-point-client/src/main/java/dto/form/SendPointFormDTO.java
  20. 2
      epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml
  21. 2
      epmet-module/epmet-point/epmet-point-server/pom.xml
  22. 1
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/AdjustmentController.java
  23. 2
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/MqPointCallbackController.java
  24. 7
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointActionLogEntity.java
  25. 9
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointActionLogService.java
  26. 2
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAdjustmentLogServiceImpl.java
  27. 13
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java
  28. 72
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java
  29. 7
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java
  30. 2
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointAdjustmentLogDao.xml
  31. 1
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml
  32. 2
      epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointTotalDao.xml
  33. 2
      epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml
  34. 2
      epmet-module/epmet-third/epmet-third-server/pom.xml
  35. 13
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaUserServiceImpl.java
  36. 4
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaUserVisitedServiceImpl.java
  37. 1
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxLoginServiceImpl.java
  38. 2
      epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml
  39. 2
      epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml
  40. 2
      epmet-module/gov-org/gov-org-server/pom.xml
  41. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
  42. 46
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml
  43. 7
      epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftDetailResultDTO.java
  44. 2
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java
  45. 15
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/DraftDao.java
  46. 30
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleEntity.java
  47. 30
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftEntity.java
  48. 6
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java
  49. 40
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
  50. 17
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/utils/ModuleConstant.java
  51. 6
      epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.2__addAutoPublish.sql
  52. 12
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml
  53. 2
      epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/VerificationCodeFromDTO.java
  54. 2
      epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-dev.yml
  55. 2
      epmet-module/resi-mine/resi-mine-server/pom.xml
  56. 2
      epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-dev.yml
  57. 2
      epmet-module/resi-partymember/resi-partymember-server/deploy/docker-compose-test.yml
  58. 2
      epmet-module/resi-partymember/resi-partymember-server/pom.xml
  59. 1
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java
  60. 8
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserResiInfoDTO.java
  61. 2
      epmet-user/epmet-user-server/deploy/docker-compose-dev.yml
  62. 2
      epmet-user/epmet-user-server/deploy/docker-compose-test.yml
  63. 2
      epmet-user/epmet-user-server/pom.xml
  64. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java
  65. 14
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java
  66. 25
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java
  67. 7
      epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml

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

@ -1,18 +0,0 @@
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;
}

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

@ -19,6 +19,11 @@ public class BasePointEventMsg implements Serializable {
*/ */
private String opAgencyId; private String opAgencyId;
/**
* 操作人Id当有固定的操作人时传入此值如果没有则为空
* */
private String operatorId;
/** /**
* 客户Id * 客户Id
*/ */
@ -42,4 +47,14 @@ public class BasePointEventMsg implements Serializable {
* 是否是通用事件通用事件不走规则 * 是否是通用事件通用事件不走规则
*/ */
private Boolean isCommon; private Boolean isCommon;
/**
* 备注
*/
private String remark;
/**
* 业务id eg活动id
*/
private String sourceId;
} }

2
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/LatestDraftActInfoResultDTO.java

@ -165,5 +165,5 @@ public class LatestDraftActInfoResultDTO implements Serializable {
/** /**
* 活动内容- * 活动内容-
*/ */
private List<ActDraftContentDTOResultDTO> actContentList; private List<ActDraftContentDTOResultDTO> actContent;
} }

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

@ -2,7 +2,7 @@ version: "3.7"
services: services:
epmet-heart-server: epmet-heart-server:
container_name: epmet-heart-server-dev container_name: epmet-heart-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.7 image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.8
ports: ports:
- "8111:8111" - "8111:8111"
network_mode: host # 使用现有网络 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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.0.7</version> <version>0.0.8</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>epmet-heart</artifactId> <artifactId>epmet-heart</artifactId>

22
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java

@ -131,7 +131,7 @@ public class ResiActListController {
return actInfoService.latestAct(formDto); return actInfoService.latestAct(formDto);
} }
/* /**
* 正在进行中的活动 * 正在进行中的活动
* 进入活动的快捷入口, 前端只取第一条 * 进入活动的快捷入口, 前端只取第一条
* *
@ -158,8 +158,6 @@ public class ResiActListController {
return actInfoService.actLookBack(formDto); return actInfoService.actLookBack(formDto);
} }
//
/** /**
* 活动详情 * 活动详情
* *
@ -217,8 +215,6 @@ public class ResiActListController {
return actLiveRecService.liveRecList(map); return actLiveRecService.liveRecList(map);
} }
//
/** /**
* 取消活动报名 * 取消活动报名
* *
@ -293,12 +289,11 @@ public class ResiActListController {
return actSignInRecService.actSignIn(tokenDto, formDTO); return actSignInRecService.actSignIn(tokenDto, formDTO);
} }
/* /**
* 活动报名 * 活动报名
* *
* @param tokenDto * @param tokenDto
* @param formDTO * @param formDTO
*
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.resi.ResiActRegistrationResultDTO> * @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.resi.ResiActRegistrationResultDTO>
* @Author zhangyong * @Author zhangyong
* @Date 16:26 2020-07-28 * @Date 16:26 2020-07-28
@ -309,4 +304,17 @@ public class ResiActListController {
return actUserRelationService.registration(tokenDto, formDTO); return actUserRelationService.registration(tokenDto, formDTO);
} }
/**
* 首页组件 - 活动回顾列表(包含状态已结束finished)
*
* @param formDto
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.resi.ResiLookBackActResultDTO>>
* @Author zhangyong
* @Date 13:39 2020-07-21
**/
@PostMapping("actlookbackassembly")
public Result<List<ResiLookBackActResultDTO>> actLookBackAssembly(@RequestBody ResiLatestActFormDTO formDto) {
ValidatorUtils.validateEntity(formDto, ResiActBaseFormDTO.AddUserInternalGroup.class);
return actInfoService.actLookBackAssembly(formDto);
}
} }

12
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java

@ -297,4 +297,16 @@ public interface ActInfoDao extends BaseDao<ActInfoEntity> {
* @Date 2020/7/26 21:35 * @Date 2020/7/26 21:35
**/ **/
InProgressActDetailResultDTO selectInProgressDetail(String actId); InProgressActDetailResultDTO selectInProgressDetail(String actId);
/**
* 首页组件 - 活动回顾列表(包含状态已结束finished)
* 已结束的活动并且有实况或有回顾
* 按照时间顺序排序
*
* @param formDTO
* @return java.util.List<com.epmet.dto.result.resi.ResiLookBackActResultDTO>
* @Author zhangyong
* @Date 11:00 2020-07-20
**/
List<ResiLookBackActResultDTO> selectListLookBackActAssembly(ResiLatestActFormDTO formDTO);
} }

10
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActInfoService.java

@ -225,4 +225,14 @@ public interface ActInfoService extends BaseService<ActInfoEntity> {
* @Date 17:17 2020-07-23 * @Date 17:17 2020-07-23
**/ **/
Integer checkActTime(ActInfoDTO actInfoDTO); Integer checkActTime(ActInfoDTO actInfoDTO);
/**
* 首页组件 - 活动回顾列表(包含状态已结束finished)
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.resi.ResiLookBackActResultDTO>>
* @Author zhangyong
* @Date 13:39 2020-07-21
**/
Result<List<ResiLookBackActResultDTO>> actLookBackAssembly(ResiLatestActFormDTO formDTO);
} }

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

@ -368,7 +368,7 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
dto.setErrorTip(""); dto.setErrorTip("");
return new Result<ResiActAddressResultDTO>().ok(dto); return new Result<ResiActAddressResultDTO>().ok(dto);
} else { } else {
logger.info("您还未进入指定的签到范围~"); logger.info(EpmetErrorCode.NOT_IN_THE_SIGN_IN_RANGE.getMsg());
dto.setIsAddress(false); dto.setIsAddress(false);
dto.setErrorTip(EpmetErrorCode.NOT_IN_THE_SIGN_IN_RANGE.getMsg()); dto.setErrorTip(EpmetErrorCode.NOT_IN_THE_SIGN_IN_RANGE.getMsg());
return new Result<ResiActAddressResultDTO>().ok(dto); return new Result<ResiActAddressResultDTO>().ok(dto);
@ -379,4 +379,10 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
public Integer checkActTime(ActInfoDTO actInfoDTO) { public Integer checkActTime(ActInfoDTO actInfoDTO) {
return baseDao.checkActTime(actInfoDTO); return baseDao.checkActTime(actInfoDTO);
} }
@Override
public Result<List<ResiLookBackActResultDTO>> actLookBackAssembly(ResiLatestActFormDTO formDTO) {
List<ResiLookBackActResultDTO> lookBackAct = baseDao.selectListLookBackActAssembly(formDTO);
return new Result<List<ResiLookBackActResultDTO>>().ok(lookBackAct);
}
} }

12
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java

@ -23,7 +23,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.MqConstant; import com.epmet.commons.tools.constant.MqConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO; import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO;
import com.epmet.commons.tools.dto.form.mq.eventmsg.ActPointEventMsg; import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg;
import com.epmet.commons.tools.enums.EventEnum; import com.epmet.commons.tools.enums.EventEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
@ -109,7 +109,7 @@ public class ActLiveRecServiceImpl extends BaseServiceImpl<ActLiveRecDao, ActLiv
List<Object> dataContainer = new ArrayList<>(); List<Object> dataContainer = new ArrayList<>();
for (int k = 0; k < actLives.size(); k++) { for (int k = 0; k < actLives.size(); k++) {
Map<String, Object> base = new HashMap<>(); Map<String, Object> base = new HashMap<>(NumConstant.ONE);
base.put("nickname", userWxInfos.getData().get(k).getNickname()); base.put("nickname", userWxInfos.getData().get(k).getNickname());
base.put("headImg", userWxInfos.getData().get(k).getHeadImgUrl()); base.put("headImg", userWxInfos.getData().get(k).getHeadImgUrl());
base.put("desc", actLives.get(k).getDesc()); base.put("desc", actLives.get(k).getDesc());
@ -130,6 +130,9 @@ public class ActLiveRecServiceImpl extends BaseServiceImpl<ActLiveRecDao, ActLiv
logger.error("未查到用户基础信息"); logger.error("未查到用户基础信息");
throw new RenException("未查到用户基础信息"); throw new RenException("未查到用户基础信息");
} }
} else {
resultDto.setActLives(new ArrayList<>());
resultDto.setActLiveNum(NumConstant.ZERO);
} }
return new Result<ResiActLiveRecResultDTO>().ok(resultDto); return new Result<ResiActLiveRecResultDTO>().ok(resultDto);
} }
@ -221,13 +224,14 @@ public class ActLiveRecServiceImpl extends BaseServiceImpl<ActLiveRecDao, ActLiv
mqBaseMsgDTO.setEventClass(EventEnum.ACTIVE_INSERT_LIVE.getEventClass()); mqBaseMsgDTO.setEventClass(EventEnum.ACTIVE_INSERT_LIVE.getEventClass());
//事件code //事件code
mqBaseMsgDTO.setEventTag(EventEnum.ACTIVE_INSERT_LIVE.getEventTag()); mqBaseMsgDTO.setEventTag(EventEnum.ACTIVE_INSERT_LIVE.getEventTag());
List<ActPointEventMsg> actPointEventMsgList=new ArrayList<>(); List<BasePointEventMsg> actPointEventMsgList=new ArrayList<>();
ActPointEventMsg actPointEventMsg=new ActPointEventMsg(); BasePointEventMsg actPointEventMsg=new BasePointEventMsg();
actPointEventMsg.setCustomerId(formDTO.getCustomerId()); actPointEventMsg.setCustomerId(formDTO.getCustomerId());
actPointEventMsg.setUserId(formDTO.getUserId()); actPointEventMsg.setUserId(formDTO.getUserId());
actPointEventMsg.setActionFlag(MqConstant.PLUS); actPointEventMsg.setActionFlag(MqConstant.PLUS);
actPointEventMsg.setIsCommon(false); actPointEventMsg.setIsCommon(false);
actPointEventMsg.setRemark(remark); actPointEventMsg.setRemark(remark);
actPointEventMsg.setSourceId(formDTO.getActId());
actPointEventMsgList.add(actPointEventMsg); actPointEventMsgList.add(actPointEventMsg);
mqBaseMsgDTO.setMsg(JSON.toJSONString(actPointEventMsgList)); mqBaseMsgDTO.setMsg(JSON.toJSONString(actPointEventMsgList));

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

@ -207,7 +207,7 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD
// 活动只能志愿者参加, 当前用户是否满足条件 // 活动只能志愿者参加, 当前用户是否满足条件
satisfy = this.volunteerParticipationAct(volunteerFlag); satisfy = this.volunteerParticipationAct(volunteerFlag);
if (!satisfy){ if (!satisfy){
logger.info("活动报名失败,请先认证志愿者"); logger.info(EpmetErrorCode.NON_CERTIFIED_VOLUNTEER.getMsg());
resultDTO.setFlag(EpmetErrorCode.NON_CERTIFIED_VOLUNTEER.getCode()); resultDTO.setFlag(EpmetErrorCode.NON_CERTIFIED_VOLUNTEER.getCode());
resultDTO.setTip(EpmetErrorCode.NON_CERTIFIED_VOLUNTEER.getMsg()); resultDTO.setTip(EpmetErrorCode.NON_CERTIFIED_VOLUNTEER.getMsg());
return new Result<ResiActRegistrationResultDTO>().ok(resultDTO); return new Result<ResiActRegistrationResultDTO>().ok(resultDTO);
@ -216,7 +216,7 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD
// 活动不限制志愿者身份,但要求是 居民身份, 当前用户是否满足条件 // 活动不限制志愿者身份,但要求是 居民身份, 当前用户是否满足条件
satisfy = this.resiParticipationAct(formDTO.getUserId()); satisfy = this.resiParticipationAct(formDTO.getUserId());
if (!satisfy){ if (!satisfy){
logger.info("活动报名失败,请完善居民信息"); logger.info(EpmetErrorCode.CANNOT_AUDIT_WARM.getMsg());
resultDTO.setFlag(EpmetErrorCode.CANNOT_AUDIT_WARM.getCode()); resultDTO.setFlag(EpmetErrorCode.CANNOT_AUDIT_WARM.getCode());
resultDTO.setTip(EpmetErrorCode.CANNOT_AUDIT_WARM.getMsg()); resultDTO.setTip(EpmetErrorCode.CANNOT_AUDIT_WARM.getMsg());
return new Result<ResiActRegistrationResultDTO>().ok(resultDTO); return new Result<ResiActRegistrationResultDTO>().ok(resultDTO);
@ -226,7 +226,7 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD
// 开始报名 // 开始报名
boolean actTimeConflict = this.actStartSignUp(actInfoDTO, formDTO, volunteerFlag); boolean actTimeConflict = this.actStartSignUp(actInfoDTO, formDTO, volunteerFlag);
if (!actTimeConflict){ if (!actTimeConflict){
logger.info("报名失败。您本次报名活动时间与已报名活动时间间隔较短,为了不影响您已报名的活动,请选择其他时间的活动,谢谢。"); logger.info(EpmetErrorCode.ACT_TIME_CONFLICT.getMsg());
resultDTO.setFlag(EpmetErrorCode.ACT_TIME_CONFLICT.getCode()); resultDTO.setFlag(EpmetErrorCode.ACT_TIME_CONFLICT.getCode());
resultDTO.setTip(EpmetErrorCode.ACT_TIME_CONFLICT.getMsg()); resultDTO.setTip(EpmetErrorCode.ACT_TIME_CONFLICT.getMsg());
return new Result<ResiActRegistrationResultDTO>().ok(resultDTO); return new Result<ResiActRegistrationResultDTO>().ok(resultDTO);

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

@ -127,7 +127,7 @@ public class HeartUserInfoServiceImpl extends BaseServiceImpl<HeartUserInfoDao,
@Override @Override
public Result<List<ResiLeaderboardResultDTO>> leaderboard(ResiActBaseFormDTO formDTO) { public Result<List<ResiLeaderboardResultDTO>> leaderboard(ResiActBaseFormDTO formDTO) {
List<ResiLeaderboardResultDTO> resultDTOS = new ArrayList<>(); List<ResiLeaderboardResultDTO> resultDtoS = new ArrayList<>();
// 获取排好序的 排行榜 // 获取排好序的 排行榜
List<HeartUserInfoDTO> leaderboardList = baseDao.selectListLeaderboard(formDTO); List<HeartUserInfoDTO> leaderboardList = baseDao.selectListLeaderboard(formDTO);
if (leaderboardList.size() > NumConstant.ZERO){ if (leaderboardList.size() > NumConstant.ZERO){
@ -151,14 +151,14 @@ public class HeartUserInfoServiceImpl extends BaseServiceImpl<HeartUserInfoDao,
dto.setNickname(wx.getNickname()); dto.setNickname(wx.getNickname());
} }
} }
resultDTOS.add(dto); resultDtoS.add(dto);
} }
} else { } else {
logger.info("查询用户基本信息接口返回失败"); logger.info("查询用户基本信息接口返回失败");
throw new RenException("查询用户基本信息失败"); throw new RenException("查询用户基本信息失败");
} }
} }
return new Result<List<ResiLeaderboardResultDTO>>().ok(resultDTOS); return new Result<List<ResiLeaderboardResultDTO>>().ok(resultDtoS);
} }
@Override @Override

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

@ -22,7 +22,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.MqConstant; import com.epmet.commons.tools.constant.MqConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO; import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO;
import com.epmet.commons.tools.dto.form.mq.eventmsg.ActPointEventMsg; import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg;
import com.epmet.commons.tools.enums.EventEnum; import com.epmet.commons.tools.enums.EventEnum;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
@ -102,8 +102,8 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
mqBaseMsgDTO.setEventClass(EventEnum.REGISTER_VOLUNTEER.getEventClass()); mqBaseMsgDTO.setEventClass(EventEnum.REGISTER_VOLUNTEER.getEventClass());
//事件code //事件code
mqBaseMsgDTO.setEventTag(EventEnum.REGISTER_VOLUNTEER.getEventTag()); mqBaseMsgDTO.setEventTag(EventEnum.REGISTER_VOLUNTEER.getEventTag());
List<ActPointEventMsg> actPointEventMsgList=new ArrayList<>(); List<BasePointEventMsg> actPointEventMsgList=new ArrayList<>();
ActPointEventMsg actPointEventMsg=new ActPointEventMsg(); BasePointEventMsg actPointEventMsg=new BasePointEventMsg();
actPointEventMsg.setCustomerId(formDTO.getCustomerId()); actPointEventMsg.setCustomerId(formDTO.getCustomerId());
actPointEventMsg.setUserId(formDTO.getUserId()); actPointEventMsg.setUserId(formDTO.getUserId());
actPointEventMsg.setActionFlag(MqConstant.PLUS); actPointEventMsg.setActionFlag(MqConstant.PLUS);

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

@ -76,7 +76,7 @@ public class WorkActDraftServiceImpl implements WorkActDraftService {
LatestDraftActInfoResultDTO latestAct=latestActInfoService.getLatestActDraft(userId); LatestDraftActInfoResultDTO latestAct=latestActInfoService.getLatestActDraft(userId);
if(null!=latestAct){ if(null!=latestAct){
List<ActDraftContentDTOResultDTO> actContentList=latestActContentService.selectActContentList(latestAct.getActDraftId()); List<ActDraftContentDTOResultDTO> actContentList=latestActContentService.selectActContentList(latestAct.getActDraftId());
latestAct.setActContentList(actContentList); latestAct.setActContent(actContentList);
} }
return latestAct; return latestAct;
}else{ }else{

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

@ -6,7 +6,7 @@ import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.MqConstant; import com.epmet.commons.tools.constant.MqConstant;
import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO; import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO;
import com.epmet.commons.tools.dto.form.mq.eventmsg.ActPointEventMsg; import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg;
import com.epmet.commons.tools.enums.EventEnum; import com.epmet.commons.tools.enums.EventEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
@ -799,19 +799,21 @@ public class WorkActServiceImpl implements WorkActService {
mqBaseMsgDTO.setEventClass(EventEnum.ACTIVE_SEND_POINT.getEventClass()); mqBaseMsgDTO.setEventClass(EventEnum.ACTIVE_SEND_POINT.getEventClass());
//事件code //事件code
mqBaseMsgDTO.setEventTag(EventEnum.ACTIVE_SEND_POINT.getEventTag()); mqBaseMsgDTO.setEventTag(EventEnum.ACTIVE_SEND_POINT.getEventTag());
List<ActPointEventMsg> actPointEventMsgList=new ArrayList<>(); List<BasePointEventMsg> basePointEventMsgArrayList=new ArrayList<>();
for(ActUserRelationEntity actUserRelationEntity:actUserRelationEntityList){ for(ActUserRelationEntity actUserRelationEntity:actUserRelationEntityList){
ActPointEventMsg actPointEventMsg=new ActPointEventMsg(); BasePointEventMsg basePointEventMsg=new BasePointEventMsg();
actPointEventMsg.setOpAgencyId(opAgencyId); basePointEventMsg.setOpAgencyId(opAgencyId);
actPointEventMsg.setCustomerId(actInfoDTO.getCustomerId()); basePointEventMsg.setCustomerId(actInfoDTO.getCustomerId());
actPointEventMsg.setUserId(actUserRelationEntity.getUserId()); basePointEventMsg.setUserId(actUserRelationEntity.getUserId());
actPointEventMsg.setActionFlag(MqConstant.PLUS); basePointEventMsg.setActionFlag(MqConstant.PLUS);
actPointEventMsg.setPoint(actInfoDTO.getReward()); basePointEventMsg.setPoint(actInfoDTO.getReward());
actPointEventMsg.setIsCommon(true); basePointEventMsg.setIsCommon(true);
actPointEventMsg.setRemark(remark); basePointEventMsg.setRemark(remark);
actPointEventMsgList.add(actPointEventMsg); basePointEventMsg.setSourceId(actInfoDTO.getId());
basePointEventMsg.setOperatorId(loginUserUtil.getLoginUserId());
basePointEventMsgArrayList.add(basePointEventMsg);
} }
mqBaseMsgDTO.setMsg(JSON.toJSONString(actPointEventMsgList)); mqBaseMsgDTO.setMsg(JSON.toJSONString(basePointEventMsgArrayList));
Result result=SendMqMsgUtils.sendMsg(mqBaseMsgDTO); Result result=SendMqMsgUtils.sendMsg(mqBaseMsgDTO);
if(!result.success()){ if(!result.success()){
logger.error("活动积分发放失败"); logger.error("活动积分发放失败");

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

@ -59,7 +59,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime, DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime, DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress, i.ACT_ADDRESS actAddress,
IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0)) i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota, i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数 IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'signing_up' AS actCurrentState, -- 活动状态:报名中,未报满 'signing_up' AS actCurrentState, -- 活动状态:报名中,未报满
@ -85,7 +85,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime, DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime, DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress, i.ACT_ADDRESS actAddress,
IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0)) i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota, i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数 IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'enough' AS actCurrentState, -- 活动状态:报名中,已报满 'enough' AS actCurrentState, -- 活动状态:报名中,已报满
@ -112,7 +112,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime, DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime, DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress, i.ACT_ADDRESS actAddress,
IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0)) i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota, i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数 IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'end_sign_up' AS actCurrentState, -- 活动状态:未开始 'end_sign_up' AS actCurrentState, -- 活动状态:未开始
@ -138,7 +138,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime, DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime, DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress, i.ACT_ADDRESS actAddress,
IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0)) i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota, i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数 IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'in_progress' AS actCurrentState, -- 活动状态:进行中 'in_progress' AS actCurrentState, -- 活动状态:进行中
@ -164,7 +164,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime, DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime, DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress, i.ACT_ADDRESS actAddress,
IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0)) i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota, i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数 IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'finished' AS actCurrentState, -- 活动状态:已结束 'finished' AS actCurrentState, -- 活动状态:已结束
@ -190,7 +190,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime, DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime, DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress, i.ACT_ADDRESS actAddress,
IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0)) i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota, i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数 IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'auditing' AS actCurrentState -- 活动状态 'auditing' AS actCurrentState -- 活动状态
@ -213,7 +213,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime, DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime, DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress, i.ACT_ADDRESS actAddress,
IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0)) i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota, i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数 IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'passed' AS actCurrentState -- 活动状态 'passed' AS actCurrentState -- 活动状态
@ -236,7 +236,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime, DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime, DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress, i.ACT_ADDRESS actAddress,
IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0)) i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota, i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数 IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'refused' AS actCurrentState -- 活动状态 'refused' AS actCurrentState -- 活动状态
@ -259,7 +259,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime, DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime, DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress, i.ACT_ADDRESS actAddress,
IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0)) i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota, i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数 IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'canceld' AS actCurrentState -- 活动状态 'canceld' AS actCurrentState -- 活动状态
@ -282,7 +282,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime, DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime, DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress, i.ACT_ADDRESS actAddress,
IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, i.ACT_QUOTA_CATEGORY actQuotaCategory,
i.ACT_QUOTA actQuota, i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数 IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
case case
@ -330,7 +330,7 @@
<select id="selectListLookBackAct" parameterType="com.epmet.dto.form.resi.ResiActBaseFormDTO" <select id="selectListLookBackAct" parameterType="com.epmet.dto.form.resi.ResiActBaseFormDTO"
resultType="com.epmet.dto.result.resi.ResiLookBackActResultDTO"> resultType="com.epmet.dto.result.resi.ResiLookBackActResultDTO">
SELECT SELECT
i.ID id, i.ID actId,
i.TITLE title, i.TITLE title,
i.COVER_PIC coverPic, i.COVER_PIC coverPic,
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime, DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
@ -391,12 +391,12 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime, DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime, DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress, i.ACT_ADDRESS actAddress,
IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0)) i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota, i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数 IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
i.REWARD reward, i.REWARD reward,
i.REQUIREMENT requirement, i.REQUIREMENT requirement,
IF(i.VOLUNTEER_LIMIT = 1, true , false ) as volunteerLimit, -- 是否是志愿者(true:只有志愿者才可以参加活动1,false: 只要是居民就可以参加活动0) i.VOLUNTEER_LIMIT volunteerLimit, -- 是否是志愿者(true:只有志愿者才可以参加活动1,false: 只要是居民就可以参加活动0)
i.SPONSOR_NAME sponsor, i.SPONSOR_NAME sponsor,
DATE_FORMAT(i.ACTUAL_START_TIME,'%Y-%m-%d %H:%i') actualStartTime, DATE_FORMAT(i.ACTUAL_START_TIME,'%Y-%m-%d %H:%i') actualStartTime,
DATE_FORMAT(i.ACTUAL_END_TIME,'%Y-%m-%d %H:%i') actualEndTime, DATE_FORMAT(i.ACTUAL_END_TIME,'%Y-%m-%d %H:%i') actualEndTime,
@ -420,7 +420,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime, DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime, DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress, i.ACT_ADDRESS actAddress,
IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0)) i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota, i.ACT_QUOTA actQuota,
i.SPONSOR_CONTACTS contacts, i.SPONSOR_CONTACTS contacts,
i.SPONSOR_TEL tel, i.SPONSOR_TEL tel,
@ -666,4 +666,24 @@
ai.DEL_FLAG = '0' ai.DEL_FLAG = '0'
AND ai.ID = #{actId} AND ai.ID = #{actId}
</select> </select>
<!--首页组件-活动回顾列表-->
<select id="selectListLookBackActAssembly" parameterType="com.epmet.dto.form.resi.ResiLatestActFormDTO"
resultType="com.epmet.dto.result.resi.ResiLookBackActResultDTO">
SELECT
i.ID actId,
i.TITLE title,
i.COVER_PIC coverPic,
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress,
'finished' actCurrentState
FROM act_info i
WHERE i.DEL_FLAG = '0'
AND i.SUMMARY_FLAG = 1 OR (SELECT r.ACT_ID FROM act_live_rec r WHERE r.DEL_FLAG = '0' AND r.ACT_ID = i.ID GROUP BY r.ACT_ID)
AND i.CUSTOMER_ID = #{customerId}
AND i.ACT_STATUS = 'finished'
ORDER BY i.CREATED_TIME DESC
LIMIT 0, #{num}
</select>
</mapper> </mapper>

5
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointActionLogDTO.java

@ -53,6 +53,11 @@ public class UserPointActionLogDTO implements Serializable {
*/ */
private String actionFlag; private String actionFlag;
/**
* 来源Id可以是活动Id
* */
private String sourceId;
/** /**
* 来源ID 当来源为积分调整时 通过事件Id查找规则ID计算出分数 通过EVENT_ID能查出RUIE_ID * 来源ID 当来源为积分调整时 通过事件Id查找规则ID计算出分数 通过EVENT_ID能查出RUIE_ID
*/ */

4
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/ResiPointDetailResultDTO.java

@ -17,11 +17,11 @@ public class ResiPointDetailResultDTO implements Serializable {
/** /**
* 累计积分 * 累计积分
* */ * */
private Integer accumulatedPoint; private Integer accumulatedPoint = 0;
/** /**
* 可用积分 * 可用积分
* */ * */
private Integer usablePoint; private Integer usablePoint = 0;
} }

45
epmet-module/epmet-point/epmet-point-client/src/main/java/dto/form/SendPointFormDTO.java

@ -14,5 +14,50 @@ import lombok.Data;
@Data @Data
public class SendPointFormDTO { public class SendPointFormDTO {
private String pointDesc; private String pointDesc;
/**
* 积分
* */
private Integer point; private Integer point;
/**
* 操作人机关id
*/
private String opAgencyId;
/**
* 操作人Id当有固定的操作人时传入此值如果没有则为空
* */
private String operatorId;
/**
* 客户Id
*/
private String customerId;
/**
* 被操作用户id
*/
private String userId;
/**
* 加减分标识 plus/minus
*/
private String actionFlag;
/**
* 是否是通用事件通用事件不走规则
*/
private Boolean isCommon;
/**
* 备注
*/
private String remark;
/**
* 业务id eg活动id
*/
private String sourceId;
} }

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

@ -2,7 +2,7 @@ version: "3.7"
services: services:
epmet-point-server: epmet-point-server:
container_name: epmet-point-server-dev container_name: epmet-point-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.5 image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.7
ports: ports:
- "8112:8112" - "8112:8112"
network_mode: host # 使用现有网络 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" 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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.0.5</version> <version>0.0.7</version>
<parent> <parent>
<artifactId>epmet-point</artifactId> <artifactId>epmet-point</artifactId>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>

1
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/AdjustmentController.java

@ -83,6 +83,7 @@ public class AdjustmentController {
@PostMapping("adjust") @PostMapping("adjust")
public Result adjustPoint(@LoginUser TokenDto token, @RequestBody PointAdjustmentFormDTO param){ public Result adjustPoint(@LoginUser TokenDto token, @RequestBody PointAdjustmentFormDTO param){
param.setOperatorId(token.getUserId()); param.setOperatorId(token.getUserId());
param.setCustomerId(token.getCustomerId());
ValidatorUtils.validateEntity(param, PointAdjustmentFormDTO.PointAdjustmentGroup.class); ValidatorUtils.validateEntity(param, PointAdjustmentFormDTO.PointAdjustmentGroup.class);
pointAdjustmentLogService.adjustPoint(param); pointAdjustmentLogService.adjustPoint(param);
return new Result(); return new Result();

2
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/MqPointCallbackController.java

@ -46,7 +46,7 @@ public class MqPointCallbackController {
} }
SendPointFormDTO formDTO = ConvertUtils.sourceToTarget(mqMsg.getMsg(), SendPointFormDTO.class); SendPointFormDTO formDTO = ConvertUtils.sourceToTarget(mqMsg.getMsg(), SendPointFormDTO.class);
try { try {
//TODO 调用调整积分方法去给用户加减积分 userPointActionLogService. userPointActionLogService.grantPoint(formDTO);
} catch (Exception e) { } catch (Exception e) {
logger.error("activeSendPoint consume fail,msg:{}",JSON.toJSONString(mqMsg.getMsg())); logger.error("activeSendPoint consume fail,msg:{}",JSON.toJSONString(mqMsg.getMsg()));
throw new RenException(EpmetErrorCode.SERVER_ERROR.getMsg()); throw new RenException(EpmetErrorCode.SERVER_ERROR.getMsg());

7
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointActionLogEntity.java

@ -54,10 +54,15 @@ public class UserPointActionLogEntity extends BaseEpmetEntity {
private String actionFlag; private String actionFlag;
/** /**
* 来源ID 当来源为积分调整时 通过事件Id查找规则ID计算出分数 通过EVENT_ID能查出RUIE_ID * 当来源为积分调整时 通过事件Id查找规则ID计算出分数 通过EVENT_ID能查出RUIE_ID
*/ */
private String eventId; private String eventId;
/**
* 来源Id可以是活动Id
* */
private String sourceId;
/** /**
* 活动描述 获取积分的原因相关内容用来拼接用户参加了xxx活动获取积分的文案取活动的名称积分调整文案其他 * 活动描述 获取积分的原因相关内容用来拼接用户参加了xxx活动获取积分的文案取活动的名称积分调整文案其他
如果是管理员手动调整扣减积分ACTION_FLAG为"minus"但是不会生成核销记录核销记录只保存用户使用积分兑换商品的核销详情 如果是管理员手动调整扣减积分ACTION_FLAG为"minus"但是不会生成核销记录核销记录只保存用户使用积分兑换商品的核销详情

9
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointActionLogService.java

@ -23,6 +23,7 @@ import com.epmet.dto.UserPointActionLogDTO;
import com.epmet.dto.form.CommonPageUserFormDTO; import com.epmet.dto.form.CommonPageUserFormDTO;
import com.epmet.dto.result.ResiPointLogListResultDTO; import com.epmet.dto.result.ResiPointLogListResultDTO;
import com.epmet.entity.UserPointActionLogEntity; import com.epmet.entity.UserPointActionLogEntity;
import dto.form.SendPointFormDTO;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -104,5 +105,13 @@ public interface UserPointActionLogService extends BaseService<UserPointActionLo
**/ **/
List<ResiPointLogListResultDTO> getMyPointRecord(CommonPageUserFormDTO pageUser); List<ResiPointLogListResultDTO> getMyPointRecord(CommonPageUserFormDTO pageUser);
/**
* @Description 消息网关回调进行积分发放
* @param grantPointParam
* @return
* @author wangc
* @date 2020.07.29 09:11
**/
void grantPoint(SendPointFormDTO grantPointParam);
} }

2
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAdjustmentLogServiceImpl.java

@ -178,7 +178,7 @@ public class PointAdjustmentLogServiceImpl extends BaseServiceImpl<PointAdjustme
if(null == param.getPoint()) throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); if(null == param.getPoint()) throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
Date currentTime = new Date(); Date currentTime = new Date();
Integer point = param.getPoint(); Integer point = param.getPoint();
if(StringUtils.equals(ModuleConstant.OPERATION_TYPE_MINUS,param.getAdjustmentType())){ if(StringUtils.equals(ModuleConstant.OPERATION_TYPE_MINUS,param.getAdjustmentType()) || param.getAdjustmentType().toLowerCase().contains("m")){
if(point > NumConstant.ZERO){ if(point > NumConstant.ZERO){
point *= NumConstant.ONE_NEG; point *= NumConstant.ONE_NEG;
} }

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

@ -236,7 +236,8 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public PointVerificationResultDTO verifyPoint(PointVerificationFormDTO verificationParam) { public PointVerificationResultDTO verifyPoint(PointVerificationFormDTO verificationParam) {
Date currentTime = new Date();
DimIdGenerator.DimIdBean dim = DimIdGenerator.getDimIdBean(new Date());
PointVerificationResultDTO result = new PointVerificationResultDTO(); PointVerificationResultDTO result = new PointVerificationResultDTO();
ResiCommonUserIdFormDTO userId = new ResiCommonUserIdFormDTO(); ResiCommonUserIdFormDTO userId = new ResiCommonUserIdFormDTO();
userId.setUserId(verificationParam.getUserId()); userId.setUserId(verificationParam.getUserId());
@ -260,7 +261,7 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi
String agencyId = ModuleConstant.EMPTY_STR; String agencyId = ModuleConstant.EMPTY_STR;
String operatorName = ModuleConstant.EMPTY_STR; String operatorName = ModuleConstant.EMPTY_STR;
PointVerificationStatisticalDailyEntity statistical = new PointVerificationStatisticalDailyEntity(); PointVerificationStatisticalDailyEntity statistical = new PointVerificationStatisticalDailyEntity();
if(staffResult.success() && null != staffResult.getData()){ if(staffResult.success() && null != staffResult.getData()){
statistical = ConvertUtils.sourceToTarget(staffResult.getData(),PointVerificationStatisticalDailyEntity.class); statistical = ConvertUtils.sourceToTarget(staffResult.getData(),PointVerificationStatisticalDailyEntity.class);
customerId = staffResult.getData().getCustomerId(); customerId = staffResult.getData().getCustomerId();
@ -270,6 +271,7 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi
//1.记录积分行为日志 - 居民端 //1.记录积分行为日志 - 居民端
UserPointActionLogEntity action = new UserPointActionLogEntity(); UserPointActionLogEntity action = new UserPointActionLogEntity();
action.setCustomerId(customerId);
action.setCreatedBy(verificationParam.getOperatorId()); action.setCreatedBy(verificationParam.getOperatorId());
action.setUserId(verificationParam.getUserId()); action.setUserId(verificationParam.getUserId());
action.setActionFlag(ModuleConstant.OPERATION_TYPE_MINUS); action.setActionFlag(ModuleConstant.OPERATION_TYPE_MINUS);
@ -291,7 +293,7 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi
verificationLog.setAddress(verificationParam.getAddress()); verificationLog.setAddress(verificationParam.getAddress());
pointVerificationLogDao.insert(verificationLog); pointVerificationLogDao.insert(verificationLog);
//3.记录积分日统计表 //3.记录积分日统计表
DimIdGenerator.DimIdBean dim = DimIdGenerator.getDimIdBean(currentTime);
UserPointStatisticalDailyEntity userStatistical = ConvertUtils.sourceToTarget(dim,UserPointStatisticalDailyEntity.class); UserPointStatisticalDailyEntity userStatistical = ConvertUtils.sourceToTarget(dim,UserPointStatisticalDailyEntity.class);
userStatistical.setUserId(verificationParam.getUserId()); userStatistical.setUserId(verificationParam.getUserId());
userStatistical.setActionFlag(ModuleConstant.OPERATION_TYPE_EXCHANGE); userStatistical.setActionFlag(ModuleConstant.OPERATION_TYPE_EXCHANGE);
@ -300,6 +302,11 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi
userPointStatisticalDailyService.insertOrUpdate(userStatistical); userPointStatisticalDailyService.insertOrUpdate(userStatistical);
//4.记录积分核销日统计 - 政府端 //4.记录积分核销日统计 - 政府端
statistical.setVerificatedPoint(point * NumConstant.ONE_NEG); statistical.setVerificatedPoint(point * NumConstant.ONE_NEG);
statistical.setDateId(dim.getDateId());
statistical.setWeekId(dim.getWeekId());
statistical.setMonthId(dim.getMonthId());
statistical.setQuarterId(dim.getQuarterId());
statistical.setYearId(dim.getYearId());
pointVerificationStatisticalDailyService.insertOrUpdate(statistical); pointVerificationStatisticalDailyService.insertOrUpdate(statistical);
//5.更新用户总积分表 //5.更新用户总积分表
UserPointTotalEntity userPoint = new UserPointTotalEntity(); UserPointTotalEntity userPoint = new UserPointTotalEntity();

72
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java

@ -20,6 +20,8 @@ package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.enums.EventEnum;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.FieldConstant;
@ -29,10 +31,18 @@ import com.epmet.dto.form.CommonPageUserFormDTO;
import com.epmet.dto.result.ResiPointLogListResultDTO; import com.epmet.dto.result.ResiPointLogListResultDTO;
import com.epmet.dto.result.ResiPointLogPeriodResultDTO; import com.epmet.dto.result.ResiPointLogPeriodResultDTO;
import com.epmet.entity.UserPointActionLogEntity; import com.epmet.entity.UserPointActionLogEntity;
import com.epmet.entity.UserPointStatisticalDailyEntity;
import com.epmet.entity.UserPointTotalEntity;
import com.epmet.service.UserPointActionLogService; import com.epmet.service.UserPointActionLogService;
import com.epmet.service.UserPointStatisticalDailyService;
import com.epmet.service.UserPointTotalService;
import com.epmet.utils.DimIdGenerator;
import com.epmet.utils.ModuleConstant;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import dto.form.SendPointFormDTO;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -48,6 +58,10 @@ import java.util.stream.Collectors;
@Service @Service
public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActionLogDao, UserPointActionLogEntity> implements UserPointActionLogService { public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActionLogDao, UserPointActionLogEntity> implements UserPointActionLogService {
@Autowired
private UserPointTotalService userPointTotalService;
@Autowired
private UserPointStatisticalDailyService userPointStatisticalDailyService;
@Override @Override
public PageData<UserPointActionLogDTO> page(Map<String, Object> params) { public PageData<UserPointActionLogDTO> page(Map<String, Object> params) {
@ -131,4 +145,62 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl<UserPointActi
return result; return result;
} }
/**
* @Description 消息网关回调进行积分发放
* @param grantPointParam
* @return
* @author wangc
* @date 2020.07.29 09:11
**/
@Override
public void grantPoint(SendPointFormDTO grantPointParam){
if(StringUtils.equals(ModuleConstant.OPERATION_TYPE_MINUS,grantPointParam.getActionFlag())){
//减
if(grantPointParam.getPoint() > NumConstant.ZERO){
//保证负数
grantPointParam.setPoint(grantPointParam.getPoint() * NumConstant.ONE_NEG);
}
}else{
//加
if(grantPointParam.getPoint() < NumConstant.ZERO){
//保证正数
grantPointParam.setPoint(grantPointParam.getPoint() * NumConstant.ONE_NEG);
}
}
//1.新增用户积分行为记录
UserPointActionLogEntity action = new UserPointActionLogEntity();
action.setCustomerId(grantPointParam.getCustomerId());
action.setPoint(grantPointParam.getPoint());
action.setEventStatement(grantPointParam.getPointDesc());
action.setEventName(EventEnum.ACTIVE_SEND_POINT.getEventDesc());
action.setEventId(EventEnum.ACTIVE_INSERT_LIVE.getEventTag());
action.setActionFlag(grantPointParam.getActionFlag());
action.setUserId(grantPointParam.getUserId());
action.setCreatedBy(grantPointParam.getOperatorId());
action.setUpdatedBy(grantPointParam.getOperatorId());
action.setSourceId(grantPointParam.getSourceId());
action.setOperatorAgencyId(grantPointParam.getOpAgencyId());
baseDao.insert(action);
//2.新增/修改用户积分日统计
DimIdGenerator.DimIdBean dimVal = DimIdGenerator.getDimIdBean(new Date());
UserPointStatisticalDailyEntity statistical = ConvertUtils.sourceToTarget(dimVal,UserPointStatisticalDailyEntity.class);
statistical.setPointChange(grantPointParam.getPoint());
statistical.setActionFlag(grantPointParam.getActionFlag());
statistical.setCustomerId(grantPointParam.getCustomerId());
statistical.setUserId(grantPointParam.getUserId());
statistical.setCreatedBy(grantPointParam.getOperatorId());
statistical.setUpdatedBy(grantPointParam.getOperatorId());
userPointStatisticalDailyService.insertOrUpdate(statistical);
//3.新增/修改用户总积分
UserPointTotalEntity point = new UserPointTotalEntity();
point.setCustomerId(grantPointParam.getCustomerId());
point.setUserId(grantPointParam.getUserId());
point.setTotalPoint(grantPointParam.getPoint());
point.setUsablePoint(grantPointParam.getPoint());
point.setUsedPoint(NumConstant.ZERO);
point.setCreatedBy(grantPointParam.getOperatorId());
point.setUpdatedBy(grantPointParam.getOperatorId());
userPointTotalService.insertOrUpdate(point);
}
} }

7
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java

@ -118,7 +118,10 @@ public class UserPointTotalServiceImpl extends BaseServiceImpl<UserPointTotalDao
**/ **/
@Override @Override
public ResiPointDetailResultDTO getMyPoint(ResiCommonUserIdFormDTO userId) { public ResiPointDetailResultDTO getMyPoint(ResiCommonUserIdFormDTO userId) {
return baseDao.selectPointByUserId(userId.getUserId()); ResiPointDetailResultDTO result = baseDao.selectPointByUserId(userId.getUserId());
if(null == result) return new ResiPointDetailResultDTO();
if(null == result.getUsablePoint() || null == result.getAccumulatedPoint()) return new ResiPointDetailResultDTO();
return result;
} }
/** /**
@ -223,7 +226,7 @@ public class UserPointTotalServiceImpl extends BaseServiceImpl<UserPointTotalDao
@Override @Override
public void insertOrUpdate(UserPointTotalEntity entity) { public void insertOrUpdate(UserPointTotalEntity entity) {
UserPointTotalEntity existed = baseDao.selectIfExisted(entity.getUserId()); UserPointTotalEntity existed = baseDao.selectIfExisted(entity.getUserId());
if(null != existed && StringUtils.isBlank(existed.getId())){ if(null != existed && StringUtils.isNotBlank(existed.getId())){
existed.setUsedPoint(null == existed.getUsedPoint() ? entity.getUsedPoint() : entity.getUsedPoint() + existed.getUsedPoint()); existed.setUsedPoint(null == existed.getUsedPoint() ? entity.getUsedPoint() : entity.getUsedPoint() + existed.getUsedPoint());
existed.setUsablePoint(null == existed.getUsablePoint() ? entity.getUsablePoint() : entity.getUsablePoint() + existed.getUsablePoint()); existed.setUsablePoint(null == existed.getUsablePoint() ? entity.getUsablePoint() : entity.getUsablePoint() + existed.getUsablePoint());
existed.setTotalPoint(null == existed.getTotalPoint() ? entity.getTotalPoint() : entity.getTotalPoint() + existed.getTotalPoint()); existed.setTotalPoint(null == existed.getTotalPoint() ? entity.getTotalPoint() : entity.getTotalPoint() + existed.getTotalPoint());

2
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointAdjustmentLogDao.xml

@ -27,7 +27,7 @@
adjust_reason AS reason, adjust_reason AS reason,
DATE_FORMAT( created_time, '%Y-%m-%d %H:%i:%s' ) AS date, DATE_FORMAT( created_time, '%Y-%m-%d %H:%i:%s' ) AS date,
CASE CASE
action_flag ADJUSTMENT_TYPE
WHEN 'plus' THEN WHEN 'plus' THEN
CONCAT( '+', POINT ) ELSE CONCAT( '-', POINT ) CONCAT( '+', POINT ) ELSE CONCAT( '-', POINT )
END AS POINT END AS POINT

1
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointActionLogDao.xml

@ -9,6 +9,7 @@
<result property="customerId" column="CUSTOMER_ID"/> <result property="customerId" column="CUSTOMER_ID"/>
<result property="actionFlag" column="ACTION_FLAG"/> <result property="actionFlag" column="ACTION_FLAG"/>
<result property="eventId" column="EVENT_ID"/> <result property="eventId" column="EVENT_ID"/>
<result property="sourceId" column="SOURCE_ID" />
<result property="eventStatement" column="EVENT_STATEMENT"/> <result property="eventStatement" column="EVENT_STATEMENT"/>
<result property="eventName" column="EVENT_NAME"/> <result property="eventName" column="EVENT_NAME"/>
<result property="point" column="POINT"/> <result property="point" column="POINT"/>

2
epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointTotalDao.xml

@ -48,7 +48,7 @@
<select id="selectIfExisted" resultType="com.epmet.entity.UserPointTotalEntity"> <select id="selectIfExisted" resultType="com.epmet.entity.UserPointTotalEntity">
SELECT SELECT
ID, ID,
USERD_POINT, USED_POINT,
USABLE_POINT, USABLE_POINT,
TOTAL_POINT TOTAL_POINT
FROM FROM

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

@ -2,7 +2,7 @@ version: "3.7"
services: services:
epmet-third-server: epmet-third-server:
container_name: epmet-third-server-dev container_name: epmet-third-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.75 image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.76
ports: ports:
- "8110:8110" - "8110:8110"
network_mode: host # 使用现有网络 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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.0.75</version> <version>0.0.76</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>

13
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaUserServiceImpl.java

@ -34,12 +34,14 @@ import com.epmet.dto.PaCustomerDTO;
import com.epmet.dto.PaUserDTO; import com.epmet.dto.PaUserDTO;
import com.epmet.dto.PaUserVisitedDTO; import com.epmet.dto.PaUserVisitedDTO;
import com.epmet.dto.PaUserWechatDTO; import com.epmet.dto.PaUserWechatDTO;
import com.epmet.dto.form.SaveUserVisitedFormDTO;
import com.epmet.dto.result.CustomerUserResultDTO; import com.epmet.dto.result.CustomerUserResultDTO;
import com.epmet.dto.result.SaveUserResultDTO; import com.epmet.dto.result.SaveUserResultDTO;
import com.epmet.entity.PaUserEntity; import com.epmet.entity.PaUserEntity;
import com.epmet.entity.PaUserWechatEntity; import com.epmet.entity.PaUserWechatEntity;
import com.epmet.redis.PaUserRedis; import com.epmet.redis.PaUserRedis;
import com.epmet.service.PaUserService; import com.epmet.service.PaUserService;
import com.epmet.service.PaUserVisitedService;
import com.epmet.service.PaUserWechatService; import com.epmet.service.PaUserWechatService;
import me.chanjar.weixin.mp.bean.result.WxMpUser; import me.chanjar.weixin.mp.bean.result.WxMpUser;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -72,6 +74,8 @@ public class PaUserServiceImpl extends BaseServiceImpl<PaUserDao, PaUserEntity>
private PaUserWechatDao paUserWechatDao; private PaUserWechatDao paUserWechatDao;
@Autowired @Autowired
private PaUserVisitedDao paUserVisitedDao; private PaUserVisitedDao paUserVisitedDao;
@Autowired
private PaUserVisitedService paUserVisitedService;
@Override @Override
public PageData<PaUserDTO> page(Map<String, Object> params) { public PageData<PaUserDTO> page(Map<String, Object> params) {
@ -156,10 +160,15 @@ public class PaUserServiceImpl extends BaseServiceImpl<PaUserDao, PaUserEntity>
wechatEntity.setCity(null == wxMpUser.getCity() ? "" : wxMpUser.getCity()); wechatEntity.setCity(null == wxMpUser.getCity() ? "" : wxMpUser.getCity());
wechatEntity.setLanguage(null == wxMpUser.getLanguage() ? "" : wxMpUser.getLanguage()); wechatEntity.setLanguage(null == wxMpUser.getLanguage() ? "" : wxMpUser.getLanguage());
paUserWechatService.insert(wechatEntity); paUserWechatService.insert(wechatEntity);
//2.3、pa_user_visited表新增访问记录数据
SaveUserVisitedFormDTO visited = new SaveUserVisitedFormDTO();
visited.setUserId(userEntity.getId());
visited.setLogonUserId(userEntity.getId());
paUserVisitedService.saveUserVisited(visited);
resultDTO.setUserId(userEntity.getId()); resultDTO.setUserId(userEntity.getId());
} else { } else {
//2.3、批量更新user_wechat表数据 //2.4、批量更新user_wechat表数据
List<PaUserWechatEntity> wechatEntity = ConvertUtils.sourceToTarget(wechatDTO, PaUserWechatEntity.class); List<PaUserWechatEntity> wechatEntity = ConvertUtils.sourceToTarget(wechatDTO, PaUserWechatEntity.class);
for(PaUserWechatEntity entity : wechatEntity){ for(PaUserWechatEntity entity : wechatEntity){
entity.setGender(wxMpUser.getSex().toString()); entity.setGender(wxMpUser.getSex().toString());
@ -172,7 +181,7 @@ public class PaUserServiceImpl extends BaseServiceImpl<PaUserDao, PaUserEntity>
} }
paUserWechatService.updateBatchById(wechatEntity); paUserWechatService.updateBatchById(wechatEntity);
//2.4、根据openid查询用户登陆访问记录表数据,按登陆时间倒序 //2.5、根据openid查询用户登陆访问记录表数据,按登陆时间倒序
PaUserVisitedDTO visitedDTO = paUserVisitedDao.selectByOpenId(wxMpUser.getOpenId()); PaUserVisitedDTO visitedDTO = paUserVisitedDao.selectByOpenId(wxMpUser.getOpenId());
if (null == visitedDTO || "".equals(visitedDTO.getUserId())) { if (null == visitedDTO || "".equals(visitedDTO.getUserId())) {
logger.error("根据openid查询用户访问记录表数据失败,openid->"+wxMpUser.getOpenId()); logger.error("根据openid查询用户访问记录表数据失败,openid->"+wxMpUser.getOpenId());

4
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaUserVisitedServiceImpl.java

@ -134,7 +134,9 @@ public class PaUserVisitedServiceImpl extends BaseServiceImpl<PaUserVisitedDao,
entity.setUserId(visited.getUserId()); entity.setUserId(visited.getUserId());
entity.setWxOpenId(userEntity.getWxOpenId()); entity.setWxOpenId(userEntity.getWxOpenId());
entity.setOpenId(openId); entity.setOpenId(openId);
entity.setPhone(visited.getPhone()); if (null != visited.getPhone()) {
entity.setPhone(visited.getPhone());
}
baseDao.insert(entity); baseDao.insert(entity);
} }

1
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxLoginServiceImpl.java

@ -52,6 +52,7 @@ public class WxLoginServiceImpl implements WxLoginService {
HashMap<String, String> hashMap = JSON.parseObject(resultStr, HashMap.class); HashMap<String, String> hashMap = JSON.parseObject(resultStr, HashMap.class);
if (null != hashMap.get("errcode")) { if (null != hashMap.get("errcode")) {
logger.error("wxcode换取openid接口调用失败"); logger.error("wxcode换取openid接口调用失败");
logger.error("对应参数:小程序appId->"+appId+"第三方component_appid->"+componentAppId+",第三方component_access_token->"+componentAccessToken);
throw new RenException(hashMap.get("errmsg")); throw new RenException(hashMap.get("errmsg"));
} }
String openid = hashMap.get("openid"); String openid = hashMap.get("openid");

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

@ -2,7 +2,7 @@ version: "3.7"
services: services:
gov-org-server: gov-org-server:
container_name: gov-org-server-dev container_name: gov-org-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.79 image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.80
ports: ports:
- "8092:8092" - "8092:8092"
network_mode: host # 使用现有网络 network_mode: host # 使用现有网络

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

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

2
epmet-module/gov-org/gov-org-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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.3.79</version> <version>0.3.80</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>gov-org</artifactId> <artifactId>gov-org</artifactId>

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

@ -154,8 +154,8 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
//cx代表市 //cx代表市
//yz代表区 //yz代表区
map.put("areaCode",areaCode); map.put("areaCode",areaCode);
map.put("cityCode",areaCode.substring(NumConstant.ZERO,areaCode.length()-NumConstant.TWO)); //map.put("cityCode",areaCode.substring(NumConstant.ZERO,areaCode.length()-NumConstant.TWO));
map.put("provinceCode",areaCode.substring(NumConstant.ZERO,areaCode.length()-NumConstant.FOUR)); //map.put("provinceCode",areaCode.substring(NumConstant.ZERO,areaCode.length()-NumConstant.FOUR));
map.put("pageSize",listCustomerGridFormDTO.getPageSize()); map.put("pageSize",listCustomerGridFormDTO.getPageSize());
map.put("pageNo",listCustomerGridFormDTO.getPageNo()); map.put("pageNo",listCustomerGridFormDTO.getPageNo());

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

@ -65,7 +65,7 @@
SELECT c.* SELECT c.*
FROM FROM
(
( (
SELECT SELECT
@ -98,52 +98,10 @@
a.area_code = #{areaCode} a.area_code = #{areaCode}
ORDER BY ORDER BY
CONVERT ( gridName USING gbk ) ASC CONVERT ( gridName USING gbk ) ASC
LIMIT 0,999999999999
)
UNION
(
SELECT
b.id AS grid_id,
b.customer_id,
concat(agency.fullname , '-' ,b.grid_name) as gridName
FROM
CUSTOMER_GRID b
LEFT JOIN (
SELECT
a1.id,
CASE
WHEN a2.ORGANIZATION_NAME IS NULL THEN
a1.ORGANIZATION_NAME ELSE concat( a2.ORGANIZATION_NAME, '-', a1.ORGANIZATION_NAME )
END AS fullname
FROM
customer_agency a1
LEFT JOIN customer_agency a2 ON a1.PID = a2.ID
AND a1.del_flag = '0'
WHERE
a1.del_flag = '0'
) agency ON b.PID = agency.ID
) c
WHERE
b.del_flag = 0
AND
b.area_code LIKE CONCAT(#{cityCode},'%')
AND <![CDATA[ b.area_code <> #{areaCode}
]]>
ORDER BY
b.area_code DESC ,CONVERT ( gridName USING gbk ) ASC
LIMIT 0,999999999999
)
) AS c
LIMIT #{pageNo}, #{pageSize} LIMIT #{pageNo}, #{pageSize}
</select> </select>

7
epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/DraftDetailResultDTO.java

@ -28,6 +28,11 @@ public class DraftDetailResultDTO implements Serializable {
*/ */
private String title; private String title;
/**
* 标题审核状态
*/
private String titleAuditStatus;
/** /**
* 发布单位名称 * 发布单位名称
*/ */
@ -36,7 +41,7 @@ public class DraftDetailResultDTO implements Serializable {
/** /**
* 发布日期 * 发布日期
*/ */
@JsonFormat(pattern="yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
private Date publishDate; private Date publishDate;
/** /**

2
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java

@ -255,7 +255,7 @@ public class ArticleController {
articleService.updateAuditStatusFailById(draftId, syncScanResult); articleService.updateAuditStatusFailById(draftId, syncScanResult);
} }
} catch (Exception e) { } catch (Exception e) {
articleService.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL); articleService.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL, null);
log.error("scanContent exception draftId:{} return result null", e); log.error("scanContent exception draftId:{} return result null", e);
} }
} }

15
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/DraftDao.java

@ -75,10 +75,11 @@ public interface DraftDao extends BaseDao<DraftEntity> {
/** /**
* 草稿列表 * 草稿列表
* @author zhaoqifeng *
* @date 2020/6/3 14:54
* @param userId * @param userId
* @return java.util.List<com.epmet.dto.result.DraftListResultDTO> * @return java.util.List<com.epmet.dto.result.DraftListResultDTO>
* @author zhaoqifeng
* @date 2020/6/3 14:54
*/ */
List<DraftListResultDTO> selectDraftList(@Param("userId") String userId); List<DraftListResultDTO> selectDraftList(@Param("userId") String userId);
@ -102,5 +103,13 @@ public interface DraftDao extends BaseDao<DraftEntity> {
int deleteDraft(String draftId); int deleteDraft(String draftId);
int updateAuditStatusById(@Param("draftId") String draftId, @Param("statusFlag") String statusFlag); /**
* desc:修改审核状态2个状态至少填一个
*
* @param draftId
* @param statusFlag
* @param titleAuditStatus
* @return
*/
int updateAuditStatusById(@Param("draftId") String draftId, @Param("statusFlag") String statusFlag, @Param("titleAuditStatus") String titleAuditStatus);
} }

30
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/ArticleEntity.java

@ -18,7 +18,6 @@
package com.epmet.entity; package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@ -43,24 +42,29 @@ public class ArticleEntity extends BaseEpmetEntity {
*/ */
private String customerId; private String customerId;
/** /**
* 草稿ID * 草稿ID
*/ */
private String draftId; private String draftId;
/** /**
* 文章标题 * 文章标题
*/ */
private String title; private String title;
/** /**
* 文章内容 精简内容 * 标题审核状态
*/ */
private String titleAuditStatus;
/**
* 文章内容 精简内容
*/
private String previewContent; private String previewContent;
/** /**
* 是否置顶 * 是否置顶
*/ */
private Integer isTop; private Integer isTop;
/** /**

30
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/DraftEntity.java

@ -18,7 +18,6 @@
package com.epmet.entity; package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@ -38,24 +37,29 @@ public class DraftEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 客户ID * 客户ID
*/ */
private String customerId; private String customerId;
/** /**
* 文章标题 * 文章标题
*/ */
private String title; private String title;
/** /**
* 文章内容 精简内容 * 标题审核状态
*/ */
private String titleAuditStatus;
/**
* 文章内容 精简内容
*/
private String previewContent; private String previewContent;
/** /**
* 是否置顶 * 是否置顶
*/ */
private Integer isTop; private Integer isTop;
/** /**

6
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/ArticleService.java

@ -200,12 +200,14 @@ public interface ArticleService extends BaseService<ArticleEntity> {
DraftContentSaveResultDTO saveDraft(TokenDto tokenDto, DraftContentFromDTO fromDTO); DraftContentSaveResultDTO saveDraft(TokenDto tokenDto, DraftContentFromDTO fromDTO);
/** /**
* desc:政府端点审核结果处理异常后 修改草稿审核状态 * desc:政府端点审核结果处理异常后 修改草稿审核状态 2选1
*
* @param draftId * @param draftId
* @param statusFlag * @param statusFlag
* @param titleAuditStatus
* @return * @return
*/ */
void updateDraftPublishStatus(String draftId,String statusFlag); void updateDraftPublishStatus(String draftId, String statusFlag, String titleAuditStatus);
/** /**
* desc:人工发布文章 不走审核接口 * desc:人工发布文章 不走审核接口

40
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

@ -970,13 +970,19 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
if (!isOk) { if (!isOk) {
this.sendMsg(draftEntity.getCustomerId(), draftEntity.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle())); this.sendMsg(draftEntity.getCustomerId(), draftEntity.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle()));
this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL); this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL, null);
return null; return null;
} }
SyncScanResult result = null; SyncScanResult result = null;
try { try {
TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); TextScanParamDTO textScanParamDTO = new TextScanParamDTO();
ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO(); ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO();
TextTaskDTO titleTextTask = new TextTaskDTO();
titleTextTask.setDataId(ModuleConstant.SCAN_TITLE_PREFIX.concat(StrConstant.UNDER_LINE).concat(draftEntity.getId()));
titleTextTask.setContent(draftEntity.getTitle());
textScanParamDTO.getTasks().add(titleTextTask);
DraftCoverDTO draftCoverDTO = draftCoverDao.selectCoverIdAndUrlByDraftId(draftId); DraftCoverDTO draftCoverDTO = draftCoverDao.selectCoverIdAndUrlByDraftId(draftId);
if (draftCoverDTO != null) { if (draftCoverDTO != null) {
ImgTaskDTO taskDTO = new ImgTaskDTO(); ImgTaskDTO taskDTO = new ImgTaskDTO();
@ -1021,7 +1027,6 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
} }
} }
result = new SyncScanResult(); result = new SyncScanResult();
if (imgSyncScanResult != null) { if (imgSyncScanResult != null) {
SyncScanResult imgSyncScanResultData = imgSyncScanResult.getData(); SyncScanResult imgSyncScanResultData = imgSyncScanResult.getData();
@ -1042,7 +1047,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
} catch (Exception e) { } catch (Exception e) {
log.error("scanContent exception", e); log.error("scanContent exception", e);
this.sendMsg(draftEntity.getCustomerId(), draftEntity.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle())); this.sendMsg(draftEntity.getCustomerId(), draftEntity.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle()));
this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL); this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL, null);
} }
log.debug("scanContent result:{}", JSON.toJSONString(result)); log.debug("scanContent result:{}", JSON.toJSONString(result));
return result; return result;
@ -1092,18 +1097,21 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg()); throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode(), EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getMsg());
} }
if (syncScanResult.isAllPass()) { if (syncScanResult.isAllPass()) {
this.updateDraftPublishStatus(draftId, DraftConstant.PUBLISHED); this.updateDraftPublishStatus(draftId, DraftConstant.PUBLISHED, null);
} else { } else {
this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL); this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL, null);
} }
boolean coverFail = false, contentFail = false; boolean coverFail = false, contentFail = false, titleFail = false;
try { try {
List<String> failDataIds = syncScanResult.getFailDataIds(); List<String> failDataIds = syncScanResult.getFailDataIds();
for (String id : failDataIds) { for (String id : failDataIds) {
if (id.indexOf(ModuleConstant.SCAN_COVER_PREFIX) >= NumConstant.ZERO) { if (id.indexOf(ModuleConstant.SCAN_COVER_PREFIX) >= NumConstant.ZERO) {
draftCoverDao.updateAuditStatusById(id.replace(ModuleConstant.SCAN_COVER_PREFIX.concat(StrConstant.UNDER_LINE), ""), ModuleConstant.AUDIT_STATUS_FAIL); draftCoverDao.updateAuditStatusById(id.replace(ModuleConstant.SCAN_COVER_PREFIX.concat(StrConstant.UNDER_LINE), ""), ModuleConstant.AUDIT_STATUS_FAIL);
coverFail = true; coverFail = true;
} else if (id.indexOf(ModuleConstant.SCAN_TITLE_PREFIX) >= NumConstant.ZERO) {
this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL, ModuleConstant.AUDIT_STATUS_FAIL);
titleFail = true;
} else { } else {
draftContentDao.updateAuditStatusById(id, ModuleConstant.AUDIT_STATUS_FAIL); draftContentDao.updateAuditStatusById(id, ModuleConstant.AUDIT_STATUS_FAIL);
contentFail = true; contentFail = true;
@ -1113,18 +1121,28 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
successDataIds.forEach(id -> { successDataIds.forEach(id -> {
if (id.indexOf(ModuleConstant.SCAN_COVER_PREFIX) >= NumConstant.ZERO) { if (id.indexOf(ModuleConstant.SCAN_COVER_PREFIX) >= NumConstant.ZERO) {
draftCoverDao.updateAuditStatusById(id.replace(ModuleConstant.SCAN_COVER_PREFIX.concat(StrConstant.UNDER_LINE), ""), ModuleConstant.AUDIT_STATUS_PASS); draftCoverDao.updateAuditStatusById(id.replace(ModuleConstant.SCAN_COVER_PREFIX.concat(StrConstant.UNDER_LINE), ""), ModuleConstant.AUDIT_STATUS_PASS);
} else if (id.indexOf(ModuleConstant.SCAN_TITLE_PREFIX) >= NumConstant.ZERO) {
this.updateDraftPublishStatus(draftId, null, ModuleConstant.AUDIT_STATUS_PASS);
} else { } else {
draftContentDao.updateAuditStatusById(id, ModuleConstant.AUDIT_STATUS_PASS); draftContentDao.updateAuditStatusById(id, ModuleConstant.AUDIT_STATUS_PASS);
} }
}); });
if (coverFail || contentFail) { if (coverFail || contentFail || titleFail) {
String auditMsg = ""; String auditMsg = "";
if (coverFail && contentFail) { if (titleFail && coverFail && contentFail) {
auditMsg = ModuleConstant.DRAFT_TITLE_CONTENT_AND_COVER;
} else if (coverFail && contentFail) {
auditMsg = ModuleConstant.DRAFT_CONTENT_AND_COVER; auditMsg = ModuleConstant.DRAFT_CONTENT_AND_COVER;
} else if (titleFail && coverFail) {
auditMsg = ModuleConstant.DRAFT_TITLE_AND_COVER;
} else if (titleFail && contentFail) {
auditMsg = ModuleConstant.DRAFT_TITLE_AND_CONTENT;
} else if (contentFail) { } else if (contentFail) {
auditMsg = ModuleConstant.DRAFT_CONTENT; auditMsg = ModuleConstant.DRAFT_CONTENT;
} else if (coverFail) { } else if (coverFail) {
auditMsg = ModuleConstant.DRAFT_COVER; auditMsg = ModuleConstant.DRAFT_COVER;
} else if (titleFail) {
auditMsg = ModuleConstant.DRAFT_TITLE;
} }
this.sendMsg(draft.getCustomerId(), draft.getTitle(), String.format(ModuleConstant.MSG_AUDIT_CONTENT, draft.getTitle(), auditMsg)); this.sendMsg(draft.getCustomerId(), draft.getTitle(), String.format(ModuleConstant.MSG_AUDIT_CONTENT, draft.getTitle(), auditMsg));
} }
@ -1154,8 +1172,8 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
} }
@Override @Override
public void updateDraftPublishStatus(String draftId, String statusFlag) { public void updateDraftPublishStatus(String draftId, String statusFlag, String titleAuditStatus) {
draftDao.updateAuditStatusById(draftId, statusFlag); draftDao.updateAuditStatusById(draftId, statusFlag, titleAuditStatus);
} }
@Override @Override
@ -1164,7 +1182,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
try { try {
//校验草稿状态 并更新为已发布 //校验草稿状态 并更新为已发布
DraftEntity draftEntity = checkDraftStatus(draftId); DraftEntity draftEntity = checkDraftStatus(draftId);
this.updateDraftPublishStatus(draftId, DraftConstant.PUBLISHED); this.updateDraftPublishStatus(draftId, DraftConstant.PUBLISHED, null);
//复制 草稿到文章(草稿内容,封面,属性) //复制 草稿到文章(草稿内容,封面,属性)
ArticleEntity articleEntity = this.publishDraftToArticle(draftEntity, ArticleConstant.PUBLISH_WAY_MANUAL); ArticleEntity articleEntity = this.publishDraftToArticle(draftEntity, ArticleConstant.PUBLISH_WAY_MANUAL);
UpdateCustomerTagCacheDTO updateCustomerTagCacheDTO = this.updateCustomerTag(tokenDto, draftId); UpdateCustomerTagCacheDTO updateCustomerTagCacheDTO = this.updateCustomerTag(tokenDto, draftId);

17
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/utils/ModuleConstant.java

@ -66,22 +66,27 @@ public interface ModuleConstant {
/** /**
* 草稿未找到异常模板 * 草稿未找到异常模板
* */ */
String SPECIFIED_DRAFT_NOT_FOUNT_EXCEPTION_TEMPLATE = "未找到指定草稿,草稿Id:【%s】"; String SPECIFIED_DRAFT_NOT_FOUNT_EXCEPTION_TEMPLATE = "未找到指定草稿,草稿Id:【%s】";
/** /**
* 内容审核 封面图片前缀用于标识这个Id是封面图片 * 内容审核 封面图片前缀用于标识这个Id是封面图片
* */ */
String SCAN_COVER_PREFIX = "cover_"; String SCAN_COVER_PREFIX = "cover_";
/**
* 内容审核 标题前缀用于标识这个Id是标题
*/
String SCAN_TITLE_PREFIX = "title_";
/** /**
* 文章站内消息标题 * 文章站内消息标题
* */ */
String MSG_TITLE = "您有一条文章【%s】的消息"; String MSG_TITLE = "您有一条文章【%s】的消息";
/** /**
* 文章未审核通过 消息内容模版 * 文章未审核通过 消息内容模版
* */ */
String MSG_AUDIT_CONTENT = "您好,您发布的【%s】文章%s审核未通过,请重新编辑后发布,谢谢。"; String MSG_AUDIT_CONTENT = "您好,您发布的【%s】文章%s审核未通过,请重新编辑后发布,谢谢。";
/** /**
@ -116,11 +121,15 @@ public interface ModuleConstant {
String DRAFT_ID_IS_NULL = "草稿ID不能为空"; String DRAFT_ID_IS_NULL = "草稿ID不能为空";
String DRAFT_TITLE_CONTENT_AND_COVER = "标题、内容和封面";
String DRAFT_TITLE_AND_COVER = "标题和封面";
String DRAFT_TITLE_AND_CONTENT = "标题和内容";
String DRAFT_CONTENT_AND_COVER = "内容和封面"; String DRAFT_CONTENT_AND_COVER = "内容和封面";
String DRAFT_CONTENT = "内容"; String DRAFT_CONTENT = "内容";
String DRAFT_COVER = "封面"; String DRAFT_COVER = "封面";
String DRAFT_TITLE = "标题";
String DRAFT_CONTENT_IS_NULL = "文章封面不能为空"; String DRAFT_CONTENT_IS_NULL = "文章封面不能为空";

6
epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.2__addAutoPublish.sql

@ -1,2 +1,6 @@
ALTER TABLE `epmet_gov_voice`.`article` ALTER TABLE `epmet_gov_voice`.`article`
ADD COLUMN `PUBLISH_WAY` varchar(16) NOT NULL DEFAULT 'autoAudit' COMMENT '发布方式 自动审核后发布:autoAudit;人工确认无误发布(不审核):manualNoAudit' AFTER `TAGS`; ADD COLUMN `PUBLISH_WAY` varchar(16) NOT NULL DEFAULT 'autoAudit' COMMENT '发布方式 自动审核后发布:autoAudit;人工确认无误发布(不审核):manualNoAudit' AFTER `TAGS`;
ALTER TABLE `epmet_gov_voice`.`draft`
ADD COLUMN `TITLE_AUDIT_STATUS` varchar(32) NULL COMMENT '标题审核状态 通过:pass;失败:fail;审核中:auditing' AFTER `TITLE`;
ALTER TABLE `epmet_gov_voice`.`article`
ADD COLUMN `TITLE_AUDIT_STATUS` varchar(32) NULL COMMENT '标题审核状态 通过:pass;失败:fail;审核中:auditing' AFTER `TITLE`;

12
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml

@ -155,6 +155,7 @@
SELECT SELECT
d.id AS draft_id, d.id AS draft_id,
d.TITLE, d.TITLE,
d.TITLE_AUDIT_STATUS,
d.PUBLISHER_NAME, d.PUBLISHER_NAME,
d.PUBLISH_DATE, d.PUBLISH_DATE,
0 AS visit_record_count, 0 AS visit_record_count,
@ -185,6 +186,15 @@
update draft set DEL_FLAG='1' where id=#{draftId} update draft set DEL_FLAG='1' where id=#{draftId}
</update> </update>
<update id="updateAuditStatusById"> <update id="updateAuditStatusById">
update draft set STATUS_FLAG =#{statusFlag,jdbcType=VARCHAR} where id=#{draftId,jdbcType=VARCHAR} update draft
<set>
<if test="titleAuditStatus != null and titleAuditStatus!= ''">
STATUS_FLAG =#{statusFlag,jdbcType=VARCHAR}
</if>
<if test="titleAuditStatus != null and titleAuditStatus!= ''">
TITLE_AUDIT_STATUS = #{titleAuditStatus,jdbcType=VARCHAR}
</if>
</set>
where id=#{draftId,jdbcType=VARCHAR}
</update> </update>
</mapper> </mapper>

2
epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/from/VerificationCodeFromDTO.java

@ -32,7 +32,7 @@ public class VerificationCodeFromDTO implements Serializable {
private String mobile; private String mobile;
/** /**
* 行为记录表ID * 行为记录表ID partymember_visit.id
*/ */
@NotBlank(message = "行为记录表ID不能为空") @NotBlank(message = "行为记录表ID不能为空")
private String visitId; private String visitId;

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

@ -2,7 +2,7 @@ version: "3.7"
services: services:
resi-mine-server: resi-mine-server:
container_name: resi-mine-server-dev container_name: resi-mine-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/resi-mine-server:0.3.30 image: 192.168.1.130:10080/epmet-cloud-dev/resi-mine-server:0.3.31
ports: ports:
- "8094:8094" - "8094:8094"
network_mode: host # 使用现有网络 network_mode: host # 使用现有网络

2
epmet-module/resi-mine/resi-mine-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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.3.30</version> <version>0.3.31</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>resi-mine</artifactId> <artifactId>resi-mine</artifactId>

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

@ -2,7 +2,7 @@ version: "3.7"
services: services:
resi-partymember-server: resi-partymember-server:
container_name: resi-partymember-server-dev container_name: resi-partymember-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/resi-partymember-server:0.3.55 image: 192.168.1.130:10080/epmet-cloud-dev/resi-partymember-server:0.3.56
ports: ports:
- "8096:8096" - "8096:8096"
network_mode: host # 使用现有网络 network_mode: host # 使用现有网络

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

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

2
epmet-module/resi-partymember/resi-partymember-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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.3.55</version> <version>0.3.56</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>resi-partymember</artifactId> <artifactId>resi-partymember</artifactId>

1
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java

@ -560,6 +560,7 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService
userResiInfoDTO.setResiVisitId(partyMemberInfoDTO.getPartymemberVisitId()); userResiInfoDTO.setResiVisitId(partyMemberInfoDTO.getPartymemberVisitId());
userResiInfoDTO.setDistrict(partyMemberInfoDTO.getEstate()); userResiInfoDTO.setDistrict(partyMemberInfoDTO.getEstate());
userResiInfoDTO.setBuildingAddress(partyMemberInfoDTO.getBuilding()); userResiInfoDTO.setBuildingAddress(partyMemberInfoDTO.getBuilding());
userResiInfoDTO.setCustomerId(partyMemberInfoDTO.getCustomerId());
epmetUserFeignClient.saveResiInfo(userResiInfoDTO); epmetUserFeignClient.saveResiInfo(userResiInfoDTO);
} }
} }

8
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/UserResiInfoDTO.java

@ -17,9 +17,11 @@
package com.epmet.dto; package com.epmet.dto;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import lombok.Data;
/** /**
@ -51,7 +53,8 @@ public class UserResiInfoDTO implements Serializable {
/** /**
* 手机号(注册手机号) * 手机号(注册手机号)
*/ */
private String regMobile; @NotBlank(message = "手机号不能为空")
private String regMobile;
/** /**
* 姓氏 * 姓氏
@ -121,6 +124,7 @@ public class UserResiInfoDTO implements Serializable {
/** /**
* 客户Id (customer.id) * 客户Id (customer.id)
*/ */
@NotBlank(message = "客户Id不能为空")
private String customerId; private String customerId;
/** /**

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

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

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

@ -2,7 +2,7 @@ version: "3.7"
services: services:
epmet-user-server: epmet-user-server:
container_name: epmet-user-server-test container_name: epmet-user-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-user-server:0.3.86 image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-user-server:0.3.87
ports: ports:
- "8087:8087" - "8087:8087"
network_mode: host # 不会创建新的网络 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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<version>0.3.86</version> <version>0.3.87</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>epmet-user</artifactId> <artifactId>epmet-user</artifactId>

1
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserResiInfoController.java

@ -149,6 +149,7 @@ public class UserResiInfoController {
**/ **/
@PostMapping("saveResiInfo") @PostMapping("saveResiInfo")
public Result saveResiInfo (@RequestBody UserResiInfoDTO userResiInfoDTO) { public Result saveResiInfo (@RequestBody UserResiInfoDTO userResiInfoDTO) {
ValidatorUtils.validateEntity(userResiInfoDTO);
return userResiInfoService.saveResiInfo(userResiInfoDTO); return userResiInfoService.saveResiInfo(userResiInfoDTO);
} }

14
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserResiInfoDao.java

@ -39,8 +39,8 @@ import java.util.List;
public interface UserResiInfoDao extends BaseDao<UserResiInfoEntity> { public interface UserResiInfoDao extends BaseDao<UserResiInfoEntity> {
/** /**
* @return com.epmet.dto.UserResiInfoDTO
* @param userResiInfoFormDTO * @param userResiInfoFormDTO
* @return com.epmet.dto.UserResiInfoDTO
* @Author yinzuomei * @Author yinzuomei
* @Description 查询用户注册信息 * @Description 查询用户注册信息
* @Date 2020/3/30 11:10 * @Date 2020/3/30 11:10
@ -48,23 +48,23 @@ public interface UserResiInfoDao extends BaseDao<UserResiInfoEntity> {
UserResiInfoResultDTO selectUserResiInfoDTO(UserResiInfoFormDTO userResiInfoFormDTO); UserResiInfoResultDTO selectUserResiInfoDTO(UserResiInfoFormDTO userResiInfoFormDTO);
/** /**
* @Description 查询用户注册信息 不按照客户Id查询
* @param userResiInfoFormDTO * @param userResiInfoFormDTO
* @return UserResiInfoResultDTO * @return UserResiInfoResultDTO
* @Description 查询用户注册信息 不按照客户Id查询
* @author wangc * @author wangc
* @date 2020.05.21 13:18 * @date 2020.05.21 13:18
**/ **/
UserResiInfoResultDTO selectUserResiInfoNotByCustId(UserResiInfoFormDTO userResiInfoFormDTO); UserResiInfoResultDTO selectUserResiInfoNotByCustId(UserResiInfoFormDTO userResiInfoFormDTO);
/** /**
* @Author sun * @Author sun
* @Description 根据手机号查询居民注册信息(user_resi_info)表数据 * @Description 根据手机号查询居民注册信息(user_resi_info)表数据
**/ **/
List<UserResiInfoDTO> selectResiInfoByMobile(String regMobile); List<UserResiInfoDTO> selectResiInfoByMobile(@Param("regMobile") String regMobile, @Param("customerId") String customerId);
/** /**
* @return java.util.List<com.epmet.dto.UserResiInfoDTO>
* @param userIdList * @param userIdList
* @return java.util.List<com.epmet.dto.UserResiInfoDTO>
* @Author yinzuomei * @Author yinzuomei
* @Description 根据userId集合查询用户注册信息 * @Description 根据userId集合查询用户注册信息
* @Date 2020/4/7 18:26 * @Date 2020/4/7 18:26
@ -72,8 +72,8 @@ public interface UserResiInfoDao extends BaseDao<UserResiInfoEntity> {
List<UserResiInfoResultDTO> selectListUserResiInfoDTO(@Param("userIdList") List<String> userIdList); List<UserResiInfoResultDTO> selectListUserResiInfoDTO(@Param("userIdList") List<String> userIdList);
/** /**
* @Description 根据userId查询议题发起人
* @param formDTO * @param formDTO
* @Description 根据userId查询议题发起人
* @author zxc * @author zxc
* @date 2020/5/11 11:18 * @date 2020/5/11 11:18
*/ */

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

@ -19,6 +19,7 @@ package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.common.token.util.UserUtil;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.EpmetRoleKeyConstant; import com.epmet.commons.tools.constant.EpmetRoleKeyConstant;
import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.FieldConstant;
@ -33,6 +34,7 @@ import com.epmet.constant.UserRoleConstant;
import com.epmet.dao.UserResiInfoDao; import com.epmet.dao.UserResiInfoDao;
import com.epmet.dao.UserWechatDao; import com.epmet.dao.UserWechatDao;
import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.UserResiInfoDTO;
import com.epmet.dto.UserResiRegisterVisitDTO;
import com.epmet.dto.UserRoleDTO; import com.epmet.dto.UserRoleDTO;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.IssueInitiatorResultDTO; import com.epmet.dto.result.IssueInitiatorResultDTO;
@ -164,8 +166,8 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl<UserResiInfoDao, Us
userResiRegisterVisitService.updateResiRegisterVisit(false, userResiInfoDTO); userResiRegisterVisitService.updateResiRegisterVisit(false, userResiInfoDTO);
return new Result().error(EpmetErrorCode.MOBILE_CODE_ERROR.getCode()); return new Result().error(EpmetErrorCode.MOBILE_CODE_ERROR.getCode());
}*/ }*/
//2:再次判断手机号是否可用 //2:再次判断手机号是否在客户下可用
if (!getResiInfoByMobile(userResiInfoDTO.getRegMobile())) { if (!getResiInfoByMobile(userResiInfoDTO.getRegMobile(), userResiInfoDTO.getCustomerId())) {
//手机号验证失败则更新行为记录表数据 返回前台结果 //手机号验证失败则更新行为记录表数据 返回前台结果
userResiRegisterVisitService.updateResiRegisterVisit(false, userResiInfoDTO); userResiRegisterVisitService.updateResiRegisterVisit(false, userResiInfoDTO);
return new Result().error(EpmetErrorCode.MOBILE_HAS_BEEN_USED.getCode()); return new Result().error(EpmetErrorCode.MOBILE_HAS_BEEN_USED.getCode());
@ -221,15 +223,17 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl<UserResiInfoDao, Us
//1:更新居民注册访问记录表数据 //1:更新居民注册访问记录表数据
userResiRegisterVisitService.updateResiVisitOperate(verificationCodeFormDTO); userResiRegisterVisitService.updateResiVisitOperate(verificationCodeFormDTO);
//2:判断手机号是否可用 //2:判断手机号是否可用
if (!getResiInfoByMobile(verificationCodeFormDTO.getMobile())) { //2020-07-29 根据要注册的网格获取客户Id
UserResiRegisterVisitDTO registerVisitDTO = userResiRegisterVisitService.get(verificationCodeFormDTO.getResiVisitId());
if (!getResiInfoByMobile(verificationCodeFormDTO.getMobile(), registerVisitDTO.getCustomerId())) {
return new Result().error(EpmetErrorCode.MOBILE_HAS_BEEN_USED.getCode()); return new Result().error(EpmetErrorCode.MOBILE_HAS_BEEN_USED.getCode());
} }
//3:调用短信服务 生成验证码发送短信 //3:调用短信服务 生成验证码发送短信
SendVerificationCodeFormDTO sendVerificationCodeFormDTO=new SendVerificationCodeFormDTO(); SendVerificationCodeFormDTO sendVerificationCodeFormDTO = new SendVerificationCodeFormDTO();
sendVerificationCodeFormDTO.setMobile(verificationCodeFormDTO.getMobile()); sendVerificationCodeFormDTO.setMobile(verificationCodeFormDTO.getMobile());
sendVerificationCodeFormDTO.setAliyunTemplateCode(SmsTemplateConstant.USER_REGISTER); sendVerificationCodeFormDTO.setAliyunTemplateCode(SmsTemplateConstant.USER_REGISTER);
Result<SendVerificationCodeResultDTO> result = epmetMessageOpenFeignClient.sendVerificationCode(sendVerificationCodeFormDTO); Result<SendVerificationCodeResultDTO> result = epmetMessageOpenFeignClient.sendVerificationCode(sendVerificationCodeFormDTO);
if(!result.success()||null==result.getData()||StringUtils.isBlank(result.getData().getCode())){ if (!result.success() || null == result.getData() || StringUtils.isBlank(result.getData().getCode())) {
return new Result().error(EpmetErrorCode.MOBILE_GET_CODE_ERROR.getCode()); return new Result().error(EpmetErrorCode.MOBILE_GET_CODE_ERROR.getCode());
} }
//4:删除缓存中可能存在的旧验证码 //4:删除缓存中可能存在的旧验证码
@ -244,7 +248,7 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl<UserResiInfoDao, Us
Result result = new Result(); Result result = new Result();
//判断手机号是否可用 //判断手机号是否可用
if (getResiInfoByMobile(userResiInfoDTO.getRegMobile())) { if (getResiInfoByMobile(userResiInfoDTO.getRegMobile(), userResiInfoDTO.getCustomerId())) {
//数据存入居民注册表 //数据存入居民注册表
saveUserResiInfo(userResiInfoDTO); saveUserResiInfo(userResiInfoDTO);
//居民注册关系表新增数据 首次注册数加一 注册数加一 参与数加一 //居民注册关系表新增数据 首次注册数加一 注册数加一 参与数加一
@ -280,12 +284,17 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl<UserResiInfoDao, Us
* 判断手机号是否可用-根据手机号查询居民注册信息(user_resi_info)表数据 * 判断手机号是否可用-根据手机号查询居民注册信息(user_resi_info)表数据
* *
* @param mobile * @param mobile
* @param customerId
* @return * @return
* @Author sun * @Author sun
*/ */
private Boolean getResiInfoByMobile(String mobile) { private Boolean getResiInfoByMobile(String mobile, String customerId) {
if (StringUtils.isBlank(customerId)) {
customerId = UserUtil.getCurrentUser().getCustomerId();
log.info("getResiInfoByMobile UserUtil.getCustomerId:{}", customerId);
}
Boolean bl = true; Boolean bl = true;
List<UserResiInfoDTO> list = userResiInfoDao.selectResiInfoByMobile(mobile); List<UserResiInfoDTO> list = userResiInfoDao.selectResiInfoByMobile(mobile, customerId);
if (list.size() > 0) { if (list.size() > 0) {
bl = false; bl = false;
} }

7
epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml

@ -98,8 +98,11 @@
SELECT SELECT
<include refid="sql"></include> <include refid="sql"></include>
FROM user_resi_info uri FROM user_resi_info uri
WHERE uri.del_flag = '0' LEFT JOIN user_customer uc ON uri.USER_ID = uc.USER_ID
AND uri.reg_mobile = #{regMobile} WHERE
uri.DEL_FLAG = '0'
AND uri.REG_MOBILE = #{regMobile,jdbcType=VARCHAR}
AND uc.CUSTOMER_ID = #{customerId,jdbcType=VARCHAR}
</select> </select>
<!-- 根据userId集合查询用户注册信息 --> <!-- 根据userId集合查询用户注册信息 -->

Loading…
Cancel
Save