Browse Source

Merge remote-tracking branch 'origin/feature/syp_volunteer'

feature/screenDataPush
songyunpeng 4 years ago
parent
commit
11a255d586
  1. 16
      esua-epdc/epdc-commons/epdc-commons-tools-wx-ma/src/main/java/com/elink/esua/epdc/utils/WxMaServiceUtils.java
  2. 8
      esua-epdc/epdc-gateway/pom.xml
  3. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/ScanSwitchDTO.java
  4. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/StartupPageDTO.java
  5. 5
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppSaveWxFormIdFormDTO.java
  6. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppScanVersionNumDTO.java
  7. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppUserMaInfoFormDTO.java
  8. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppUserMaTokenFormDTO.java
  9. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppUserRegisterFormDTO.java
  10. 6
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppUserTokenFormDTO.java
  11. 36
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcClockListV2FormDTO.java
  12. 6
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcCompleteUserInfoFormDTO.java
  13. 6
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/v2/EpdcCompleteUserInfoFormV2DTO.java
  14. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcAppScanFlagDTO.java
  15. 18
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcStartupPageFormDTO.java
  16. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/StartupPageResultDTO.java
  17. 12
      esua-epdc/epdc-module/epdc-api/epdc-api-server/pom.xml
  18. 19
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiActUserRelationController.java
  19. 9
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScanSwitchController.java
  20. 12
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/StartupController.java
  21. 10
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/v2/ApiStartupV2Controller.java
  22. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/dao/StartupPageDao.java
  23. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/entity/ScanSwitchEntity.java
  24. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/entity/StartupPageEntity.java
  25. 11
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AppActUserRelationFeignClient.java
  26. 20
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java
  27. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AppActUserRelationFeignClientFallback.java
  28. 12
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java
  29. 10
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/ActUserRelationService.java
  30. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/StartupPageService.java
  31. 6
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/ActUserRelationServiceImpl.java
  32. 103
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java
  33. 11
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/StartupPageServiceImpl.java
  34. 7
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/resources/application.yml
  35. 4
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/resources/mapper/ScanSwitchDao.xml
  36. 12
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/resources/mapper/StartupPageDao.xml
  37. 11
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/AppActUserRelationController.java
  38. 9
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActUserRelationDao.java
  39. 9
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActUserRelationService.java
  40. 43
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserRelationServiceImpl.java
  41. 15
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActUserRelationDao.xml
  42. 15
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/controller/PointsLogsController.java
  43. 9
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/dao/PointsLogsDao.java
  44. 10
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/PointsLogsService.java
  45. 7
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/PointsLogsServiceImpl.java
  46. 8
      esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/PointsLogsDao.xml
  47. 11
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/CachingUserInfoDTO.java
  48. 46
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/PointsLogsBindUnIdDTO.java
  49. 19
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/CheckRepeatUserFormDTO.java
  50. 23
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/CombineVolunteerUserFormDTO.java
  51. 5
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcGridLeaderRegisterSubmitFormDTO.java
  52. 6
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcUserRegistFormDTO.java
  53. 28
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/UserController.java
  54. 17
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserGridRelationDao.java
  55. 33
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/feign/PointsFeignClient.java
  56. 21
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/feign/fallback/PointsFeignClientFallback.java
  57. 16
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserGridRelationService.java
  58. 16
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserService.java
  59. 12
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserGridRelationServiceImpl.java
  60. 194
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java
  61. 4
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserDao.xml
  62. 22
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserGridRelationDao.xml

16
esua-epdc/epdc-commons/epdc-commons-tools-wx-ma/src/main/java/com/elink/esua/epdc/utils/WxMaServiceUtils.java

@ -23,6 +23,9 @@ public class WxMaServiceUtils {
@Value("${wx.ma.appId.analysis}")
private String APPID_ANALYSIS;
@Value("${wx.ma.appId.volunteer}")
private String APPID_VOLUNTEER;
/**
* 获取党群e家 普通居民端配置
*
@ -60,4 +63,17 @@ public class WxMaServiceUtils {
final WxMaService wxMaService = WxMaConfig.getMaService(APPID_ANALYSIS);
return wxMaService;
}
/**
*
* 获取党群e家 数据分析端配置
*
* @params []
* @return cn.binarywang.wx.miniapp.api.WxMaService
* @author liuchuang
* @since 2021/4/8 10:44
*/
public final WxMaService volunteerWxMaService() {
final WxMaService wxMaService = WxMaConfig.getMaService(APPID_VOLUNTEER);
return wxMaService;
}
}

8
esua-epdc/epdc-gateway/pom.xml

@ -100,16 +100,16 @@
<!-- gateway routes -->
<gateway.routes.epdc-auth-server.uri>lb://epdc-auth-server</gateway.routes.epdc-auth-server.uri>
<!-- <gateway.routes.epdc-admin-server.uri>lb://epdc-admin-server</gateway.routes.epdc-admin-server.uri>-->
<gateway.routes.epdc-admin-server.uri>http://127.0.0.1:9092</gateway.routes.epdc-admin-server.uri>
<gateway.routes.epdc-admin-server.uri>lb://epdc-admin-server</gateway.routes.epdc-admin-server.uri>
<!-- <gateway.routes.epdc-admin-server.uri>http://127.0.0.1:9092</gateway.routes.epdc-admin-server.uri>-->
<gateway.routes.epdc-activiti-server.uri>lb://epdc-activiti-server
</gateway.routes.epdc-activiti-server.uri>
<!-- <gateway.routes.epdc-api-server.uri>lb://epdc-api-server</gateway.routes.epdc-api-server.uri>-->
<gateway.routes.epdc-api-server.uri>http://127.0.0.1:9040</gateway.routes.epdc-api-server.uri>
<gateway.routes.epdc-app-server.uri>lb://epdc-app-server</gateway.routes.epdc-app-server.uri>
<!-- <gateway.routes.epdc-app-server.uri>http://127.0.0.1:9058</gateway.routes.epdc-app-server.uri>-->
<gateway.routes.epdc-heart-server.uri>lb://epdc-heart-server</gateway.routes.epdc-heart-server.uri>
<!-- <gateway.routes.epdc-heart-server.uri>http://127.0.0.1:9060</gateway.routes.epdc-heart-server.uri>-->
<!-- <gateway.routes.epdc-heart-server.uri>lb://epdc-heart-server</gateway.routes.epdc-heart-server.uri>-->
<gateway.routes.epdc-heart-server.uri>http://127.0.0.1:9060</gateway.routes.epdc-heart-server.uri>
<gateway.routes.epdc-job-server.uri>lb://epdc-job-server</gateway.routes.epdc-job-server.uri>
<!-- <gateway.routes.epdc-job-server.uri>http://127.0.0.1:9061</gateway.routes.epdc-job-server.uri>-->
<gateway.routes.epdc-message-server.uri>lb://epdc-message-server

7
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/ScanSwitchDTO.java

@ -86,4 +86,9 @@ public class ScanSwitchDTO implements Serializable {
*/
private Date updatedTime;
}
/**
* 平台0-e锦水1-志愿者去哪
*/
private String platform;
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/StartupPageDTO.java

@ -98,4 +98,9 @@ public class StartupPageDTO implements Serializable {
*/
private String delFlag;
}
/**
* 平台0-e锦水1-志愿者去哪
*/
private String platform;
}

5
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppSaveWxFormIdFormDTO.java

