Browse Source

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

master
sunyuchao 5 years ago
parent
commit
9d5d961526
  1. 2
      epmet-module/epmet-common-service/common-service-server/deploy/docker-compose-dev.yml
  2. 2
      epmet-module/epmet-common-service/common-service-server/pom.xml
  3. 22
      epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.2__add_event.sql
  4. 63
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/TestGrantFormDTO.java
  5. 2
      epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml
  6. 2
      epmet-module/epmet-heart/epmet-heart-server/pom.xml
  7. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java
  8. 33
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActGrantPointLogDao.java
  9. 73
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActGrantPointLogEntity.java
  10. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java
  11. 33
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java
  12. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java
  13. 55
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java
  14. 24
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql
  15. 24
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActGrantPointLogDao.xml
  16. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActUserRelationDao.xml
  17. 2
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointDetailResultDTO.java
  18. 2
      epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml
  19. 2
      epmet-module/epmet-point/epmet-point-server/pom.xml
  20. 6
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java
  21. 4
      epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/epmet_point.sql
  22. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserRoleController.java
  23. 25
      epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java
  24. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java
  25. 40
      epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml
  26. 8
      epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml

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

@ -2,7 +2,7 @@ version: "3.7"
services:
common-service-server:
container_name: common-service-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/common-service-server:0.3.5
image: 192.168.1.130:10080/epmet-cloud-dev/common-service-server:0.3.6
ports:
- "8103:8103"
network_mode: host # 使用现有网络

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

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.3.5</version>
<version>0.3.6</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-common-service</artifactId>

22
epmet-module/epmet-common-service/common-service-server/src/main/resources/db/migration/V0.0.2__add_event.sql

