Browse Source

Merge remote-tracking branch 'remotes/origin/dev' into release

master
jianjun 5 years ago
parent
commit
156a4c8d84
  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. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/PublishActInfoFormDTO.java
  5. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/RePublishFormDTO.java
  6. 63
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/TestGrantFormDTO.java
  7. 86
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiVolunteerInfoResultDTO.java
  8. 2
      epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml
  9. 2
      epmet-module/epmet-heart/epmet-heart-server/pom.xml
  10. 23
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java
  11. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java
  12. 33
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActGrantPointLogDao.java
  13. 11
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/VolunteerInfoDao.java
  14. 73
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActGrantPointLogEntity.java
  15. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java
  16. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java
  17. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java
  18. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java
  19. 26
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java
  20. 55
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java
  21. 24
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql
  22. 24
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActGrantPointLogDao.xml
  23. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActUserRelationDao.xml
  24. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/VolunteerInfoDao.xml
  25. 2
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointDetailResultDTO.java
  26. 2
      epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml
  27. 2
      epmet-module/epmet-point/epmet-point-server/pom.xml
  28. 4
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java
  29. 4
      epmet-module/epmet-point/epmet-point-server/src/main/resources/db/migration/epmet_point.sql
  30. 5
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaCustomerDTO.java
  31. 5
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserDTO.java
  32. 5
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/PaUserVisitedDTO.java
  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. 4
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/PaConstant.java
  36. 19
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/constant/ThirdRunTimeInfoConstant.java
  37. 5
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaCustomerEntity.java
  38. 5
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaUserEntity.java
  39. 5
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaUserVisitedEntity.java
  40. 1
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/AppLetAuthorizationServiceImpl.java
  41. 19
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java
  42. 6
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/PaCustomerServiceImpl.java
  43. 3
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/WarrantServiceImpl.java
  44. 18
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java
  45. 6
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java
  46. 2
      epmet-user/epmet-user-server/deploy/docker-compose-dev.yml
  47. 2
      epmet-user/epmet-user-server/pom.xml
  48. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserBaseInfoController.java
  49. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserRoleController.java
  50. 3
      epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java
  51. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java
  52. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserResiInfoServiceImpl.java
  53. 16
      epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml
  54. 6
      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');

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

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

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

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

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()));
}
}

86
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiVolunteerInfoResultDTO.java

@ -0,0 +1,86 @@
package com.epmet.dto.result.resi;
import lombok.Data;
import java.io.Serializable;
/**
* 志愿者信息+用户基础信息 返回值
* @Auther: zhangyong
* @Date: 2020-07-28 14:40
*/
@Data
public class ResiVolunteerInfoResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 用户id
*/
private String userId;
/**
* 手机号(注册手机号)
*/
private String mobile;
/**
* 姓氏
*/
private String surname;
/**
*
*/
private String name;
/**
* 姓名
*/
private String realName;
/**
* 身份证号
*/
private String idNum;
/**
* 性别1男2女0未知
*/
private String gender;
/**
* 街道
*/
private String street;
/**
* 小区名称
*/
private String district;
/**
* 楼栋单元
*/
private String buildingAddress;
/**
* 昵称(目前来源于微信昵称后续系统可支持用户有昵称)
*/
private String nickname;
/**
* 头像目前来源于微信后续系统顾客支持上传头像
*/
private String headImgUrl;
/**
* 志愿者签名
*/
private String volunteerSignature;
/**
* 志愿者自我介绍
*/
private String volunteerIntroduce;
}

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.10
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.10</version>
<version>0.0.13</version>
<parent>
<groupId>com.epmet</groupId>
<artifactId>epmet-heart</artifactId>

23
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java

@ -23,6 +23,8 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.resi.ResiActUserCancelSignUpFormDTO;
import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO;
import com.epmet.dto.result.ResiUserBaseInfoResultDTO;
import com.epmet.dto.result.resi.ResiVolunteerInfoResultDTO;
import com.epmet.service.VolunteerInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
@ -44,9 +46,30 @@ public class ResiVolunteerController {
@Autowired
private VolunteerInfoService volunteerInfoService;
/**
* 志愿者认证
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 13:59 2020-07-30
**/
@PostMapping("authenticate")
public Result authenticate(@LoginUser TokenDto tokenDto, @RequestBody ResiVolunteerAuthenticateFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ResiVolunteerAuthenticateFormDTO.AddUserInternalGroup.class, ResiVolunteerAuthenticateFormDTO.AddUserShowGroup.class);
return volunteerInfoService.authenticate(tokenDto, formDTO);
}
/**
* 志愿者认证界面获取用户基础信息+志愿者信息
*
* @param tokenDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.resi.ResiVolunteerInfoResultDTO>
* @Author zhangyong
* @Date 15:20 2020-07-28
**/
@PostMapping("selectvolunteerinfo")
public Result<ResiVolunteerInfoResultDTO> selectVolunteerInfo(@LoginUser TokenDto tokenDTO){
return volunteerInfoService.selectVolunteerInfoByUserId(tokenDTO);
}
}

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> {
}