@ -19,4 +19,9 @@ public class EpdcAppSaveWxFormIdFormDTO implements Serializable {
@NotBlank(message = "wxFormId不能为空")
private String wxFormId;
/**
* 小程序类型
*/
private String type;
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppScanVersionNumDTO.java

@ -38,4 +38,9 @@ public class EpdcAppScanVersionNumDTO implements Serializable {
@NotBlank(message = "版本号不能为空")
private String versionNum;
}
/**
* 平台0-e锦水1-志愿者去哪
*/
private String platform;
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppUserMaInfoFormDTO.java

@ -33,4 +33,11 @@ public class EpdcAppUserMaInfoFormDTO implements Serializable {
*/
@NotBlank(message = "初始向量不能为空")
private String iv;
/**
* 小程序类型
*/
private String type;
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppUserMaTokenFormDTO.java

@ -23,6 +23,13 @@ public class EpdcAppUserMaTokenFormDTO implements Serializable {
@NotBlank(message = "微信code不能为空")
private String wxCode;
/**
* 小程序类型
*/
private String type;
/*@NotBlank(message = "用户信息不能为空")
private String encryptedData;

7
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppUserRegisterFormDTO.java

@ -33,4 +33,11 @@ public class EpdcAppUserRegisterFormDTO implements Serializable {
* 邀请人ID
*/
private String inviteUserId;
/**
* 小程序类型
*/
private String type;
}

6
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcAppUserTokenFormDTO.java

@ -22,4 +22,10 @@ public class EpdcAppUserTokenFormDTO implements Serializable {
*/
@NotBlank(message = "微信code不能为空")
private String wxCode;
/**
* 小程序类型
*/
private String type;
}

36
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcClockListV2FormDTO.java

@ -0,0 +1,36 @@
package com.elink.esua.epdc.dto.form;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 活动打卡
* @Author zhangyong
* @Date 2020-04-29
*/
@Data
public class EpdcClockListV2FormDTO implements Serializable {
private static final long serialVersionUID = 202049992792275120L;
/**
* 页码
*/
@Min(value = 1, message = "页码必须大于0")
private Integer pageIndex;
/**
* 页容量
*/
@Min(value = 1, message = "页容量必须大于0")
private Integer pageSize;
/**
* 用户ID
*/
private String actId;
}

6
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/EpdcCompleteUserInfoFormDTO.java

@ -77,4 +77,10 @@ public class EpdcCompleteUserInfoFormDTO implements Serializable {
* 居住网格id
*/
private Long gridId;
/**
* 小程序类型
*/
private String type;
}

6
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/form/v2/EpdcCompleteUserInfoFormV2DTO.java

@ -3,7 +3,6 @@ package com.elink.esua.epdc.dto.form.v2;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
@ -99,4 +98,9 @@ public class EpdcCompleteUserInfoFormV2DTO implements Serializable {
* 自我介绍
*/
private String introduce;
/**
* 小程序类型
*/
private String type;
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcAppScanFlagDTO.java

@ -49,4 +49,9 @@ public class EpdcAppScanFlagDTO implements Serializable {
*/
private String maintainInfo;
}
/**
* 平台0-e锦水1-志愿者去哪
*/
private String platform;
}

18
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcStartupPageFormDTO.java

@ -0,0 +1,18 @@
package com.elink.esua.epdc.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @author Liuchuang
*/
@Data
public class EpdcStartupPageFormDTO implements Serializable {
private static final long serialVersionUID = 8243694943324254390L;
/**
* 平台0-e锦水1-志愿者去哪
*/
private String platform;
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/StartupPageResultDTO.java

@ -47,6 +47,9 @@ public class StartupPageResultDTO implements Serializable {
*/
private Integer duration;
/**
* 平台0-e锦水1-志愿者去哪
*/
private String platform;
}
}

12
esua-epdc/epdc-module/epdc-api/epdc-api-server/pom.xml

@ -188,6 +188,10 @@
<!--数据分析端小程序-->
<analysis.wx.ma.appId>wx3ea0a6fb71ddf659</analysis.wx.ma.appId>
<analysis.wx.ma.secret>2154e86d56df9fae4224c93a17e01bb3</analysis.wx.ma.secret>
<!--志愿者去哪儿小程序-->
<volunteer.wx.ma.appId>wxc4fe0ea629aaa309</volunteer.wx.ma.appId>
<volunteer.wx.ma.secret>34fa86621c3c1dcebd39db333e746d88</volunteer.wx.ma.secret>
<!--RocketMQ-->
<rocketmq.name.server>47.104.85.99:9876;114.215.125.123:9876</rocketmq.name.server>
<rocketmq.consumer.group>jinshui-organizationGroup</rocketmq.consumer.group>
@ -235,7 +239,9 @@
<!--数据分析端小程序-->
<analysis.wx.ma.appId>wx3ea0a6fb71ddf659</analysis.wx.ma.appId>
<analysis.wx.ma.secret>2154e86d56df9fae4224c93a17e01bb3</analysis.wx.ma.secret>
<!--志愿者去哪儿小程序-->
<volunteer.wx.ma.appId>wxc4fe0ea629aaa309</volunteer.wx.ma.appId>
<volunteer.wx.ma.secret>34fa86621c3c1dcebd39db333e746d88</volunteer.wx.ma.secret>
<!--RocketMQ-->
<rocketmq.name.server>47.104.85.99:9876;114.215.125.123:9876</rocketmq.name.server>
<rocketmq.consumer.group>jinshui-organizationGroup</rocketmq.consumer.group>
@ -268,7 +274,9 @@
<!--数据分析端小程序-->
<analysis.wx.ma.appId>wx3ea0a6fb71ddf659</analysis.wx.ma.appId>
<analysis.wx.ma.secret>2154e86d56df9fae4224c93a17e01bb3</analysis.wx.ma.secret>
<!--志愿者去哪儿小程序-->
<volunteer.wx.ma.appId>wxc4fe0ea629aaa309</volunteer.wx.ma.appId>
<volunteer.wx.ma.secret>34fa86621c3c1dcebd39db333e746d88</volunteer.wx.ma.secret>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>172.16.0.8</spring.redis.host>

19
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiActUserRelationController.java

@ -7,6 +7,7 @@ import com.elink.esua.epdc.activity.AppClockListDTO;
import com.elink.esua.epdc.activity.result.AppActInfoDTO;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.annotation.LoginUser;
import com.elink.esua.epdc.commons.tools.constant.Constant;
import com.elink.esua.epdc.commons.tools.enums.UserTagEnum;
import com.elink.esua.epdc.commons.tools.enums.YesOrNoEnum;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
@ -16,6 +17,7 @@ import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.epdc.result.EpdcUserInfoResultDTO;
import com.elink.esua.epdc.dto.form.EpdcAppActUserCancelsignupDTO;
import com.elink.esua.epdc.dto.form.EpdcAppActUserClockLogDTO;
import com.elink.esua.epdc.dto.form.EpdcClockListV2FormDTO;
import com.elink.esua.epdc.dto.result.EpdcAppClockListDTO;
import com.elink.esua.epdc.service.ActUserRelationService;
import com.elink.esua.epdc.service.AppUserService;
@ -151,6 +153,23 @@ public class ApiActUserRelationController {
}
/**
* 获取打卡列表 - v2
*
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author syp
* @date 2020/4/16 14:41
*/
@GetMapping(Constant.VERSION_CONTROL+"/clockList")
public Result<EpdcAppClockListDTO> getV2ClockList(EpdcClockListV2FormDTO epdcClockListV2FormDTO) {
Result<AppClockListDTO> result = actUserRelationService.getV2ClockList(epdcClockListV2FormDTO);
EpdcAppClockListDTO epdcAppClockListDTO = ConvertUtils.sourceToTarget(result.getData(), EpdcAppClockListDTO.class);
Result<EpdcAppClockListDTO> result1 = new Result<EpdcAppClockListDTO>();
result1.setData(epdcAppClockListDTO);
return result1;
}
/**
* 获取活动打卡地点详情
*

9
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiScanSwitchController.java

@ -17,6 +17,7 @@
package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.AssertUtils;
@ -28,6 +29,7 @@ import com.elink.esua.epdc.dto.ScanSwitchDTO;
import com.elink.esua.epdc.dto.form.EpdcAppScanVersionNumDTO;
import com.elink.esua.epdc.dto.result.EpdcAppScanFlagDTO;
import com.elink.esua.epdc.service.ScanSwitchService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -43,7 +45,7 @@ import java.util.Map;
@RestController
@RequestMapping("ma")
public class ApiScanSwitchController {
@Autowired
private ScanSwitchService scanSwitchService;
@ -92,9 +94,12 @@ public class ApiScanSwitchController {
*/
@GetMapping("scanSwitch")
public Result<EpdcAppScanFlagDTO> get(EpdcAppScanVersionNumDTO scanVersionNumDTO){
if (StringUtils.isEmpty(scanVersionNumDTO.getPlatform())) {
scanVersionNumDTO.setPlatform(NumConstant.ZERO_STR);
}
//效验数据
ValidatorUtils.validateEntity(scanVersionNumDTO);
EpdcAppScanFlagDTO data = scanSwitchService.getOneScanInfo(scanVersionNumDTO);
return new Result<EpdcAppScanFlagDTO>().ok(data);
}
}
}

12
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/StartupController.java

@ -17,9 +17,12 @@
package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.result.EpdcStartupPageFormDTO;
import com.elink.esua.epdc.dto.result.StartupPageResultDTO;
import com.elink.esua.epdc.service.StartupPageService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -46,9 +49,12 @@ public class StartupController {
* @Param []
**/
@GetMapping("getStartupPage")
public Result<StartupPageResultDTO> getStartupPage() {
StartupPageResultDTO data = startupPageService.getStartupPage();
public Result<StartupPageResultDTO> getStartupPage(EpdcStartupPageFormDTO formDto) {
if (StringUtils.isEmpty(formDto.getPlatform())) {
formDto.setPlatform(NumConstant.ZERO_STR);
}
StartupPageResultDTO data = startupPageService.getStartupPage(formDto);
return new Result<StartupPageResultDTO>().ok(data);
}
}
}

10
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/v2/ApiStartupV2Controller.java