@ -0,0 +1,22 @@
CREATE TABLE `event` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CLASS_ID` varchar(32) DEFAULT NULL COMMENT '消息网关事件类别ID 从消息网关获取事件类型Id',
`APP_ID` varchar(128) DEFAULT NULL COMMENT '消息网关APP_ID',
`APP_NAME` varchar(32) DEFAULT NULL COMMENT '消息网关APP_NAME',
`EVENT_CODE` varchar(32) DEFAULT NULL COMMENT '事件标识 与消息网关事件tag一致',
`EVENT_NAME` varchar(32) DEFAULT NULL COMMENT '事件名称',
`EVENT_DESC` varchar(64) DEFAULT NULL COMMENT '事件说明',
`FUNCTION_ID` varchar(64) DEFAULT NULL COMMENT '功能ID 来自oper_customize.customer_function表',
`IS_COMMON` varchar(1) DEFAULT NULL COMMENT '是否是通用事件 0-否,1-是;消息体内需要体现该字段,通用则说明由业务系统自己计算分值',
`DEL_FLAG` varchar(1) DEFAULT NULL COMMENT '删除标识 0-否,1-是',
`REVISION` int(11) DEFAULT NULL COMMENT '乐观锁 查询时添加版本号,新加的事件需要更新版本号',
`CREATED_BY` varchar(32) DEFAULT NULL COMMENT '创建人',
`CREATED_TIME` datetime DEFAULT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) DEFAULT NULL COMMENT '更新人',
`UPDATED_TIME` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`),
UNIQUE KEY `unx_event_code` (`EVENT_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='事件表';
INSERT INTO `epmet_common_service`.`event`(`ID`, `CLASS_ID`, `APP_ID`, `APP_NAME`, `EVENT_CODE`, `EVENT_NAME`, `EVENT_DESC`, `FUNCTION_ID`, `IS_COMMON`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1', 'epmet_heart', '202007161443499985fa2d397436d10356542134c8f008c48', '党群e事通开发测试', 'register_volunteer', '注册志愿者', '给注册志愿者的人发放积分', '43addd0735230c01eedbb38d721076b0', '0', '0', 0, 'APP_USER', '2020-07-23 14:19:17', 'APP_USER', '2020-07-23 14:19:17');
INSERT INTO `epmet_common_service`.`event`(`ID`, `CLASS_ID`, `APP_ID`, `APP_NAME`, `EVENT_CODE`, `EVENT_NAME`, `EVENT_DESC`, `FUNCTION_ID`, `IS_COMMON`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2', 'epmet_heart', '202007161443499985fa2d397436d10356542134c8f008c48', '党群e事通开发测试', 'active_send_point', '活动发放积分', '给参加活动的人发放积分', '43addd0735230c01eedbb38d721076b0', '0', '0', 0, 'APP_USER', '2020-07-23 14:16:49', 'APP_USER', '2020-07-23 14:16:49');
INSERT INTO `epmet_common_service`.`event`(`ID`, `CLASS_ID`, `APP_ID`, `APP_NAME`, `EVENT_CODE`, `EVENT_NAME`, `EVENT_DESC`, `FUNCTION_ID`, `IS_COMMON`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3', 'epmet_heart', '202007161443499985fa2d397436d10356542134c8f008c48', '党群e事通开发测试', 'publist_active_live', '发布实况', '给发布实况的人发放积分', '43addd0735230c01eedbb38d721076b0', '0', '0', 0, 'APP_USER', '2020-07-23 14:16:49', 'APP_USER', '2020-07-23 14:16:49');

63
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/TestGrantFormDTO.java

@ -0,0 +1,63 @@
package com.epmet.dto.form.work;
import com.alibaba.fastjson.JSON;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* 描述一下
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/30 12:15
*/
@Data
public class TestGrantFormDTO implements Serializable {
private static final long serialVersionUID = -2643821406956680381L;
public interface AddUserInternalGroup {}
/**
* 当前客户id
*/
@NotBlank(message = "客户id不能为空",groups = AddUserInternalGroup.class)
private String customerId;
/**
* 居民id
*/
@NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class)
private String userId;
/**
* 分值
*/
@NotNull(message = "分值不能为空",groups = AddUserInternalGroup.class)
private Integer reward;
/**
* 业务id eg活动id
*/
@NotBlank(message = "业务id不能为空",groups = AddUserInternalGroup.class)
private String sourceId;
/**
* 备注
*/
@NotBlank(message = "备注不能为空",groups = AddUserInternalGroup.class)
private String remark;
/**
* 加减分标识 plus/minus
*/
@NotBlank(message = "加减分标识 plus/minus不能为空",groups = AddUserInternalGroup.class)
private String actionFlag;
TestGrantFormDTO(){
this.customerId="";
this.userId="";
this.sourceId="111";
this.reward=20;
this.remark="test";
this.actionFlag="plus";
}
public static void main(String[] args) {
System.out.println(JSON.toJSON(new TestGrantFormDTO()));
}
}

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

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

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

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.0.11</version>
<version>0.0.13</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-heart</artifactId>

6
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java

@ -190,6 +190,12 @@ public class WorkActController {
return new Result();
}
@PostMapping("testgrantpoint")
public Result testGrantPoint(@RequestBody TestGrantFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO,TestGrantFormDTO.AddUserInternalGroup.class);
workActService.testGrantPoint(formDTO);
return new Result();
}
/**
* @return com.epmet.commons.tools.utils.Result
* @param formDTO

33
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActGrantPointLogDao.java

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

73
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActGrantPointLogEntity.java

@ -0,0 +1,73 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 活动发放积分日志表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-30
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("act_grant_point_log")
public class ActGrantPointLogEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private String customerId;
/**
*
*/
private String actId;
/**
*
*/
private Integer reward;
/**
*
*/
private String remark;
/**
*
*/
private String operatorId;
/**
*
*/
private String sendMsg;
/**
*
*/
private String responseMsg;
}

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

@ -146,4 +146,6 @@ public interface WorkActService {
* @Date 2020/7/27 13:55
**/
PublishActResultDTO rePublish(RePublishFormDTO rePublishFormDTO);
void testGrantPoint(TestGrantFormDTO formDTO);
}

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

@ -128,21 +128,24 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
public Result<List<ResiActInfoResultDTO>> listAct(TokenDto tokenDto, ResiActBaseFormDTO formDto) {
List<ResiActInfoResultDTO> list = new ArrayList<>();
formDto.setUserId(tokenDto.getUserId());
// 查询活动状态是:报名中 signing_up
List<ResiActInfoResultDTO> signingUp = baseDao.selectListActSigningUp(formDto);
list.addAll(signingUp);
// 查询活动状态是:已报满 enough
List<ResiActInfoResultDTO> enough = baseDao.selectListActQuotaIsEnough(formDto);
list.addAll(enough);
// 查询活动状态是:截止报名 end_sign_up
List<ResiActInfoResultDTO> endSignUp = baseDao.selectListActEndSignUp(formDto);
list.addAll(endSignUp);
// 查询活动状态是:已开始 in_progress
List<ResiActInfoResultDTO> inProgress = baseDao.selectListActInProgress(formDto);
list.addAll(inProgress);
// 列表第一次查询,不是已结束状态的活动,一次性返回
if (formDto.getPageNo() == NumConstant.ONE){
// 查询活动状态是:报名中 signing_up
List<ResiActInfoResultDTO> signingUp = baseDao.selectListActSigningUp(formDto);
list.addAll(signingUp);
// 查询活动状态是:已报满 enough
List<ResiActInfoResultDTO> enough = baseDao.selectListActQuotaIsEnough(formDto);
list.addAll(enough);
// 查询活动状态是:截止报名 end_sign_up
List<ResiActInfoResultDTO> endSignUp = baseDao.selectListActEndSignUp(formDto);
list.addAll(endSignUp);
// 查询活动状态是:已开始 in_progress
List<ResiActInfoResultDTO> inProgress = baseDao.selectListActInProgress(formDto);
list.addAll(inProgress);
}
// 查询活动状态是:已结束 finished
int pageIndex = (formDto.getPageNo() - NumConstant.ONE) * formDto.getPageSize();

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

@ -299,10 +299,12 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD
boolean satisfy = false;
// 活动不限制志愿者身份,但要求是 居民身份
Result<List<UserRoleResultDTO>> userRoleInfo = epmetUserOpenFeignClient.getUserRoleInfoByUserId(userId);
if (userRoleInfo.success()){
for (UserRoleResultDTO roleResultDTO :userRoleInfo.getData()){
if (EpmetRoleKeyConstant.REGISTERED_RESI.equals(roleResultDTO.getRoleKey())){
satisfy = true;
if (null != userRoleInfo){
if (userRoleInfo.success()){
for (UserRoleResultDTO roleResultDTO :userRoleInfo.getData()){
if (EpmetRoleKeyConstant.REGISTERED_RESI.equals(roleResultDTO.getRoleKey())){
satisfy = true;
}
}
}
}

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

@ -89,7 +89,8 @@ public class WorkActServiceImpl implements WorkActService {
private HeartUserInfoService heartUserInfoService;
@Autowired
private ActSummaryDao actSummaryDao;
@Autowired
private ActGrantPointLogDao actGrantPointLogDao;
/**
* @return void
* @author yinzuomei
@ -868,11 +869,62 @@ public class WorkActServiceImpl implements WorkActService {
}
mqBaseMsgDTO.setMsg(JSON.toJSONString(basePointEventMsgArrayList));
Result result=SendMqMsgUtils.sendMsg(mqBaseMsgDTO);
ActGrantPointLogEntity actGrantPointLogEntity=new ActGrantPointLogEntity();
actGrantPointLogEntity.setActId(actInfoDTO.getId());
actGrantPointLogEntity.setCustomerId(actInfoDTO.getCustomerId());
actGrantPointLogEntity.setOperatorId(loginUserUtil.getLoginUserId());
actGrantPointLogEntity.setRemark(remark);
actGrantPointLogEntity.setReward(actInfoDTO.getReward());
actGrantPointLogEntity.setSendMsg(JSON.toJSONString(mqBaseMsgDTO));
actGrantPointLogEntity.setResponseMsg(JSON.toJSONString(result));
actGrantPointLogDao.insert(actGrantPointLogEntity);
if(!result.success()){
logger.error("活动积分发放失败");
}
}
@Override
public void testGrantPoint(TestGrantFormDTO formDTO) {
//查询当前用户所属组织信息
Result<CustomerAgencyDTO> userResult = govOrgOpenFeignClient.getAgencyByStaff(loginUserUtil.getLoginUserId());
String opAgencyId = userResult.getData().getId();
MqBaseMsgDTO mqBaseMsgDTO = new MqBaseMsgDTO();
//mq的事件类型
mqBaseMsgDTO.setEventClass(EventEnum.ACTIVE_SEND_POINT.getEventClass());
//事件code
mqBaseMsgDTO.setEventTag(EventEnum.ACTIVE_SEND_POINT.getEventTag());
List<BasePointEventMsg> basePointEventMsgArrayList = new ArrayList<>();
BasePointEventMsg basePointEventMsg = new BasePointEventMsg();
basePointEventMsg.setOpAgencyId(opAgencyId);
basePointEventMsg.setCustomerId(formDTO.getCustomerId());
basePointEventMsg.setUserId(formDTO.getUserId());
basePointEventMsg.setActionFlag(formDTO.getActionFlag());
basePointEventMsg.setPoint(formDTO.getReward());
basePointEventMsg.setIsCommon(true);
basePointEventMsg.setRemark(formDTO.getRemark());
basePointEventMsg.setSourceId(formDTO.getSourceId());
basePointEventMsg.setOperatorId(loginUserUtil.getLoginUserId());
basePointEventMsgArrayList.add(basePointEventMsg);
mqBaseMsgDTO.setMsg(JSON.toJSONString(basePointEventMsgArrayList));
logger.info("发送消息入参:"+JSON.toJSON(mqBaseMsgDTO));
Result result = SendMqMsgUtils.sendMsg(mqBaseMsgDTO);
logger.info("发送消息返参:"+JSON.toJSON(result));
ActGrantPointLogEntity actGrantPointLogEntity=new ActGrantPointLogEntity();
actGrantPointLogEntity.setActId(formDTO.getSourceId());
actGrantPointLogEntity.setCustomerId(formDTO.getCustomerId());
actGrantPointLogEntity.setOperatorId(loginUserUtil.getLoginUserId());
actGrantPointLogEntity.setRemark(formDTO.getRemark());
actGrantPointLogEntity.setReward(formDTO.getReward());
actGrantPointLogEntity.setSendMsg(JSON.toJSONString(mqBaseMsgDTO));
actGrantPointLogEntity.setResponseMsg(JSON.toJSONString(result));
actGrantPointLogDao.insert(actGrantPointLogEntity);
if (!result.success()) {
logger.error("积分发放失败");
return;
}
logger.info("积分发方成功");
}
private void updateHeartUserInfo(ActInfoDTO actInfoDTO) {
List<ActUserRelationDTO> actUserRelationDTOList=actUserRelationService.getUserList(actInfoDTO.getId(),StrConstant.EPMETY_STR);
for(ActUserRelationDTO actUserRelation:actUserRelationDTOList){
@ -1082,6 +1134,7 @@ public class WorkActServiceImpl implements WorkActService {
return publishActResultDTO;
}
private void noticePassedPeople(ActInfoDTO originalActInfo, ActInfoEntity newActInfoEntity) {
/* List<ActUserRelationDTO> actUserRelationDTOList=actUserRelationDao.selectAuditingAndPassedList(originalActInfo.getId());
if(null==actUserRelationDTOList||actUserRelationDTOList.size()<1){

24
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql

@ -11,7 +11,7 @@
Target Server Version : 50728
File Encoding : 65001
Date: 28/07/2020 15:17:47
Date: 30/07/2020 14:11:45
*/
SET NAMES utf8mb4;
@ -58,6 +58,28 @@ CREATE TABLE `act_customized` (
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '爱心互助首页自定义配置' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for act_grant_point_log
-- ----------------------------
DROP TABLE IF EXISTS `act_grant_point_log`;
CREATE TABLE `act_grant_point_log` (
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`REWARD` int(11) NOT NULL,
`REMARK` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`OPERATOR_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`SEND_MSG` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
`RESPONSE_MSG` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
`REVISION` int(11) NOT NULL DEFAULT 0 COMMENT '乐观锁',
`DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记',
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间(报名时间)',
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动发放积分日志表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for act_info
-- ----------------------------

24
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActGrantPointLogDao.xml

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.ActGrantPointLogDao">
<resultMap type="com.epmet.entity.ActGrantPointLogEntity" id="actGrantPointLogMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="actId" column="ACT_ID"/>
<result property="reward" column="REWARD"/>
<result property="remark" column="REMARK"/>
<result property="operatorId" column="OPERATOR_ID"/>
<result property="sendMsg" column="SEND_MSG"/>
<result property="responseMsg" column="RESPONSE_MSG"/>
<result property="revision" column="REVISION"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

3
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActUserRelationDao.xml

@ -75,7 +75,7 @@
FROM act_user_relation re
WHERE re.DEL_FLAG = '0'
AND re.ACT_ID = #{actId}
GROUP BY re.ACT_ID
AND re.`STATUS` != 'refused' AND re.`STATUS` != 'cancele'
</select>
<update id="updateUserRelationByActIdAndUserId" parameterType="com.epmet.dto.ActUserRelationDTO">
@ -175,6 +175,7 @@
WHERE
aur.DEL_FLAG = '0'
AND aur.PROCESS_FLAG != 'handled'
and aur.`status`='passed'
AND aur.ACT_ID = #{actId}
</select>

2
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointDetailResultDTO.java

@ -18,7 +18,7 @@ public class PointDetailResultDTO implements Serializable {
private String ruleDesc;
private Integer point;
private String pointUnit;
private String upLimit;
private Integer upLimit;
private Boolean enabledFlag;
private String upLimitDesc;
}

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

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

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

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>0.0.10</version>
<version>0.0.11</version>
<parent>
<artifactId>epmet-point</artifactId>
<groupId>com.epmet</groupId>

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

@ -205,17 +205,17 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi
List<String> userIds = dataList.stream().map(data -> data.getUserId()).collect(Collectors.toList());
Result<List<UserBaseInfoResultDTO>> userInfo =
epmetUserOpenFeignClient.queryUserBaseInfo(userIds);
epmetUserOpenFeignClient.queryUserBaseInfo(userIds);
boolean userRequestCallback = userInfo.success() && null != userInfo.getData() && !userInfo.getData().isEmpty();
for(int i = NumConstant.ZERO ; i < dataList.size() ; i++){
WorkPointVerificationDetailResultDTO o = new WorkPointVerificationDetailResultDTO();
WorkPointVerificationDetailResultDTO o = ConvertUtils.sourceToTarget(dataList.get(i),WorkPointVerificationDetailResultDTO.class);
o.setPoint(new StringBuilder("-").append(dataList.get(i).getPoint().toString()).toString());
o.setRemark(dataList.get(i).getRemark());
if(userRequestCallback) {
//如果是陌生人显示微信昵称
o.setUserNickname(userInfo.getData().get(i) == null ? ModuleConstant.EMPTY_STR : (StringUtils.isBlank(userInfo.getData().get(i).getShowName()) ? userInfo.getData().get(i).getNickname() : userInfo.getData().get(i).getShowName()));
}
resultObj.add(o);
}

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

@ -37,3 +37,7 @@ CREATE TABLE rule_operate_log(
UPDATED_TIME DATETIME COMMENT '更新时间' ,
PRIMARY KEY (ID)
) COMMENT = '积分规则操作记录表';
INSERT INTO `epmet_point`.`point_rule`(`ID`, `CUSTOMER_ID`, `RULE_NAME`, `RULE_DESC`, `EVENT_CODE`, `FUNCTION_ID`, `OPERATE_TYPE`, `UP_LIMIT`, `UP_LIMIT_DESC`, `POINT`, `POINT_UNIT`, `ENABLED_FLAG`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1', '3ef7e4bb195eb9e622d68b52509aa940', '注册志愿者', '认证志愿者会获得积分', 'register_volunteer', '43addd0735230c01eedbb38d721076b0', 'plus', 0, '', 10, 'time', '1', '0', 0, 'APP_USER', '2020-07-23 14:48:56', 'APP_USER', '2020-07-23 14:48:56');
INSERT INTO `epmet_point`.`point_rule`(`ID`, `CUSTOMER_ID`, `RULE_NAME`, `RULE_DESC`, `EVENT_CODE`, `FUNCTION_ID`, `OPERATE_TYPE`, `UP_LIMIT`, `UP_LIMIT_DESC`, `POINT`, `POINT_UNIT`, `ENABLED_FLAG`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2', '3ef7e4bb195eb9e622d68b52509aa940', '发布实况', '发布实况获得积分', 'publist_active_live', '43addd0735230c01eedbb38d721076b0', 'plus', 0, '', 10, 'time', '1', '0', 0, 'APP_USER', '2020-07-23 14:48:56', 'APP_USER', '2020-07-23 14:48:56');

2
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserRoleController.java

@ -128,7 +128,7 @@ public class UserRoleController {
* @Author zhangyong
* @Date 14:24 2020-07-23
**/
@GetMapping("getuserroleinfobyuserid/{userId}")
@GetMapping(value = "getuserroleinfobyuserid/{userId}")
public Result<List<UserRoleResultDTO>> getUserRoleInfoByUserId(@PathVariable("userId") String userId) {
return userRoleService.getUserRoleInfoByUserId(userId);
}

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

@ -108,17 +108,17 @@ public class UserBaseInfoRedis {
gridParam.setGridId(relation.getGridId());
baseInfo.setRegisteredGridId(relation.getGridId());
Result<BelongGridNameResultDTO> gridResult =
govOrgOpenFeignClient.getGridNameByGridId(gridParam);
govOrgOpenFeignClient.getGridNameByGridId(gridParam);
if(gridResult.success() && null != gridResult.getData()
&& StringUtils.isNotBlank(gridResult.getData().getBelongsGridName())){
String gridFullName = gridResult.getData().getBelongsGridName();
baseInfo.setRegisteredGridName(gridFullName);
StringBuffer buffer = new StringBuffer(gridFullName.split(ModuleConstant.DASH)[NumConstant.ONE]).append(ModuleConstant.DASH).append(baseInfo.getSurname());
switch(baseInfo.getGender()){
case NumConstant.ONE_STR :
switch (baseInfo.getGender()) {
case NumConstant.ONE_STR:
buffer.append(ModuleConstant.RESI_USER_NICKNAME_SUFFIX_MALE);
break;
case NumConstant.TWO_STR :
case NumConstant.TWO_STR:
buffer.append(ModuleConstant.RESI_USER_NICKNAME_SUFFIX_FEMALE);
break;
default:
@ -126,18 +126,19 @@ public class UserBaseInfoRedis {
}
baseInfo.setShowName(buffer.toString());
}
}else{
//如果没有居民注册记录,说明当前用户是陌生人,需要从陌生人网格访问列表中查询所属的客户Id
LatestGridInfoResultDTO gridLatest =
}
}else{
//如果没有居民注册记录,说明当前用户是陌生人,需要从陌生人网格访问列表中查询所属的客户Id
LatestGridInfoResultDTO gridLatest =
gridLatestDao.selectLatestGridInfoByUserId(userId);
if(null != gridLatest){
baseInfo.setCustomerId(gridLatest.getCustomerId());
}
if(null != gridLatest){
baseInfo.setCustomerId(gridLatest.getCustomerId());
}
set(baseInfo);
return baseInfo;
}
set(baseInfo);
return baseInfo;
}
return null;
}
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java

@ -197,7 +197,7 @@ public class GridLatestServiceImpl extends BaseServiceImpl<GridLatestDao, GridLa
if(StringUtils.isNotBlank(info.getUserId())){
UserBaseInfoResultDTO cache = userBaseInfoRedis.getUserInfo(info.getUserId());
if(null != cache) {
info.setRegisteredGrid(cache.getRegisteredGridName());
info.setRegisteredGrid(StringUtils.isBlank(cache.getRegisteredGridName()) ? ModuleConstant.EMPTY_STR : cache.getRegisteredGridName());
}
}
});

40
epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml

@ -28,24 +28,28 @@
<!-- 根据用户id查询user_base_info基本信息 -->
<select id="selectListByUserIdList" parameterType="java.lang.String" resultType="com.epmet.dto.result.UserBaseInfoResultDTO">
SELECT
ubi.id,
ubi.USER_ID,
ubi.MOBILE,
ubi.SURNAME,
ubi.`NAME`,
ubi.real_name,
ubi.ID_NUM,
ubi.GENDER,
ubi.STREET,
ubi.DISTRICT,
ubi.BUILDING_ADDRESS,
ubi.NICKNAME,
ubi.HEAD_IMG_URL
FROM
user_base_info ubi
WHERE
ubi.DEL_FLAG = '0'
AND ubi.USER_ID = #{userId}
ubi.id,
wechat.USER_ID,
ubi.MOBILE,
ubi.SURNAME,
ubi.`NAME`,
ubi.real_name,
ubi.ID_NUM,
ubi.GENDER,
ubi.STREET,
ubi.DISTRICT,
ubi.BUILDING_ADDRESS,
wechat.NICKNAME,
wechat.HEAD_IMG_URL
FROM
user_wechat wechat
LEFT JOIN user_base_info ubi ON wechat.USER_ID = ubi.USER_ID
AND wechat.DEL_FLAG = '0'
AND ubi.DEL_FLAG = '0'
AND ubi.USER_ID = #{userId}
WHERE
wechat.USER_ID = #{userId}
</select>
<!-- 根据用户id获取user_wechat表微信用户基本信息 -->

8
epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml

@ -93,10 +93,10 @@
<!-- 查询人员信息,排序,包括陌生人与注册居民,没有注册居民则只有微信昵称 -->
<select id="selectResiAndStrangerInfo" resultType="com.epmet.dto.result.CustomerUser4PointResultDTO">
SELECT
wechat.USER_ID,
wechat.NICKNAME AS userNickname,
wechat.HEAD_IMG_URL AS userHeadPhoto,
base.REAL_NAME AS userName
wechat.USER_ID,
IFNULL(wechat.NICKNAME,'') AS userNickname,
IFNULL(wechat.HEAD_IMG_URL,'') AS userHeadPhoto,
IFNULL(base.REAL_NAME,'') AS userName
FROM
user_wechat wechat
LEFT JOIN

Loading…
Cancel
Save