11
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/VolunteerInfoDao.java

@ -18,6 +18,7 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.VolunteerInfoDTO;
import com.epmet.entity.VolunteerInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -52,4 +53,14 @@ public interface VolunteerInfoDao extends BaseDao<VolunteerInfoEntity> {
* @Date 15:05 2020-07-23
**/
void updateVolunteerInfoByUserId(VolunteerInfoEntity entity);
/**
* 根据用户id查询志愿者信息
*
* @param userId
* @return java.lang.String
* @Author zhangyong
* @Date 14:33 2020-07-23l
**/
VolunteerInfoDTO selectVolunteerInfoByUserId(@Param("userId") String userId);
}

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;
}

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

@ -23,6 +23,7 @@ import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.VolunteerInfoDTO;
import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO;
import com.epmet.dto.result.resi.ResiVolunteerInfoResultDTO;
import com.epmet.entity.VolunteerInfoEntity;
import java.util.List;
@ -47,4 +48,13 @@ public interface VolunteerInfoService extends BaseService<VolunteerInfoEntity> {
**/
Result authenticate(TokenDto tokenDto, ResiVolunteerAuthenticateFormDTO formDTO);
/**
* 志愿者认证界面获取用户基础信息+志愿者信息
*
* @param tokenDto
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.resi.ResiVolunteerInfoResultDTO>
* @Author zhangyong
* @Date 14:05 2020-07-30
**/
Result<ResiVolunteerInfoResultDTO> selectVolunteerInfoByUserId(TokenDto tokenDto);
}

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);
}

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

@ -128,6 +128,8 @@ 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());
// 列表第一次查询,不是已结束状态的活动,一次性返回
if (formDto.getPageNo() == NumConstant.ONE){
// 查询活动状态是:报名中 signing_up
List<ResiActInfoResultDTO> signingUp = baseDao.selectListActSigningUp(formDto);
list.addAll(signingUp);
@ -143,6 +145,7 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
// 查询活动状态是:已开始 in_progress
List<ResiActInfoResultDTO> inProgress = baseDao.selectListActInProgress(formDto);
list.addAll(inProgress);
}
// 查询活动状态是:已结束 finished
int pageIndex = (formDto.getPageNo() - NumConstant.ONE) * formDto.getPageSize();

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

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

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

@ -24,6 +24,7 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO;
import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg;
import com.epmet.commons.tools.enums.EventEnum;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
@ -31,8 +32,11 @@ import com.epmet.commons.tools.utils.SendMqMsgUtils;
import com.epmet.constant.ActMessageConstant;
import com.epmet.dao.VolunteerInfoDao;
import com.epmet.dto.HeartUserInfoDTO;
import com.epmet.dto.VolunteerInfoDTO;
import com.epmet.dto.form.WxUserInfoFormDTO;
import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO;
import com.epmet.dto.result.ResiUserBaseInfoResultDTO;
import com.epmet.dto.result.resi.ResiVolunteerInfoResultDTO;
import com.epmet.entity.VolunteerInfoEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.redis.VolunteerInfoRedis;
@ -134,4 +138,26 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
wxUserInfoFormDTO.setGender(formDTO.getGender());
return wxUserInfoFormDTO;
}
@Override
public Result<ResiVolunteerInfoResultDTO> selectVolunteerInfoByUserId(TokenDto tokenDto) {
ResiVolunteerInfoResultDTO resultDTO = new ResiVolunteerInfoResultDTO();
// 获取用户基本信息
Result<ResiUserBaseInfoResultDTO> userBaseInfo = epmetUserOpenFeignClient.selectUserBaseInfo(tokenDto);
if (userBaseInfo.success()){
resultDTO = ConvertUtils.sourceToTarget(userBaseInfo.getData(), ResiVolunteerInfoResultDTO.class);
// 判断是不是志愿者
Integer volunteerFlag = baseDao.queryVolunteerFlagByUserId(tokenDto.getUserId());
if (volunteerFlag > NumConstant.ZERO){
// 获取志愿者信息
VolunteerInfoDTO dto = baseDao.selectVolunteerInfoByUserId(tokenDto.getUserId());
resultDTO.setVolunteerIntroduce(dto.getVolunteerIntroduce());
resultDTO.setVolunteerSignature(dto.getVolunteerSignature());
}
} else {
logger.error("获取用户基本信息失败");
throw new RenException("获取用户基本信息失败!");
}
return new Result<ResiVolunteerInfoResultDTO>().ok(resultDTO);
}
}

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>