@ -2,9 +2,12 @@ package com.elink.esua.epdc.controller.v2;
import com.elink.esua.epdc.commons.api.version.ApiVersion;
import com.elink.esua.epdc.commons.tools.constant.Constant;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.result.EpdcStartupPageFormDTO;
import com.elink.esua.epdc.dto.result.StartupPageResultDTO;
import com.elink.esua.epdc.service.StartupPageService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -33,8 +36,11 @@ public class ApiStartupV2Controller {
* @Param []
**/
@GetMapping("getStartupPage")
public Result<List<StartupPageResultDTO>> getStartupPage() {
List<StartupPageResultDTO> data = startupPageService.getStartupPageV2();
public Result<List<StartupPageResultDTO>> getStartupPage(EpdcStartupPageFormDTO formDto) {
if (StringUtils.isEmpty(formDto.getPlatform())) {
formDto.setPlatform(NumConstant.ZERO_STR);
}
List<StartupPageResultDTO> data = startupPageService.getStartupPageV2(formDto);
return new Result<List<StartupPageResultDTO>>().ok(data);
}
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/dao/StartupPageDao.java

@ -19,6 +19,7 @@ package com.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.StartupPageDTO;
import com.elink.esua.epdc.dto.result.EpdcStartupPageFormDTO;
import com.elink.esua.epdc.dto.result.StartupPageResultDTO;
import com.elink.esua.epdc.entity.StartupPageEntity;
import org.apache.ibatis.annotations.Mapper;
@ -49,7 +50,7 @@ public interface StartupPageDao extends BaseDao<StartupPageEntity> {
* @Param []
* @return com.elink.esua.dto.StartupPageDTO
**/
StartupPageResultDTO getStartupPage();
StartupPageResultDTO getStartupPage(EpdcStartupPageFormDTO formDto);
/**
* @Description 获取欢迎页信息 v2
* @Author songyunpeng
@ -57,5 +58,5 @@ public interface StartupPageDao extends BaseDao<StartupPageEntity> {
* @Param []
* @return com.elink.esua.dto.StartupPageDTO
**/
List<StartupPageResultDTO> getStartupPageV2();
}
List<StartupPageResultDTO> getStartupPageV2(EpdcStartupPageFormDTO formDto);
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/entity/ScanSwitchEntity.java

@ -56,4 +56,9 @@ public class ScanSwitchEntity extends BaseEpdcEntity {
*/
private String maintainInfo;
}
/**
* 平台0-e锦水1-志愿者去哪
*/
private String platform;
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/entity/StartupPageEntity.java

@ -59,4 +59,9 @@ public class StartupPageEntity extends BaseEpdcEntity {
*/
private String remark;
}
/**
* 平台0-e锦水1-志愿者去哪
*/
private String platform;
}

11
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AppActUserRelationFeignClient.java

@ -7,6 +7,7 @@ import com.elink.esua.epdc.activity.AppClockListDTO;
import com.elink.esua.epdc.activity.result.AppActInfoDTO;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.form.EpdcClockListV2FormDTO;
import com.elink.esua.epdc.feign.fallback.AppActUserRelationFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
@ -62,5 +63,13 @@ public interface AppActUserRelationFeignClient {
*/
@GetMapping("heart/appactinfo/clockAddressDetail/{actId}")
Result<AppActInfoDTO> clockAddressDetail(@PathVariable("actId") String actId);
/**
* @Description 通过活动ID查询打卡列表 - v2
* @Author songyunpeng
* @Date 2021/4/16
* @Param [epdcClockListV2FormDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.activity.AppClockListDTO>
**/
@GetMapping(value = "heart/appactuserrelation/selectListV2ActUserRelation",consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
Result<AppClockListDTO> selectListV2ActUserRelation(EpdcClockListV2FormDTO epdcClockListV2FormDTO);
}

20
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java

@ -1,5 +1,6 @@
package com.elink.esua.epdc.feign;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
@ -603,5 +604,22 @@ public interface UserFeignClient {
*/
@GetMapping("app-user/epdc-app/volunteerinfo/tags")
Result<List<VolunteerTagsResultDTO>> getVolunteerTags();
/**
* @Description 检查用户重复信息
* @Author songyunpeng
* @Date 2021/4/9
* @Param [wxMaUserInfo]
* @return java.lang.String
**/
@PostMapping("app-user/user/checkRepeatUser")
Result<String> checkRepeatUser(CheckRepeatUserFormDTO checkRepeatUserFormDTO);
/**
* @Description
* @Author songyunpeng
* @Date 2021/4/15
* @Param [userId, mobile]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.common.token.dto.TokenDto>
**/
@PostMapping("app-user/user/combineVolunteerUser")
Result<UserDTO> combineVolunteerUser(CombineVolunteerUserFormDTO combineVolunteerUserFormDTO);
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AppActUserRelationFeignClientFallback.java

@ -3,10 +3,12 @@ package com.elink.esua.epdc.feign.fallback;
import com.elink.esua.epdc.activity.ActUserRelationDTO;
import com.elink.esua.epdc.activity.AppActUserCancelsignupDTO;
import com.elink.esua.epdc.activity.AppActUserClockLogDTO;
import com.elink.esua.epdc.activity.AppClockListDTO;
import com.elink.esua.epdc.activity.result.AppActInfoDTO;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.form.EpdcClockListV2FormDTO;
import com.elink.esua.epdc.feign.AppActUserRelationFeignClient;
import org.springframework.stereotype.Component;
@ -41,4 +43,9 @@ public class AppActUserRelationFeignClientFallback implements AppActUserRelation
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "clockAddressDetail", actId);
}
@Override
public Result<AppClockListDTO> selectListV2ActUserRelation(EpdcClockListV2FormDTO epdcClockListV2FormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "selectListV2ActUserRelation", epdcClockListV2FormDTO);
}
}

12
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java

@ -1,5 +1,6 @@
package com.elink.esua.epdc.feign.fallback;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
@ -10,7 +11,6 @@ import com.elink.esua.epdc.dto.epdc.form.v2.EpdcCompleteVolunteerInfoV2FormDTO;
import com.elink.esua.epdc.dto.epdc.result.*;
import com.elink.esua.epdc.feign.UserFeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import java.util.List;
@ -293,4 +293,14 @@ public class UserFeignClientFallback implements UserFeignClient {
public Result<List<VolunteerTagsResultDTO>> getVolunteerTags() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getVolunteerTags", null);
}
@Override
public Result<String> checkRepeatUser(CheckRepeatUserFormDTO checkRepeatUserFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "checkRepeatUser", checkRepeatUserFormDTO);
}
@Override
public Result<UserDTO> combineVolunteerUser(CombineVolunteerUserFormDTO combineVolunteerUserFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "combineVolunteerUser", combineVolunteerUserFormDTO);
}
}

10
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/ActUserRelationService.java

@ -6,6 +6,7 @@ import com.elink.esua.epdc.activity.AppActUserClockLogDTO;
import com.elink.esua.epdc.activity.AppClockListDTO;
import com.elink.esua.epdc.activity.result.AppActInfoDTO;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.form.EpdcClockListV2FormDTO;
/**
* @author wanggongfeng
@ -52,5 +53,12 @@ public interface ActUserRelationService {
* @return
*/
Result<AppActInfoDTO> clockAddressDetail(String actId);
/**
* @Description 获取打卡列表 - v2
* @Author songyunpeng
* @Date 2021/4/16
* @Param [epdcClockListV2FormDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.activity.AppClockListDTO>
**/
Result<AppClockListDTO> getV2ClockList(EpdcClockListV2FormDTO epdcClockListV2FormDTO);
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/StartupPageService.java

@ -20,6 +20,7 @@ package com.elink.esua.epdc.service;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.dto.StartupPageDTO;
import com.elink.esua.epdc.dto.result.EpdcStartupPageFormDTO;
import com.elink.esua.epdc.dto.result.StartupPageResultDTO;
import com.elink.esua.epdc.entity.StartupPageEntity;
@ -109,7 +110,7 @@ public interface StartupPageService extends BaseService<StartupPageEntity> {
* @Date 2020/3/24
* @Param []
**/
StartupPageResultDTO getStartupPage();
StartupPageResultDTO getStartupPage(EpdcStartupPageFormDTO formDto);
/**
* @return com.elink.esua.dto.StartupPageResultDTO
* @Description 获取欢迎页信息 v2
@ -117,5 +118,5 @@ public interface StartupPageService extends BaseService<StartupPageEntity> {
* @Date 2020/3/24
* @Param []
**/
List<StartupPageResultDTO> getStartupPageV2();
}
List<StartupPageResultDTO> getStartupPageV2(EpdcStartupPageFormDTO formDto);
}

6
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/ActUserRelationServiceImpl.java

@ -6,6 +6,7 @@ import com.elink.esua.epdc.activity.AppActUserClockLogDTO;
import com.elink.esua.epdc.activity.AppClockListDTO;
import com.elink.esua.epdc.activity.result.AppActInfoDTO;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.form.EpdcClockListV2FormDTO;
import com.elink.esua.epdc.feign.AppActUserRelationFeignClient;
import com.elink.esua.epdc.service.ActUserRelationService;
import lombok.extern.slf4j.Slf4j;
@ -54,4 +55,9 @@ public class ActUserRelationServiceImpl implements ActUserRelationService {
return dataResult;
}
@Override
public Result<AppClockListDTO> getV2ClockList(EpdcClockListV2FormDTO epdcClockListV2FormDTO) {
Result<AppClockListDTO> result = actInfoFeignClient.selectListV2ActUserRelation(epdcClockListV2FormDTO);
return result; }
}

103
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java

@ -124,12 +124,12 @@ public class AppUserServiceImpl implements AppUserService {
@Override
public Result<EpdcAppAuthorizationDTO> getMpToken(EpdcAppUserTokenFormDTO formDto) {
return this.getTokenByOpenId(this.getWxMaUser(formDto.getWxCode()));
return this.getTokenByOpenId(this.getWxMaUser(formDto.getWxCode(), formDto.getType()));
}
@Override
public Result<EpdcAppAuthorizationDTO> getMaToken(EpdcAppUserMaTokenFormDTO formDto) {
return this.getTokenByOpenId(this.getWxMaUser(formDto.getWxCode()));
return this.getTokenByOpenId(this.getWxMaUser(formDto.getWxCode(),formDto.getType()));
}
@Override
@ -144,7 +144,7 @@ public class AppUserServiceImpl implements AppUserService {
EpdcUserSaveWxFormIdFormDTO saveFormId = new EpdcUserSaveWxFormIdFormDTO();
saveFormId.setWxFormId(formDto.getWxFormId());
saveFormId.setWxOpenId(this.getWxMaUser(formDto.getWxCode()).getOpenid());
saveFormId.setWxOpenId(this.getWxMaUser(formDto.getWxCode(), formDto.getType()).getOpenid());
return this.userFeignClient.saveWxFormId(saveFormId);
}
@ -224,6 +224,8 @@ public class AppUserServiceImpl implements AppUserService {
formDTO.setOpenId(wxMaJscode2SessionResult.getOpenid());
formDTO.setUnionId(wxMaJscode2SessionResult.getUnionid());
// Result<UserDTO> userInfoResult = userFeignClient.queryUserDto(formDTO);
logger.info("getToken接口调用,unionId:" + wxMaJscode2SessionResult.getUnionid());
logger.info("getToken接口调用,openId:" + wxMaJscode2SessionResult.getOpenid());
Result<CachingUserInfoDTO> userInfoResult = userFeignClient.needCachingUserInfo(formDTO);
if (!userInfoResult.success()) {
return new Result().error(userInfoResult.getMsg());
@ -267,7 +269,7 @@ public class AppUserServiceImpl implements AppUserService {
this.verifyUserRegisterData(formDto);
WxMaJscode2SessionResult wxMaUser = this.getWxMaUser(formDto.getWxCode());
WxMaJscode2SessionResult wxMaUser = this.getWxMaUser(formDto.getWxCode(), formDto.getType());
UserDTO userDto = this.packageUserDto(formDto, null, wxMaUser);
// IP地址
HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
@ -300,7 +302,7 @@ public class AppUserServiceImpl implements AppUserService {
GridLeaderRegisterDTO leaderRegisterDto = adminResult.getData();
// 组装用户注册信息
EpdcGridLeaderRegisterDTO gridLeaderRegister = this.packageGridLeaderWhileRegister(leaderRegisterDto.getSysUser(), formDto.getWxCode());
EpdcGridLeaderRegisterDTO gridLeaderRegister = this.packageGridLeaderWhileRegister(leaderRegisterDto.getSysUser(), formDto.getWxCode(),formDto.getType());
List<UserGridRelationDTO> userGridList = ConvertUtils.sourceToTarget(leaderRegisterDto.getLeaderGridList(), UserGridRelationDTO.class);
for (UserGridRelationDTO item : userGridList) {
item.setAllDeptNames(item.getDistrict() + "-" + item.getStreet() + "-" + item.getCommunity() + "-" + item.getGrid());
@ -336,13 +338,14 @@ public class AppUserServiceImpl implements AppUserService {
*
* @param sysUser 后台管理端管理员账号
* @param wxCode
* @param formDto
* @return com.elink.esua.epdc.dto.UserDTO
* @author work@yujt.net.cn
* @date 2019/10/23 10:01
*/
private EpdcGridLeaderRegisterDTO packageGridLeaderWhileRegister(SysUserDTO sysUser, String wxCode) {
private EpdcGridLeaderRegisterDTO packageGridLeaderWhileRegister(SysUserDTO sysUser, String wxCode, String formDto) {
WxMaJscode2SessionResult wxMaUser = this.getWxMaUser(wxCode);
WxMaJscode2SessionResult wxMaUser = this.getWxMaUser(wxCode, formDto);
Date now = new Date();
String mobile = sysUser.getMobile();
@ -569,14 +572,19 @@ public class AppUserServiceImpl implements AppUserService {
* 解析微信code获取小程序用户信息
*
* @param wxCode
* @param type
* @return cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult
* @author work@yujt.net.cn
* @date 2019/9/19 19:32
*/
private WxMaJscode2SessionResult getWxMaUser(String wxCode) {
private WxMaJscode2SessionResult getWxMaUser(String wxCode, String type) {
WxMaJscode2SessionResult wxMaJscode2SessionResult = null;
try {
wxMaJscode2SessionResult = wxMaServiceUtils.normalWxMaService().jsCode2SessionInfo(wxCode);
if(StringUtils.isNotBlank(type) && "volunteer".equals(type)){
wxMaJscode2SessionResult = wxMaServiceUtils.volunteerWxMaService().jsCode2SessionInfo(wxCode);
} else {
wxMaJscode2SessionResult = wxMaServiceUtils.normalWxMaService().jsCode2SessionInfo(wxCode);
}
} catch (WxErrorException e) {
log.error("->[getMaOpenId]::error[{}]", "解析微信code失败");
}
@ -680,9 +688,11 @@ public class AppUserServiceImpl implements AppUserService {
@Override
public Result<EpdcAppAuthorizationDTO> getMaV2Token(EpdcAppUserRegisterFormDTO formDto) {
WxMaJscode2SessionResult wxMaResult = this.getWxMaUser(formDto.getWxCode());
WxMaJscode2SessionResult wxMaResult = this.getWxMaUser(formDto.getWxCode(), formDto.getType());
String openId = wxMaResult.getOpenid();
String unionId = wxMaResult.getUnionid();
logger.info("getTokenV2接口调用,unionId:" + openId);
logger.info("getTokenV2接口调用,openId:" + unionId);
// if (null == formDto.getGridId()) {
// // 获取用户绑定网格信息
// Result<EpdcUserRegisterInfoResultDTO> dtoResult = userFeignClient.getUserLastSwitchGrid(openId);
@ -804,12 +814,19 @@ public class AppUserServiceImpl implements AppUserService {
userDto.setId(tokenDto.getUserId());
if (StringUtils.isNotBlank(infoDto.getWxCode())) {
String sessionKey = this.getUserSessionKey(infoDto.getWxCode());
String sessionKey = this.getUserSessionKey(infoDto.getWxCode(),infoDto.getType());
WxMaUserInfo wxMaUserInfo = wxMaServiceUtils.normalWxMaService().getUserService().getUserInfo(sessionKey, infoDto.getEncryptedData(), infoDto.getIv());
if (StringUtils.isBlank(wxMaUserInfo.getUnionId())) {
return new Result().error("解析微信开放平台ID失败");
}
logger.info("完善用户信息(带验证码)接口调用,unionId:" + wxMaUserInfo.getUnionId());
logger.info("完善用户信息(带验证码)接口调用,openId:" + wxMaUserInfo.getOpenId());
userDto.setWxUnionId(wxMaUserInfo.getUnionId());
//检验志愿者去哪儿 和 居民端 用户重复问题
/* String userId = this.checkRepeatUser(wxMaUserInfo);
if(StringUtils.isNotBlank(userId)){
userDto.setId(userId);
}*/
}
// 党员提交,验证身份证号
@ -893,6 +910,28 @@ public class AppUserServiceImpl implements AppUserService {
//获取用户认证网格ID - 积分使用 - end
return new Result().ok(authorizationDto);
}
/**
* @Description 检验用户重复问题并返回合并后的userId
* @Author songyunpeng
* @Date 2021/4/9
* @Param [wxMaUserInfo]
* @return void
**/
private String checkRepeatUser(WxMaUserInfo wxMaUserInfo) {
String unionId = wxMaUserInfo.getUnionId();
String openId = wxMaUserInfo.getOpenId();
if(StringUtils.isBlank(unionId) || StringUtils.isBlank(openId)){
return "";
}
CheckRepeatUserFormDTO checkRepeatUserFormDTO = new CheckRepeatUserFormDTO();
checkRepeatUserFormDTO.setOpenId(openId);
checkRepeatUserFormDTO.setUnionId(unionId);
Result<String> userIdResult = userFeignClient.checkRepeatUser(checkRepeatUserFormDTO);
if(userIdResult.success()){
userIdResult.getData();
}
return "";
}
@Override
public Result<EpdcCompleteUserInfoDTO> prepareCompleteUserInfo(TokenDto tokenDto) {
@ -1008,7 +1047,7 @@ public class AppUserServiceImpl implements AppUserService {
if (null == userDetail || StringUtils.isEmpty(userDetail.getUserId())) {
return new Result().error("获取用户信息失败");
}
String sessionKey = this.getUserSessionKey(formDto.getWxCode());
String sessionKey = this.getUserSessionKey(formDto.getWxCode(), formDto.getType());
WxMaUserInfo wxMaUserInfo = wxMaServiceUtils.normalWxMaService().getUserService().getUserInfo(sessionKey, formDto.getEncryptedData(), formDto.getIv());
// 是否需要unionId,0 否 1 是
Object requireUnionid = redisUtils.get("epdc:unionid:require");
@ -1062,9 +1101,14 @@ public class AppUserServiceImpl implements AppUserService {
* @author liuchuang
* @since 2019/10/25 16:31
*/
private String getUserSessionKey(String code) {
private String getUserSessionKey(String code, String type) {
try {
WxMaJscode2SessionResult wxMaJscode2SessionResult = wxMaServiceUtils.normalWxMaService().jsCode2SessionInfo(code);
WxMaJscode2SessionResult wxMaJscode2SessionResult;
if(StringUtils.isNotBlank(type) && "volunteer".equals(type)){
wxMaJscode2SessionResult = wxMaServiceUtils.volunteerWxMaService().jsCode2SessionInfo(code);
} else {
wxMaJscode2SessionResult = wxMaServiceUtils.normalWxMaService().jsCode2SessionInfo(code);
}
if (wxMaJscode2SessionResult != null) {
return wxMaJscode2SessionResult.getSessionKey();
}
@ -1348,7 +1392,9 @@ public class AppUserServiceImpl implements AppUserService {
String encryptedData = infoDto.getEncryptedData();
if (StringUtils.isNotBlank(wxCode)) {
// 解析微信用户openid
WxMaJscode2SessionResult maJscode2SessionResult = getWxMaUser(wxCode);
WxMaJscode2SessionResult maJscode2SessionResult = getWxMaUser(wxCode, infoDto.getType());
logger.info("完善用户信息(不带验证码)接口调用,unionId:" + maJscode2SessionResult.getUnionid());
logger.info("完善用户信息(不带验证码)接口调用,openId:" + maJscode2SessionResult.getOpenid());
userDto.setWxOpenId(maJscode2SessionResult.getOpenid());
// 解析微信用户加密数据
if (StringUtils.isNotBlank(iv) && StringUtils.isNotBlank(encryptedData)) {
@ -1368,6 +1414,11 @@ public class AppUserServiceImpl implements AppUserService {
}
userDto.setWxUnionId(wxMaUserInfo.getUnionId());
userDto.setFaceImg(wxMaUserInfo.getAvatarUrl());
//检验志愿者去哪儿 和 居民端 用户重复问题
/*String unionUserId = this.checkRepeatUser(wxMaUserInfo);
if(StringUtils.isNotBlank(unionUserId)){
userDto.setId(unionUserId);
}*/
}
}
EpdcCompleteAppUserDTO completeAppUserDto = ConvertUtils.sourceToTarget(userDto, EpdcCompleteAppUserDTO.class);
@ -1409,7 +1460,12 @@ public class AppUserServiceImpl implements AppUserService {
@Override
public Result<String> getUserWxPhone(EpdcAppUserMaInfoFormDTO formDto) {
try {
WxMaService wxMaService = wxMaServiceUtils.normalWxMaService();
WxMaService wxMaService;
if(StringUtils.isNotBlank(formDto.getType()) && "volunteer".equals(formDto.getType())){
wxMaService = wxMaServiceUtils.volunteerWxMaService();
} else {
wxMaService = wxMaServiceUtils.normalWxMaService();
}
WxMaJscode2SessionResult wxMaJscode2SessionResult = wxMaService.jsCode2SessionInfo(formDto.getWxCode());
WxMaPhoneNumberInfo phoneNoInfo = wxMaService.getUserService().getPhoneNoInfo(wxMaJscode2SessionResult.getSessionKey(), formDto.getEncryptedData(), formDto.getIv());
if (null != phoneNoInfo) {
@ -1497,6 +1553,21 @@ public class AppUserServiceImpl implements AppUserService {
if (StringUtils.isNotBlank(formDto.getSmsCode())) {
this.checkSmsCode(formDto.getMobile(), formDto.getSmsCode());
}
// 合并用户开始 ----- start
CombineVolunteerUserFormDTO combineVolunteerUserFormDTO = new CombineVolunteerUserFormDTO();
combineVolunteerUserFormDTO.setMobile(formDto.getMobile());
combineVolunteerUserFormDTO.setUserId(tokenDto.getUserId());
Result<UserDTO> combineUserDto = userFeignClient.combineVolunteerUser(combineVolunteerUserFormDTO);
if (combineUserDto.success() && combineUserDto.getData() != null) {
UserDTO userDTO = combineUserDto.getData();
tokenDto = ConvertUtils.sourceToTarget(userDTO,TokenDto.class);
tokenDto.setUserId(userDTO.getId());
tokenDto.setGridId(userDTO.getDeptId());
}
logger.info("返回后的UserID userID:" + tokenDto.getUserId());
// 合并用户开始 ----- end
// 此次完善信息后是否变为党员
boolean newPartyFlag = Boolean.FALSE;

11
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/StartupPageServiceImpl.java

@ -25,6 +25,7 @@ import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.dao.StartupPageDao;
import com.elink.esua.epdc.dto.StartupPageDTO;
import com.elink.esua.epdc.dto.result.EpdcStartupPageFormDTO;
import com.elink.esua.epdc.dto.result.StartupPageResultDTO;
import com.elink.esua.epdc.entity.StartupPageEntity;
import com.elink.esua.epdc.service.StartupPageService;
@ -111,13 +112,13 @@ public class StartupPageServiceImpl extends BaseServiceImpl<StartupPageDao, Star
}
@Override
public StartupPageResultDTO getStartupPage() {
return baseDao.getStartupPage();
public StartupPageResultDTO getStartupPage(EpdcStartupPageFormDTO formDto) {
return baseDao.getStartupPage(formDto);
}
@Override
public List<StartupPageResultDTO> getStartupPageV2() {
return baseDao.getStartupPageV2();
public List<StartupPageResultDTO> getStartupPageV2(EpdcStartupPageFormDTO formDto) {
return baseDao.getStartupPageV2(formDto);
}
}
}

7
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/resources/application.yml

@ -119,6 +119,11 @@ wx:
token: #微信小程序消息服务器配置的token
aesKey: #微信小程序消息服务器配置的EncodingAESKey
msgDataFormat: JSON
- appid: @volunteer.wx.ma.appId@
secret: @volunteer.wx.ma.secret@
token: #微信小程序消息服务器配置的token
aesKey: #微信小程序消息服务器配置的EncodingAESKey
msgDataFormat: JSON
appId:
# 普通居民端的appId
normal: @wx.ma.appId@
@ -126,6 +131,8 @@ wx:
work: @work.wx.ma.appId@
# 数据分析端的appId
analysis: @analysis.wx.ma.appId@
# 志愿者去哪儿的appId
volunteer: @volunteer.wx.ma.appId@

4
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/resources/mapper/ScanSwitchDao.xml

@ -17,8 +17,8 @@
</resultMap>
<select id="selectOneOfScanInfo" resultType="com.elink.esua.epdc.dto.result.EpdcAppScanFlagDTO">
SELECT scan_flag, maintain_flag, maintain_info FROM `epdc_scan_switch` WHERE del_flag = '0' AND version_num = #{versionNum} ORDER BY updated_time DESC LIMIT 1
SELECT scan_flag, maintain_flag, maintain_info, platform FROM `epdc_scan_switch` WHERE del_flag = '0' AND version_num = #{versionNum} AND platform = #{platform} ORDER BY updated_time DESC LIMIT 1
</select>
</mapper>
</mapper>

12
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/resources/mapper/StartupPageDao.xml

@ -18,23 +18,23 @@
</resultMap>
<select id="selectListOfStartupPageDTO" resultType="com.elink.esua.epdc.dto.StartupPageDTO">
select ID,IMG_URL,DURATION,ENABLE_FLAG,REMARK,SORT,CREATED_TIME,UPDATED_TIME
select ID,IMG_URL,DURATION,ENABLE_FLAG,REMARK,SORT,CREATED_TIME,UPDATED_TIME,platform
from epdc_startup_page
where DEL_FLAG = '0'
order by SORT asc ,CREATED_TIME desc
</select>
<select id="getStartupPage" resultType="com.elink.esua.epdc.dto.result.StartupPageResultDTO">
select ID,IMG_URL,DURATION
select ID,IMG_URL,DURATION,platform
from epdc_startup_page
where ENABLE_FLAG = '1' and DEL_FLAG = '0'
where ENABLE_FLAG = '1' and DEL_FLAG = '0' AND platform = #{platform}
order by UPDATED_TIME desc
limit 1
</select>
<select id="getStartupPageV2" resultType="com.elink.esua.epdc.dto.result.StartupPageResultDTO">
select ID,IMG_URL,DURATION
select ID,IMG_URL,DURATION,platform
from epdc_startup_page
where ENABLE_FLAG = '1' and DEL_FLAG = '0'
where ENABLE_FLAG = '1' and DEL_FLAG = '0' AND platform = #{platform}
order by SORT asc, UPDATED_TIME desc
</select>
</mapper>
</mapper>

11
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/AppActUserRelationController.java

@ -22,6 +22,7 @@ import com.elink.esua.epdc.activity.AppActUserCancelsignupDTO;
import com.elink.esua.epdc.activity.AppClockListDTO;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.form.EpdcClockListV2FormDTO;
import com.elink.esua.epdc.modules.activity.service.ActUserRelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -70,6 +71,16 @@ public class AppActUserRelationController {
return actUserRelationService.selectListActUserRelation(actId);
}
/**
* 通过活动ID查询打卡列表 - v2
* @param formDTO
* @return
*/
@GetMapping("selectListV2ActUserRelation")
public Result<AppClockListDTO> selectListV2ActUserRelation(@RequestBody EpdcClockListV2FormDTO formDTO){
return actUserRelationService.selectListV2ActUserRelation(formDTO);
}
/**
* 活动时间到自动审核通过未审核的报名人员
* @param actId

9
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActUserRelationDao.java

@ -24,6 +24,7 @@ import com.elink.esua.epdc.activity.result.ActInfoClockResultDTO;
import com.elink.esua.epdc.activity.result.ActUserClockResultDTO;
import com.elink.esua.epdc.activity.result.ActUserRelationResultDTO;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.form.EpdcClockListV2FormDTO;
import com.elink.esua.epdc.modules.activity.entity.ActUserRelationEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -116,4 +117,12 @@ public interface ActUserRelationDao extends BaseDao<ActUserRelationEntity> {
* @Date 2020/2/7 20:53
**/
List<ActUserRelationDTO> selectAllSignUpUsers(String actId);
/**
* @Description
* @Author songyunpeng
* @Date 2021/4/16
* @Param [formDTO]
* @return java.util.List<com.elink.esua.epdc.activity.ActClockListDTO>
**/
List<ActClockListDTO> selectListV2ActUserRelation(EpdcClockListV2FormDTO formDTO);
}

9
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActUserRelationService.java

@ -27,6 +27,7 @@ import com.elink.esua.epdc.activity.result.ActUserRelationResultDTO;
import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.form.EpdcClockListV2FormDTO;
import com.elink.esua.epdc.modules.activity.entity.ActUserRelationEntity;
import java.util.List;
@ -174,4 +175,12 @@ public interface ActUserRelationService extends BaseService<ActUserRelationEntit
* @Date 14:26 2020-10-29
**/
List<ActUserRelationResultDTO> exportActUserRelationListPC(Map<String, Object> params);
/**
* @Description 通过活动ID查询打卡列表 - v2
* @Author songyunpeng
* @Date 2021/4/16
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.activity.AppClockListDTO>
**/
Result<AppClockListDTO> selectListV2ActUserRelation(EpdcClockListV2FormDTO formDTO);
}

43
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserRelationServiceImpl.java

@ -45,6 +45,7 @@ import com.elink.esua.epdc.dto.UserDTO;
import com.elink.esua.epdc.dto.VolunteerInfoDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO;
import com.elink.esua.epdc.dto.form.EpdcClockListV2FormDTO;
import com.elink.esua.epdc.dto.result.BehaviorResultDto;
import com.elink.esua.epdc.modules.activity.dao.ActInfoDao;
import com.elink.esua.epdc.modules.activity.dao.ActUserLogDao;
@ -522,6 +523,48 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD
return baseDao.getActUserRelationPageFromPC(params);
}
@Override
public Result<AppClockListDTO> selectListV2ActUserRelation(EpdcClockListV2FormDTO formDTO) {
int pageIndex = (formDTO.getPageIndex() - NumConstant.ONE) * formDTO.getPageSize();
formDTO.setPageIndex(pageIndex);
List<ActClockListDTO> list = baseDao.selectListV2ActUserRelation(formDTO);
List<ActClockListDTO> allList = baseDao.selectListActUserRelation(formDTO.getActId());
if (null == list || list.size() == 0) {
return new Result<AppClockListDTO>();
}
List<Object> resultList = new ArrayList<Object>();
String[] idArr = new String[list.size()];
for (int k = 0; k < list.size(); k++) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("nickname", list.get(k).getNickname());
map.put("faceImg", list.get(k).getFaceImg());
map.put("partyFlag", list.get(k).getPartyFlag());
map.put("clockDesc", list.get(k).getClockDesc());
map.put("createdTime", list.get(k).getClockTime());
map.put("clockId", list.get(k).getId() == null ? "" : list.get(k).getId());
//查询打卡对应图片
idArr[k] = list.get(k).getId();
resultList.add(map);
}
List<ActClockPicDTO> listLogImg = baseDao.selectListClockImg(idArr);
for (Object objMap : resultList) {
Map<String, Object> mm = (Map<String, Object>) objMap;
List<String> imgList = new ArrayList<String>();
for (int i = listLogImg.size() - 1; i >= 0; i--) {
if (mm.get("clockId").equals(listLogImg.get(i).getClockId())) {
imgList.add(listLogImg.get(i).getClockPic());
listLogImg.remove(i);
}
}
mm.put("images", imgList);
mm.remove("clockId");
}
AppClockListDTO appClockListDTO = new AppClockListDTO();
appClockListDTO.setClockNum(allList.size());
appClockListDTO.setClocks(resultList);
return new Result<AppClockListDTO>().ok(appClockListDTO); }
//自动审核 定时任务 消息通知
private void sendNotice(ActUserRelationDTO actUserRelationDTO, String actUserDefaultState, ActInfoDTO actInfoDTO) {
EpdcInformationFormDTO informationFormDTO = new EpdcInformationFormDTO();

15
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActUserRelationDao.xml

@ -272,4 +272,19 @@
AND eaur.`STATUS` IN ( '0', '1' )
AND eaur.ACT_ID = #{actId}
</select>
<select id="selectListV2ActUserRelation" resultType="com.elink.esua.epdc.activity.ActClockListDTO">
select
aur.FACE_IMG faceImg,
aur.NICKNAME nickname,
aur.PARTY_FLAG partyFlag,
auc.CLOCK_TIME clockTime,
auc.CLOCK_DESC clockDesc,
auc.ID id
from epdc_act_user_relation aur
left join epdc_act_user_clock_log auc on aur.ID = auc.ACT_USER_ID
where aur.DEL_FLAG = '0' and auc.DEL_FLAG = '0' and auc.SHIELD_FLAG = '0'
and aur.ACT_ID = #{actId}
order by auc.CLOCK_TIME desc
LIMIT #{pageIndex}, #{pageSize}
</select>
</mapper>

15
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/controller/PointsLogsController.java

@ -26,6 +26,7 @@ import com.elink.esua.epdc.commons.tools.validator.group.AddGroup;
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup;
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup;
import com.elink.esua.epdc.dto.EpdcAdjustUserPointsDTO;
import com.elink.esua.epdc.dto.PointsLogsBindUnIdDTO;
import com.elink.esua.epdc.dto.PointsLogsDTO;
import com.elink.esua.epdc.dto.UserPointResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO;
@ -166,4 +167,18 @@ public class PointsLogsController {
}
/**
* 更新过时的积分记录
*
* @param formDto
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author zhy
* @date 2020/8/12 16:16
*/
@PostMapping("maBindUnIdLogs")
public Result maBindUnIdLogs(@RequestBody PointsLogsBindUnIdDTO formDto) {
ValidatorUtils.validateEntity(formDto);
return pointsLogsService.maBindUnIdLogs(formDto);
}
}

9
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/dao/PointsLogsDao.java

@ -24,6 +24,7 @@ import com.elink.esua.epdc.dto.form.*;
import com.elink.esua.epdc.dto.result.*;
import com.elink.esua.epdc.entity.PointsLogsEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@ -189,4 +190,12 @@ public interface PointsLogsDao extends BaseDao<PointsLogsEntity> {
* @since 2021/1/20 9:49
*/
Integer selectCountOfVerificationLogs(EpdcWorkVerificationLogsFormDTO formDto);
/**
* @Description 更新过时的积分记录
* @Author songyunpeng
* @Date 2021/4/8
* @Param [userId, id, faceImg]
* @return void
**/
void maBindUnIdLogs(@Param("oldUserId") String oldUserId, @Param("newUserId") String newUserId, @Param("faceImg") String faceImg);
}

10
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/PointsLogsService.java

@ -21,10 +21,10 @@ import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.EpdcAdjustUserPointsDTO;
import com.elink.esua.epdc.dto.PointsLogsBindUnIdDTO;
import com.elink.esua.epdc.dto.PointsLogsDTO;
import com.elink.esua.epdc.dto.UserPointResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcUserPointsVerificationResultDTO;
import com.elink.esua.epdc.dto.form.*;
import com.elink.esua.epdc.dto.result.*;
import com.elink.esua.epdc.entity.PointsLogsEntity;
@ -235,4 +235,12 @@ public interface PointsLogsService extends BaseService<PointsLogsEntity> {
* @since 2021/1/19 17:45
*/
EpdcVerificationLogsResultDTO listOfVerificationLogs(EpdcWorkVerificationLogsFormDTO formDto);
/**
* @Description 更新过时的积分记录
* @Author songyunpeng
* @Date 2021/4/8
* @Param [formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result maBindUnIdLogs(PointsLogsBindUnIdDTO formDto);
}

7
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/PointsLogsServiceImpl.java

@ -39,7 +39,6 @@ import com.elink.esua.epdc.dto.constant.PointsNoticeConstant;
import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcUserPointsVerificationResultDTO;
import com.elink.esua.epdc.dto.form.*;
import com.elink.esua.epdc.dto.result.*;
import com.elink.esua.epdc.entity.PointsLogsEntity;
@ -469,6 +468,12 @@ public class PointsLogsServiceImpl extends BaseServiceImpl<PointsLogsDao, Points
return data;
}
@Override
public Result maBindUnIdLogs(PointsLogsBindUnIdDTO formDto) {
baseDao.maBindUnIdLogs(formDto.getUserId(), formDto.getUser().getId(), formDto.getUser().getFaceImg());
return new Result();
}
/**
* 组装积分日志信息
*

8
esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/PointsLogsDao.xml

@ -343,4 +343,12 @@
AND GRID_ID = #{deptId}
</if>
</select>
<update id="maBindUnIdLogs">
UPDATE epdc_points_logs
SET FACE_IMG = #{faceImg},
USER_ID = #{newUserId}
WHERE
id = #{oldUserId}
</update>
</mapper>

11
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/CachingUserInfoDTO.java

@ -74,4 +74,15 @@ public class CachingUserInfoDTO {
*/
private String remark;
/**
* 积分
*/
private Integer points;
/**
* 积分
*/
private Integer pointsTotle;
}

46
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/PointsLogsBindUnIdDTO.java

@ -0,0 +1,46 @@
/**
* 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.elink.esua.epdc.dto;
import lombok.Data;
import java.io.Serializable;
/**
* 修改过时积分日志
*
* @author elink elink@elink-cn.com
* @since v1.0.0 2020-04-29
*/
@Data
public class PointsLogsBindUnIdDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 用户ID
*/
private String userId;
/**
* 新用户
*/
private UserDTO user;
}

19
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/CheckRepeatUserFormDTO.java

@ -0,0 +1,19 @@
package com.elink.esua.epdc.dto.epdc.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Description
* @Author syp
* @Date 2019/11/22 13:54
*/
@Data
public class CheckRepeatUserFormDTO implements Serializable {
private static final long serialVersionUID = -4267811821756082365L;
private String openId;
private String unionId;
}

23
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/CombineVolunteerUserFormDTO.java

@ -0,0 +1,23 @@
package com.elink.esua.epdc.dto.epdc.form;
import lombok.Data;
import java.io.Serializable;
/**
* @author songyunpeng
* @Description
* @create 2021-04-15
*/
@Data
public class CombineVolunteerUserFormDTO implements Serializable {
/**
* 新用户ID
*/
private String userId;
/**
* 手机号
*/
private String mobile;
}

5
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcGridLeaderRegisterSubmitFormDTO.java

@ -33,4 +33,9 @@ public class EpdcGridLeaderRegisterSubmitFormDTO implements Serializable {
*/
@NotBlank(message = "微信code不能为空")
private String wxCode;
/**
* 小程序类型
*/
private String type;
}

6
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcUserRegistFormDTO.java

@ -63,4 +63,10 @@ public class EpdcUserRegistFormDTO implements Serializable {
*/
@NotBlank(message = "微信code不能为空")
private String wxCode;
/**
* 小程序类型
*/
private String type;
}

28
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/UserController.java

@ -31,6 +31,8 @@ import com.elink.esua.epdc.dto.PartyMemberModifyFormDTO;
import com.elink.esua.epdc.dto.UserDTO;
import com.elink.esua.epdc.dto.UserPointResultDTO;
import com.elink.esua.epdc.dto.UserPointsDTO;
import com.elink.esua.epdc.dto.epdc.form.CheckRepeatUserFormDTO;
import com.elink.esua.epdc.dto.epdc.form.CombineVolunteerUserFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO;
import com.elink.esua.epdc.enums.AppUserStatesEnum;
import com.elink.esua.epdc.excel.UserExcel;
@ -340,4 +342,30 @@ public class UserController {
return userService.updateUserPoints(epdcUserPointsFormDTO);
}
/**
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.pointcommons.tools.dto.BehaviorResultDto>
* @Description 更新用户积分信息
* @Author songyunpeng
* @Date 2020/4/29
* @Param [dto]
**/
@PostMapping(value = "checkRepeatUser")
Result<String> checkRepeatUser(@RequestBody CheckRepeatUserFormDTO checkRepeatUserFormDTO){
return userService.checkRepeatUser(checkRepeatUserFormDTO);
}
/**
* @Description 志愿者注册合并用户
* @Author songyunpeng
* @Date 2021/4/15
* @Param [checkRepeatUserFormDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.lang.String>
**/
@PostMapping(value = "combineVolunteerUser")
Result<UserDTO> combineVolunteerUser(@RequestBody CombineVolunteerUserFormDTO formDTO){
return userService.combineVolunteerUser(formDTO);
}
}

17
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/UserGridRelationDao.java

@ -21,6 +21,7 @@ import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.UserGridRelationDTO;
import com.elink.esua.epdc.entity.UserGridRelationEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -83,4 +84,20 @@ public interface UserGridRelationDao extends BaseDao<UserGridRelationEntity> {
* @return com.elink.esua.epdc.dto.UserGridRelationDTO
**/
UserGridRelationDTO getUserFirstScanGrid(String userId);
/**
* @Description 把小程序用户的userID全部替换为UidUser的ID
* @Author songyunpeng
* @Date 2021/4/8
* @Param [openUserId, unionUserId]
* @return void
**/
void maBindUnId(@Param("openUserId") String openUserId, @Param("unionUserId") String unionUserId);
/**
* @Description 查询重复的网格关系数据
* @Author songyunpeng
* @Date 2021/4/8
* @Param [userId]
* @return java.util.List<java.lang.String>
**/
List<String> selectRepeatRelation(String userId);
}

33
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/feign/PointsFeignClient.java

@ -0,0 +1,33 @@
package com.elink.esua.epdc.feign;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.PointsLogsBindUnIdDTO;
import com.elink.esua.epdc.feign.fallback.NewsFeignClientFallback;
import com.elink.esua.epdc.feign.fallback.PointsFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* 积分管理模块
*
* @author work@yujt.net.cn
* @date 2019/9/18 15:37
*/
@FeignClient(name = ServiceConstant.EPDC_POINTS_SERVER, fallback = PointsFeignClientFallback.class)
public interface PointsFeignClient {
/**
* 更新积分日志
*
* @param formDto
* @return com.elink.esua.epdc.commons.tools.utils.Result
* @author zhy
* @date 2020/8/12 15:55
*/
@PostMapping(value = "points/pointslogs/maBindUnIdLogs", consumes = MediaType.APPLICATION_JSON_VALUE)
Result maBindUnIdLogs(@RequestBody PointsLogsBindUnIdDTO formDto);
}

21
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/feign/fallback/PointsFeignClientFallback.java

@ -0,0 +1,21 @@
package com.elink.esua.epdc.feign.fallback;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.PointsLogsBindUnIdDTO;
import com.elink.esua.epdc.feign.PointsFeignClient;
import org.springframework.stereotype.Component;
/**
* @author work@yujt.net.cn
* @date 2019/9/18 15:38
*/
@Component
public class PointsFeignClientFallback implements PointsFeignClient {
@Override
public Result maBindUnIdLogs(PointsLogsBindUnIdDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_POINTS_SERVER, "maBindUnIdLogs", formDto);
}
}

16
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserGridRelationService.java

@ -205,4 +205,20 @@ public interface UserGridRelationService extends BaseService<UserGridRelationEnt
* @return com.elink.esua.epdc.dto.UserGridRelationDTO
**/
UserGridRelationDTO getUserFirstScanGird(String userId);
/**
* @Description 把小程序用户的userID全部替换为UidUser的ID
* @Author songyunpeng
* @Date 2021/4/8
* @Param [userId, userId1]
* @return void
**/
void maBindUnId(String userId, String userId1);
/**
* @Description 查询重复的网格关系数据
* @Author songyunpeng
* @Date 2021/4/8
* @Param [userId]
* @return java.util.List<java.lang.String>
**/
List<String> selectRepeatRelation(String userId);
}

16
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/UserService.java

@ -417,4 +417,20 @@ public interface UserService extends BaseService<UserEntity> {
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.lang.Long>
**/
Result<Long> getUserGridIdByUserId(String userId);
/**
* @Description 检查完善信息 合并重复用户
* @Author songyunpeng
* @Date 2021/4/9
* @Param [checkRepeatUserFormDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.lang.String>
**/
Result<String> checkRepeatUser(CheckRepeatUserFormDTO checkRepeatUserFormDTO);
/**
* @Description 志愿者合并用户
* @Author songyunpeng
* @Date 2021/4/15
* @Param [formDTO]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.lang.String>
**/
Result<UserDTO> combineVolunteerUser(CombineVolunteerUserFormDTO formDTO);
}

12
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserGridRelationServiceImpl.java

@ -21,11 +21,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.redis.RedisKeys;
import com.elink.esua.epdc.commons.tools.redis.RedisUtils;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.constant.FieldConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.constant.UserFieldConsant;
import com.elink.esua.epdc.dao.UserGridRelationDao;
@ -243,6 +243,16 @@ public class UserGridRelationServiceImpl extends BaseServiceImpl<UserGridRelatio
return baseDao.getUserFirstScanGrid(userId);
}
@Override
public void maBindUnId(String openUserId,String unionUserId) {
baseDao.maBindUnId(openUserId,unionUserId);
}
@Override
public List<String> selectRepeatRelation(String userId) {
return baseDao.selectRepeatRelation(userId);
}
/**
*
* 组织机构信息处理

194
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java

@ -38,39 +38,33 @@ import com.elink.esua.epdc.commons.tools.utils.MessageUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.constant.AuthenticatedConsant;
import com.elink.esua.epdc.constant.UserFieldConsant;
import com.elink.esua.epdc.dao.PartyAuthenticationFailedDao;
import com.elink.esua.epdc.dao.PartyMembersDao;
import com.elink.esua.epdc.dao.UserAuthenticateHistoryDao;
import com.elink.esua.epdc.dao.UserDao;
import com.elink.esua.epdc.dao.*;
import com.elink.esua.epdc.dto.*;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserRegistFormDTO;
import com.elink.esua.epdc.dto.epdc.result.*;
import com.elink.esua.epdc.dto.epdc.EpdcCompleteAppUserDTO;
import com.elink.esua.epdc.dto.epdc.EpdcGridLeaderRegisterDTO;
import com.elink.esua.epdc.dto.epdc.form.*;
import com.elink.esua.epdc.dto.epdc.result.EpdcResidentDetailResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcUserRegisterInfoResultDTO;
import com.elink.esua.epdc.dto.epdc.result.*;
import com.elink.esua.epdc.entity.*;
import com.elink.esua.epdc.dto.epdc.result.EpdcUserInfoResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcUserRegisterAuditMsgResultDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcWorkUserResultDTO;
import com.elink.esua.epdc.enums.AppUserAuditStateEnum;
import com.elink.esua.epdc.enums.AppUserStatesEnum;
import com.elink.esua.epdc.enums.PartyMemberRegFlagEnum;
import com.elink.esua.epdc.exception.UserModuleErrorCode;
import com.elink.esua.epdc.feign.AdminFeignClient;
import com.elink.esua.epdc.feign.PointsFeignClient;
import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.service.UserGridRelationService;
import com.elink.esua.epdc.service.UserInvitationRecordService;
import com.elink.esua.epdc.service.UserService;
import com.elink.esua.epdc.service.UserTagRelationService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.logging.Logger;
/**
* 用户信息表
@ -80,6 +74,8 @@ import java.util.*;
*/
@Service
public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implements UserService {
private final org.slf4j.Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private PartyMembersDao partyMembersDao;
@ -100,6 +96,8 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
private PartyAuthenticationFailedDao partyAuthenticationFailedDao;
@Autowired
private UserTagRelationService userTagRelationService;
@Autowired
private PointsFeignClient pointsFeignClient;
@Override
public PageData<UserDTO> page(Map<String, Object> params) {
@ -1024,16 +1022,120 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
if (StringUtils.isBlank(formDTO.getOpenId())) {
throw new RenException("openId不能为空");
}
CachingUserInfoDTO cachingUserInfoDTO = null;
if (StringUtils.isNotBlank(formDTO.getUnionId())) {
//根据unionId查询
cachingUserInfoDTO = this.baseDao.selectCachingUserInfoDTO(null, formDTO.getUnionId());
}
if (null == cachingUserInfoDTO) {
//根据openId查询
cachingUserInfoDTO = this.baseDao.selectCachingUserInfoDTO(formDTO.getOpenId(), null);
//接口匹配志愿者小程序 - start
CachingUserInfoDTO uIdUser = this.baseDao.selectCachingUserInfoDTO(null, formDTO.getUnionId());
CachingUserInfoDTO oIdUser = this.baseDao.selectCachingUserInfoDTO(formDTO.getOpenId(), null);
if(uIdUser != null && oIdUser != null){
//都不为空的话 合并用户
//如果相同,则查出的用户为同一个
if(uIdUser.getUserId().equals(oIdUser.getUserId())){
return new Result<CachingUserInfoDTO>().ok(oIdUser);
}
this.combineUsers(oIdUser,uIdUser,formDTO.getUnionId());
//重新获取更新后的unionIdUser
uIdUser = this.baseDao.selectCachingUserInfoDTO(null, formDTO.getUnionId());
return new Result<CachingUserInfoDTO>().ok(uIdUser);
}
//更新oIdUser的unionId
if(uIdUser == null && oIdUser != null){
UserEntity userEntity = new UserEntity();
userEntity.setId(oIdUser.getUserId());
userEntity.setWxUnionId(formDTO.getUnionId());
baseDao.updateById(userEntity);
return new Result<CachingUserInfoDTO>().ok(oIdUser);
}
return new Result<CachingUserInfoDTO>().ok(uIdUser);
}
/**
* @Description 合并用户
* @Author songyunpeng
* @Date 2021/4/8
* @Param [oIdUser, uIdUser]
* @return void
**/
private void combineUsers(CachingUserInfoDTO oIdUser, CachingUserInfoDTO uIdUser, String unionId) {
//判断以哪个用户为主
if(!"0".equals(oIdUser.getState())){
// 处理user表积分,删除小程序用户
updateUserInfo(uIdUser, oIdUser,unionId);
// 处理网格关系表
updateUerGridRelation(uIdUser,oIdUser );
// 处理积分日志
updatePointLogs(uIdUser,oIdUser );
}else {
// 处理user表积分,删除小程序用户
updateUserInfo(oIdUser, uIdUser,unionId);
// 处理网格关系表
updateUerGridRelation(oIdUser, uIdUser);
// 处理积分日志
updatePointLogs(oIdUser, uIdUser);
}
return new Result<CachingUserInfoDTO>().ok(cachingUserInfoDTO);
}
/**
* @Description 处理积分日志
* @Author songyunpeng
* @Date 2021/4/8
* @Param [oIdUser, uIdUser]
* @return void
**/
private void updatePointLogs(CachingUserInfoDTO ljUser, CachingUserInfoDTO mainUser) {
logger.info("处理积分日志");
// 把原有积分日志中的userid替换为新的userid,同时更新其中的用户信息
PointsLogsBindUnIdDTO pointsLogsBindAppDTO = new PointsLogsBindUnIdDTO();
UserDTO userDTO = ConvertUtils.sourceToTarget(mainUser, UserDTO.class);
pointsLogsBindAppDTO.setUserId(ljUser.getUserId());
pointsLogsBindAppDTO.setUser(userDTO);
pointsFeignClient.maBindUnIdLogs(pointsLogsBindAppDTO);
}
/**
* @Description 处理网格关系表
* @Author songyunpeng
* @Date 2021/4/8
* @Param [oIdUser, uIdUser]
* @return void
**/
private void updateUerGridRelation(CachingUserInfoDTO ljUser, CachingUserInfoDTO mainUser) {
logger.info("替换网格关系,替换者ID:"+mainUser.getUserId() + ",被替换者为:"+ljUser.getUserId());
// 把小程序用户的userID全部替换为UidUser的ID
userGridRelationService.maBindUnId(ljUser.getUserId(), mainUser.getUserId());
// 修改完成后查询重复的网格关系数据,把重复并且createTime比较新的数据删除
List<String> repeatUser = userGridRelationService.selectRepeatRelation(mainUser.getUserId());
userGridRelationService.deleteBatchIds(repeatUser);
}
/**
* @Description 处理user表积分删除小程序用户
* @Author songyunpeng
* @Date 2021/4/8
* @Param [oIdUser, uIdUser]
* @return void
**/
private void updateUserInfo(CachingUserInfoDTO ljUser, CachingUserInfoDTO mainUser, String unionId) {
logger.info("合并积分,删除重复用户操作");
// 求出两个账户的积分和
int oIdPoints = ljUser.getPoints() == null?0:ljUser.getPoints();
int uIdPoints = mainUser.getPoints() == null?0:mainUser.getPoints();
int oIdPointsTotle = ljUser.getPointsTotle() == null?0:ljUser.getPointsTotle();
int uIdPointsTotle = mainUser.getPointsTotle() == null?0:mainUser.getPointsTotle();
Integer pointSum = oIdPoints + uIdPoints;
Integer pointsTotleSum = oIdPointsTotle + uIdPointsTotle;
UserEntity updateUser = new UserEntity();
updateUser.setId(mainUser.getUserId());
updateUser.setPoints(pointSum);
updateUser.setPointsTotle(pointsTotleSum);
updateUser.setWxUnionId(unionId);
// 更新app账户的积分信息
baseDao.updateById(updateUser);
// 删除当前小程序用户
baseDao.deleteById(ljUser.getUserId());
}
@Override
@ -1390,4 +1492,54 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
public Result<Long> getUserGridIdByUserId(String userId) {
return new Result<Long>().ok(baseDao.getUserGridIdByUserId(userId));
}
@Override
public Result<String> checkRepeatUser(CheckRepeatUserFormDTO checkRepeatUserFormDTO) {
String unionId = checkRepeatUserFormDTO.getUnionId();
String openId = checkRepeatUserFormDTO.getOpenId();
//根据unionId获取用户
QueryWrapper<UserEntity> wrapper = new QueryWrapper<>();
wrapper.eq("UNION_ID", unionId);
UserEntity unionIdUserEntity = baseDao.selectOne(wrapper);
//根据openId获取用户
QueryWrapper<UserEntity> wrapper2 = new QueryWrapper<>();
wrapper2.eq("OPEN_ID", openId);
UserEntity openIdUserEntity = baseDao.selectOne(wrapper2);
//代表两条用户记录
if(unionIdUserEntity!=null && openIdUserEntity!=null && !unionIdUserEntity.getId().equals(openIdUserEntity.getIdentityNo())){
CachingUserInfoDTO oIdUser = ConvertUtils.sourceToTarget(openIdUserEntity,CachingUserInfoDTO.class);
CachingUserInfoDTO uIdUser = ConvertUtils.sourceToTarget(unionIdUserEntity,CachingUserInfoDTO.class);
this.combineUsers(oIdUser,uIdUser,unionId);
return new Result<String>().ok(unionIdUserEntity.getId());
}
return new Result<String>().ok("");
}
@Override
public Result<UserDTO> combineVolunteerUser(CombineVolunteerUserFormDTO formDTO) {
//根据手机号获取用户
QueryWrapper<UserEntity> queryWrapper = new QueryWrapper();
queryWrapper.eq("MOBILE",formDTO.getMobile());
UserEntity mobileUser = baseDao.selectOne(queryWrapper);
//根据用户ID获取用户
UserEntity userIdUser = selectById(formDTO.getUserId());
if("0".equals(userIdUser.getState())){
CachingUserInfoDTO ljUser = ConvertUtils.sourceToTarget(userIdUser,CachingUserInfoDTO.class);
ljUser.setUserId(userIdUser.getId());
CachingUserInfoDTO mainUser = ConvertUtils.sourceToTarget(mobileUser,CachingUserInfoDTO.class);
mainUser.setUserId(mobileUser.getId());
//合并用户
// 处理user表积分,删除小程序用户
updateUserInfo(ljUser, mainUser,userIdUser.getWxUnionId());
// 处理网格关系表
updateUerGridRelation(ljUser,mainUser );
// 处理积分日志
updatePointLogs(ljUser,mainUser );
UserEntity userEntity = selectById(mobileUser.getId());
logger.info("合并志愿者用户信息完成,返回合并后的用户信息,ID:"+userEntity.getId());
UserDTO userDTO = ConvertUtils.sourceToTarget(userEntity,UserDTO.class);
return new Result<UserDTO>().ok(userDTO);
}
return new Result<>();
}
}

4
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserDao.xml

@ -460,6 +460,8 @@
<result property="remark" column="REMARK"/>
<result property="gridId" column="gridId"/>
<result property="grid" column="grid"/>
<result property="pointsTotle" column="POINTS_TOTLE"/>
<result property="points" column="POINTS"/>
<collection property="userTagInfos" select="com.elink.esua.epdc.dao.UserTagDao.selectByUserId"
column="id">
</collection>
@ -511,6 +513,8 @@
eu.STATE,
eu.REMARK,
eu.PARTY_FLAG,
eu.POINTS,
eu.POINTS_TOTLE,
(select r.GRID_ID
from epdc_user_grid_relation r
where r.USER_ID=eu.ID

22
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/UserGridRelationDao.xml

@ -32,6 +32,9 @@
<update id="updateGridByDeptId">
UPDATE epdc_user_grid_relation SET GRID = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId}
</update>
<update id="maBindUnId">
UPDATE epdc_user_grid_relation SET USER_ID = #{unionUserId}, UPDATED_TIME = NOW() WHERE USER_ID = #{openUserId}
</update>
<select id="selectListUserIdByDeptId" resultType="String">
SELECT
@ -60,6 +63,25 @@
CREATED_TIME
LIMIT 1
</select>
<select id="selectRepeatRelation" resultType="java.lang.String">
SELECT
t.ID
FROM
(
SELECT
ID,GRID_ID,USER_ID
FROM
epdc_user_grid_relation
WHERE
USER_ID = #{userId}
ORDER BY
CREATED_TIME DESC
) t
GROUP BY
t.GRID_ID
HAVING
COUNT(t.USER_ID) > 1
</select>
</mapper>

Loading…
Cancel
Save