10
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/VolunteerInfoDao.xml

@ -44,4 +44,14 @@
WHERE DEL_FLAG = '0'
AND USER_ID = #{userId}
</update>
<select id="selectVolunteerInfoByUserId" parameterType="java.lang.String" resultType="com.epmet.dto.VolunteerInfoDTO">
SELECT
CUSTOMER_ID customerId,
VOLUNTEER_INTRODUCE volunteerIntroduce,
VOLUNTEER_SIGNATURE volunteerSignature
FROM volunteer_info
WHERE DEL_FLAG = '0'
AND USER_ID = #{userId}
</select>
</mapper>

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>

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

@ -209,13 +209,13 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi
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');

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

@ -48,6 +48,11 @@ public class PaCustomerDTO implements Serializable {
*/
private Integer isInitialize;
/**
* 数据来源(dev:开发 test:体验 prod:生产)
*/
private String source;
/**
* 删除标识0.未删除 1.已删除
*/

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

@ -53,6 +53,11 @@ public class PaUserDTO implements Serializable {
*/
private String gender;
/**
* 数据来源(dev:开发 test:体验 prod:生产)
*/
private String source;
/**
* 删除标识
*/

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

@ -58,6 +58,11 @@ public class PaUserVisitedDTO implements Serializable {
*/
private String phone;
/**
* 数据来源(dev:开发 test:体验 prod:生产)
*/
private String source;
/**
* 删除标识
*/

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

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

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

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

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

@ -6,6 +6,10 @@ package com.epmet.constant;
*/
public interface PaConstant {
/**
* 根据userId查询pa_user表失败
*/
String SELECT_USER_EXCEPTION = "获取用户信息失败";
/**
* 更新用户信息失败
*/

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

@ -84,4 +84,23 @@ public interface ThirdRunTimeInfoConstant {
String REFRESH_AUTH_ACCESS_TOKEN = "查询到新的 授权方【access_token】";
String INFO_TYPE = "》》》》》》》》》》infoType = %s《《《《《《《《《《《《《《";
String COMPONENT_VERIFY_TICKET = "============================接收的票据为:%s===========================";
String AUTH_STATUS = "----------------------------授权成功------------------------------------";
String REMOVE_AUTH = "============================取消授权====================================";
String UPDATE_AUTH = "----------------------------变更授权------------------------------------";
String COMPONENT_ACCESS_TOKEN = "**********************************获取【component_access_token】请求参数componentVerifyTicket为:%s*************************************";
String EXIST_UPCOMING_EXPIRED = "===============================查询到即将过期的 ComponentAccessToken=================================";
String BEGIN_DELETE_INSERT_AUTH_CODE = "**************************************开始删除旧的AuthCode并保存新的AuthCode******************************************";
String BEGIN_CREATE_OPEN = "============================开始执行绑定开放平台账号===================================";
String CODE_AUDIT_RESULT = "----------------------------------代码审核结果即将插入,需要插入的内容为:%s-----------------------------------------";
}

5
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaCustomerEntity.java

@ -48,4 +48,9 @@ public class PaCustomerEntity extends BaseEpmetEntity {
*/
private Integer isInitialize;
/**
* 数据来源(dev:开发 test:体验 prod:生产)
*/
private String source;
}

5
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaUserEntity.java

@ -53,4 +53,9 @@ public class PaUserEntity extends BaseEpmetEntity {
*/
private String gender;
/**
* 数据来源(dev:开发 test:体验 prod:生产)
*/
private String source;
}

5
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/PaUserVisitedEntity.java

@ -58,4 +58,9 @@ public class PaUserVisitedEntity extends BaseEpmetEntity {
*/
private String phone;
/**
* 数据来源(dev:开发 test:体验 prod:生产)
*/
private String source;
}

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

@ -62,7 +62,6 @@ public class AppLetAuthorizationServiceImpl implements AppLetAuthorizationServic
public GoToAuthResultDTO goToAuth(TokenDto tokenDto, GoToAuthFormDTO formDTO) {
GoToAuthResultDTO result = new GoToAuthResultDTO();
String userId = tokenDto.getUserId();
String customerId = paCustomerAgencyDao.getCustomerIdByUserId(userId);
//获取预授权码
String preAuthCode = componentVerifyTicketService.preAuthCode();
String redirectUrl = WxMaCodeConstant.WEB_URL + formDTO.getClientType();

19
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java

@ -14,7 +14,6 @@ import com.epmet.dao.*;
import com.epmet.dto.PaCustomerUserAgencyDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.mpaes.WXBizMsgCrypt;
import com.epmet.mpaes.WXXmlToMapUtil;
import com.epmet.redis.RedisThird;
@ -77,8 +76,6 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
@Autowired
private BusinessInfoDao businessInfoDao;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Autowired
private AuthResultRecordDao authResultRecordDao;
@Autowired
private PaCustomerUserAgencyDao paCustomerUserAgencyDao;
@ -112,6 +109,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
String nonce = request.getParameter(ModuleConstant.NONCE);
String encryptType = request.getParameter(ModuleConstant.ENCRYPT_TYPE);
String signature = request.getParameter(ModuleConstant.SIGNATURE);
log.info(String.format(ThirdRunTimeInfoConstant.VERIFY_TICKET,msgSignature,timeStamp,nonce,encryptType,signature));
// 从请求中读取整个post数据
InputStream inputStream;
String postData = null;
@ -123,9 +121,11 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
// 将xml转为map
Map<String, String> result = WXXmlToMapUtil.xmlToMap(msg);
String infotype = result.get(ModuleConstant.INFO_TYPE);
log.info(String.format(ThirdRunTimeInfoConstant.INFO_TYPE,infotype));
switch (infotype){
case ModuleConstant.TICKET_UNDERLINE_KEY: //接收票据 【component_verify_ticket】
String ComponentVerifyTicket = result.get(ModuleConstant.TICKET_KEY);
log.info(String.format(COMPONENT_VERIFY_TICKET));
// 缓存 ticket
redisThird.setComponentVerifyTicket(ComponentVerifyTicket);
// 存数据库
@ -139,15 +139,18 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
break;
case ModuleConstant.AUTHORIZED: //授权成功
this.disposeAuthResult(result);
log.info(AUTH_STATUS);
break;
case ModuleConstant.UNAUTHORIZED://用户取消授权
//todo 取消授权
String authorizerAppId = result.get(ModuleConstant.AUTHORIZER_APP_ID_HUMP);
customerMpDao.updateAuthorizationFlag(authorizerAppId);
this.disposeAuthResult(result);
log.info(REMOVE_AUTH);
break;
case ModuleConstant.UPDATE_AUTHORIZED://授权变更
this.disposeAuthResult(result);
log.info(UPDATE_AUTH);
break;
}
} catch (Exception e) {
@ -195,11 +198,13 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
//距离超时时间小于15分钟的数量
Integer tokenCount = componentAccessTokenDao.selectWillOverTokenCount();
if ((tokenCount > NumConstant.ZERO && accessTokenCountFlag.equals(ModuleConstant.ACCOUNT_TOKEN_FLAG_TWO)) || accessTokenCountFlag.equals(ModuleConstant.ACCOUNT_TOKEN_FLAG_ONE)) {
log.info(String.format(EXIST_UPCOMING_EXPIRED));
String componentVerifyTicket = redisThird.getComponentVerifyTicket();
JSONObject jsonObject = new JSONObject();
jsonObject.put(ModuleConstant.COMPONENT_APPID, componentAppId);
jsonObject.put(ModuleConstant.COMPONENT_APPSECRET, appSecret);
jsonObject.put(ModuleConstant.TICKET_UNDERLINE_KEY, componentVerifyTicket);
log.info(String.format(ThirdRunTimeInfoConstant.COMPONENT_ACCESS_TOKEN,componentVerifyTicket));
String post = HttpClientManager.getInstance().sendPostByJSON(WxMaCodeConstant.API_COMPONENT_TOKEN_URL, JSON.toJSONString(jsonObject)).getData();
Map hashMap = JSON.parseObject(post, Map.class);
if (!hashMap.containsKey(ModuleConstant.ERR_MSG)) {
@ -389,7 +394,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
formDTO.setExpiresInTime(expiresInTime);
formDTO.setClientType(clientType);
formDTO.setCustomerId(customerId);
log.info(formDTO.toString());
log.info(ThirdRunTimeInfoConstant.BEGIN_DELETE_INSERT_AUTH_CODE);
authCodeDao.deleteCustomerAuthCode(customerId,clientType);
authCodeDao.insertRedirectAuthCode(formDTO);
//authCode存缓存
@ -523,6 +528,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
}
public void createAndBindOpenAccount(String customerId,String authAppId,String clientType){
log.info(ThirdRunTimeInfoConstant.BEGIN_CREATE_OPEN);
Map<String, Object> authorizerRefreshToken = redisThird.getAuthorizerRefreshToken(customerId + ThirdRedisKeyConstant.COLON + clientType);
String authorizerAccessToken = authorizerRefreshToken.get("authorizerAccessToken").toString();
JSONObject bindInfoForm = new JSONObject();
@ -531,7 +537,6 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
Map<String,Object> bindInfo = JSON.parseObject(bindResult, Map.class);
boolean bindStatus = bindInfo.containsKey(ModuleConstant.OPEN_APP_ID);
if (bindStatus != true) {
log.info(CREATE_AND_BIND_SUCCESS);
Integer authCount = customerMpDao.selectAuthCount(customerId);
String openPlatformId = null;
if (authCount > 0) {
@ -655,11 +660,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
* @author zxc
*/
public String getLoginUserCustomerId(TokenDto tokenDto){
/*LoginUserDetailsFormDTO dto = new LoginUserDetailsFormDTO();
BeanUtils.copyProperties(tokenDto,dto);
LoginUserDetailsResultDTO data = epmetUserOpenFeignClient.getLoginUserDetails(dto).getData();*/
PaCustomerUserAgencyDTO result = paCustomerUserAgencyDao.selectByUserId(tokenDto.getUserId());
// return data.getCustomerId();
return result.getCustomerId();
}

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

@ -172,9 +172,13 @@ public class PaCustomerServiceImpl extends BaseServiceImpl<PaCustomerDao, PaCust
//2.根据token中的userId查询pa_user表数据,根据手机号是否为空判断后续是新增还是更新user数据
PaUserEntity paUserEntity = paUserDao.selectById(formDTO.getUserId());
if (null == paUserEntity) {
logger.error("根据token中userId查询pa_user表信息失败,userId->"+formDTO.getUserId());
throw new RenException(PaConstant.SELECT_USER_EXCEPTION);
}
//3.手机号不为空说明是同一个微信用户用第二个手机号注册,手机为空说明当前微信用户用第一个手机号注册
if(null != paUserEntity.getPhone() && StringUtils.isNotBlank(paUserEntity.getPhone())){
if(StringUtils.isNotBlank(paUserEntity.getPhone())){
//手机号不为空说明是同一个微信用户用第二个手机号注册,新增user和user_wechat表数据
//3-1.user表新增数据
PaUserEntity userEntity = new PaUserEntity();

3
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/WarrantServiceImpl.java

@ -68,6 +68,7 @@ public class WarrantServiceImpl implements WarrantService {
@Transactional(rollbackFor = Exception.class)
@Override
public String acceptMessageAndEvent(HttpServletRequest request, String appId, HttpServletResponse response)throws IOException, DocumentException, AesException {
log.info("消息与事件接收URL【代码审核结果】开始执行......");
log.info("appId:"+ appId);
request.setCharacterEncoding(ModuleConstant.UTF8);
String msgSignature = request.getParameter(ModuleConstant.MSG_SIGNATURE);
@ -109,6 +110,7 @@ public class WarrantServiceImpl implements WarrantService {
codeAuditRecord.setAuthAppId(authAppId);
codeAuditRecord.setTemplateId(templateId);
//插入 代码审核 记录
log.info(String.format(ThirdRunTimeInfoConstant.CODE_AUDIT_RESULT,xml));
codeAuditRecordDao.insertCodeAuditRecord(codeAuditRecord);
// 修改 code_audit_result 中的代码审核结果
String event = codeAuditRecord.getEvent();
@ -134,6 +136,7 @@ public class WarrantServiceImpl implements WarrantService {
messagePushTextFormDTO.setWeChatCreateTime(date);
messagePushTextDao.insertMessageText(messagePushTextFormDTO);
}
log.info("消息与事件接收URL【代码审核结果】结束......");
return ModuleConstant.SUCCESS;
}
}

18
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java

@ -1,6 +1,8 @@
package com.epmet.feign;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerStaffDTO;
import com.epmet.dto.GovStaffRoleDTO;
@ -11,10 +13,7 @@ import com.epmet.dto.result.*;
import com.epmet.feign.fallback.EpmetUserOpenFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -229,4 +228,15 @@ public interface EpmetUserOpenFeignClient {
**/
@GetMapping(value = "epmetuser/customerstaff/getCustsomerStaffByIdAndPhone")
Result<List<CustomerStaffDTO>> getCustsomerStaffByIdAndPhone(@RequestBody ThirdCustomerStaffFormDTO formDTO);
/**
* 获取用户基础信息
*
* @param tokenDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.ResiUserBaseInfoResultDTO>
* @Author zhangyong
* @Date 14:10 2020-07-30
**/
@PostMapping("/epmetuser/userbaseinfo/selectuserbaseinfo")
Result<ResiUserBaseInfoResultDTO> selectUserBaseInfo(@RequestBody TokenDto tokenDTO);
}

6
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java

@ -1,6 +1,7 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerStaffDTO;
@ -167,4 +168,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien
public Result<List<CustomerStaffDTO>> getCustsomerStaffByIdAndPhone(ThirdCustomerStaffFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getCustsomerStaffByIdAndPhone", formDTO);
}
@Override
public Result<ResiUserBaseInfoResultDTO> selectUserBaseInfo(TokenDto tokenDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "selectUserBaseInfo", tokenDTO);
}
}

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

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

2
epmet-user/epmet-user-server/pom.xml

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

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

@ -158,8 +158,8 @@ public class UserBaseInfoController {
* @Author zhangyong
* @Date 15:20 2020-07-28
**/
@PostMapping("selecuserbaseinfo")
public Result<ResiUserBaseInfoResultDTO> selecUserBaseInfo(@LoginUser TokenDto tokenDTO){
@PostMapping("selectuserbaseinfo")
public Result<ResiUserBaseInfoResultDTO> selectUserBaseInfo(@LoginUser TokenDto tokenDTO){
return userBaseInfoService.selecUserBaseInfoByUserId(tokenDTO.getUserId());
}
}

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);
}

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

@ -126,6 +126,7 @@ public class UserBaseInfoRedis {
}
baseInfo.setShowName(buffer.toString());
}
}
}else{
//如果没有居民注册记录,说明当前用户是陌生人,需要从陌生人网格访问列表中查询所属的客户Id
LatestGridInfoResultDTO gridLatest =
@ -137,7 +138,7 @@ public class UserBaseInfoRedis {
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());
}
}
});

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

@ -150,8 +150,9 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl<UserResiInfoDao, Us
/**
* 居民注册信息提交
*
* @param userResiInfoDTO
* @Author sun
* @Author sunUserRoleServiceImpl
*/
@Override
public Result submit(UserResiInfoDTO userResiInfoDTO) {
@ -253,6 +254,7 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl<UserResiInfoDao, Us
UserRoleDTO userRole = new UserRoleDTO();
userRole.setUserId(userResiInfoDTO.getUserId());
userRole.setRoleKey(UserConstant.ROLE_RESI);
userRole.setApp(userResiInfoDTO.getApp());
userRoleService.saveUserRole(userRole);
}

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

@ -29,7 +29,7 @@
<select id="selectListByUserIdList" parameterType="java.lang.String" resultType="com.epmet.dto.result.UserBaseInfoResultDTO">
SELECT
ubi.id,
ubi.USER_ID,
wechat.USER_ID,
ubi.MOBILE,
ubi.SURNAME,
ubi.`NAME`,
@ -39,13 +39,17 @@
ubi.STREET,
ubi.DISTRICT,
ubi.BUILDING_ADDRESS,
ubi.NICKNAME,
ubi.HEAD_IMG_URL
wechat.NICKNAME,
wechat.HEAD_IMG_URL
FROM
user_base_info ubi
WHERE
ubi.DEL_FLAG = '0'
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表微信用户基本信息 -->

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

@ -94,9 +94,9 @@
<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
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