From 63e7cc4dad234ffd0e06fca0e2ff5fb93b558c63 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 28 Jul 2020 09:24:18 +0800 Subject: [PATCH 01/38] =?UTF-8?q?=E7=A7=AF=E5=88=86=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/PointAdjustmentLogDTO.java | 106 ++++++++ .../epmet/dto/PointVerificationLogDTO.java | 10 - .../epmet/dto/form/CommonPageUserFormDTO.java | 29 ++ .../dto/form/PointAdjustmentFormDTO.java | 56 ++++ .../dto/form/PointVerificationFormDTO.java | 53 ++++ .../dto/form/ResiCommonUserIdFormDTO.java | 4 +- .../epmet/dto/form/ResiPointRankFormDTO.java | 20 +- .../form/WorkPointVerificationFormDTO.java | 32 +++ .../dto/result/PointAdjustmentResultDTO.java | 36 +++ .../result/PointVerificationResultDTO.java | 36 +++ .../result/ResiPointRankListResultDTO.java | 2 +- .../WorkPointVerficationListResultDTO.java | 27 ++ .../WorkPointVerificationDetailResultDTO.java | 33 +++ .../WorkPointVerificationLogResultDTO.java | 38 +++ .../feign/EpmetPointOpenFeignClient.java | 15 + .../EpmetPointOpenFeignClientFallback.java | 9 + .../epmet-point/epmet-point-server/pom.xml | 6 + .../controller/AdjustmentController.java | 59 ++++ .../epmet/controller/ExchangeController.java | 2 + .../epmet/controller/ResiPointController.java | 122 ++++++++- .../com/epmet/dao/PointAdjustmentLogDao.java | 46 ++++ .../epmet/dao/PointVerificationLogDao.java | 12 + .../PointVerificationStatisticalDailyDao.java | 11 +- .../dao/UserPointStatisticalDailyDao.java | 8 + .../java/com/epmet/dao/UserPointTotalDao.java | 9 + .../entity/PointAdjustmentLogEntity.java | 76 ++++++ .../entity/PointVerificationLogEntity.java | 10 - .../main/java/com/epmet/redis/PointRedis.java | 18 ++ .../service/PointAdjustmentLogService.java | 126 +++++++++ .../service/PointVerificationLogService.java | 28 +- ...ntVerificationStatisticalDailyService.java | 9 + .../service/UserPointActionLogService.java | 7 +- .../UserPointStatisticalDailyService.java | 11 +- .../epmet/service/UserPointTotalService.java | 31 +++ .../impl/PointAdjustmentLogServiceImpl.java | 242 +++++++++++++++++ .../impl/PointVerificationLogServiceImpl.java | 256 +++++++++++++++++- ...rificationStatisticalDailyServiceImpl.java | 18 ++ .../impl/UserPointActionLogServiceImpl.java | 10 +- .../UserPointStatisticalDailyServiceImpl.java | 113 +++++++- .../impl/UserPointTotalServiceImpl.java | 137 +++++++++- .../java/com/epmet/utils/DimIdGenerator.java | 91 +++++++ .../java/com/epmet/utils/ModuleConstant.java | 55 +++- .../mapper/PointAdjustmentLogDao.xml | 43 +++ .../mapper/PointVerificationLogDao.xml | 20 +- .../PointVerificationStatisticalDailyDao.xml | 14 + .../mapper/UserPointStatisticalDailyDao.xml | 20 ++ .../resources/mapper/UserPointTotalDao.xml | 15 + .../epmet/feign/GovOrgOpenFeignClient.java | 10 + .../GovOrgOpenFeignClientFallback.java | 6 + .../dto/result/MyResiUserInfoResultDTO.java | 4 + .../impl/PartyMemberConfirmServiceImpl.java | 18 +- .../epmet/dto/form/CustomerUserFormDTO.java | 34 +++ .../epmet/dto/form/IssueInitiatorFormDTO.java | 5 + .../result/CustomerUserDetailResultDTO.java | 51 ++++ .../dto/result/CustomerUserResultDTO.java | 41 +++ .../dto/result/MyResiUserInfoResultDTO.java | 5 + .../dto/result/StaffEtAgencyResultDTO.java | 42 +++ .../dto/result/UserBaseInfoResultDTO.java | 21 ++ .../epmet/feign/EpmetUserOpenFeignClient.java | 41 +++ .../EpmetUserOpenFeignClientFallback.java | 49 ++++ epmet-user/epmet-user-server/pom.xml | 6 + .../com/epmet/constant/UserRedisKeys.java | 26 ++ .../controller/CustomerStaffController.java | 15 +- .../controller/GridLatestController.java | 15 + .../controller/UserBaseInfoController.java | 31 ++- .../com/epmet/controller/UserController.java | 7 +- .../java/com/epmet/dao/GridLatestDao.java | 9 + .../com/epmet/dao/RegisterRelationDao.java | 8 + .../java/com/epmet/dao/UserWechatDao.java | 11 + .../OperRoleUserFeignClientFallBack.java | 2 +- .../com/epmet/redis/UserBaseInfoRedis.java | 99 ++++++- .../epmet/service/CustomerStaffService.java | 9 + .../com/epmet/service/GridLatestService.java | 11 + .../epmet/service/UserBaseInfoService.java | 19 ++ .../impl/CustomerStaffServiceImpl.java | 26 ++ .../service/impl/GridLatestServiceImpl.java | 47 +++- .../impl/RegisterRelationServiceImpl.java | 1 + .../service/impl/UserBaseInfoServiceImpl.java | 56 ++++ .../service/impl/UserResiInfoServiceImpl.java | 25 +- .../epmet/service/impl/UserServiceImpl.java | 22 ++ .../java/com/epmet/util/ModuleConstant.java | 15 + .../main/resources/mapper/GridLatestDao.xml | 11 + .../resources/mapper/RegisterRelationDao.xml | 14 + .../main/resources/mapper/UserWechatDao.xml | 23 ++ 84 files changed, 2872 insertions(+), 94 deletions(-) create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointAdjustmentLogDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/CommonPageUserFormDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/PointAdjustmentFormDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/PointVerificationFormDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/WorkPointVerificationFormDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointAdjustmentResultDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointVerificationResultDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/WorkPointVerficationListResultDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/WorkPointVerificationDetailResultDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/WorkPointVerificationLogResultDTO.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointAdjustmentLogDao.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointAdjustmentLogEntity.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/redis/PointRedis.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointAdjustmentLogService.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAdjustmentLogServiceImpl.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/utils/DimIdGenerator.java create mode 100644 epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointAdjustmentLogDao.xml create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CustomerUserFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerUserDetailResultDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerUserResultDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffEtAgencyResultDTO.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserRedisKeys.java diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointAdjustmentLogDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointAdjustmentLogDTO.java new file mode 100644 index 0000000000..3f75c7fecc --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointAdjustmentLogDTO.java @@ -0,0 +1,106 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-27 + */ +@Data +public class PointAdjustmentLogDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String id; + + /** + * 关联的积分动作Id + */ + private String actionId; + + /** + * 调整人名称【xx机关-xx】 + */ + private String operatorName; + + /** + * 调整原因 + */ + private String adjustReason; + + /** + * 调整积分 + */ + private Integer point; + + /** + * plus/minus + */ + private String adjustmentType; + + /** + * 调整人所属机关Id + */ + private String operatorAgencyId; + + /** + * 居民Id + */ + private String userId; + + /** + * + */ + private String delFlag; + + /** + * + */ + private Integer revision; + + /** + * + */ + private Date createdTime; + + /** + * + */ + private String createdBy; + + /** + * + */ + private Date updatedTime; + + /** + * + */ + private String updatedBy; + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointVerificationLogDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointVerificationLogDTO.java index 8c8c1a6db1..9a570898db 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointVerificationLogDTO.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/PointVerificationLogDTO.java @@ -48,16 +48,6 @@ public class PointVerificationLogDTO implements Serializable { */ private String userId; - /** - * 核销对象首次注册网格 - */ - private String userRegistedGridId; - - /** - * 核销对象首次注册网格所在机关 - */ - private String userRegistedAgnecyId; - /** * 核销人员ID */ diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/CommonPageUserFormDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/CommonPageUserFormDTO.java new file mode 100644 index 0000000000..3dd0e34ac9 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/CommonPageUserFormDTO.java @@ -0,0 +1,29 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 用户Id 分页参数 + * @ClassName CommonPageUserFormDTO + * @Auth wangc + * @Date 2020-07-24 13:24 + */ +@Data +public class CommonPageUserFormDTO implements Serializable { + private static final long serialVersionUID = -6721313124444595189L; + + public interface PageUserGroup extends CustomerClientShowGroup{} + + @NotBlank(message = "获取不到用户Id" , groups = PageUserGroup.class) + private String userId; + + @Min(value = 1) + private Integer pageNo = 1; + + private Integer pageSize = 10; +} diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/PointAdjustmentFormDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/PointAdjustmentFormDTO.java new file mode 100644 index 0000000000..d43c069393 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/PointAdjustmentFormDTO.java @@ -0,0 +1,56 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 积分调整传参积分dto + * @ClassName PointAdjustmentFormDTO + * @Auth wangc + * @Date 2020-07-27 13:36 + */ +@Data +public class PointAdjustmentFormDTO implements Serializable { + private static final long serialVersionUID = -1879530107301465633L; + + public interface PointAdjustmentGroup extends CustomerClientShowGroup{} + + /** + * 用户Id + * */ + @NotBlank(message = "用户Id不能为空", groups = PointAdjustmentGroup.class) + private String userId; + + /** + * 积分调整标识 key:add/minus + * */ + @NotBlank(message = "调整类型不能为空", groups = PointAdjustmentGroup.class) + private String adjustmentType; + + /** + * 调整的分值 + * */ + private Integer point; + + /** + * 调整原因 + * */ + @NotBlank(message = "调整原因不能为空", groups = PointAdjustmentGroup.class) + private String reason; + + /** + * 操作人Id + * */ + @NotBlank(message = "当前工作人员Id不能为空", groups = PointAdjustmentGroup.class) + private String operatorId; + + /** + * 客户Id + * */ + @NotBlank(message = "客户Id不能为空", groups = PointAdjustmentGroup.class) + private String customerId; + +} diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/PointVerificationFormDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/PointVerificationFormDTO.java new file mode 100644 index 0000000000..4a5aff0a09 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/PointVerificationFormDTO.java @@ -0,0 +1,53 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 积分核销传参dto + * + * @ClassName PointVerificationFormDTO + * @Auth wangc + * @Date 2020-07-27 13:45 + */ +@Data +public class PointVerificationFormDTO implements Serializable { + private static final long serialVersionUID = -154634518066538184L; + + public interface PointVerificationGroup extends CustomerClientShowGroup{} + + /** + * 用户Id + * */ + @NotBlank(message = "用户Id不能为空", groups = PointVerificationGroup.class) + private String userId; + + /** + * 核销备注 + * */ + @NotBlank(message = "核销备注不能为空", groups = PointVerificationGroup.class) + private String remark; + + /** + * 核销积分数 + * */ + @Min(0) + private Integer point; + + /** + * 操作人Id + * */ + @NotBlank(message = "当前工作人员Id不能为空", groups = PointVerificationGroup.class) + private String operatorId; + + + private String longitude; + + private String dimension; + + private String address; +} diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/ResiCommonUserIdFormDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/ResiCommonUserIdFormDTO.java index af247b84f0..01d72ace70 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/ResiCommonUserIdFormDTO.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/ResiCommonUserIdFormDTO.java @@ -16,8 +16,8 @@ import java.io.Serializable; public class ResiCommonUserIdFormDTO implements Serializable { private static final long serialVersionUID = -1961545266124776452L; - public interface UserId extends CustomerClientShowGroup{} + public interface UserIdGroup extends CustomerClientShowGroup{} - @NotBlank(message = "获取不到用户Id",groups = UserId.class) + @NotBlank(message = "获取不到用户Id",groups = UserIdGroup.class) private String userId; } diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/ResiPointRankFormDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/ResiPointRankFormDTO.java index e78baf6178..49f6d22f8a 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/ResiPointRankFormDTO.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/ResiPointRankFormDTO.java @@ -1,8 +1,10 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -15,19 +17,29 @@ import java.io.Serializable; public class ResiPointRankFormDTO implements Serializable { private static final long serialVersionUID = 1534061512200591149L; + public interface ResiPointRankGroup extends CustomerClientShowGroup{} + /** * 页码 * */ - @Min(1) - private Integer pageNo; + @Min(value = 1,groups = ResiPointRankGroup.class) + private Integer pageNo = 1; /** * 每页数据条数 * */ - private Integer pageSize; + private Integer pageSize = 10; /** - * 时间维度 week month + * 时间维度 week month 如果为空则按照week处理 * */ private String timeDimension; + + @NotBlank(message = "获取不到用户Id",groups = ResiPointRankGroup.class) + private String userId; + + /** + * 客户Id,不做校验,如果前端不传则使用userId查询相应的客户Id + * */ + private String customerId; } diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/WorkPointVerificationFormDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/WorkPointVerificationFormDTO.java new file mode 100644 index 0000000000..8741ae49c6 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/WorkPointVerificationFormDTO.java @@ -0,0 +1,32 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 工作端核销记录传参 + * @ClassName WorkPointVerificationFormDTO + * @Auth wangc + * @Date 2020-07-24 16:25 + */ +@Data +public class WorkPointVerificationFormDTO implements Serializable { + private static final long serialVersionUID = -590822390667788693L; + + @NotBlank(message = "获取不到用户Id",groups = ResiCommonUserIdFormDTO.UserIdGroup.class) + private String staffId; + + /** + * yyyy-MM + * */ + private String timeParam; + + @Min(1) + private Integer pageNo; + + private Integer pageSize; +} diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointAdjustmentResultDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointAdjustmentResultDTO.java new file mode 100644 index 0000000000..224406c199 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointAdjustmentResultDTO.java @@ -0,0 +1,36 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @ClassName PointAdjustmentResultDTO + * @Auth wangc + * @Date 2020-07-27 09:45 + */ +@Data +public class PointAdjustmentResultDTO implements Serializable { + private static final long serialVersionUID = -5339173292750971212L; + + /** + * 操作日期 + * */ + private String date; + + /** + * 调整积分 + * */ + private String point; + + /** + * 调整原因 + * */ + private String reason; + + /** + * 调整人昵称 + * */ + private String staffNickname; +} diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointVerificationResultDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointVerificationResultDTO.java new file mode 100644 index 0000000000..d62686d66a --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointVerificationResultDTO.java @@ -0,0 +1,36 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 积分核销返参Dto + * @ClassName PointVerificationResultDTO + * @Auth wangc + * @Date 2020-07-27 13:57 + */ +@Data +public class PointVerificationResultDTO implements Serializable { + private static final long serialVersionUID = 6990717665110392389L; + + /** + * 核销成功标识 + * */ + private boolean successFlag; + + /** + * 失败原因 + * */ + private String failureReason; + + /** + * 用户(居民)昵称 + * */ + private String userNickname; + + /** + * 用户(居民)头像 + * */ + private String userHeadPhoto; +} diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/ResiPointRankListResultDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/ResiPointRankListResultDTO.java index 0bcf0a4758..ab1d289bf5 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/ResiPointRankListResultDTO.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/ResiPointRankListResultDTO.java @@ -33,5 +33,5 @@ public class ResiPointRankListResultDTO implements Serializable { /** * 积分排名列表 * */ - private List rankList; + private ResiPointRankingResultDTO rankList; } diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/WorkPointVerficationListResultDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/WorkPointVerficationListResultDTO.java new file mode 100644 index 0000000000..fea0f2d6b3 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/WorkPointVerficationListResultDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 工作端积分核销记录列表 + * @ClassName WorkPointVerficationListResultDTO + * @Auth wangc + * @Date 2020-07-24 15:38 + */ +@Data +public class WorkPointVerficationListResultDTO implements Serializable { + private static final long serialVersionUID = 2737976236826002595L; + + /** + * 当月总积分 + * */ + private Integer totalPoint; + + /** + * 核销列表 + * */ + List checkingList; +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/WorkPointVerificationDetailResultDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/WorkPointVerificationDetailResultDTO.java new file mode 100644 index 0000000000..694c80a1cd --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/WorkPointVerificationDetailResultDTO.java @@ -0,0 +1,33 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 工作端积分核销显示记录 + * @ClassName WorkPointVerificationDetailResultDTO + * @Auth wangc + * @Date 2020-07-24 15:38 + */ +@Data +public class WorkPointVerificationDetailResultDTO implements Serializable { + private static final long serialVersionUID = -205177259417194562L; + + /** + * 被核销用户昵称 + * */ + private String userNickname; + + /** + * 核销积分 "-100" + * */ + private String point; + + /** + * 核销备注 + * */ + private String remark; + + +} diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/WorkPointVerificationLogResultDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/WorkPointVerificationLogResultDTO.java new file mode 100644 index 0000000000..0cc4689899 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/WorkPointVerificationLogResultDTO.java @@ -0,0 +1,38 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 工作端积分核销记录 + * @ClassName WorkPointVerificationLogResultDTO + * @Auth wangc + * @Date 2020-07-24 15:38 + */ +@Data +public class WorkPointVerificationLogResultDTO implements Serializable { + private static final long serialVersionUID = -3570820382554221450L; + + /** + * 积分 + * */ + private Integer point; + + /** + * 用户Id + * */ + private String userId; + + /** + * 日期 yyyy-MM-dd HH:mm:ss + * */ + private String date; + + /** + * 核销备注 + * */ + private String remark; + + +} diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java index 643542bddc..5598ff8732 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/EpmetPointOpenFeignClient.java @@ -1,8 +1,13 @@ 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.result.ResiPointDetailResultDTO; import com.epmet.feign.fallback.EpmetPointOpenFeignClientFallback; import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; /** * 本服务对外开放的API,其他服务通过引用此client调用该服务 @@ -12,4 +17,14 @@ import org.springframework.cloud.openfeign.FeignClient; */ @FeignClient(name = ServiceConstant.EPMET_HEART_SERVER, fallback = EpmetPointOpenFeignClientFallback.class) public interface EpmetPointOpenFeignClient { + + /** + * @Description 获取指定居民的积分信息 + * @param dto + * @return + * @author wangc + * @date 2020.07.22 15:58 + **/ + @GetMapping("mypoint") + Result myPoint(TokenDto dto); } diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java index 7dfd5ee983..188881efd8 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/feign/fallback/EpmetPointOpenFeignClientFallback.java @@ -1,5 +1,10 @@ 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.result.ResiPointDetailResultDTO; import com.epmet.feign.EpmetPointOpenFeignClient; import org.springframework.stereotype.Component; @@ -11,4 +16,8 @@ import org.springframework.stereotype.Component; */ @Component public class EpmetPointOpenFeignClientFallback implements EpmetPointOpenFeignClient { + @Override + public Result myPoint(TokenDto dto) { + return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "myPoint", dto); + } } diff --git a/epmet-module/epmet-point/epmet-point-server/pom.xml b/epmet-module/epmet-point/epmet-point-server/pom.xml index 49ccab5b90..31263dd1a3 100644 --- a/epmet-module/epmet-point/epmet-point-server/pom.xml +++ b/epmet-module/epmet-point/epmet-point-server/pom.xml @@ -69,6 +69,12 @@ 2.0.0 compile + + com.epmet + epmet-user-client + 2.0.0 + compile + diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/AdjustmentController.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/AdjustmentController.java index 04d9f2c4b4..15e1980651 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/AdjustmentController.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/AdjustmentController.java @@ -1,8 +1,23 @@ package com.epmet.controller; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.CustomerUserFormDTO; +import com.epmet.dto.form.IssueInitiatorFormDTO; +import com.epmet.dto.result.CustomerUserDetailResultDTO; +import com.epmet.dto.result.CustomerUserResultDTO; +import com.epmet.dto.result.PointAdjustmentResultDTO; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.service.PointAdjustmentLogService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * @description: 工作人员积分调整Controller * @date: Created in 2020-07-20 16:38 @@ -11,4 +26,48 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("work/adjustment") public class AdjustmentController { + + @Autowired + EpmetUserOpenFeignClient epmetUserOpenFeignClient; + @Autowired + PointAdjustmentLogService pointAdjustmentLogService; + /** + * @Description 调整积分时获取用户列表 + * @param param + * @return + * @author wangc + * @date 2020.07.27 10:57 + **/ + @PostMapping("userlist") + public Result> userList(@RequestBody CustomerUserFormDTO param){ + ValidatorUtils.validateEntity(param, CustomerUserFormDTO.CustomerIdGroup.class); + return epmetUserOpenFeignClient.customerUserList(param); + } + + /** + * @Description 调整积分时获取用户详情 + * @param param + * @return + * @author wangc + * @date 2020.07.27 11:15 + **/ + @PostMapping("userdetail") + public Result userDetail(@RequestBody IssueInitiatorFormDTO param){ + ValidatorUtils.validateEntity(param,IssueInitiatorFormDTO.UserIdGroup.class); + return new Result().ok(pointAdjustmentLogService.userDetail(param)); + } + + /** + * @Description 根据UserId获取积分调整记录 + * @param param :: getUserId + * @return + * @author wangc + * @date 2020.07.27 10:51 + **/ + @PostMapping("adjustrecord") + public Result> adjustRecord(@RequestBody IssueInitiatorFormDTO param){ + ValidatorUtils.validateEntity(param, IssueInitiatorFormDTO.UserIdGroup.class); + return new Result>().ok(pointAdjustmentLogService.adjustRecord(param)); + } } + diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ExchangeController.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ExchangeController.java index c3bf13d4ba..8f81e46de2 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ExchangeController.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ExchangeController.java @@ -11,4 +11,6 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("work/exchange") public class ExchangeController { + + } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java index 9a935771cb..f58da5b0fa 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/ResiPointController.java @@ -1,7 +1,24 @@ package com.epmet.controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.CommonPageUserFormDTO; +import com.epmet.dto.form.ResiCommonUserIdFormDTO; +import com.epmet.dto.form.ResiPointRankFormDTO; +import com.epmet.dto.result.ResiPointDetailResultDTO; +import com.epmet.dto.result.ResiPointLogListResultDTO; +import com.epmet.dto.result.ResiPointRankListResultDTO; +import com.epmet.service.PointVerificationLogService; +import com.epmet.service.UserPointActionLogService; +import com.epmet.service.UserPointStatisticalDailyService; +import com.epmet.service.UserPointTotalService; +import com.epmet.utils.ModuleConstant; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; /** * @description: 居民端积分信息controller @@ -11,4 +28,105 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("resi/point") public class ResiPointController { + + @Autowired + private UserPointTotalService userPointTotalService; + @Autowired + private UserPointStatisticalDailyService userPointStatisticalDailyService; + @Autowired + private PointVerificationLogService pointVerificationLogService; + @Autowired + private UserPointActionLogService pointActionLogService; + + /** + * @Description 获取指定居民的积分信息 + * @param dto + * @return + * @author wangc + * @date 2020.07.22 15:58 + **/ + @GetMapping("mypoint") + public Result myPoint(@LoginUser TokenDto dto){ + ResiCommonUserIdFormDTO param = new ResiCommonUserIdFormDTO(); + param.setUserId(dto.getUserId()); + ValidatorUtils.validateEntity(param,ResiCommonUserIdFormDTO.UserIdGroup.class); + return new Result().ok(userPointTotalService.getMyPoint(param)); + } + + /** + * @Description 获取客户下用户积分排名榜 + * @param dto + * @param pointRankFormDTO + * @return + * @author wangc + * @date 2020.07.22 16:13 + **/ + @PostMapping("rank") + public Result> rank(@LoginUser TokenDto dto,@RequestBody ResiPointRankFormDTO pointRankFormDTO){ + pointRankFormDTO.setUserId(dto.getUserId()); + ValidatorUtils.validateEntity(pointRankFormDTO, ResiPointRankFormDTO.ResiPointRankGroup.class); + return new Result>().ok(userPointTotalService.getPointRanking(pointRankFormDTO)); + } + + /** + * @Description 获取居民端周积分排行榜 还有当前用的信息 + * @param dto + * @param pointRankFormDTO + * @return + * @author wangc + * @date 2020.07.21 16:57 + **/ + @PostMapping("weeklyrank") + public Result> weeklyRank(@LoginUser TokenDto dto,@RequestBody ResiPointRankFormDTO pointRankFormDTO){ + pointRankFormDTO.setUserId(dto.getUserId()); + pointRankFormDTO.setTimeDimension(ModuleConstant.TIME_DIMENSION_WEEK); + ValidatorUtils.validateEntity(pointRankFormDTO, ResiPointRankFormDTO.ResiPointRankGroup.class); + return new Result>().ok(userPointStatisticalDailyService.getPointRankWithinTimeZone(pointRankFormDTO)); + } + + /** + * @Description 获取居民端月积分排行榜 还有当前用的信息 + * @param dto + * @param pointRankFormDTO + * @return + * @author wangc + * @date 2020.07.21 16:57 + **/ + @PostMapping("monthlyrank") + public Result> monthlyRank(@LoginUser TokenDto dto,@RequestBody ResiPointRankFormDTO pointRankFormDTO){ + pointRankFormDTO.setUserId(dto.getUserId()); + pointRankFormDTO.setTimeDimension(ModuleConstant.TIME_DIMENSION_MONTH); + ValidatorUtils.validateEntity(pointRankFormDTO,ResiPointRankFormDTO.ResiPointRankGroup.class); + return new Result>().ok(userPointStatisticalDailyService.getPointRankWithinTimeZone(pointRankFormDTO)); + } + + /** + * @Description 查找指定用户的积分记录 + * @param dto + * @param pageUserParam + * @return + * @author wangc + * @date 2020.07.22 14:05 + **/ + @PostMapping("records") + public Result> records(@LoginUser TokenDto dto,@RequestBody CommonPageUserFormDTO pageUserParam){ + pageUserParam.setUserId(dto.getUserId()); + ValidatorUtils.validateEntity(pageUserParam, CommonPageUserFormDTO.PageUserGroup.class); + return new Result>().ok(pointActionLogService.getMyPointRecord(pageUserParam)); + } + + /** + * @Description 查找指定用户的积分兑换记录 + * @param dto + * @param pageUserParam + * @return + * @author wangc + * @date 2020.07.22 14:05 + **/ + @PostMapping("exchangedrecord") + public Result> exchangeRecord(@LoginUser TokenDto dto,@RequestBody CommonPageUserFormDTO pageUserParam){ + pageUserParam.setUserId(dto.getUserId()); + ValidatorUtils.validateEntity(pageUserParam,CommonPageUserFormDTO.PageUserGroup.class); + return new Result>().ok(pointVerificationLogService.getMyExchangeRecord(pageUserParam)); + } } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointAdjustmentLogDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointAdjustmentLogDao.java new file mode 100644 index 0000000000..517874eacf --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointAdjustmentLogDao.java @@ -0,0 +1,46 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.PointAdjustmentResultDTO; +import com.epmet.entity.PointAdjustmentLogEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-27 + */ +@Mapper +public interface PointAdjustmentLogDao extends BaseDao { + + /** + * @Description 查询积分调整列表 + * @param userId + * @return + * @author wangc + * @date 2020.07.27 10:44 + **/ + List selectAdjustmentListByUserId(@Param("userId") String userId); + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationLogDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationLogDao.java index 4791eb6c00..9138df614f 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationLogDao.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationLogDao.java @@ -19,10 +19,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.result.ResiPointLogPeriodResultDTO; +import com.epmet.dto.result.WorkPointVerificationLogResultDTO; import com.epmet.entity.PointVerificationLogEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.Date; import java.util.List; /** @@ -43,4 +45,14 @@ public interface PointVerificationLogDao extends BaseDao selectVerificationLog(@Param("userId") String userId); + /** + * @Description 获取工作人员月度核销记录 + * @param staffId + * @param startDate + * @param endDate + * @return + * @author wangc + * @date 2020.07.25 13:17 + **/ + List selectStaffVerificationLog(String staffId, Date startDate, Date endDate); } \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationStatisticalDailyDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationStatisticalDailyDao.java index d123b66210..5880d4bc3e 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationStatisticalDailyDao.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/PointVerificationStatisticalDailyDao.java @@ -20,6 +20,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.entity.PointVerificationStatisticalDailyEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 工作人员核销数据统计 @@ -29,5 +30,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface PointVerificationStatisticalDailyDao extends BaseDao { - + /** + * @Description 查询指定日期的工作人员核销积分是否存在 + * @param createdBy + * @param dateId + * @return + * @author wangc + * @date 2020.07.27 17:37 + **/ + PointVerificationStatisticalDailyEntity selectIfExisted(@Param("createdBy") String createdBy, @Param("dateId") String dateId); } \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java index 142817ae9f..1c3352a090 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointStatisticalDailyDao.java @@ -45,4 +45,12 @@ public interface UserPointStatisticalDailyDao extends BaseDao selectPointRankWithinTimeZone(@Param("customerId") String customerId,@Param("dimension") String dimension,@Param("dimensionId") String dimensionId); + /** + * @Description 查询有无指定日期的积分日统计 + * @param userId + * @return + * @author wangc + * @date 2020.07.27 16:20 + **/ + UserPointStatisticalDailyEntity selectIfExisted(@Param("userId") String userId,@Param("dateId") String dateId,@Param("actionFlag")String actionFlag); } \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointTotalDao.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointTotalDao.java index b50249c020..9d5ebca3f6 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointTotalDao.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/dao/UserPointTotalDao.java @@ -53,4 +53,13 @@ public interface UserPointTotalDao extends BaseDao { **/ List selectUserPointRank(@Param("customerId") String customerId); + /** + * @Description 根据userId查找是否存在数据 + * @param userId + * @return + * @author wangc + * @date 2020.07.27 16:51 + **/ + UserPointTotalEntity selectIfExisted(@Param("userId") String userId); + } \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointAdjustmentLogEntity.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointAdjustmentLogEntity.java new file mode 100644 index 0000000000..2cfdbf6e3b --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointAdjustmentLogEntity.java @@ -0,0 +1,76 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-27 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("point_adjustment_log") +public class PointAdjustmentLogEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 关联的积分动作Id + */ + private String actionId; + + /** + * 调整人名称【xx机关-xx】 + */ + private String operatorName; + + /** + * 调整原因 + */ + private String adjustReason; + + /** + * 调整积分 + */ + private Integer point; + + /** + * plus/minus + */ + private String adjustmentType; + + /** + * 调整人所属机关Id + */ + private String operatorAgencyId; + + /** + * 居民Id + */ + private String userId; + +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointVerificationLogEntity.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointVerificationLogEntity.java index 5e9de373e1..531bf9ca93 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointVerificationLogEntity.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/PointVerificationLogEntity.java @@ -48,16 +48,6 @@ public class PointVerificationLogEntity extends BaseEpmetEntity { */ private String userId; - /** - * 核销对象首次注册网格 - */ - private String userRegistedGridId; - - /** - * 核销对象首次注册网格所在机关 - */ - private String userRegistedAgnecyId; - /** * 核销人员ID */ diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/redis/PointRedis.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/redis/PointRedis.java new file mode 100644 index 0000000000..4e868d150f --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/redis/PointRedis.java @@ -0,0 +1,18 @@ +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * @Description 积分缓存相关 + * @ClassName PointRedis + * @Auth wangc + * @Date 2020-07-27 17:25 + */ +@Component +public class PointRedis { + + @Autowired + private RedisUtils redisUtils; +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointAdjustmentLogService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointAdjustmentLogService.java new file mode 100644 index 0000000000..02df12d652 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointAdjustmentLogService.java @@ -0,0 +1,126 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.PointAdjustmentLogDTO; +import com.epmet.dto.form.IssueInitiatorFormDTO; +import com.epmet.dto.form.PointAdjustmentFormDTO; +import com.epmet.dto.result.CustomerUserDetailResultDTO; +import com.epmet.dto.result.PointAdjustmentResultDTO; +import com.epmet.entity.PointAdjustmentLogEntity; + +import java.util.List; +import java.util.Map; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-27 + */ +public interface PointAdjustmentLogService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-07-27 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-07-27 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PointAdjustmentLogDTO + * @author generator + * @date 2020-07-27 + */ + PointAdjustmentLogDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-27 + */ + void save(PointAdjustmentLogDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-07-27 + */ + void update(PointAdjustmentLogDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-07-27 + */ + void delete(String[] ids); + + /** + * @Description 根据UserId获取积分调整记录 + * @param param :: getUserId + * @return + * @author wangc + * @date 2020.07.27 10:51 + **/ + List adjustRecord(IssueInitiatorFormDTO param); + + /** + * @Description 用户详情 + * @param param + * @return + * @author wangc + * @date 2020.07.27 10:57 + **/ + CustomerUserDetailResultDTO userDetail(IssueInitiatorFormDTO param); + + /** + * @Description 积分调整 + * @param param + * @return + * @author wangc + * @date 2020.07.27 13:52 + **/ + void adjustPoint(PointAdjustmentFormDTO param); +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationLogService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationLogService.java index 54700cbf63..d8610aa2b0 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationLogService.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationLogService.java @@ -20,8 +20,12 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.PointVerificationLogDTO; -import com.epmet.dto.form.ResiCommonUserIdFormDTO; +import com.epmet.dto.form.CommonPageUserFormDTO; +import com.epmet.dto.form.PointVerificationFormDTO; +import com.epmet.dto.form.WorkPointVerificationFormDTO; +import com.epmet.dto.result.PointVerificationResultDTO; import com.epmet.dto.result.ResiPointLogListResultDTO; +import com.epmet.dto.result.WorkPointVerficationListResultDTO; import com.epmet.entity.PointVerificationLogEntity; import java.util.List; @@ -97,10 +101,28 @@ public interface PointVerificationLogService extends BaseService getMyExchangeRecord(ResiCommonUserIdFormDTO userId); + List getMyExchangeRecord(CommonPageUserFormDTO pageUser); + + /** + * @Description 获取工作端积分核销记录 + * @param verificationParam + * @return + * @author wangc + * @date 2020.07.24 16:08 + **/ + WorkPointVerficationListResultDTO getStaffVerificationRecordMonthly(WorkPointVerificationFormDTO verificationParam); + + /** + * @Description 积分核销 + * @param verificationParam + * @return + * @author wangc + * @date 2020.07.27 14:03 + **/ + PointVerificationResultDTO verifyPoint(PointVerificationFormDTO verificationParam); } \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationStatisticalDailyService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationStatisticalDailyService.java index 5c7b8903b3..d48e70529b 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationStatisticalDailyService.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/PointVerificationStatisticalDailyService.java @@ -92,4 +92,13 @@ public interface PointVerificationStatisticalDailyService extends BaseService getMyPointRecord(ResiCommonUserIdFormDTO userId); + List getMyPointRecord(CommonPageUserFormDTO pageUser); + } \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java index b3cdc6443f..8e3616e51f 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointStatisticalDailyService.java @@ -102,5 +102,14 @@ public interface UserPointStatisticalDailyService extends BaseService getPointRankWithinTimeZone(ResiPointRankFormDTO pointRankFormDTO); + + /** + * @Description 用户积分日统计新增或修改 + * @param entity + * @return + * @author wangc + * @date 2020.07.27 16:10 + **/ + void insertOrUpdate(UserPointStatisticalDailyEntity entity); } \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointTotalService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointTotalService.java index 04a49fbf11..c6ca4a0c3d 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointTotalService.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointTotalService.java @@ -20,6 +20,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.UserPointTotalDTO; +import com.epmet.dto.form.ResiCommonUserIdFormDTO; +import com.epmet.dto.form.ResiPointRankFormDTO; +import com.epmet.dto.result.ResiPointDetailResultDTO; +import com.epmet.dto.result.ResiPointRankListResultDTO; import com.epmet.entity.UserPointTotalEntity; import java.util.List; @@ -92,4 +96,31 @@ public interface UserPointTotalService extends BaseService * @date 2020-07-20 */ void delete(String[] ids); + + /** + * @Description 获取指定居民的积分信息 + * @param userId + * @return + * @author wangc + * @date 2020.07.22 15:58 + **/ + ResiPointDetailResultDTO getMyPoint(ResiCommonUserIdFormDTO userId); + + /** + * @Description 获取客户下用户积分排名榜 + * @param pointRankFormDTO + * @return + * @author wangc + * @date 2020.07.22 16:13 + **/ + List getPointRanking(ResiPointRankFormDTO pointRankFormDTO); + + /** + * @Description 新增或修改用户总积分记录 + * @param entity + * @return + * @author wangc + * @date 2020.07.27 16:45 + **/ + void insertOrUpdate(UserPointTotalEntity entity); } \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAdjustmentLogServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAdjustmentLogServiceImpl.java new file mode 100644 index 0000000000..220dc525e7 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointAdjustmentLogServiceImpl.java @@ -0,0 +1,242 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.PointAdjustmentLogDao; +import com.epmet.dao.UserPointActionLogDao; +import com.epmet.dto.PointAdjustmentLogDTO; +import com.epmet.dto.form.IssueInitiatorFormDTO; +import com.epmet.dto.form.PointAdjustmentFormDTO; +import com.epmet.dto.form.ResiCommonUserIdFormDTO; +import com.epmet.dto.result.CustomerUserDetailResultDTO; +import com.epmet.dto.result.PointAdjustmentResultDTO; +import com.epmet.dto.result.ResiPointDetailResultDTO; +import com.epmet.dto.result.StaffEtAgencyResultDTO; +import com.epmet.entity.PointAdjustmentLogEntity; +import com.epmet.entity.UserPointActionLogEntity; +import com.epmet.entity.UserPointStatisticalDailyEntity; +import com.epmet.entity.UserPointTotalEntity; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.service.PointAdjustmentLogService; +import com.epmet.service.UserPointStatisticalDailyService; +import com.epmet.service.UserPointTotalService; +import com.epmet.utils.DimIdGenerator; +import com.epmet.utils.ModuleConstant; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-27 + */ +@Service +public class PointAdjustmentLogServiceImpl extends BaseServiceImpl implements PointAdjustmentLogService { + + @Autowired + EpmetUserOpenFeignClient epmetUserOpenFeignClient; + @Autowired + UserPointTotalService userPointTotalService; + @Autowired + UserPointActionLogDao userPointActionLogDao; + @Autowired + UserPointStatisticalDailyService userPointStatisticalDailyService; + @Autowired + PointAdjustmentLogDao pointAdjustmentLogDao; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PointAdjustmentLogDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PointAdjustmentLogDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PointAdjustmentLogDTO get(String id) { + PointAdjustmentLogEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PointAdjustmentLogDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PointAdjustmentLogDTO dto) { + PointAdjustmentLogEntity entity = ConvertUtils.sourceToTarget(dto, PointAdjustmentLogEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PointAdjustmentLogDTO dto) { + PointAdjustmentLogEntity entity = ConvertUtils.sourceToTarget(dto, PointAdjustmentLogEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * @Description 根据UserId获取积分调整记录 + * @param param :: getUserId + * @return + * @author wangc + * @date 2020.07.27 10:51 + **/ + @Override + public List adjustRecord(IssueInitiatorFormDTO param) { + return baseDao.selectAdjustmentListByUserId(param.getUserId()); + } + + + /** + * @Description 用户详情 + * @param param + * @return + * @author wangc + * @date 2020.07.27 10:57 + **/ + @Override + public CustomerUserDetailResultDTO userDetail(IssueInitiatorFormDTO param) { + Result detailResult = epmetUserOpenFeignClient.customerUserDetail(param); + if(!detailResult.success()){ + throw new RenException(detailResult.getCode()); + } + ResiCommonUserIdFormDTO userParam = ConvertUtils.sourceToTarget(param,ResiCommonUserIdFormDTO.class); + ResiPointDetailResultDTO pointDto = userPointTotalService.getMyPoint(userParam); + if(null != detailResult.getData()){ + CustomerUserDetailResultDTO result = new CustomerUserDetailResultDTO(); + result.setPoint(null != pointDto ? pointDto.getUsablePoint() : NumConstant.ZERO); + } + detailResult.getData().setPoint(null != pointDto ? pointDto.getUsablePoint() : NumConstant.ZERO); + return detailResult.getData(); + } + + /** + * @Description 积分调整 + * @param param + * @return + * @author wangc + * @date 2020.07.27 13:52 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void adjustPoint(PointAdjustmentFormDTO param) { + if(null == param.getPoint()) throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + Date currentTime = new Date(); + Integer point = param.getPoint(); + if(StringUtils.equals(ModuleConstant.OPERATION_TYPE_MINUS,param.getAdjustmentType())){ + if(point > NumConstant.ZERO){ + point *= NumConstant.ONE_NEG; + } + }else{ + if(point < NumConstant.ZERO){ + point *= NumConstant.ONE_NEG; + } + } + //0.工作人员基本信息[agencyId 昵称] + IssueInitiatorFormDTO staffParam = new IssueInitiatorFormDTO(); + staffParam.setUserId(param.getOperatorId()); + Result staffResult = + epmetUserOpenFeignClient.staffMsg(staffParam); + String agencyId = ModuleConstant.EMPTY_STR; + String operatorName = ModuleConstant.EMPTY_STR; + if(staffResult.success() && null != staffResult.getData()){ + agencyId = staffResult.getData().getAgencyId(); + operatorName = staffResult.getData().getNickname(); + } + //1.记录用户积分行为记录表 + UserPointActionLogEntity userPointActionEntity = new UserPointActionLogEntity(); + userPointActionEntity.setUserId(param.getUserId()); + userPointActionEntity.setCustomerId(param.getCustomerId()); + userPointActionEntity.setActionFlag(param.getAdjustmentType()); + userPointActionEntity.setPoint(point); + userPointActionEntity.setEventStatement(param.getReason()); + userPointActionEntity.setEventName(ModuleConstant.EVENT_NAME_ADJUSTMENT); + userPointActionEntity.setOperatorAgencyId(agencyId); + userPointActionLogDao.insert(userPointActionEntity); + //2.记录积分调整记录表 + PointAdjustmentLogEntity adjustmentEntity = new PointAdjustmentLogEntity(); + adjustmentEntity.setActionId(userPointActionEntity.getId()); + adjustmentEntity.setOperatorName(operatorName); + adjustmentEntity.setAdjustReason(param.getReason()); + adjustmentEntity.setAdjustmentType(param.getAdjustmentType()); + adjustmentEntity.setPoint(point); + adjustmentEntity.setOperatorAgencyId(agencyId); + adjustmentEntity.setUserId(param.getUserId()); + //此处设置无效,会拦截到当前请求token中的userId,实际与这里的operatorId一致 + adjustmentEntity.setCreatedBy(param.getOperatorId()); + pointAdjustmentLogDao.insert(adjustmentEntity); + //3.新增或更新用户积分日统计表 + DimIdGenerator.DimIdBean dim = DimIdGenerator.getDimIdBean(currentTime); + UserPointStatisticalDailyEntity statistical = ConvertUtils.sourceToTarget(dim,UserPointStatisticalDailyEntity.class); + statistical.setUserId(param.getUserId()); + statistical.setActionFlag(param.getAdjustmentType()); + statistical.setCustomerId(param.getCustomerId()); + statistical.setPointChange(point); + userPointStatisticalDailyService.insertOrUpdate(statistical); + //4.更新用户积分总表 + UserPointTotalEntity total = new UserPointTotalEntity(); + total.setUserId(param.getUserId()); + total.setCustomerId(param.getCustomerId()); + //增量 + total.setUsedPoint(NumConstant.ZERO); + total.setUsablePoint(point); + total.setTotalPoint(point); + userPointTotalService.insertOrUpdate(total); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java index 6b48127276..0cfe6d642f 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationLogServiceImpl.java @@ -20,25 +20,42 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.PointVerificationLogDao; +import com.epmet.dao.UserPointActionLogDao; import com.epmet.dto.PointVerificationLogDTO; -import com.epmet.dto.form.ResiCommonUserIdFormDTO; -import com.epmet.dto.result.ResiPointLogListResultDTO; -import com.epmet.dto.result.ResiPointLogPeriodResultDTO; -import com.epmet.entity.PointVerificationLogEntity; +import com.epmet.dto.form.*; +import com.epmet.dto.result.*; +import com.epmet.entity.*; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.redis.PointRedis; import com.epmet.service.PointVerificationLogService; +import com.epmet.service.PointVerificationStatisticalDailyService; +import com.epmet.service.UserPointStatisticalDailyService; +import com.epmet.service.UserPointTotalService; +import com.epmet.utils.DimIdGenerator; +import com.epmet.utils.ModuleConstant; +import com.github.pagehelper.PageHelper; import com.google.common.collect.Maps; import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +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.Arrays; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; +import java.text.SimpleDateFormat; +import java.time.Instant; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.ZoneId; +import java.util.*; import java.util.stream.Collectors; /** @@ -50,6 +67,22 @@ import java.util.stream.Collectors; @Service public class PointVerificationLogServiceImpl extends BaseServiceImpl implements PointVerificationLogService { + protected final Logger logger = LoggerFactory.getLogger(getClass()); + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; + @Autowired + private UserPointTotalService userPointTotalService; + @Autowired + private PointVerificationLogDao pointVerificationLogDao; + @Autowired + private PointVerificationStatisticalDailyService pointVerificationStatisticalDailyService; + @Autowired + PointRedis pointRedis; + @Autowired + private UserPointActionLogDao userPointActionLogDao; + @Autowired + private UserPointStatisticalDailyService userPointStatisticalDailyService; + @Override public PageData page(Map params) { IPage page = baseDao.selectPage( @@ -104,14 +137,15 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl getMyExchangeRecord(ResiCommonUserIdFormDTO userId) { - List logList = baseDao.selectVerificationLog(userId.getUserId()); + public List getMyExchangeRecord(CommonPageUserFormDTO pageUser) { + PageHelper.startPage(pageUser.getPageNo(),pageUser.getPageSize()); + List logList = baseDao.selectVerificationLog(pageUser.getUserId()); List result = new LinkedList<>(); if(null != logList && !logList.isEmpty()){ Map> map = @@ -130,4 +164,204 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl resultObj = new LinkedList<>(); + + try{ + Date date = format.parse(verificationParam.getTimeParam()); + List dataList = + baseDao.selectStaffVerificationLog(verificationParam.getStaffId(),getFirstDayDateOfMonth(date),getLastDayOfMonth(date)); + result.setTotalPoint( + dataList.stream().mapToInt(o -> o.getPoint()).sum() + ); + List userIds = dataList.stream().map(data -> data.getUserId()).collect(Collectors.toList()); + Result> userInfo = + epmetUserOpenFeignClient.queryUserBaseInfo(userIds); + boolean userRequestCallback = userInfo.success() && null != userInfo.getData() && !userInfo.getData().isEmpty(); + for(int i = NumConstant.ZERO ; i < dataList.size() ; i++){ + + WorkPointVerificationDetailResultDTO o = new WorkPointVerificationDetailResultDTO(); + 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); + } + + }catch (Exception e){ + logger.error(String.format(ModuleConstant.DATE_TRANSLATION_ERROR,e.getMessage())); + } + result.setCheckingList(resultObj); + return result; + } + + /** + * @Description 积分核销 + * @param verificationParam + * @return + * @author wangc + * @date 2020.07.27 14:03 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public PointVerificationResultDTO verifyPoint(PointVerificationFormDTO verificationParam) { + Date currentTime = new Date(); + PointVerificationResultDTO result = new PointVerificationResultDTO(); + ResiCommonUserIdFormDTO userId = new ResiCommonUserIdFormDTO(); + userId.setUserId(verificationParam.getUserId()); + ResiPointDetailResultDTO currentPoint = userPointTotalService.getMyPoint(userId); + if(null == currentPoint || null == currentPoint.getUsablePoint() || currentPoint.getUsablePoint() < verificationParam.getPoint()){ + result.setSuccessFlag(false); + result.setFailureReason(ModuleConstant.POINT_NOT_ENOUGH); + return result; + } + IssueInitiatorFormDTO staffId = new IssueInitiatorFormDTO(); + staffId.setUserId(verificationParam.getOperatorId()); + Result staffResult = + epmetUserOpenFeignClient.staffMsg(staffId); + //保证积分为负数,因为是积分核销,只有在积分核销日统计和积分核销日志里存储正数 + Integer point = verificationParam.getPoint(); + if(point > NumConstant.ZERO){ + point *= NumConstant.ONE_NEG; + } + + String customerId = ModuleConstant.EMPTY_STR; + + String agencyId = ModuleConstant.EMPTY_STR; + String operatorName = ModuleConstant.EMPTY_STR; + PointVerificationStatisticalDailyEntity statistical = new PointVerificationStatisticalDailyEntity(); + if(staffResult.success() && null != staffResult.getData()){ + statistical = ConvertUtils.sourceToTarget(staffResult.getData(),PointVerificationStatisticalDailyEntity.class); + customerId = staffResult.getData().getCustomerId(); + operatorName = staffResult.getData().getNickname(); + agencyId = staffResult.getData().getAgencyId(); + } + + //1.记录积分行为日志 - 居民端 + UserPointActionLogEntity action = new UserPointActionLogEntity(); + action.setCreatedBy(verificationParam.getOperatorId()); + action.setUserId(verificationParam.getUserId()); + action.setActionFlag(ModuleConstant.OPERATION_TYPE_MINUS); + action.setEventName(ModuleConstant.EVENT_NAME_EXCHANGE); + action.setEventStatement(verificationParam.getRemark()); + action.setPoint(point); + userPointActionLogDao.insert(action); + //2.记录积分核销日志表 + PointVerificationLogEntity verificationLog = new PointVerificationLogEntity(); + verificationLog.setActionId(action.getId()); + verificationLog.setUserId(verificationParam.getUserId()); + verificationLog.setOperatorId(verificationParam.getOperatorId()); + verificationLog.setOperatorName(operatorName); + verificationLog.setOperatorAgencyId(agencyId); + verificationLog.setExchangedItem(verificationParam.getRemark()); + verificationLog.setPoint(point * NumConstant.ONE_NEG); + verificationLog.setLongitude(verificationParam.getLongitude()); + verificationLog.setDimension(verificationParam.getDimension()); + verificationLog.setAddress(verificationParam.getAddress()); + pointVerificationLogDao.insert(verificationLog); + //3.记录积分日统计表 + DimIdGenerator.DimIdBean dim = DimIdGenerator.getDimIdBean(currentTime); + UserPointStatisticalDailyEntity userStatistical = ConvertUtils.sourceToTarget(dim,UserPointStatisticalDailyEntity.class); + userStatistical.setUserId(verificationParam.getUserId()); + userStatistical.setActionFlag(ModuleConstant.OPERATION_TYPE_EXCHANGE); + userStatistical.setCustomerId(customerId); + userStatistical.setPointChange(point); + userPointStatisticalDailyService.insertOrUpdate(userStatistical); + //4.记录积分核销日统计 - 政府端 + statistical.setVerificatedPoint(point * NumConstant.ONE_NEG); + pointVerificationStatisticalDailyService.insertOrUpdate(statistical); + //5.更新用户总积分表 + UserPointTotalEntity userPoint = new UserPointTotalEntity(); + userPoint.setUserId(verificationParam.getUserId()); + userPoint.setCustomerId(customerId); + //负数 + userPoint.setTotalPoint(point); + //负数 + userPoint.setUsablePoint(point); + //正数 + userPoint.setUsedPoint(point * NumConstant.ONE_NEG); + userPointTotalService.insertOrUpdate(userPoint); + //6.将核销结果记录redis(List) key -> [epmet:point:verification:userId] lpush #新元素插入表头 lindex key 0 #表头 + + result.setSuccessFlag(true); + List userParam = new LinkedList<>(); + userParam.add(verificationParam.getUserId()); + Result> userResult = + epmetUserOpenFeignClient.queryUserBaseInfo(userParam); + String userHeadPhoto = ModuleConstant.EMPTY_STR; + String userNickname = ModuleConstant.EMPTY_STR; + if(userResult.success() && null != userResult.getData() && !userResult.getData().isEmpty()){ + userHeadPhoto = userResult.getData().get(NumConstant.ZERO).getHeadImgUrl(); + userNickname = userResult.getData().get(NumConstant.ZERO).getShowName(); + } + result.setUserHeadPhoto(userHeadPhoto); + result.setUserNickname(userNickname); + return result; + } + + /** + * @Description 得到指定日所在月第一天 + * @param date + * @return + * @author wangc + * @date 2020.07.27 17:21 + **/ + private static Date getFirstDayDateOfMonth(final Date date) { + + final Calendar cal = Calendar.getInstance(); + + cal.setTime(date); + + final int last = cal.getActualMinimum(Calendar.DAY_OF_MONTH); + + cal.set(Calendar.DAY_OF_MONTH, last); + + LocalDateTime localDateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(cal.getTimeInMillis()), ZoneId.systemDefault()); + LocalDateTime startOfDay = localDateTime.with(LocalTime.MIN); + return Date.from(startOfDay.atZone(ZoneId.systemDefault()).toInstant()); + + + } + + /** + * @Description 得到指定日所在月最后一天 + * @param date + * @return + * @author wangc + * @date 2020.07.27 17:21 + **/ + public static Date getLastDayOfMonth(final Date date) { + + final Calendar cal = Calendar.getInstance(); + + cal.setTime(date); + + final int last = cal.getActualMaximum(Calendar.DAY_OF_MONTH); + + cal.set(Calendar.DAY_OF_MONTH, last); + + LocalDateTime localDateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(cal.getTimeInMillis()), ZoneId.systemDefault());; + LocalDateTime endOfDay = localDateTime.with(LocalTime.MAX); + return Date.from(endOfDay.atZone(ZoneId.systemDefault()).toInstant()); + + + } } \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationStatisticalDailyServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationStatisticalDailyServiceImpl.java index b1802b95cd..195d5fe3d8 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationStatisticalDailyServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointVerificationStatisticalDailyServiceImpl.java @@ -97,4 +97,22 @@ public class PointVerificationStatisticalDailyServiceImpl extends BaseServiceImp baseDao.deleteBatchIds(Arrays.asList(ids)); } + /** + * @Description 新增或修改积分核销数据 + * @param entity + * @return + * @author wangc + * @date 2020.07.27 17:28 + **/ + @Override + public void insertOrUpdate(PointVerificationStatisticalDailyEntity entity) { + PointVerificationStatisticalDailyEntity existed = baseDao.selectIfExisted(entity.getCreatedBy(),entity.getDateId()); + if(null != existed && StringUtils.isNotBlank(existed.getId())){ + existed.setVerificatedPoint(null == existed.getVerificatedPoint() ? entity.getVerificatedPoint() : existed.getVerificatedPoint() + entity.getVerificatedPoint()); + updateById(existed); + }else{ + insert(entity); + } + } + } \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java index bb57179d6c..a3d82366c2 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointActionLogServiceImpl.java @@ -25,11 +25,12 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.UserPointActionLogDao; import com.epmet.dto.UserPointActionLogDTO; -import com.epmet.dto.form.ResiCommonUserIdFormDTO; +import com.epmet.dto.form.CommonPageUserFormDTO; import com.epmet.dto.result.ResiPointLogListResultDTO; import com.epmet.dto.result.ResiPointLogPeriodResultDTO; import com.epmet.entity.UserPointActionLogEntity; import com.epmet.service.UserPointActionLogService; +import com.github.pagehelper.PageHelper; import com.google.common.collect.Maps; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; @@ -102,14 +103,15 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl getMyPointRecord(ResiCommonUserIdFormDTO userId) { - List logList = baseDao.selectPointActionLogList(userId.getUserId()); + public List getMyPointRecord(CommonPageUserFormDTO pageUser) { + PageHelper.startPage(pageUser.getPageNo(),pageUser.getPageSize()); + List logList = baseDao.selectPointActionLogList(pageUser.getUserId()); List result = new LinkedList<>(); if(null != logList && !logList.isEmpty()){ Map> map = diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java index 6f68297877..851a65ecca 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointStatisticalDailyServiceImpl.java @@ -20,23 +20,31 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.UserPointStatisticalDailyDao; import com.epmet.dto.UserPointStatisticalDailyDTO; import com.epmet.dto.form.ResiPointRankFormDTO; import com.epmet.dto.result.ResiPointRankListResultDTO; +import com.epmet.dto.result.ResiPointRankResultDTO; +import com.epmet.dto.result.ResiPointRankingResultDTO; +import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.entity.UserPointStatisticalDailyEntity; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.UserPointStatisticalDailyService; +import com.epmet.utils.DimIdGenerator; import com.epmet.utils.ModuleConstant; +import com.github.pagehelper.PageHelper; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; /** * 用户积分统计情况 @@ -47,6 +55,8 @@ import java.util.Map; @Service public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl implements UserPointStatisticalDailyService { + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; @Override public PageData page(Map params) { @@ -108,13 +118,100 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl getPointRankWithinTimeZone(ResiPointRankFormDTO pointRankFormDTO) { + + List result = new LinkedList<>(); + ResiPointRankListResultDTO o = new ResiPointRankListResultDTO(); + //需要参数 Id 维度值 维度标识 + + //1.获取当前用户昵称以及当前用户所属客户Id + List userIdParam = new LinkedList<>(); + userIdParam.add(pointRankFormDTO.getUserId()); + Result> myResiInfoResult = + epmetUserOpenFeignClient.queryUserBaseInfo(userIdParam); + if(myResiInfoResult.success() && null != myResiInfoResult.getData() && !myResiInfoResult.getData().isEmpty()){ + if(StringUtils.isBlank(pointRankFormDTO.getCustomerId())) { + //缓存中陌生人游客也有对应的customerId + pointRankFormDTO.setCustomerId(myResiInfoResult.getData().get(NumConstant.ZERO).getCustomerId()); + } + //微信昵称 + o.setMyNickname(myResiInfoResult.getData().get(NumConstant.ZERO).getNickname()); } + //2.获取维度值 + DimIdGenerator.DimIdBean dimIdBean = DimIdGenerator.getDimIdBean(new Date()); + String dimVal = StringUtils.equals(ModuleConstant.TIME_ZONE_WEEK,pointRankFormDTO.getTimeDimension()) ? dimIdBean.getWeekId() : dimIdBean.getMonthId(); + //3.查询排行榜信息,个人排行(分页) + if(NumConstant.ONE < pointRankFormDTO.getPageNo()){ + PageHelper.startPage(pointRankFormDTO.getPageNo(),pointRankFormDTO.getPageSize()); + } + List rankList = + baseDao.selectPointRankWithinTimeZone(pointRankFormDTO.getCustomerId(),pointRankFormDTO.getTimeDimension(),dimVal); + if(null == rankList || rankList.isEmpty()){ + o.setMyPoint(NumConstant.ZERO); + o.setMyRanking(NumConstant.ZERO); + + return result; + } + //如果请求的是第一页 + if(NumConstant.ONE == pointRankFormDTO.getPageNo()) { + ResiPointRankResultDTO myself = + rankList.stream().filter(obj -> StringUtils.equals(obj.getUserId(), pointRankFormDTO.getUserId())).findFirst().get(); + if (null != myself) { + o.setMyPoint(myself.getTotalPoint()); + o.setMyRanking(myself.getRank()); + } else { + o.setMyPoint(NumConstant.ZERO); + if (rankList.get(rankList.size() - NumConstant.ONE).getTotalPoint() > NumConstant.ZERO) { + o.setMyRanking(rankList.get(rankList.size() - NumConstant.ONE).getRank() + NumConstant.ONE); + } else { + o.setMyRanking(rankList.get(rankList.size() - NumConstant.ONE).getRank()); + } + } + int fromIndex = pointRankFormDTO.getPageNo() * pointRankFormDTO.getPageSize(); + int toIndex = (pointRankFormDTO.getPageNo() + 1) * pointRankFormDTO.getPageSize(); + if(toIndex > rankList.size()) { + toIndex = rankList.size(); + } + rankList = rankList.subList(fromIndex,toIndex); + + } + List userIds = rankList.stream().map(ResiPointRankResultDTO::getUserId).collect(Collectors.toList()); + //查询用户昵称 + Result> userInfo = + epmetUserOpenFeignClient.queryUserBaseInfo(userIds); + boolean userRequestCallback = userInfo.success() && null != userInfo.getData() && !userInfo.getData().isEmpty(); + + for (int i = NumConstant.ZERO; i < rankList.size(); i++) { + ResiPointRankListResultDTO resultObj = ConvertUtils.sourceToTarget(o,ResiPointRankListResultDTO.class); + ResiPointRankingResultDTO target = new ResiPointRankingResultDTO(); + target.setRanking(rankList.get(i).getRank()); + target.setPoint(rankList.get(i).getTotalPoint()); + if(userRequestCallback) { + target.setNickname(null == userInfo.getData().get(i) ? "" : userInfo.getData().get(i).getNickname()); + } + resultObj.setRankList(target); + result.add(resultObj); + } + return result; + } - return null; + /** + * @Description 用户积分日统计新增或修改 + * @param entity + * @return + * @author wangc + * @date 2020.07.27 16:10 + **/ + @Override + public void insertOrUpdate(UserPointStatisticalDailyEntity entity) { + UserPointStatisticalDailyEntity existed = baseDao.selectIfExisted(entity.getUserId(),entity.getDateId(),entity.getActionFlag()); + if(null != existed && StringUtils.isNotBlank(existed.getId())){ + existed.setPointChange(null == existed.getPointChange() ? entity.getPointChange() : existed.getPointChange() + entity.getPointChange()); + updateById(existed); + }else{ + insert(entity); + } } + } \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java index 22f3cf2e94..741e5ad54f 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/UserPointTotalServiceImpl.java @@ -20,20 +20,30 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.utils.Result; import com.epmet.dao.UserPointTotalDao; import com.epmet.dto.UserPointTotalDTO; +import com.epmet.dto.form.ResiCommonUserIdFormDTO; +import com.epmet.dto.form.ResiPointRankFormDTO; +import com.epmet.dto.result.*; import com.epmet.entity.UserPointTotalEntity; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.UserPointTotalService; +import com.epmet.utils.DimIdGenerator; +import com.epmet.utils.ModuleConstant; +import com.github.pagehelper.PageHelper; import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.annotations.Param; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; /** * 用户积分总计 @@ -44,6 +54,8 @@ import java.util.Map; @Service public class UserPointTotalServiceImpl extends BaseServiceImpl implements UserPointTotalService { + @Autowired + EpmetUserOpenFeignClient epmetUserOpenFeignClient; @Override public PageData page(Map params) { @@ -97,4 +109,123 @@ public class UserPointTotalServiceImpl extends BaseServiceImpl getPointRanking(ResiPointRankFormDTO pointRankFormDTO) { + + List result = new LinkedList<>(); + ResiPointRankListResultDTO o = new ResiPointRankListResultDTO(); + + + //1.获取当前用户昵称以及当前用户所属客户Id + List userIdParam = new LinkedList<>(); + userIdParam.add(pointRankFormDTO.getUserId()); + Result> myResiInfoResult = + epmetUserOpenFeignClient.queryUserBaseInfo(userIdParam); + if(myResiInfoResult.success() && null != myResiInfoResult.getData() && !myResiInfoResult.getData().isEmpty()){ + if(StringUtils.isBlank(pointRankFormDTO.getCustomerId())) { + pointRankFormDTO.setCustomerId(myResiInfoResult.getData().get(NumConstant.ZERO).getCustomerId()); + } + //微信昵称 + o.setMyNickname(myResiInfoResult.getData().get(NumConstant.ZERO).getNickname()); + } + //2.查询排行榜信息,个人排行(分页) + if(NumConstant.ONE < pointRankFormDTO.getPageNo()){ + PageHelper.startPage(pointRankFormDTO.getPageNo(),pointRankFormDTO.getPageSize()); + } + //排行榜 + List rankList = + baseDao.selectUserPointRank(pointRankFormDTO.getCustomerId()); + //当排行榜没有数据时 + if(null == rankList || rankList.isEmpty()){ + o.setMyPoint(NumConstant.ZERO); + o.setMyRanking(NumConstant.ZERO); + + result.add(o); + return result; + } + //如果当前请求不是第一页 + if(NumConstant.ONE == pointRankFormDTO.getPageNo()) { + ResiPointRankResultDTO myself = + rankList.stream().filter(obj -> StringUtils.equals(obj.getUserId(), pointRankFormDTO.getUserId())).findFirst().get(); + if (null != myself) { + o.setMyPoint(myself.getTotalPoint()); + o.setMyRanking(myself.getRank()); + } else { + + if (rankList.get(rankList.size() - NumConstant.ONE).getTotalPoint() > NumConstant.ZERO) { + o.setMyRanking(rankList.get(rankList.size() - NumConstant.ONE).getRank() + NumConstant.ONE); + } else { + o.setMyRanking(rankList.get(rankList.size() - NumConstant.ONE).getRank()); + } + } + int fromIndex = pointRankFormDTO.getPageNo() * pointRankFormDTO.getPageSize(); + int toIndex = (pointRankFormDTO.getPageNo() + 1) * pointRankFormDTO.getPageSize(); + if(toIndex > rankList.size()) { + toIndex = rankList.size(); + } + //将假分页结果替换到rankList + rankList = rankList.subList(fromIndex,toIndex); + + } + + List userIds = rankList.stream().map(ResiPointRankResultDTO::getUserId).collect(Collectors.toList()); + //查询用户昵称 + Result> userInfo = + epmetUserOpenFeignClient.queryUserBaseInfo(userIds); + boolean userRequestCallback = userInfo.success() && null != userInfo.getData() && !userInfo.getData().isEmpty(); + + for (int i = NumConstant.ZERO; i < rankList.size(); i++) { + ResiPointRankListResultDTO resultObj = ConvertUtils.sourceToTarget(o,ResiPointRankListResultDTO.class); + + ResiPointRankingResultDTO target = new ResiPointRankingResultDTO(); + target.setRanking(rankList.get(i).getRank()); + target.setPoint(rankList.get(i).getTotalPoint()); + if(userRequestCallback) { + target.setNickname(null == userInfo.getData().get(i) ? "" : userInfo.getData().get(i).getNickname()); + } + resultObj.setRankList(target); + result.add(resultObj); + } + return result; + } + + /** + * @Description 新增或修改用户总积分记录 + * @param entity + * @return + * @author wangc + * @date 2020.07.27 16:45 + **/ + @Override + public void insertOrUpdate(UserPointTotalEntity entity) { + UserPointTotalEntity existed = baseDao.selectIfExisted(entity.getUserId()); + if(null != existed && StringUtils.isBlank(existed.getId())){ + existed.setUsedPoint(null == existed.getUsedPoint() ? entity.getUsedPoint() : entity.getUsedPoint() + existed.getUsedPoint()); + existed.setUsablePoint(null == existed.getUsablePoint() ? entity.getUsablePoint() : entity.getUsablePoint() + existed.getUsablePoint()); + existed.setTotalPoint(null == existed.getTotalPoint() ? entity.getTotalPoint() : entity.getTotalPoint() + existed.getTotalPoint()); + updateById(existed); + }else{ + insert(entity); + } + } + } \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/utils/DimIdGenerator.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/utils/DimIdGenerator.java new file mode 100644 index 0000000000..09809250f5 --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/utils/DimIdGenerator.java @@ -0,0 +1,91 @@ +package com.epmet.utils; + +import com.epmet.commons.tools.utils.DateUtils; +import lombok.Data; + +import java.util.Calendar; +import java.util.Date; + +public class DimIdGenerator { + + /** + * 生成日期维度ID + * @param targetDate + * @return + */ + public static String getDateDimId(Date targetDate) { + return DateUtils.format(targetDate, DateUtils.DATE_PATTERN_YYYYMMDD); + } + + /** + * 获取月维度ID + * @param date + * @return + */ + public static String getMonthDimId(Date date) { + return DateUtils.format(date, DateUtils.DATE_PATTERN_YYYYMM); + } + + /** + * 获取周维度ID ,每周的星期一为 周的开始 + * @param date + * @return + */ + public static String getWeekDimId(Date date) { + String yyyy = DateUtils.format(date, DateUtils.DATE_PATTERN_YYYY); + Calendar calendar = Calendar.getInstance(); + calendar.setFirstDayOfWeek(Calendar.MONDAY); + calendar.setTime(date); + return yyyy.concat("W").concat(calendar.get(Calendar.WEEK_OF_YEAR)+""); + } + + /** + * 获取季度维度ID + * @param date + * @return + */ + public static String getQuarterDimId(Date date) { + String yyyy = DateUtils.format(date, DateUtils.DATE_PATTERN_YYYY); + return yyyy.concat("Q").concat(DateUtils.getQuarterIndex(date) + ""); + } + + /** + * 获取年维度ID + * @param date + * @return + */ + public static String getYearDimId(Date date) { + return DateUtils.format(date, DateUtils.DATE_PATTERN_YYYY); + } + + /** + * 获取封装了所有ID的对象 + * @return + */ + public static DimIdBean getDimIdBean(Date date) { + DimIdBean dimIdBean = new DimIdBean(); + dimIdBean.setDateId(getDateDimId(date)); + dimIdBean.setMonthId(getMonthDimId(date)); + dimIdBean.setWeekId(getWeekDimId(date)); + dimIdBean.setQuarterId(getQuarterDimId(date)); + dimIdBean.setYearId(getYearDimId(date)); + return dimIdBean; + } + + public static void main(String[] args) { + DimIdBean dimIdBean = getDimIdBean(DateUtils.stringToDate("2020-06-14",DateUtils.DATE_PATTERN)); + System.out.println(dimIdBean); + } + + @Data + public static class DimIdBean { + private String dateId; + private String monthId; + private String quarterId; + private String yearId; + private String weekId; + + public DimIdBean() { + } + } +} diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/utils/ModuleConstant.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/utils/ModuleConstant.java index b21041f82c..c20c88fa00 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/utils/ModuleConstant.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/utils/ModuleConstant.java @@ -20,31 +20,74 @@ public interface ModuleConstant extends Constant { /** * 正则表达式 日期 严格按照【yyyy-MM-dd】格式匹配 - * */ + */ String DATE_REG = "^([1-9]\\d{3}-)([0-1][1-9]-)(([0-3]{0,1}[0-9]))$"; /** * 正则表达式 周 严格按照【yyyyWcc】格式匹配 - * */ + */ String WEEK_REG = "^([1-9]\\d{3}W)(([0-4][1-9])|50|51|52)"; /** * 正则表达式 月份 严格按照【yyyy-MM】格式匹配 - * */ + */ String MONTH_REG = "^([1-9]\\d{3}-)(([0][1-9])|10|11|12)"; /** * 兑换记录标题 - * */ + */ String TITLE_EXCHANGE_POINT = "积分兑换"; /** * 按周排行 - * */ + */ String TIME_ZONE_WEEK = "week"; /** * 按月排行 - * */ + */ String TIME_ZONE_MONTH = "month"; + + /** + * 给传参 yyyy-MM形式补全日期 + */ + String DATE_COMPLEMENT = "-01"; + + /** + * 日期转换格式异常 + */ + String DATE_TRANSLATION_ERROR = "日期转换格式异常 -> 【%s】"; + + /** + * 时间维度:周 + */ + String TIME_DIMENSION_WEEK = "week"; + + /** + * 时间维度:月 + */ + String TIME_DIMENSION_MONTH = "month"; + + /** + * 减 + */ + String OPERATION_TYPE_MINUS = "minus"; + + /** + * 加 + */ + String OPERATION_TYPE_PLUS = "plus"; + + /** + * 核销 + */ + String OPERATION_TYPE_EXCHANGE = "exchange"; + + String EMPTY_STR = ""; + + String EVENT_NAME_ADJUSTMENT = "积分调整"; + + String EVENT_NAME_EXCHANGE = "积分兑换"; + + String POINT_NOT_ENOUGH = "积分余额不足"; } diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointAdjustmentLogDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointAdjustmentLogDao.xml new file mode 100644 index 0000000000..b16836e89f --- /dev/null +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointAdjustmentLogDao.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationLogDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationLogDao.xml index da8ca4135c..c6bb3e4bc6 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationLogDao.xml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationLogDao.xml @@ -7,8 +7,6 @@ - - @@ -42,4 +40,22 @@ ORDER BY CREATED_TIME DESC + + + \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationStatisticalDailyDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationStatisticalDailyDao.xml index 1a69fb4c49..df61f4dc2d 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationStatisticalDailyDao.xml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/PointVerificationStatisticalDailyDao.xml @@ -23,5 +23,19 @@ + + \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml index e37642cd78..f8a5d074ec 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointStatisticalDailyDao.xml @@ -23,12 +23,14 @@ + + + \ No newline at end of file diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointTotalDao.xml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointTotalDao.xml index 9c372dc78b..1603237883 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointTotalDao.xml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/mapper/UserPointTotalDao.xml @@ -44,4 +44,19 @@ ( SELECT @point := NULL, @rank := 1 ) a + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java index 4fbf1e6f59..68391842db 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java @@ -5,6 +5,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.CustomerPartyBranchDTO; import com.epmet.dto.form.AddAgencyAndStaffFormDTO; +import com.epmet.dto.form.BelongGridNameFormDTO; import com.epmet.dto.form.ListPartyBranchFormDTO; import com.epmet.dto.result.*; import com.epmet.feign.fallback.GovOrgOpenFeignClientFallback; @@ -156,4 +157,13 @@ public interface GovOrgOpenFeignClient { */ @PostMapping("/gov/org/grid/gridsbystaffid/{staffId}") Result> listGridsbystaffid(@PathVariable("staffId") String staffId); + + /** + * + * @Description 根据网格id查询网格名称 + * @Author zxc + * @CreatedTime 2020/4/27 9:22 + */ + @PostMapping("/gov/org/customergrid/getgridnamebygridid") + Result getGridNameByGridId(@RequestBody BelongGridNameFormDTO formDTO); } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java index 48fa9c84dc..f6ca2691ee 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java @@ -6,6 +6,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.CustomerPartyBranchDTO; import com.epmet.dto.form.AddAgencyAndStaffFormDTO; +import com.epmet.dto.form.BelongGridNameFormDTO; import com.epmet.dto.form.ListPartyBranchFormDTO; import com.epmet.dto.result.*; import com.epmet.feign.GovOrgOpenFeignClient; @@ -90,4 +91,9 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { public Result> listGridsbystaffid(String staffId) { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "listGridsbystaffid", staffId); } + + @Override + public Result getGridNameByGridId(BelongGridNameFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridNameByGridId", formDTO); + } } diff --git a/epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/result/MyResiUserInfoResultDTO.java b/epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/result/MyResiUserInfoResultDTO.java index 35c8d0203c..21d940ec2c 100644 --- a/epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/result/MyResiUserInfoResultDTO.java +++ b/epmet-module/resi-mine/resi-mine-client/src/main/java/com/epmet/resi/mine/dto/result/MyResiUserInfoResultDTO.java @@ -42,5 +42,9 @@ public class MyResiUserInfoResultDTO implements Serializable { * 拥有角色名称列表,可为空[] * */ private List roleList; + /** + * 累计积分 + * */ + private Integer point; } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java index e047396cfd..7b4398dc31 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartyMemberConfirmServiceImpl.java @@ -12,13 +12,11 @@ import com.epmet.constant.PartyMemberConstant; import com.epmet.constant.PartyMemberMessageConstant; import com.epmet.constant.ReadFlagConstant; import com.epmet.constant.SmsTemplateConstant; -import com.epmet.dto.CustomerGridDTO; -import com.epmet.dto.CustomerStaffGridDTO; -import com.epmet.dto.UserResiInfoDTO; -import com.epmet.dto.UserRoleDTO; +import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.feign.EpmetMessageOpenFeignClient; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.modules.feign.EpmetUserFeignClient; import com.epmet.modules.feign.GovOrgFeignClient; import com.epmet.modules.feign.ResiGroupFeignClient; @@ -91,6 +89,8 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService private ResiGroupFeignClient resiGroupFeignClient; @Autowired private PartymemberAuthRecordService partymemberAuthRecordService; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; @Override @Transactional(rollbackFor = Exception.class) @@ -266,6 +266,16 @@ public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService //判断是否已注册居民,如果没有则注册居民 isResiRegister(partyMemberInfoDTO); + //将身份证号更新到用户基础信息表中 + UserBaseInfoDTO baseInfo = new UserBaseInfoDTO(); + baseInfo.setUserId(partyMemberInfoDTO.getUserId()); + baseInfo.setIdNum(partyMemberInfoDTO.getIdCard()); + baseInfo.setBuildingAddress(partyMemberInfoDTO.getBuilding()); + baseInfo.setStreet(partyMemberInfoDTO.getStreet()); + baseInfo.setSurname(partyMemberInfoDTO.getSurname()); + baseInfo.setName(partyMemberInfoDTO.getName()); + + epmetUserOpenFeignClient.saveUserBaseInfo(baseInfo); return result; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CustomerUserFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CustomerUserFormDTO.java new file mode 100644 index 0000000000..4be83bca63 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CustomerUserFormDTO.java @@ -0,0 +1,34 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 查询一个客户下所有用户包括陌生人 + * @ClassName CustomerUserFormDTO + * @Auth wangc + * @Date 2020-07-25 15:38 + */ +@Data +public class CustomerUserFormDTO implements Serializable { + private static final long serialVersionUID = -8209934663808878617L; + + public interface CustomerIdGroup extends CustomerClientShowGroup{} + + @NotBlank(message = "客户Id不能为空", groups = CustomerIdGroup.class) + private String customerId; + + /** + * 查询参数:全名 + * */ + private String name; + + @Min(1) + private Integer pageNo = 1; + + private Integer pageSize = 20; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IssueInitiatorFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IssueInitiatorFormDTO.java index e52d7c19e6..5e48aec3fd 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IssueInitiatorFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IssueInitiatorFormDTO.java @@ -1,7 +1,9 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -14,9 +16,12 @@ public class IssueInitiatorFormDTO implements Serializable { private static final long serialVersionUID = 1L; + public interface UserIdGroup extends CustomerClientShowGroup{} + /** * 话题id */ + @NotBlank(message = "用户Id不能为空",groups = UserIdGroup.class) private String userId; diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerUserDetailResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerUserDetailResultDTO.java new file mode 100644 index 0000000000..de2d3bf04c --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerUserDetailResultDTO.java @@ -0,0 +1,51 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 积分调整-人员查询-人员详情 + * @ClassName CustomerUserDetailResultDTO + * @Auth wangc + * @Date 2020-07-27 01:26 + */ +@Data +public class CustomerUserDetailResultDTO implements Serializable { + private static final long serialVersionUID = 893146364651215391L; + + /** + * 姓名 + * */ + private String name; + + /** + * 男 女 未知 + * */ + private String gender; + + /** + * 手机号 + * */ + private String mobile; + + /** + * 身份证号 + * */ + private String idNum; + + /** + * 居民地址 + * */ + private String address; + + /** + * 所属(注册)网格 + * */ + private String associatedGrid; + + /** + * 积分(可用) + * */ + private Integer point; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerUserResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerUserResultDTO.java new file mode 100644 index 0000000000..52885077d0 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerUserResultDTO.java @@ -0,0 +1,41 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @ClassName CustomerUserResultDTO + * @Auth wangc + * @Date 2020-07-25 15:45 + */ +@Data +public class CustomerUserResultDTO implements Serializable { + private static final long serialVersionUID = 388843991776771308L; + + /** + * 用户头像 + * */ + private String userHeadPhoto; + + /** + * 用户显示昵称 + * */ + private String userName; + + /** + * 用户微信昵称 + * */ + private String userNickname; + + /** + *注册网格名称 + * */ + private String registeredGrid; + + /** + * 用户Id + * */ + private String userId; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyResiUserInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyResiUserInfoResultDTO.java index bd9bd52e5b..4201a109a3 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyResiUserInfoResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/MyResiUserInfoResultDTO.java @@ -43,4 +43,9 @@ public class MyResiUserInfoResultDTO implements Serializable { * */ private List roleList; + /** + * 累计积分 + * */ + private Integer point; + } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffEtAgencyResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffEtAgencyResultDTO.java new file mode 100644 index 0000000000..08e83f83a6 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffEtAgencyResultDTO.java @@ -0,0 +1,42 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 工作人员的信息:显示昵称、所属机关Id + * @ClassName StaffEtAgencyResultDTO + * @Auth wangc + * @Date 2020-07-27 15:11 + */ +@Data +public class StaffEtAgencyResultDTO implements Serializable { + + private static final long serialVersionUID = -7048248108253396688L; + + /** + * 所属机关Id + * */ + private String agencyId; + + /** + * 工作人员昵称 xx机关-xx + * */ + private String nickname; + + /** + * 上级机关Id + * */ + private String pid; + + /** + * 上级机关Id集合 + * */ + private String pids; + + /** + * 客户Id + * */ + private String customerId; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBaseInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBaseInfoResultDTO.java index 983bffec24..96d90db4ef 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBaseInfoResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBaseInfoResultDTO.java @@ -16,6 +16,12 @@ public class UserBaseInfoResultDTO implements Serializable { private static final long serialVersionUID = 3124057264557384333L; @JsonIgnore private String id; + + /** + * 客户Id + * */ + private String customerId; + /** * 用户id */ @@ -76,6 +82,21 @@ public class UserBaseInfoResultDTO implements Serializable { */ private String headImgUrl; + /** + * 网格Id + * */ + private String registeredGridId; + + /** + * xx机关-yy网格 + * */ + private String registeredGridName; + + /** + * 显示昵称 xx网格-y先生/女士 + * */ + private String showName; + /** * 微信基本信息 */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 8a4de9898e..67ffff8fb1 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -4,6 +4,7 @@ import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.CustomerStaffDTO; import com.epmet.dto.GovStaffRoleDTO; +import com.epmet.dto.UserBaseInfoDTO; import com.epmet.dto.UserDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; @@ -148,4 +149,44 @@ public interface EpmetUserOpenFeignClient { **/ @PostMapping("/epmetuser/userbaseinfo/queryuserbaseinfo") Result> queryUserBaseInfo(@RequestBody List userIdList); + + /** + * @Description 新增或保存用户基本信息 + * @param baseInfo + * @return + * @author wangc + * @date 2020.07.23 13:31 + **/ + @PostMapping("/epmetuser/userbaseinfo/saveuserbaseinfo") + Result saveUserBaseInfo(@RequestBody UserBaseInfoDTO baseInfo); + + /** + * @Description 查询客户下所有用户包括陌生人 + * @param param + * @return + * @author wangc + * @date 2020.07.25 16:15 + **/ + @PostMapping("/epmetuser/gridlatest/customeruserlist") + Result> customerUserList(@RequestBody CustomerUserFormDTO param); + + /** + * @Description 查询用户详情信息 + * @param param + * @return + * @author wangc + * @date 2020.07.27 01:34 + **/ + @PostMapping("/epmetuser/userbaseinfo/customeruserdetail") + Result customerUserDetail(@RequestBody IssueInitiatorFormDTO param); + + /** + * @Description 得到工组人员的头像、名称、所属机关名称 + * @param userId + * @return + * @author wangc + * @date 2020.07.27 14:45 + **/ + @PostMapping("/epmetuser/customerstaff/staffmsg") + Result staffMsg(@RequestBody IssueInitiatorFormDTO userId); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index bb2cbe9d77..a6403a0448 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -5,6 +5,7 @@ import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.CustomerStaffDTO; import com.epmet.dto.GovStaffRoleDTO; +import com.epmet.dto.UserBaseInfoDTO; import com.epmet.dto.UserDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; @@ -98,4 +99,52 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result> queryUserBaseInfo(List userIdList) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "queryUserBaseInfo", userIdList); } + + /** + * @Description 新增或保存用户基本信息 + * @param baseInfo + * @return + * @author wangc + * @date 2020.07.23 13:31 + **/ + @Override + public Result saveUserBaseInfo(UserBaseInfoDTO baseInfo) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "saveUserBaseInfo", baseInfo); + } + + /** + * @Description 查询客户下所有用户包括陌生人 + * @param param + * @return + * @author wangc + * @date 2020.07.25 16:15 + **/ + @Override + public Result> customerUserList(CustomerUserFormDTO param) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "customerUserList", param); + } + + /** + * @Description 查询用户详情信息 + * @param param + * @return + * @author wangc + * @date 2020.07.27 01:34 + **/ + @Override + public Result customerUserDetail(IssueInitiatorFormDTO param) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "customerUserDetail", param); + } + + /** + * @Description 得到工组人员的头像、名称、所属机关名称 + * @param userId + * @return + * @author wangc + * @date 2020.07.27 14:45 + **/ + @Override + public Result staffMsg(IssueInitiatorFormDTO userId) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "staffMsg", userId); + } } diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index 2c3f938f56..69a426911b 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -88,6 +88,12 @@ 2.0.0 compile + + com.epmet + epmet-point-client + 2.0.0 + compile + diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserRedisKeys.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserRedisKeys.java new file mode 100644 index 0000000000..f4fffb6975 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/constant/UserRedisKeys.java @@ -0,0 +1,26 @@ +package com.epmet.constant; + +/** + * @Description + * @ClassName UserRedisKeys + * @Auth wangc + * @Date 2020-07-22 17:16 + */ +public class UserRedisKeys { + + /** + * 党群e事通redis前缀 + */ + private static String rootPrefix = "epmet:"; + + /** + * @Description 用户缓存Key + * @Param 用户Id + * @return epmet:resi:user:userId + * @Author wangc + * @Date 2020.04.13 11:27 + **/ + public static String getResiUserKey(String userId){ + return rootPrefix.concat("resi:user:").concat(userId); + } +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java index 883b9b21bd..ff6920eb27 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java @@ -297,4 +297,17 @@ public class CustomerStaffController { customerStaffService.resetStaffPassword(staffResetPwFormDTO); return new Result(); } -} \ No newline at end of file + + /** + * @Description 得到工组人员的头像、名称、所属机关名称 + * @param userId + * @return + * @author wangc + * @date 2020.07.27 14:45 + **/ + @PostMapping("staffmsg") + public Result staffMsg(@RequestBody IssueInitiatorFormDTO userId){ + ValidatorUtils.validateEntity(userId, IssueInitiatorFormDTO.UserIdGroup.class); + return new Result().ok(customerStaffService.getStaffMsg(userId)); + } +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java index 6d0344839d..8f0922d2b1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java @@ -26,6 +26,8 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.GridLatestDTO; +import com.epmet.dto.form.CustomerUserFormDTO; +import com.epmet.dto.result.CustomerUserResultDTO; import com.epmet.dto.result.LatestGridInfoResultDTO; import com.epmet.excel.GridLatestExcel; import com.epmet.service.GridLatestService; @@ -115,4 +117,17 @@ public class GridLatestController { return gridLatestService.getGridsByUserId(userId); } + + /** + * @Description 查询客户下所有用户包括陌生人 + * @param param + * @return + * @author wangc + * @date 2020.07.25 16:15 + **/ + @PostMapping("customeruserlist") + public Result> customerUserList(@RequestBody CustomerUserFormDTO param){ + return new Result>().ok(gridLatestService.getCustomerUsers(param)); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserBaseInfoController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserBaseInfoController.java index 046bc0f071..1b9f707e1a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserBaseInfoController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserBaseInfoController.java @@ -26,9 +26,13 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.UserBaseInfoDTO; +import com.epmet.dto.form.IssueInitiatorFormDTO; +import com.epmet.dto.result.CustomerUserDetailResultDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; +import com.epmet.entity.UserBaseInfoEntity; import com.epmet.excel.UserBaseInfoExcel; import com.epmet.service.UserBaseInfoService; +import oracle.jdbc.proxy.annotation.Post; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -117,4 +121,29 @@ public class UserBaseInfoController { userBaseInfoService.initBaseInfo(); return new Result(); } -} \ No newline at end of file + + /** + * @Description 新增或保存用户基本信息 + * @param baseInfo + * @return + * @author wangc + * @date 2020.07.23 13:31 + **/ + @PostMapping("saveuserbaseinfo") + public Result insertOrUpdate(@RequestBody UserBaseInfoEntity baseInfo){ + userBaseInfoService.insertOrUpdate(baseInfo); + return new Result(); + } + + /** + * @Description 查询用户详情信息 + * @param param + * @return + * @author wangc + * @date 2020.07.27 01:34 + **/ + @PostMapping("customeruserdetail") + public Result customerUserDetail(@RequestBody IssueInitiatorFormDTO param){ + return new Result().ok(userBaseInfoService.customerUserDetail(param.getUserId())); + } +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java index 9c0f40c8ef..ffd2e1f5c7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java @@ -9,10 +9,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.UserDTO; import com.epmet.dto.UserWechatDTO; import com.epmet.dto.form.*; -import com.epmet.dto.result.CreatedTimeByUserIdResultDTO; -import com.epmet.dto.result.LoginUserDetailsResultDTO; -import com.epmet.dto.result.MyResiUserInfoResultDTO; -import com.epmet.dto.result.PasswordLoginUserInfoResultDTO; +import com.epmet.dto.result.*; import com.epmet.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -31,7 +28,6 @@ public class UserController { @Autowired private UserService userService; - /** * @param formDTO * @return com.epmet.commons.tools.utils.Result @@ -131,5 +127,4 @@ public class UserController { public Result saveWxUser(@RequestBody WxUserFormDTO formDTO){ return new Result().ok(userService.saveWxUser(formDTO)); } - } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridLatestDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridLatestDao.java index 735be62827..2e5b9e7b8f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridLatestDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/GridLatestDao.java @@ -55,4 +55,13 @@ public interface GridLatestDao extends BaseDao { * @Author sun **/ List selectAllGridsByUserId(@Param("userId") String userId); + + /** + * @Description 查询一个客户下的所有用户:注册居民、陌生人 + * @param customerId + * @return + * @author wangc + * @date 2020.07.25 15:26 + **/ + List selectAllUserByCustomerId(@Param("customerId")String customerId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RegisterRelationDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RegisterRelationDao.java index ff7df4de5c..4570711923 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RegisterRelationDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/RegisterRelationDao.java @@ -36,4 +36,12 @@ public interface RegisterRelationDao extends BaseDao { List getListByUserId(@Param("userId") String userId); + /** + * @Description 查询用户的首次注册网格Id + * @param userId + * @return + * @author wangc + * @date 2020.07.23 15:31 + **/ + RegisterRelationEntity selectRegisteredGridIdByUserId(@Param("userId") String userId); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java index fc00b799bf..b0a2490bda 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java @@ -6,6 +6,7 @@ import com.epmet.dto.UserHeadPhotoDTO; import com.epmet.dto.UserWechatDTO; import com.epmet.dto.form.WxLoginUserInfoFormDTO; import com.epmet.dto.result.CertifiedResultDTO; +import com.epmet.dto.result.CustomerUserResultDTO; import com.epmet.entity.UserWechatEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -64,4 +65,14 @@ public interface UserWechatDao extends BaseDao{ * @Date 2020/7/22 10:46 **/ List selectAll(); + + /** + * @Description 查询人员信息,排序,包括陌生人与注册居民,没有注册居民则只有微信昵称 + * @param userIds + * @return + * @author wangc + * @date 2020.07.27 00:58 + **/ + List selectResiAndStrangerInfo(@Param("userIds") List userIds,@Param("realName")String realName); + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/feign/fallback/OperRoleUserFeignClientFallBack.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/feign/fallback/OperRoleUserFeignClientFallBack.java index 53691f4e84..39fc8aae8a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/feign/fallback/OperRoleUserFeignClientFallBack.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/feign/fallback/OperRoleUserFeignClientFallBack.java @@ -5,7 +5,7 @@ import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.feign.OperRoleUserFeignClient; import org.springframework.stereotype.Component; -import sun.misc.Contended; + import java.util.List; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java index 1e34bba718..ac442388ad 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/UserBaseInfoRedis.java @@ -17,10 +17,29 @@ package com.epmet.redis; +import cn.hutool.core.bean.BeanUtil; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.redis.RedisUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.UserRedisKeys; +import com.epmet.dao.GridLatestDao; +import com.epmet.dao.RegisterRelationDao; +import com.epmet.dao.UserBaseInfoDao; +import com.epmet.dto.form.BelongGridNameFormDTO; +import com.epmet.dto.result.BelongGridNameResultDTO; +import com.epmet.dto.result.LatestGridInfoResultDTO; +import com.epmet.dto.result.UserBaseInfoResultDTO; +import com.epmet.entity.RegisterRelationEntity; +import com.epmet.feign.GovOrgOpenFeignClient; +import com.epmet.util.ModuleConstant; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import java.util.Map; + +import static com.epmet.commons.tools.redis.RedisUtils.NOT_EXPIRE; + /** * 用户基础信息 * @@ -31,17 +50,93 @@ import org.springframework.stereotype.Component; public class UserBaseInfoRedis { @Autowired private RedisUtils redisUtils; + @Autowired + private UserBaseInfoDao userBaseInfoDao; + @Autowired + private RegisterRelationDao registerRelationDao; + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + @Autowired + private GridLatestDao gridLatestDao; public void delete(Object[] ids) { } - public void set(){ - + /** + * @Description 将用户基本信息放入缓存 + * @param baseInfo + * @return + * @author wangc + * @date 2020.07.23 14:43 + **/ + public void set(UserBaseInfoResultDTO baseInfo){ + if(StringUtils.isBlank(baseInfo.getUserId())) return; + String key = UserRedisKeys.getResiUserKey(baseInfo.getUserId()); + //bean to map + Map map = BeanUtil.beanToMap(baseInfo, false, true); + redisUtils.hMSet(key, map,NOT_EXPIRE); } public String get(String id){ return null; } + /** + * @Description 缓存中获取用户基本信息 + * @param userId + * @return + * @author wangc + * @date 2020.07.23 14:58 + **/ + public UserBaseInfoResultDTO getUserInfo(String userId){ + if(StringUtils.isNotBlank(userId)){ + //获取居民缓存key + Map map = redisUtils.hGetAll(UserRedisKeys.getResiUserKey(userId)); + if(null != map && !map.isEmpty()) { + //缓存中有数据,直接返回 + return BeanUtil.mapToBean(map, UserBaseInfoResultDTO.class, true); + } + //缓存中没有数据,先查数据库,放入缓存后再返回 + UserBaseInfoResultDTO baseInfo = userBaseInfoDao.selectListByUserIdList(userId); + if(null != baseInfo && StringUtils.isNotBlank(baseInfo.getId())){ + RegisterRelationEntity relation = registerRelationDao.selectRegisteredGridIdByUserId(userId); + //如果没有首次注册网格,则没有网格名称(xx机关-xx网格)、显示昵称(xx网格-x先生/女士) + if(null != relation && StringUtils.isNotBlank(relation.getGridId())){ + baseInfo.setCustomerId(relation.getCustomerId()); + BelongGridNameFormDTO gridParam = new BelongGridNameFormDTO(); + gridParam.setGridId(relation.getGridId()); + Result gridResult = + govOrgOpenFeignClient.getGridNameByGridId(gridParam); + if(gridResult.success() && null != gridResult.getData() + && StringUtils.isNotBlank(gridResult.getData().getBelongsGridName())){ + String gridFullName = gridResult.getData().getBelongsGridName(); + baseInfo.setRegisteredGridName(gridFullName); + StringBuffer buffer = new StringBuffer(gridFullName.split(ModuleConstant.DASH)[NumConstant.ONE]).append(ModuleConstant.DASH).append(baseInfo.getSurname()); + switch(baseInfo.getGender()){ + case NumConstant.ONE_STR : + buffer.append(ModuleConstant.RESI_USER_NICKNAME_SUFFIX_MALE); + break; + case NumConstant.TWO_STR : + buffer.append(ModuleConstant.RESI_USER_NICKNAME_SUFFIX_FEMALE); + break; + default: + buffer.append(ModuleConstant.RESI_USER_NICKNAME_SUFFIX_GENDER_UNKNOWN); + } + baseInfo.setShowName(buffer.toString()); + } + }else{ + //如果没有居民注册记录,说明当前用户是陌生人,需要从陌生人网格访问列表中查询所属的客户Id + LatestGridInfoResultDTO gridLatest = + gridLatestDao.selectLatestGridInfoByUserId(userId); + if(null != gridLatest){ + baseInfo.setCustomerId(gridLatest.getCustomerId()); + } + } + set(baseInfo); + return baseInfo; + } + } + return null; + } } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java index 4129e37c8c..9d7003fa65 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java @@ -241,4 +241,13 @@ public interface CustomerStaffService extends BaseService { * @Date 2020/7/1 10:41 **/ void resetStaffPassword(StaffResetPwFormDTO staffResetPwFormDTO); + + /** + * @Description 得到工组人员的头像、名称、所属机关名称 + * @param userId + * @return + * @author wangc + * @date 2020.07.27 14:45 + **/ + StaffEtAgencyResultDTO getStaffMsg(IssueInitiatorFormDTO userId); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java index 1833106279..595f5a503f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java @@ -22,7 +22,9 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.GridLatestDTO; +import com.epmet.dto.form.CustomerUserFormDTO; import com.epmet.dto.form.VisitedFormDTO; +import com.epmet.dto.result.CustomerUserResultDTO; import com.epmet.dto.result.LatestGridInfoResultDTO; import com.epmet.entity.GridLatestEntity; @@ -120,4 +122,13 @@ public interface GridLatestService extends BaseService { **/ Result> getGridsByUserId(String userId); + /** + * @Description 查询客户下所有用户包括陌生人 + * @param customerUserFormDTO + * @return + * @author wangc + * @date 2020.07.25 16:15 + **/ + List getCustomerUsers(CustomerUserFormDTO customerUserFormDTO); + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java index d4c13a7c1c..c2512b3e8b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java @@ -20,6 +20,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.UserBaseInfoDTO; +import com.epmet.dto.result.CustomerUserDetailResultDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.entity.UserBaseInfoEntity; @@ -111,4 +112,22 @@ public interface UserBaseInfoService extends BaseService { * @Date 2020/7/22 10:42 **/ void initBaseInfo(); + + /** + * @Description 检查有无居民基础信息表,如果有更新,无插入 + * @param baseInfo + * @return + * @author wangc + * @date 2020.07.23 10:35 + **/ + void insertOrUpdate(UserBaseInfoEntity baseInfo); + + /** + * @Description 查询用户详情信息 + * @param userId + * @return + * @author wangc + * @date 2020.07.27 01:34 + **/ + CustomerUserDetailResultDTO customerUserDetail(String userId); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java index a0f3aab8e2..00975b17de 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java @@ -43,11 +43,13 @@ import com.epmet.entity.GovStaffRoleEntity; import com.epmet.entity.StaffRoleEntity; import com.epmet.entity.UserEntity; import com.epmet.feign.AuthFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.redis.CustomerStaffRedis; import com.epmet.service.CustomerStaffService; import com.epmet.service.GovStaffRoleService; import com.epmet.service.StaffRoleService; import com.epmet.service.UserService; +import com.epmet.util.ModuleConstant; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; @@ -86,6 +88,8 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl page(Map params) { @@ -480,4 +484,26 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl agencyResult = govOrgOpenFeignClient.getAgencyByStaff(userId.getUserId()); + if(agencyResult.success() && null != agencyResult.getData()){ + result = ConvertUtils.sourceToTarget(agencyResult.getData(),StaffEtAgencyResultDTO.class); + result.setAgencyId(agencyResult.getData().getId()); + result.setNickname(new StringBuilder(agencyResult.getData().getOrganizationName()).append(ModuleConstant.DASH).append(staff.getRealName()).toString()); + } + } + return result; + } + } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java index 8f24ebf889..a8938ea276 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java @@ -26,13 +26,20 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.GridLatestDao; +import com.epmet.dao.UserWechatDao; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.GridLatestDTO; +import com.epmet.dto.form.CustomerUserFormDTO; import com.epmet.dto.form.VisitedFormDTO; +import com.epmet.dto.result.CustomerUserResultDTO; import com.epmet.dto.result.LatestGridInfoResultDTO; +import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.entity.GridLatestEntity; import com.epmet.redis.GridLatestRedis; +import com.epmet.redis.UserBaseInfoRedis; import com.epmet.service.GridLatestService; +import com.epmet.util.ModuleConstant; +import com.github.pagehelper.PageHelper; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,10 +47,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; /** * 最近访问网格表 记录用户访问网格的最近一次记录,对同一网格只记录一条记录,同一网格每次只更新最近一次访问的时间 @@ -58,6 +62,10 @@ public class GridLatestServiceImpl extends BaseServiceImpl page(Map params) { @@ -166,4 +174,35 @@ public class GridLatestServiceImpl extends BaseServiceImpl>().ok(gridList); } + /** + * @Description 查询客户下所有用户包括陌生人 + * @param customerUserFormDTO + * @return + * @author wangc + * @date 2020.07.25 16:15 + **/ + @Override + public List getCustomerUsers(CustomerUserFormDTO customerUserFormDTO) { + List userIds = baseDao.selectAllUserByCustomerId(customerUserFormDTO.getCustomerId()); + List allData = new LinkedList<>(); + if(null == userIds || userIds.isEmpty()){ + return allData; + } + PageHelper.startPage(customerUserFormDTO.getPageNo(),customerUserFormDTO.getPageSize()); + allData = userWechatDao.selectResiAndStrangerInfo(userIds,customerUserFormDTO.getName()); + if(null == allData || allData.isEmpty()){ + return allData; + } + allData.forEach(info -> { + if(StringUtils.isBlank(info.getUserName())){ + info.setUserName(ModuleConstant.EMPTY_STR); + UserBaseInfoResultDTO cache = userBaseInfoRedis.getUserInfo(info.getUserId()); + if(null != cache) { + info.setRegisteredGrid(cache.getRegisteredGridName()); + } + } + }); + return allData; + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java index b2cba9216e..2b0e655f24 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/RegisterRelationServiceImpl.java @@ -296,6 +296,7 @@ public class RegisterRelationServiceImpl extends BaseServiceImpl { + UserBaseInfoResultDTO baseInfo = userBaseInfoRedis.getUserInfo(id); + //为了保证传过来的user数量与返回的一致,就算查出的用户信息为空也要添加进集合里 + //if(null != baseInfo && StringUtils.isNotBlank(baseInfo.getId())){ + userBaseInfoList.add(baseInfo); + //} + }); return userBaseInfoList; } @@ -197,5 +206,52 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl page(Map params) { @@ -192,6 +197,18 @@ public class UserResiInfoServiceImpl extends BaseServiceImpl wechat = userWechatService.selectByUserId(userResiInfoDTO.getUserId()); + if(null != wechat && !wechat.isEmpty()){ + baseInfo.setHeadImgUrl(wechat.get(NumConstant.ZERO).getHeadImgUrl()); + baseInfo.setGender(wechat.get(NumConstant.ZERO).getSex().toString()); + baseInfo.setNickname(wechat.get(NumConstant.ZERO).getNickname()); + } + userBaseInfoService.insertOrUpdate(baseInfo); } /** diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java index b6d3a63965..70f342e4c4 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java @@ -3,6 +3,7 @@ package com.epmet.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; 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.CpUserDetailRedis; import com.epmet.commons.tools.utils.Result; @@ -15,9 +16,12 @@ import com.epmet.dto.UserDTO; import com.epmet.dto.UserWechatDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; +import com.epmet.entity.UserBaseInfoEntity; import com.epmet.entity.UserEntity; import com.epmet.entity.UserWechatEntity; +import com.epmet.feign.EpmetPointOpenFeignClient; import com.epmet.feign.GovOrgFeignClient; +import com.epmet.service.UserBaseInfoService; import com.epmet.service.UserService; import com.epmet.util.ModuleConstant; import org.apache.commons.lang3.StringUtils; @@ -45,6 +49,10 @@ public class UserServiceImpl extends BaseServiceImpl implem private UserRoleDao userRoleDao; @Autowired private CpUserDetailRedis cpUserDetailRedis; + @Autowired + private UserBaseInfoService userBaseInfoService; + @Autowired + private EpmetPointOpenFeignClient epmetPointOpenFeignClient; private static final Logger log = LoggerFactory.getLogger(UserServiceImpl.class); @@ -122,6 +130,12 @@ public class UserServiceImpl extends BaseServiceImpl implem userWechatDTO.setUpdatedTime(new Date()); userWechatDTO.setUpdatedBy(wxUserInfoFormDTO.getUserId()); userWechatDao.updateByUserId(userWechatDTO); + UserBaseInfoEntity baseInfo = new UserBaseInfoEntity(); + baseInfo.setUserId(wxUserInfoFormDTO.getUserId()); + baseInfo.setNickname(wxUserInfoFormDTO.getNickName()); + baseInfo.setHeadImgUrl(wxUserInfoFormDTO.getAvatarUrl()); + baseInfo.setGender(wxUserInfoFormDTO.getGender()); + userBaseInfoService.insertOrUpdate(baseInfo); return new Result(); } @@ -172,6 +186,14 @@ public class UserServiceImpl extends BaseServiceImpl implem userRoleFormDTO.setCustomerId(myResiUserInfoFormDTO.getCustomerId()); userRoleFormDTO.setGridId(myResiUserInfoFormDTO.getGridId()); result.setRoleList(userRoleDao.getUserRoleList(userRoleFormDTO)); + + TokenDto dto = new TokenDto(); + dto.setUserId(myResiUserInfoFormDTO.getUserId()); + Result pointResult = epmetPointOpenFeignClient.myPoint(dto); + if(pointResult.success() && null != pointResult.getData()){ + //累计积分 + result.setPoint(pointResult.getData().getAccumulatedPoint()); + } return result; } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/util/ModuleConstant.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/util/ModuleConstant.java index 7bd388d54a..68b95319ac 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/util/ModuleConstant.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/util/ModuleConstant.java @@ -19,4 +19,19 @@ public interface ModuleConstant { * 未检索到客户信息 * */ String CUSTOMER_INFO_NOT_FOUND = "未检索到客户信息"; + + String RESI_USER_NICKNAME_SUFFIX_MALE = "先生"; + + String RESI_USER_NICKNAME_SUFFIX_FEMALE = "女士"; + + String RESI_USER_NICKNAME_SUFFIX_GENDER_UNKNOWN = "先生/女士"; + + String DASH = "-"; + + String GENDER_MALE = "男"; + + String GENDER_FEMALE = "女"; + + String GENDER_UNKNOWN = "未知"; + } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/GridLatestDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/GridLatestDao.xml index 3dfe0f9939..d98797d043 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/GridLatestDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/GridLatestDao.xml @@ -82,4 +82,15 @@ AND customer_user_id = #{userId} ORDER BY latest_time DESC + + + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml index 472540b853..44dbb58269 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml @@ -30,5 +30,19 @@ user_id = #{userId} + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml index 6ed041a555..9d3167ed1b 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml @@ -89,4 +89,27 @@ uw.DEL_FLAG = '0' AND uw.NICKNAME IS NOT NULL + + + From 69974842ef53c39449174f9f988f312456ebaeca Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 28 Jul 2020 09:44:16 +0800 Subject: [PATCH 02/38] heart-work:heart+1 --- .../epmet-heart-server/deploy/docker-compose-dev.yml | 4 ++-- epmet-module/epmet-heart/epmet-heart-server/pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml index 03c207c23e..69bb46e905 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml @@ -1,8 +1,8 @@ version: "3.7" services: - oper-crm-server: + epmet-heart-server: container_name: epmet-heart-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.2 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.3 ports: - "8111:8111" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml index 83bdd4921c..13589f1e64 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.2 + 0.0.3 com.epmet epmet-heart From 0619dfc051a6091186b34b3e88928e32a444be49 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 28 Jul 2020 09:45:02 +0800 Subject: [PATCH 03/38] heart-work:point+1 --- .../epmet-point-server/deploy/docker-compose-dev.yml | 4 ++-- epmet-module/epmet-point/epmet-point-server/pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml index d37df7459f..28246db531 100644 --- a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml @@ -1,8 +1,8 @@ version: "3.7" services: - oper-crm-server: + epmet-point-server: container_name: epmet-point-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.2 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.3 ports: - "8112:8112" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-point/epmet-point-server/pom.xml b/epmet-module/epmet-point/epmet-point-server/pom.xml index 1b8007a7b7..c031fc496e 100644 --- a/epmet-module/epmet-point/epmet-point-server/pom.xml +++ b/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"> 4.0.0 - 0.0.2 + 0.0.3 epmet-point com.epmet From a7f5109345ba6278f20c62f02487d8746e082092 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 28 Jul 2020 09:51:16 +0800 Subject: [PATCH 04/38] =?UTF-8?q?=E4=BF=AE=E6=94=B9heart=E3=80=81point?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-heart-server/deploy/docker-compose-prod.yml | 2 +- .../epmet-heart-server/deploy/docker-compose-test.yml | 2 +- .../epmet-point-server/deploy/docker-compose-prod.yml | 2 +- .../epmet-point-server/deploy/docker-compose-test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-prod.yml index 8a981b9839..48b1d7310e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-prod.yml @@ -1,6 +1,6 @@ version: "3.7" services: - oper-crm-server: + epmet-heart-server: container_name: epmet-heart-server-prod image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-heart-server:0.0.1 ports: diff --git a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-test.yml b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-test.yml index 7e11fabd04..1156199182 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-test.yml @@ -1,6 +1,6 @@ version: "3.7" services: - oper-crm-server: + epmet-heart-server: container_name: epmet-heart-server-test image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-heart-server:0.0.1 ports: diff --git a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-prod.yml b/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-prod.yml index a53ebe7fe4..31c7258001 100644 --- a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-prod.yml +++ b/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-prod.yml @@ -1,6 +1,6 @@ version: "3.7" services: - oper-crm-server: + epmet-point-server: container_name: epmet-point-server-prod image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/epmet-point-server:0.0.1 ports: diff --git a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-test.yml b/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-test.yml index 42c92bd168..adaebe09d4 100644 --- a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-test.yml @@ -1,6 +1,6 @@ version: "3.7" services: - oper-crm-server: + epmet-point-server: container_name: epmet-point-server-test image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-point-server:0.0.1 ports: From 24cd250261b7d037b5a992ab27c873f5b36fde0a Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 28 Jul 2020 10:00:01 +0800 Subject: [PATCH 05/38] =?UTF-8?q?dto=E5=90=8D=E7=A7=B0=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/AdjustmentController.java | 4 ++-- ...UserResultDTO.java => CustomerUser4PointResultDTO.java} | 7 +++---- .../java/com/epmet/feign/EpmetUserOpenFeignClient.java | 2 +- .../feign/fallback/EpmetUserOpenFeignClientFallback.java | 2 +- .../java/com/epmet/controller/GridLatestController.java | 6 +++--- .../src/main/java/com/epmet/dao/UserWechatDao.java | 4 ++-- .../src/main/java/com/epmet/service/GridLatestService.java | 4 ++-- .../java/com/epmet/service/impl/GridLatestServiceImpl.java | 6 +++--- .../src/main/resources/mapper/UserWechatDao.xml | 2 +- 9 files changed, 18 insertions(+), 19 deletions(-) rename epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/{CustomerUserResultDTO.java => CustomerUser4PointResultDTO.java} (71%) diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/AdjustmentController.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/AdjustmentController.java index 15e1980651..0f2876f74f 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/AdjustmentController.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/AdjustmentController.java @@ -5,8 +5,8 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.CustomerUserFormDTO; import com.epmet.dto.form.IssueInitiatorFormDTO; +import com.epmet.dto.result.CustomerUser4PointResultDTO; import com.epmet.dto.result.CustomerUserDetailResultDTO; -import com.epmet.dto.result.CustomerUserResultDTO; import com.epmet.dto.result.PointAdjustmentResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.PointAdjustmentLogService; @@ -39,7 +39,7 @@ public class AdjustmentController { * @date 2020.07.27 10:57 **/ @PostMapping("userlist") - public Result> userList(@RequestBody CustomerUserFormDTO param){ + public Result> userList(@RequestBody CustomerUserFormDTO param){ ValidatorUtils.validateEntity(param, CustomerUserFormDTO.CustomerIdGroup.class); return epmetUserOpenFeignClient.customerUserList(param); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerUserResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerUser4PointResultDTO.java similarity index 71% rename from epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerUserResultDTO.java rename to epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerUser4PointResultDTO.java index 52885077d0..95cba037ef 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerUserResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CustomerUser4PointResultDTO.java @@ -6,13 +6,12 @@ import java.io.Serializable; /** * @Description - * @ClassName CustomerUserResultDTO + * @ClassName CustomerUser4PointResultDTO * @Auth wangc - * @Date 2020-07-25 15:45 + * @Date 2020-07-28 09:47 */ @Data -public class CustomerUserResultDTO implements Serializable { - private static final long serialVersionUID = 388843991776771308L; +public class CustomerUser4PointResultDTO implements Serializable { /** * 用户头像 diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index c765ec0a28..70116e6e91 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -199,7 +199,7 @@ public interface EpmetUserOpenFeignClient { * @date 2020.07.25 16:15 **/ @PostMapping("/epmetuser/gridlatest/customeruserlist") - Result> customerUserList(@RequestBody CustomerUserFormDTO param); + Result> customerUserList(@RequestBody CustomerUserFormDTO param); /** * @Description 查询用户详情信息 diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 39c71e8e9f..6ba2d156fd 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -135,7 +135,7 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien * @date 2020.07.25 16:15 **/ @Override - public Result> customerUserList(CustomerUserFormDTO param) { + public Result> customerUserList(CustomerUserFormDTO param) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "customerUserList", param); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java index 8f0922d2b1..342300ea58 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java @@ -27,7 +27,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.GridLatestDTO; import com.epmet.dto.form.CustomerUserFormDTO; -import com.epmet.dto.result.CustomerUserResultDTO; +import com.epmet.dto.result.CustomerUser4PointResultDTO; import com.epmet.dto.result.LatestGridInfoResultDTO; import com.epmet.excel.GridLatestExcel; import com.epmet.service.GridLatestService; @@ -126,8 +126,8 @@ public class GridLatestController { * @date 2020.07.25 16:15 **/ @PostMapping("customeruserlist") - public Result> customerUserList(@RequestBody CustomerUserFormDTO param){ - return new Result>().ok(gridLatestService.getCustomerUsers(param)); + public Result> customerUserList(@RequestBody CustomerUserFormDTO param){ + return new Result>().ok(gridLatestService.getCustomerUsers(param)); } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java index b0a2490bda..ef513d0ac7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserWechatDao.java @@ -6,7 +6,7 @@ import com.epmet.dto.UserHeadPhotoDTO; import com.epmet.dto.UserWechatDTO; import com.epmet.dto.form.WxLoginUserInfoFormDTO; import com.epmet.dto.result.CertifiedResultDTO; -import com.epmet.dto.result.CustomerUserResultDTO; +import com.epmet.dto.result.CustomerUser4PointResultDTO; import com.epmet.entity.UserWechatEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -73,6 +73,6 @@ public interface UserWechatDao extends BaseDao{ * @author wangc * @date 2020.07.27 00:58 **/ - List selectResiAndStrangerInfo(@Param("userIds") List userIds,@Param("realName")String realName); + List selectResiAndStrangerInfo(@Param("userIds") List userIds, @Param("realName")String realName); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java index 595f5a503f..4298d1ef68 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java @@ -24,7 +24,7 @@ import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.GridLatestDTO; import com.epmet.dto.form.CustomerUserFormDTO; import com.epmet.dto.form.VisitedFormDTO; -import com.epmet.dto.result.CustomerUserResultDTO; +import com.epmet.dto.result.CustomerUser4PointResultDTO; import com.epmet.dto.result.LatestGridInfoResultDTO; import com.epmet.entity.GridLatestEntity; @@ -129,6 +129,6 @@ public interface GridLatestService extends BaseService { * @author wangc * @date 2020.07.25 16:15 **/ - List getCustomerUsers(CustomerUserFormDTO customerUserFormDTO); + List getCustomerUsers(CustomerUserFormDTO customerUserFormDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java index a8938ea276..a3b1a97331 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java @@ -31,7 +31,7 @@ import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.GridLatestDTO; import com.epmet.dto.form.CustomerUserFormDTO; import com.epmet.dto.form.VisitedFormDTO; -import com.epmet.dto.result.CustomerUserResultDTO; +import com.epmet.dto.result.CustomerUser4PointResultDTO; import com.epmet.dto.result.LatestGridInfoResultDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.entity.GridLatestEntity; @@ -182,9 +182,9 @@ public class GridLatestServiceImpl extends BaseServiceImpl getCustomerUsers(CustomerUserFormDTO customerUserFormDTO) { + public List getCustomerUsers(CustomerUserFormDTO customerUserFormDTO) { List userIds = baseDao.selectAllUserByCustomerId(customerUserFormDTO.getCustomerId()); - List allData = new LinkedList<>(); + List allData = new LinkedList<>(); if(null == userIds || userIds.isEmpty()){ return allData; } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml index 9d3167ed1b..d3edc68319 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml @@ -91,7 +91,7 @@ - SELECT wechat.USER_ID, wechat.NICKNAME AS userNickname, From 2c6c48fffdafd37fff469aa5198cac844ac5d113 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 28 Jul 2020 10:03:33 +0800 Subject: [PATCH 06/38] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-oss/epmet-oss-server/pom.xml | 2 +- .../epmet-third-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-third/epmet-third-server/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml index 6460e6170d..058634f3f1 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml @@ -3,7 +3,7 @@ services: epmet-oss-server: container_name: epmet-oss-server-dev # image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/epmet-oss-server:0.3.2 - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-oss-server:0.3.23 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-oss-server:0.3.24 ports: - "8083:8083" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-oss/epmet-oss-server/pom.xml b/epmet-module/epmet-oss/epmet-oss-server/pom.xml index 1b8463505e..5947b835d9 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/pom.xml +++ b/epmet-module/epmet-oss/epmet-oss-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.23 + 0.3.24 com.epmet epmet-oss diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml index 9ee4c50dfa..696dfe4e0e 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml +++ b/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.65 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.66 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index a8b968cfb6..9f84313461 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.65 + 0.0.66 com.epmet From 19f9af474f46eeadfdc8ce78e272080675c496ed Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 28 Jul 2020 10:06:58 +0800 Subject: [PATCH 07/38] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-oss/epmet-oss-server/deploy/docker-compose-test.yml | 2 +- .../epmet-third-server/deploy/docker-compose-test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-test.yml b/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-test.yml index 00aef6ff53..6978f9d660 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-test.yml @@ -3,7 +3,7 @@ services: epmet-oss-server: container_name: epmet-oss-server-test # image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-test/epmet-oss-server:0.3.2 - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-oss-server:0.3.23 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-oss-server:0.3.24 ports: - "8083:8083" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml index 160ea5a29d..854e668863 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-server:0.0.65 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-server:0.0.66 ports: - "8110:8110" network_mode: host # 使用现有网络 From eb80a21b3b80a1f71f07dacd4587dd624d824933 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 28 Jul 2020 10:41:59 +0800 Subject: [PATCH 08/38] =?UTF-8?q?=E7=A7=AF=E5=88=86=E8=A7=84=E5=88=99?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/result/PointDetailResultDTO.java | 2 +- .../src/main/java/com/epmet/dto/result/PointRuleResultDTO.java | 1 + .../main/java/com/epmet/service/impl/PointRuleServiceImpl.java | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointDetailResultDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointDetailResultDTO.java index 8ed856dc91..a911fed232 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointDetailResultDTO.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointDetailResultDTO.java @@ -19,6 +19,6 @@ public class PointDetailResultDTO implements Serializable { private Integer point; private String pointUnit; private String upLimit; - private String enabledFlag; + private Boolean enabledFlag; private String upLimitDesc; } diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointRuleResultDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointRuleResultDTO.java index bf8e546806..e66779580e 100644 --- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointRuleResultDTO.java +++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/result/PointRuleResultDTO.java @@ -16,6 +16,7 @@ public class PointRuleResultDTO implements Serializable { private String ruleId; private String ruleName; private String ruleDesc; + private Boolean enabledFlag; /** * 拼接好的 积分值/单位 */ diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java index a0ef4fed91..68c14c2739 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java +++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointRuleServiceImpl.java @@ -115,6 +115,7 @@ public class PointRuleServiceImpl extends BaseServiceImpl fun != null).collect(Collectors.toList()); @@ -129,7 +130,7 @@ public class PointRuleServiceImpl extends BaseServiceImpl Date: Tue, 28 Jul 2020 10:46:37 +0800 Subject: [PATCH 09/38] =?UTF-8?q?=E9=83=A8=E7=BD=B2voice=E5=92=8Cpoint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-point-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-point/epmet-point-server/pom.xml | 2 +- .../gov-voice/gov-voice-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-voice/gov-voice-server/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml index 28246db531..20460ab5a4 100644 --- a/epmet-module/epmet-point/epmet-point-server/deploy/docker-compose-dev.yml +++ b/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.3 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.4 ports: - "8112:8112" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-point/epmet-point-server/pom.xml b/epmet-module/epmet-point/epmet-point-server/pom.xml index c031fc496e..3285affd5b 100644 --- a/epmet-module/epmet-point/epmet-point-server/pom.xml +++ b/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"> 4.0.0 - 0.0.3 + 0.0.4 epmet-point com.epmet diff --git a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml index 315b948a99..2a67f32e7f 100644 --- a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-voice-server: container_name: gov-voice-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-voice-server:0.3.60 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-voice-server:0.3.61 ports: - "8105:8105" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-voice/gov-voice-server/pom.xml b/epmet-module/gov-voice/gov-voice-server/pom.xml index 8076291c2a..16f35ef7a0 100644 --- a/epmet-module/gov-voice/gov-voice-server/pom.xml +++ b/epmet-module/gov-voice/gov-voice-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"> 4.0.0 - 0.3.60 + 0.3.61 gov-voice com.epmet From b83a5f9c558a4c091a323542bde7dba48bcc1b11 Mon Sep 17 00:00:00 2001 From: zxc <954985706@qq.com> Date: Tue, 28 Jul 2020 10:58:09 +0800 Subject: [PATCH 10/38] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E6=96=B9=E5=B9=B3=E5=8F=B0-=E8=8E=B7=E5=8F=96customerId?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ComponentVerifyTicketServiceImpl.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java index 85986d041e..74f723aed1 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java @@ -1,9 +1,7 @@ package com.epmet.service.impl; -import cn.hutool.core.convert.Convert; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; -import com.alibaba.fastjson.TypeReference; import com.alibaba.nacos.client.config.utils.IOUtils; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.RenException; @@ -13,6 +11,7 @@ import com.epmet.constant.ModuleConstant; import com.epmet.constant.ThirdRedisKeyConstant; import com.epmet.constant.ThirdRunTimeInfoConstant; import com.epmet.dao.*; +import com.epmet.dto.PaCustomerUserAgencyDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.feign.EpmetUserOpenFeignClient; @@ -81,6 +80,8 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe private EpmetUserOpenFeignClient epmetUserOpenFeignClient; @Autowired private AuthResultRecordDao authResultRecordDao; + @Autowired + private PaCustomerUserAgencyDao paCustomerUserAgencyDao; @Value("${third.platform.appId}") private String componentAppId; @@ -652,10 +653,12 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe * @author zxc */ public String getLoginUserCustomerId(TokenDto tokenDto){ - LoginUserDetailsFormDTO dto = new LoginUserDetailsFormDTO(); + /*LoginUserDetailsFormDTO dto = new LoginUserDetailsFormDTO(); BeanUtils.copyProperties(tokenDto,dto); - LoginUserDetailsResultDTO data = epmetUserOpenFeignClient.getLoginUserDetails(dto).getData(); - return data.getCustomerId(); + LoginUserDetailsResultDTO data = epmetUserOpenFeignClient.getLoginUserDetails(dto).getData();*/ + PaCustomerUserAgencyDTO result = paCustomerUserAgencyDao.selectByUserId(tokenDto.getUserId()); +// return data.getCustomerId(); + return result.getCustomerId(); } /** From 49ba482316ab864462808dc6673546e2d4cf4045 Mon Sep 17 00:00:00 2001 From: zxc <954985706@qq.com> Date: Tue, 28 Jul 2020 10:59:37 +0800 Subject: [PATCH 11/38] =?UTF-8?q?epmet-third=E6=9C=8D=E5=8A=A1=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-third/epmet-third-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml index 696dfe4e0e..42619a92cf 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml +++ b/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.66 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.67 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index 9f84313461..7a44b88d3b 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.66 + 0.0.67 com.epmet From 5920bfd8e80dacb5c2e9a3a10a6939efdd898508 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Tue, 28 Jul 2020 11:00:42 +0800 Subject: [PATCH 12/38] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=AD=BE=E5=88=B0-?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=9E=E5=86=B5=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/exception/EpmetErrorCode.java | 2 +- .../resi/ResiActCaculateDistanceFormDTO.java | 5 +- .../form/resi/ResiActInsertLiveFormDTO.java | 16 +-- .../dto/form/resi/ResiActSignInFormDTO.java | 19 ++-- .../controller/ResiActListController.java | 4 +- .../service/impl/ActLiveRecServiceImpl.java | 78 +++++++++++++-- .../service/impl/ActSignInRecServiceImpl.java | 79 +++++++++++++-- .../impl/ActUserRelationServiceImpl.java | 99 +++++++++++++------ .../com/epmet/utils/ValidityVerification.java | 94 ------------------ .../src/main/resources/mapper/ActInfoDao.xml | 4 +- 10 files changed, 230 insertions(+), 170 deletions(-) delete mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/utils/ValidityVerification.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 7ec8b301fd..1cd6ba736c 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -84,7 +84,7 @@ public enum EpmetErrorCode { // 爱心互助 居民端 NOT_IN_THE_SIGN_IN_RANGE(8510, "您还未进入指定的签到范围~"), NON_CERTIFIED_VOLUNTEER(8511, "活动报名失败,请先认证志愿者"), - ACT_TIME_CONFLICT(8512, "活动时间冲突"), + ACT_TIME_CONFLICT(8512, "报名失败。您本次报名活动时间与已报名活动时间间隔较短,为了不影响您已报名的活动,请选择其他时间的活动,谢谢。"), // 该错误不会提示给前端,只是后端传输错误信息用。 ACCESS_SQL_FILTER_MISSION_ARGS(8701, "缺少生成权限过滤SQL所需参数"), diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActCaculateDistanceFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActCaculateDistanceFormDTO.java index bd67a4a69b..b55dd0e392 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActCaculateDistanceFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActCaculateDistanceFormDTO.java @@ -3,6 +3,7 @@ package com.epmet.dto.form.resi; import lombok.Data; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; /** @@ -28,13 +29,13 @@ public class ResiActCaculateDistanceFormDTO implements Serializable { /** * 经度 */ - @NotBlank(message = "经度不能为空", groups = { AddUserInternalGroup.class }) + @NotNull(message = "经度不能为空", groups = { AddUserInternalGroup.class }) private Double longitude; /** * 纬度 */ - @NotBlank(message = "纬度不能为空", groups = { AddUserInternalGroup.class }) + @NotNull(message = "纬度不能为空", groups = { AddUserInternalGroup.class }) private Double latitude; /** diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActInsertLiveFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActInsertLiveFormDTO.java index 54182f0da3..b6a0b22542 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActInsertLiveFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActInsertLiveFormDTO.java @@ -21,6 +21,7 @@ import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; import java.math.BigDecimal; import java.util.List; @@ -43,13 +44,6 @@ public class ResiActInsertLiveFormDTO implements Serializable { */ public interface AddUserInternalGroup {} - /** - * 添加用户操作的用户可见异常分组 - * 该分组用于校验需要返回给前端错误信息提示的列,需要继承CustomerClientShowGroup - * 返回错误码为8999,提示信息为DTO中具体的列的校验注解message的内容 - */ - public interface AddUserShowGroup extends CustomerClientShowGroup {} - // <<<<<<<<<<<<<<<<<<<校验分组结束<<<<<<<<<<<<<<<<<<<<<<<< /** @@ -66,19 +60,19 @@ public class ResiActInsertLiveFormDTO implements Serializable { /** * 活动签到位置经度 */ - @NotBlank(message = "活动签到位置经度不能为空", groups = { AddUserInternalGroup.class }) + @NotNull(message = "活动签到位置经度不能为空", groups = { AddUserInternalGroup.class }) private BigDecimal longitude; /** * 活动签到位置纬度 */ - @NotBlank(message = "活动签到位置纬度不能为空", groups = { AddUserInternalGroup.class }) + @NotNull(message = "活动签到位置纬度不能为空", groups = { AddUserInternalGroup.class }) private BigDecimal latitude; /** * 活动签到地址 */ - @NotBlank(message = "活动签到地址不能为空", groups = { AddUserInternalGroup.class, AddUserShowGroup.class}) + @NotBlank(message = "活动签到地址不能为空", groups = { AddUserInternalGroup.class}) private String address; /** @@ -99,6 +93,6 @@ public class ResiActInsertLiveFormDTO implements Serializable { /** * 客户id */ - @NotBlank(message = "客户id不能为空", groups = {AddUserShowGroup.class }) + @NotBlank(message = "客户id不能为空", groups = {AddUserInternalGroup.class }) private String customerId; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActSignInFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActSignInFormDTO.java index 69c1486c7f..f315a04449 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActSignInFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/resi/ResiActSignInFormDTO.java @@ -20,7 +20,9 @@ package com.epmet.dto.form.resi; import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; +import javax.validation.constraints.Min; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; import java.math.BigDecimal; import java.util.List; @@ -43,13 +45,6 @@ public class ResiActSignInFormDTO implements Serializable { */ public interface AddUserInternalGroup {} - /** - * 添加用户操作的用户可见异常分组 - * 该分组用于校验需要返回给前端错误信息提示的列,需要继承CustomerClientShowGroup - * 返回错误码为8999,提示信息为DTO中具体的列的校验注解message的内容 - */ - public interface AddUserShowGroup extends CustomerClientShowGroup {} - // <<<<<<<<<<<<<<<<<<<校验分组结束<<<<<<<<<<<<<<<<<<<<<<<< /** @@ -66,19 +61,19 @@ public class ResiActSignInFormDTO implements Serializable { /** * 活动签到位置经度 */ - @NotBlank(message = "活动签到位置经度不能为空", groups = { AddUserInternalGroup.class }) + @NotNull(message = "活动签到位置经度不能为空", groups = { AddUserInternalGroup.class }) private BigDecimal longitude; /** * 活动签到位置纬度 */ - @NotBlank(message = "活动签到位置纬度不能为空", groups = { AddUserInternalGroup.class }) + @NotNull(message = "活动签到位置纬度不能为空", groups = { AddUserInternalGroup.class }) private BigDecimal latitude; /** * 活动签到地址 */ - @NotBlank(message = "活动签到地址不能为空", groups = { AddUserInternalGroup.class, AddUserShowGroup.class}) + @NotBlank(message = "活动签到地址不能为空", groups = { AddUserInternalGroup.class}) private String address; /** @@ -89,7 +84,7 @@ public class ResiActSignInFormDTO implements Serializable { /** * 0不同步实况1同步到实况记录 */ - @NotBlank(message = "是否同步到实况记录不能为空", groups = { AddUserInternalGroup.class, AddUserShowGroup.class}) + @Min(0) private Integer syncLive; /** @@ -100,6 +95,6 @@ public class ResiActSignInFormDTO implements Serializable { /** * 客户id */ - @NotBlank(message = "客户id不能为空", groups = {AddUserShowGroup.class }) + @NotBlank(message = "客户id不能为空", groups = {AddUserInternalGroup.class }) private String customerId; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java index 29cde0e42b..f6c61a6815 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java @@ -275,7 +275,7 @@ public class ResiActListController { **/ @PostMapping("insertlive") public Result insertLive(@LoginUser TokenDto tokenDto, @RequestBody ResiActInsertLiveFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO, ResiActInsertLiveFormDTO.AddUserInternalGroup.class, ResiActInsertLiveFormDTO.AddUserShowGroup.class); + ValidatorUtils.validateEntity(formDTO, ResiActInsertLiveFormDTO.AddUserInternalGroup.class); Result result = actLiveRecService.insertLive(tokenDto, formDTO); return new Result(); } @@ -290,7 +290,7 @@ public class ResiActListController { **/ @PostMapping("signin") public Result actSignIn(@LoginUser TokenDto tokenDto, @RequestBody ResiActSignInFormDTO formDTO) { - ValidatorUtils.validateEntity(formDTO, ResiActSignInFormDTO.AddUserInternalGroup.class, ResiActSignInFormDTO.AddUserShowGroup.class); + ValidatorUtils.validateEntity(formDTO, ResiActSignInFormDTO.AddUserInternalGroup.class); return actSignInRecService.actSignIn(tokenDto, formDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java index ed5cd03409..ef55f849ab 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java @@ -18,16 +18,23 @@ package com.epmet.service.impl; import com.alibaba.fastjson.JSON; +import com.alibaba.nacos.client.utils.StringUtils; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.MqConstant; 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.ActPointEventMsg; import com.epmet.commons.tools.enums.EventEnum; -import com.epmet.commons.tools.exception.ErrorCode; +import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.scan.param.ImgScanParamDTO; +import com.epmet.commons.tools.scan.param.ImgTaskDTO; +import com.epmet.commons.tools.scan.param.TextScanParamDTO; +import com.epmet.commons.tools.scan.param.TextTaskDTO; +import com.epmet.commons.tools.scan.result.SyncScanResult; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.commons.tools.utils.SendMqMsgUtils; import com.epmet.constant.ActMessageConstant; import com.epmet.dao.ActLivePicDao; @@ -42,15 +49,14 @@ import com.epmet.entity.ActLiveRecEntity; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.redis.ActLiveRecRedis; import com.epmet.service.ActLiveRecService; -import com.epmet.utils.ValidityVerification; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.*; -import java.util.stream.Collectors; /** * 活动实况记录 @@ -60,7 +66,7 @@ import java.util.stream.Collectors; */ @Service public class ActLiveRecServiceImpl extends BaseServiceImpl implements ActLiveRecService { - private Logger logger = LogManager.getLogger(VolunteerInfoServiceImpl.class); + private Logger logger = LogManager.getLogger(ActLiveRecServiceImpl.class); @Autowired private ActLiveRecRedis actLiveRecRedis; @@ -71,6 +77,13 @@ public class ActLiveRecServiceImpl extends BaseServiceImpl liveRecList(Map map) { if (map.get("actId") == null){ @@ -125,11 +138,8 @@ public class ActLiveRecServiceImpl extends BaseServiceImpl insertLive(TokenDto tokenDto, ResiActInsertLiveFormDTO formDTO) { formDTO.setUserId(tokenDto.getUserId()); - // 文本校验 - ValidityVerification verification = new ValidityVerification(); - verification.textScanVerification(formDTO.getDesc(),"添加实况-文本内容审核失败"); - // 图片校验 - verification.imgScanVerification(formDTO.getImages(),"添加实况-图片审核失败"); + // 文本校验/图片校验 + this.auditActContent(formDTO.getDesc(),formDTO.getImages()); // 存储活动实况记录表 String uuid = UUID.randomUUID().toString().replaceAll("-",""); @@ -153,6 +163,56 @@ public class ActLiveRecServiceImpl extends BaseServiceImpl().ok(uuid); } + /** + * 内容校验 + * + * @param context 文本 + * @param imgList 图片 + * @return void + * @Author zhangyong + * @Date 10:15 2020-07-28 + **/ + private void auditActContent(String context, List imgList) { + //审核活动详情中的内容 + if(StringUtils.isNotBlank(context)){ + TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); + TextTaskDTO taskDTO = new TextTaskDTO(); + taskDTO.setContent(context); + taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); + textScanParamDTO.getTasks().add(taskDTO); + Result contentSyncScanRes = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); + if (!contentSyncScanRes.success()) { + logger.error("添加实况接口失败,返参:", JSON.toJSONString(contentSyncScanRes)); + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!contentSyncScanRes.getData().isAllPass()) { + throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); + } + } + logger.info("添加实况成功"); + } + if(null!=imgList&&imgList.size()>0){ + //审核活动详情中的图片 + ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO(); + imgList.forEach(url -> { + ImgTaskDTO task = new ImgTaskDTO(); + task.setDataId(UUID.randomUUID().toString().replace("-", "")); + task.setUrl(url); + imgScanParamDTO.getTasks().add(task); + }); + Result imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO); + if (!imgScanResult.success()){ + logger.error("添加实况图片审核接口失败,返参:", JSON.toJSONString(imgScanResult)); + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!imgScanResult.getData().isAllPass()) { + throw new RenException(EpmetErrorCode.IMG_SCAN_FAILED.getCode()); + } + } + logger.info("添加实况审核成功"); + } + } + private void grantActPoints(ResiActInsertLiveFormDTO formDTO){ //备注 String remark=String.format(ActMessageConstant.ACT_POINTS_EVENT_VOLUNTEER_LIVE,formDTO.getUserId(),formDTO.getActId()); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActSignInRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActSignInRecServiceImpl.java index c874a61640..c2fdd5c71d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActSignInRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActSignInRecServiceImpl.java @@ -17,11 +17,21 @@ package com.epmet.service.impl; +import com.alibaba.fastjson.JSON; +import com.alibaba.nacos.client.utils.StringUtils; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.scan.param.ImgScanParamDTO; +import com.epmet.commons.tools.scan.param.ImgTaskDTO; +import com.epmet.commons.tools.scan.param.TextScanParamDTO; +import com.epmet.commons.tools.scan.param.TextTaskDTO; +import com.epmet.commons.tools.scan.result.SyncScanResult; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.constant.ActConstant; import com.epmet.dao.ActSignInPicDao; import com.epmet.dao.ActSignInRecDao; @@ -35,8 +45,10 @@ import com.epmet.entity.ActSignInRecEntity; import com.epmet.redis.ActSignInRecRedis; import com.epmet.service.ActLiveRecService; import com.epmet.service.ActSignInRecService; -import com.epmet.utils.ValidityVerification; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -64,15 +76,20 @@ public class ActSignInRecServiceImpl extends BaseServiceImpl imgList) { + //审核活动详情中的内容 + if(StringUtils.isNotBlank(context)){ + TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); + TextTaskDTO taskDTO = new TextTaskDTO(); + taskDTO.setContent(context); + taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); + textScanParamDTO.getTasks().add(taskDTO); + Result contentSyncScanRes = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); + if (!contentSyncScanRes.success()) { + logger.error("活动签到接口失败,返参:", JSON.toJSONString(contentSyncScanRes)); + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!contentSyncScanRes.getData().isAllPass()) { + throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); + } + } + logger.info("活动签到成功"); + } + if(null!=imgList&&imgList.size()>0){ + //审核活动详情中的图片 + ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO(); + imgList.forEach(url -> { + ImgTaskDTO task = new ImgTaskDTO(); + task.setDataId(UUID.randomUUID().toString().replace("-", "")); + task.setUrl(url); + imgScanParamDTO.getTasks().add(task); + }); + Result imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO); + if (!imgScanResult.success()){ + logger.error("活动签到图片审核接口失败,返参:", JSON.toJSONString(imgScanResult)); + throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); + } else { + if (!imgScanResult.getData().isAllPass()) { + throw new RenException(EpmetErrorCode.IMG_SCAN_FAILED.getCode()); + } + } + logger.info("活动签到图片审核成功"); + } + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java index 134ac475e2..7aacc0cd0d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java @@ -237,45 +237,19 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl NumConstant.ZERO){ signUp = false; - logger.info("活动报名失败,活动时间冲突"); + logger.info("报名失败。您本次报名活动时间与已报名活动时间间隔较短,为了不影响您已报名的活动,请选择其他时间的活动,谢谢。"); throw new RenException(EpmetErrorCode.ACT_TIME_CONFLICT.getCode()); } } else { // 3.第一次报名 - HeartUserInfoEntity entity = new HeartUserInfoEntity(); - entity.setCustomerId(formDTO.getCustomerId()); - entity.setUserId(formDTO.getUserId()); - entity.setVolunteerFlag(volunteerFlag > NumConstant.ZERO); - entity.setKindnessTime(NumConstant.ZERO); - entity.setParticipationNum(NumConstant.ZERO); - entity.setObtainPointNum(NumConstant.ZERO); - heartUserInfoDao.insert(entity); + this.insertHeartUserInfo(formDTO, volunteerFlag); } if (signUp){ // 4.插入活动日志表 - ActUserLogEntity userLogEntity = new ActUserLogEntity(); - userLogEntity.setActId(formDTO.getActId()); - userLogEntity.setUserId(formDTO.getUserId()); - userLogEntity.setOperationType(ActConstant.ACT_USER_LOG_OPER_AUDITING); - actUserLogService.insert(userLogEntity); + this.insertActUserLog(formDTO); } - ActUserRelationEntity entity = new ActUserRelationEntity(); - entity.setActId(formDTO.getActId()); - entity.setUserId(formDTO.getUserId()); - entity.setStatus(ActConstant.ACT_USER_STATUS_AUDITING); - // 审核开关:1报名人员需要人工审核(true) 0不需要(false) - if (actInfoDTO.getAuditSwitch()){ - entity.setPassedType(ActConstant.PASSEDTYPE_MANUAL); - } else { - entity.setPassedType(ActConstant.PASSEDTYPE_AUTO); - entity.setAuditTime(new Date()); - } - Integer operationCount = baseDao.selectCountByActIdAndUserId(formDTO.getActId(), formDTO.getUserId()); - if (operationCount > NumConstant.ZERO){ - // 用户如果不是第一次参加 这次的活动,先删除关系表中的数据,在插入 - baseDao.delSignUpRecord(entity); - } - baseDao.insert(entity); + // 5.插入 用户活动关系表 + this.insertActUserRelation(formDTO, actInfoDTO); } /** @@ -322,4 +296,67 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl NumConstant.ZERO); + entity.setKindnessTime(NumConstant.ZERO); + entity.setParticipationNum(NumConstant.ZERO); + entity.setObtainPointNum(NumConstant.ZERO); + heartUserInfoDao.insert(entity); + } + + /** + * 每次成功报名活动,都需要插入【用户活动关系日志表】 + * @param formDTO + * @return void + * @Author zhangyong + * @Date 09:37 2020-07-28 + **/ + private void insertActUserLog(ResiActRegistrationFormDTO formDTO){ + ActUserLogEntity userLogEntity = new ActUserLogEntity(); + userLogEntity.setActId(formDTO.getActId()); + userLogEntity.setUserId(formDTO.getUserId()); + userLogEntity.setOperationType(ActConstant.ACT_USER_LOG_OPER_AUDITING); + actUserLogService.insert(userLogEntity); + } + + /** + * 活动报名成功,插入【用户活动关系表】,重复报名,先删除后插入 + * + * @param formDTO + * @param actInfoDTO + * @return void + * @Author zhangyong + * @Date 09:41 2020-07-28 + **/ + private void insertActUserRelation(ResiActRegistrationFormDTO formDTO, ActInfoDTO actInfoDTO){ + ActUserRelationEntity entity = new ActUserRelationEntity(); + entity.setActId(formDTO.getActId()); + entity.setUserId(formDTO.getUserId()); + entity.setStatus(ActConstant.ACT_USER_STATUS_AUDITING); + // 审核开关:1报名人员需要人工审核(true) 0不需要(false) + if (actInfoDTO.getAuditSwitch()){ + entity.setPassedType(ActConstant.PASSEDTYPE_MANUAL); + } else { + entity.setPassedType(ActConstant.PASSEDTYPE_AUTO); + entity.setAuditTime(new Date()); + } + Integer operationCount = baseDao.selectCountByActIdAndUserId(formDTO.getActId(), formDTO.getUserId()); + if (operationCount > NumConstant.ZERO){ + // 用户如果不是第一次参加 这次的活动,先删除关系表中的数据,在插入 + baseDao.delSignUpRecord(entity); + } + baseDao.insert(entity); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/utils/ValidityVerification.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/utils/ValidityVerification.java deleted file mode 100644 index 4bb60ab49f..0000000000 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/utils/ValidityVerification.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.epmet.utils; - -import com.alibaba.nacos.client.utils.StringUtils; -import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.exception.EpmetErrorCode; -import com.epmet.commons.tools.exception.RenException; -import com.epmet.commons.tools.scan.param.ImgScanParamDTO; -import com.epmet.commons.tools.scan.param.ImgTaskDTO; -import com.epmet.commons.tools.scan.param.TextScanParamDTO; -import com.epmet.commons.tools.scan.param.TextTaskDTO; -import com.epmet.commons.tools.scan.result.SyncScanResult; -import com.epmet.commons.tools.utils.Result; -import com.epmet.commons.tools.utils.ScanContentUtils; -import org.springframework.beans.factory.annotation.Value; -import lombok.extern.slf4j.Slf4j; - -import java.util.List; -import java.util.UUID; - -/** - * 文字、图片合法性校验 - * - * @author zhangyong - * @date 2020-07-15 14:26 - */ -@Slf4j -public class ValidityVerification { - - @Value("${openapi.scan.server.url}") - private String scanApiUrl; - @Value("${openapi.scan.method.textSyncScan}") - private String textSyncScanMethod; - @Value("${openapi.scan.method.imgSyncScan}") - private String imgSyncScanMethod; - - /** - * 文本校验 - * @param context 被校验的文本,,不能超过10000 - * @param businessEnum 业务枚举,定义校验失败后,输出的日志信息 - * @return void - * @auther zhangyong - * @Date 14:42 2020-07-15 - **/ - public void textScanVerification(String context, String businessEnum){ - if (StringUtils.isNotBlank(context)) { - TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); - TextTaskDTO taskDTO = new TextTaskDTO(); - taskDTO.setContent(context); - taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); - textScanParamDTO.getTasks().add(taskDTO); - Result textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); - if (!textSyncScanResult.success()) { - throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); - } else { - if (!textSyncScanResult.getData().isAllPass()) { - // 业务枚举:例如:评论话题失败,评论内容为:%s" - log.error(String.format(businessEnum, context)); - throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); - } - } - } - } - - /** - * 图片列表校验 - * @param imgList 被校验的图片列表 - * @param businessEnum 业务枚举,定义校验失败后,输出的日志信息 - * - * @return void - * @auther zhangyong - * @Date 14:42 2020-07-15 - **/ - public void imgScanVerification(List imgList, String businessEnum){ - if (null != imgList && NumConstant.ZERO != imgList.size()){ - ImgScanParamDTO imgScanParamDTO = new ImgScanParamDTO(); - imgList.forEach(url -> { - ImgTaskDTO task = new ImgTaskDTO(); - task.setDataId(UUID.randomUUID().toString().replace("-", "")); - task.setUrl(url); - imgScanParamDTO.getTasks().add(task); - }); - Result imgScanResult = ScanContentUtils.imgSyncScan(scanApiUrl.concat(imgSyncScanMethod), imgScanParamDTO); - if (!imgScanResult.success()){ - throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); - } else { - if (!imgScanResult.getData().isAllPass()) { - // 业务枚举:例如:评论话题失败,评论内容为:%s" - log.error(String.format(businessEnum)); - throw new RenException(EpmetErrorCode.IMG_SCAN_FAILED.getCode()); - } - } - } - } -} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml index 370150c73d..2c83ec6ded 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml @@ -300,7 +300,7 @@ then 'in_progress' end as actCurrentState FROM act_info i - LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID + LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` != 'refused' AND re.`STATUS` != 'canceled' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID WHERE i.DEL_FLAG = '0' AND i.CUSTOMER_ID = #{customerId} AND i.ACT_STATUS != 'finished' AND i.ACT_STATUS != 'canceled' @@ -403,7 +403,7 @@ IF(aur.SIGN_IN_FLAG = 'signed_in', true , false ) as isSignUp-- 是否已签到(true已签到,false未签到) FROM act_info i - LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID + LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` != 'refused' AND re.`STATUS` != 'canceled' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID LEFT JOIN act_user_relation aur ON aur.ACT_ID = i.ID AND aur.DEL_FLAG = '0' AND aur.USER_ID = #{userId} WHERE i.DEL_FLAG = '0' From 042e757342cabbee4976661aebff18da7bcdbcb0 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 28 Jul 2020 11:02:04 +0800 Subject: [PATCH 13/38] =?UTF-8?q?=E8=8D=89=E7=A8=BF=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-voice-server/src/main/resources/mapper/DraftDao.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml index 71330a10b8..521f29821d 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/DraftDao.xml @@ -143,8 +143,7 @@ TITLE AS "title", IFNULL(PREVIEW_CONTENT, "") AS "content", UNIX_TIMESTAMP(CREATED_TIME) AS "createdTime", - AUDIT_STATUS, - AUDIT_REASON + STATUS_FLAG AS auditStatus FROM draft WHERE DEL_FLAG = '0' AND (STATUS_FLAG = 'unpublish' OR STATUS_FLAG = 'auditfail') From cc81afc1a8a9dc38f4e0d724900ff712bbd46f90 Mon Sep 17 00:00:00 2001 From: zxc <954985706@qq.com> Date: Tue, 28 Jul 2020 11:03:43 +0800 Subject: [PATCH 14/38] =?UTF-8?q?epmet-third=E6=9C=8D=E5=8A=A1=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml index 854e668863..c441095225 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-server:0.0.66 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-server:0.0.67 ports: - "8110:8110" network_mode: host # 使用现有网络 From 9c0a0c39c4e417bf68ee2fbb970c6c096d688bb6 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 28 Jul 2020 11:07:32 +0800 Subject: [PATCH 15/38] =?UTF-8?q?=E9=83=A8=E7=BD=B2voice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-voice/gov-voice-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-voice/gov-voice-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml index 2a67f32e7f..aeedb43eb9 100644 --- a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-voice-server: container_name: gov-voice-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-voice-server:0.3.61 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-voice-server:0.3.62 ports: - "8105:8105" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-voice/gov-voice-server/pom.xml b/epmet-module/gov-voice/gov-voice-server/pom.xml index 16f35ef7a0..d6d206c95a 100644 --- a/epmet-module/gov-voice/gov-voice-server/pom.xml +++ b/epmet-module/gov-voice/gov-voice-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"> 4.0.0 - 0.3.61 + 0.3.62 gov-voice com.epmet From 187c344718b726e993bc455b36d5cf6eb1d2b7c5 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 28 Jul 2020 11:12:15 +0800 Subject: [PATCH 16/38] =?UTF-8?q?=E4=BF=AE=E6=94=B9user+1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-user/epmet-user-server/deploy/docker-compose-dev.yml | 2 +- epmet-user/epmet-user-server/pom.xml | 2 +- .../java/com/epmet/service/impl/UserBaseInfoServiceImpl.java | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml index 4523fe51aa..418139a0b9 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml +++ b/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.81 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.82 ports: - "8087:8087" network_mode: host # 不会创建新的网络 diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index cda0f4cf4f..1160d9ec41 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.81 + 0.3.82 com.epmet epmet-user diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java index e730a8dd13..5fb9961648 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java @@ -33,7 +33,6 @@ import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.UserWechatDTO; import com.epmet.dto.result.CustomerUserDetailResultDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; -import com.epmet.dto.result.UserWechatResultDTO; import com.epmet.entity.UserBaseInfoEntity; import com.epmet.redis.UserBaseInfoRedis; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; @@ -133,14 +132,14 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl(); } List userBaseInfoList=new ArrayList<>(); - for(String userId:userIdList){ + /* for(String userId:userIdList){ UserBaseInfoResultDTO userBaseInfoResultDTO=baseDao.selectListByUserIdList(userId); if(null!=userBaseInfoResultDTO){ UserWechatResultDTO userWechatResultDTO=baseDao.selectUserWechatByUserId(userId); userBaseInfoResultDTO.setUserWechatResultDTO(userWechatResultDTO); userBaseInfoList.add(userBaseInfoResultDTO); } - } + }*/ userIdList.forEach(id -> { UserBaseInfoResultDTO baseInfo = userBaseInfoRedis.getUserInfo(id); //为了保证传过来的user数量与返回的一致,就算查出的用户信息为空也要添加进集合里 From 7fefc8d01ad529e26795f9d0d9316d81ee909e9e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 28 Jul 2020 11:14:37 +0800 Subject: [PATCH 17/38] =?UTF-8?q?=E4=BF=AE=E6=94=B9heart+1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-heart-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-heart/epmet-heart-server/pom.xml | 2 +- .../src/main/java/com/epmet/controller/WorkActController.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml index 69bb46e905..a0a80e2b1a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml +++ b/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.3 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.4 ports: - "8111:8111" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml index 13589f1e64..7f9cd25c89 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.3 + 0.0.4 com.epmet epmet-heart diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java index 8501fb6ac8..7deae2b1af 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java @@ -157,7 +157,7 @@ public class WorkActController { * @description 已结束-活动详情 * @Date 2020/7/26 21:01 **/ - @PostMapping("finisheddeatil") + @PostMapping("finisheddetail") public Result finishedDeatil(@RequestBody ActIdFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, ActIdFormDTO.AddUserInternalGroup.class); return new Result().ok(workActService.finishedDeatil(formDTO)); From d9ca1f7ca644bd197575d976207abad4665f0eaf Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Tue, 28 Jul 2020 11:49:30 +0800 Subject: [PATCH 18/38] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=89=93=E5=8D=A1?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E5=88=A4=E6=96=AD=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/resi/ResiActAddressResultDTO.java | 46 +++++++++++++++++++ .../controller/ResiActListController.java | 7 ++- .../com/epmet/service/ActInfoService.java | 9 ++-- .../service/impl/ActInfoServiceImpl.java | 17 +++++-- .../impl/ActUserRelationServiceImpl.java | 2 +- 5 files changed, 68 insertions(+), 13 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActAddressResultDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActAddressResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActAddressResultDTO.java new file mode 100644 index 0000000000..96cd30af4d --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActAddressResultDTO.java @@ -0,0 +1,46 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.result.resi; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 是否到达活动打卡地址 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-07-19 + */ +@Data +public class ResiActAddressResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private Boolean isAddress; + + /** + * 未报到活动范围的提示信息 + */ + private String errorTip; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java index f6c61a6815..1dfb2ed28a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java @@ -235,16 +235,15 @@ public class ResiActListController { } /** - * 重新定位 * 根据活动id、前端传的实时经纬度,与活动设置的经纬度相比较,判断用户是否已到达打卡地点 * * @param formDTO - * @return javax.xml.transform.Result + * @return com.epmet.commons.tools.utils.Result * @Author zhangyong - * @Date 16:48 2020-07-20 + * @Date 11:21 2020-07-28 **/ @PostMapping("checksigninaddress") - public Result cancelSignUp(@RequestBody ResiActCaculateDistanceFormDTO formDTO) { + public Result cancelSignUp(@RequestBody ResiActCaculateDistanceFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, ResiActCaculateDistanceFormDTO.AddUserInternalGroup.class); return actInfoService.checkSignInAddress(formDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActInfoService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActInfoService.java index 4f67a60cd8..26a868572b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActInfoService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActInfoService.java @@ -101,12 +101,13 @@ public interface ActInfoService extends BaseService { /** * 根据活动id、前端传的实时经纬度,与活动设置的经纬度相比较,判断用户是否已到达打卡地点 - * @param fromDTO - * @return javax.xml.transform.Result + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result * @Author zhangyong - * @Date 16:48 2020-07-20 + * @Date 11:21 2020-07-28 **/ - Result checkSignInAddress(ResiActCaculateDistanceFormDTO fromDTO); + Result checkSignInAddress(ResiActCaculateDistanceFormDTO formDTO); /** * 活动列表(包含状态:报名中:signing_up;已报满:enough;截止报名: end_sign_up; 已开始: in_progress; 已结束:finished;) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java index 3644df4f10..d47594761f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java @@ -23,7 +23,6 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; -import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; @@ -42,6 +41,8 @@ import com.epmet.service.ActInfoService; import com.epmet.service.ActUserRelationService; import com.epmet.utils.CaculateDistance; import org.apache.commons.lang3.StringUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -57,6 +58,8 @@ import java.util.*; @Service public class ActInfoServiceImpl extends BaseServiceImpl implements ActInfoService { + private Logger logger = LogManager.getLogger(ActInfoServiceImpl.class); + @Autowired private ActInfoRedis actInfoRedis; @@ -355,14 +358,20 @@ public class ActInfoServiceImpl extends BaseServiceImpl checkSignInAddress(ResiActCaculateDistanceFormDTO formDTO) { // 根据活动id,查询活动基本信息 ActInfoEntity entity = baseDao.selectById(formDTO.getActId()); Double distance = CaculateDistance.getDistance(formDTO.getLongitude(),formDTO.getLatitude(),entity.getActLongitude().doubleValue(),entity.getActLatitude().doubleValue()); + ResiActAddressResultDTO dto = new ResiActAddressResultDTO(); if (distance <= entity.getSignInRadius()){ - return new Result(); + dto.setIsAddress(true); + dto.setErrorTip(""); + return new Result().ok(dto); } else { - throw new RenException(EpmetErrorCode.NOT_IN_THE_SIGN_IN_RANGE.getCode()); + logger.info("您还未进入指定的签到范围~"); + dto.setIsAddress(false); + dto.setErrorTip(EpmetErrorCode.NOT_IN_THE_SIGN_IN_RANGE.getMsg()); + return new Result().ok(dto); } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java index 7aacc0cd0d..5d6ed5249b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java @@ -81,7 +81,7 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl page(Map params) { From 2019ceb46c57194429669a762d5e66c8ef56c23a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 28 Jul 2020 13:29:59 +0800 Subject: [PATCH 19/38] =?UTF-8?q?=E5=8D=95=E5=AE=A2=E6=88=B7-=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=AB=AF=E6=A0=B9=E6=8D=AE=E6=89=8B=E6=9C=BA=E5=8F=B7?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E6=88=96=E5=AF=86=E7=A0=81=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=BB=84=E7=BB=87=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ThirdLoginController.java | 31 +++ .../epmet/dto/form/ThirdStaffOrgsFormDTO.java | 48 +++++ .../com/epmet/service/ThirdLoginService.java | 20 ++ .../service/impl/ThirdLoginServiceImpl.java | 189 +++++++++++++----- .../main/resources/mapper/CustomerMpDao.xml | 3 + .../epmet/feign/GovOrgOpenFeignClient.java | 11 + .../GovOrgOpenFeignClientFallback.java | 6 + .../dto/form/ThirdCustomerStaffFormDTO.java | 25 +++ .../epmet/feign/EpmetUserOpenFeignClient.java | 9 + .../EpmetUserOpenFeignClientFallback.java | 5 + .../controller/CustomerStaffController.java | 11 + .../java/com/epmet/dao/CustomerStaffDao.java | 8 + .../epmet/service/CustomerStaffService.java | 8 + .../impl/CustomerStaffServiceImpl.java | 20 ++ .../resources/mapper/CustomerStaffDao.xml | 12 ++ 15 files changed, 354 insertions(+), 52 deletions(-) create mode 100644 epmet-auth/src/main/java/com/epmet/dto/form/ThirdStaffOrgsFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ThirdCustomerStaffFormDTO.java diff --git a/epmet-auth/src/main/java/com/epmet/controller/ThirdLoginController.java b/epmet-auth/src/main/java/com/epmet/controller/ThirdLoginController.java index 461dd1ab48..924c1a4070 100644 --- a/epmet-auth/src/main/java/com/epmet/controller/ThirdLoginController.java +++ b/epmet-auth/src/main/java/com/epmet/controller/ThirdLoginController.java @@ -3,7 +3,10 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.LoginFormDTO; +import com.epmet.dto.form.StaffOrgsFormDTO; +import com.epmet.dto.form.ThirdStaffOrgsFormDTO; import com.epmet.dto.form.ThirdWxmpEnteOrgFormDTO; +import com.epmet.dto.result.StaffOrgsResultDTO; import com.epmet.dto.result.UserTokenResultDTO; import com.epmet.service.ThirdLoginService; import org.springframework.beans.factory.annotation.Autowired; @@ -12,6 +15,8 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * @Description 第三方-居民端、政府端登陆服务 * @author sun @@ -60,4 +65,30 @@ public class ThirdLoginController { return new Result().ok(userTokenResultDTO); } + /** + * @param formDTO + * @return + * @Author sun + * @Description 单客户-手机验证码获取组织 + **/ + @PostMapping(value = "/getmyorg") + public Result> getmyorg(@RequestBody ThirdStaffOrgsFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, StaffOrgsFormDTO.AddUserShowGroup.class, StaffOrgsFormDTO.GetMyOrgByLoginWxmp.class); + List staffOrgs = thirdLoginService.getMyOrg(formDTO); + return new Result>().ok(staffOrgs); + } + + /** + * @param formDTO + * @return + * @author sun + * @description 单客户-手机号密码获取组织 + **/ + @PostMapping(value = "/getmyorgbypassword") + public Result> getMyOrgByPassword(@RequestBody ThirdStaffOrgsFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, StaffOrgsFormDTO.AddUserShowGroup.class, StaffOrgsFormDTO.GetMyOrgByPassWordGroup.class); + List staffOrgs = thirdLoginService.getMyOrgByPassword(formDTO); + return new Result>().ok(staffOrgs); + } + } diff --git a/epmet-auth/src/main/java/com/epmet/dto/form/ThirdStaffOrgsFormDTO.java b/epmet-auth/src/main/java/com/epmet/dto/form/ThirdStaffOrgsFormDTO.java new file mode 100644 index 0000000000..c5027dcd82 --- /dev/null +++ b/epmet-auth/src/main/java/com/epmet/dto/form/ThirdStaffOrgsFormDTO.java @@ -0,0 +1,48 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description appId、手机号、验证码获取组织-接口入参 + * @Author sun + */ +@Data +public class ThirdStaffOrgsFormDTO implements Serializable { + private static final long serialVersionUID = 4193133227120225342L; + /** + * 添加用户操作的用户可见异常分组 + * 该分组用于校验需要返回给前端错误信息提示的列,需要继承CustomerClientShowGroup + * 返回错误码为8999,提示信息为DTO中具体的列的校验注解message的内容 + */ + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + public interface GetMyOrgByPassWordGroup extends CustomerClientShowGroup { + } + public interface GetMyOrgByLoginWxmp extends CustomerClientShowGroup{} + /** + * 小程序appId + */ + @NotBlank(message = "appId不能为空", groups = {AddUserShowGroup.class}) + private String appId; + + /** + * 手机号 + */ + @NotBlank(message = "手机号不能为空", groups = {AddUserShowGroup.class}) + private String mobile; + + /** + * 验证码 + */ + @NotBlank(message="验证码不能为空", groups = {GetMyOrgByLoginWxmp.class}) + private String smsCode; + + @NotBlank(message = "密码不能为空",groups ={GetMyOrgByPassWordGroup.class}) + private String password; +} + diff --git a/epmet-auth/src/main/java/com/epmet/service/ThirdLoginService.java b/epmet-auth/src/main/java/com/epmet/service/ThirdLoginService.java index a532adec56..b343bf5a22 100644 --- a/epmet-auth/src/main/java/com/epmet/service/ThirdLoginService.java +++ b/epmet-auth/src/main/java/com/epmet/service/ThirdLoginService.java @@ -1,9 +1,13 @@ package com.epmet.service; import com.epmet.dto.form.LoginFormDTO; +import com.epmet.dto.form.ThirdStaffOrgsFormDTO; import com.epmet.dto.form.ThirdWxmpEnteOrgFormDTO; +import com.epmet.dto.result.StaffOrgsResultDTO; import com.epmet.dto.result.UserTokenResultDTO; +import java.util.List; + /** * @Description 第三方-居民端、政府端登陆服务 * @author sun @@ -33,4 +37,20 @@ public interface ThirdLoginService { * @Description 单客户-选择组织,进入首页 **/ UserTokenResultDTO enterOrg(ThirdWxmpEnteOrgFormDTO formDTO); + + /** + * @param formDTO + * @return + * @Author sun + * @Description 单客户-手机验证码获取组织 + **/ + List getMyOrg(ThirdStaffOrgsFormDTO formDTO); + + /** + * @param formDTO + * @return + * @author sun + * @description 单客户-手机号密码获取组织 + **/ + List getMyOrgByPassword(ThirdStaffOrgsFormDTO formDTO); } diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java index df85d0ccd1..2bb6c09a7e 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java @@ -2,38 +2,36 @@ package com.epmet.service.impl; import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; import com.epmet.common.token.constant.LoginConstant; +import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.GovTokenDto; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.security.password.PasswordUtils; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.CpUserDetailRedis; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.*; import com.epmet.dto.form.*; -import com.epmet.dto.result.DepartmentListResultDTO; -import com.epmet.dto.result.GridByStaffResultDTO; -import com.epmet.dto.result.StaffLatestAgencyResultDTO; -import com.epmet.dto.result.UserTokenResultDTO; +import com.epmet.dto.result.*; import com.epmet.feign.EpmetThirdFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.jwt.JwtTokenProperties; import com.epmet.jwt.JwtTokenUtils; +import com.epmet.redis.CaptchaRedis; import com.epmet.service.ThirdLoginService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import java.util.stream.Collectors; /** @@ -48,6 +46,8 @@ public class ThirdLoginServiceImpl implements ThirdLoginService { @Autowired private JwtTokenUtils jwtTokenUtils; @Autowired + private CaptchaRedis captchaRedis; + @Autowired private JwtTokenProperties jwtTokenProperties; @Autowired private CpUserDetailRedis cpUserDetailRedis; @@ -142,6 +142,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService { **/ @Override public UserTokenResultDTO workLogin(LoginFormDTO formDTO) { + //1.调用epmet_third服务,校验appId是否有效以及是否授权,校验通过的调用微信API获取用户基本信息 WxLoginFormDTO resiLoginFormDTO = new WxLoginFormDTO(); resiLoginFormDTO.setAppId(formDTO.getAppId()); @@ -379,66 +380,150 @@ public class ThirdLoginServiceImpl implements ThirdLoginService { wxMaJscode2SessionResult.setSessionKey(userWechatDTO.getSessionKey()); wxMaJscode2SessionResult.setUnionid(""); // end - //3、记录staff_wechat,并记录用户激活状态,激活时间 - this.savestaffwechat(customerStaff.getUserId(), wxMaJscode2SessionResult.getOpenid()); + this.savestaffwechat(customerStaff.getUserId(), userWechatDTO.getWxOpenId()); //4、记录登录日志 - this.saveGovStaffLoginRecord(formDTO, customerStaff.getUserId(), wxMaJscode2SessionResult.getOpenid()); + StaffLatestAgencyResultDTO staffLatestAgencyResultDTO = new StaffLatestAgencyResultDTO(); + staffLatestAgencyResultDTO.setCustomerId(formDTO.getCustomerId()); + staffLatestAgencyResultDTO.setStaffId(customerStaff.getUserId()); + staffLatestAgencyResultDTO.setWxOpenId(userWechatDTO.getWxOpenId()); + staffLatestAgencyResultDTO.setMobile(formDTO.getMobile()); + staffLatestAgencyResultDTO.setAgencyId(formDTO.getRootAgencyId()); + this.saveStaffLoginRecord(staffLatestAgencyResultDTO); //5.1、获取用户token String token = this.generateGovWxmpToken(customerStaff.getUserId()); //5.2、保存到redis - this.saveGovTokenDto(formDTO.getRootAgencyId(), formDTO.getCustomerId(), customerStaff.getUserId(), wxMaJscode2SessionResult, token); + StaffLatestAgencyResultDTO staffLatestAgency = new StaffLatestAgencyResultDTO(); + staffLatestAgency.setAgencyId(formDTO.getRootAgencyId()); + staffLatestAgency.setCustomerId(formDTO.getCustomerId()); + staffLatestAgency.setStaffId(customerStaff.getUserId()); + this.saveLatestGovTokenDto(staffLatestAgency, userWechatDTO, token); + UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO(); userTokenResultDTO.setToken(token); return userTokenResultDTO; } - //保存登录日志 - private Result saveGovStaffLoginRecord(ThirdWxmpEnteOrgFormDTO formDTO, String staffId, String openId) { - StaffLoginAgencyRecordFormDTO staffLoginAgencyRecordFormDTO = new StaffLoginAgencyRecordFormDTO(); - staffLoginAgencyRecordFormDTO.setCustomerId(formDTO.getCustomerId()); - staffLoginAgencyRecordFormDTO.setStaffId(staffId); - staffLoginAgencyRecordFormDTO.setWxOpenId(openId); - staffLoginAgencyRecordFormDTO.setMobile(formDTO.getMobile()); - staffLoginAgencyRecordFormDTO.setAgencyId(formDTO.getRootAgencyId()); - Result staffLoginRecordResult = epmetUserOpenFeignClient.saveStaffLoginRecord(staffLoginAgencyRecordFormDTO); - return staffLoginRecordResult; + /** + * @param formDTO + * @return + * @Author sun + * @Description 单客户-手机验证码获取组织 + **/ + @Override + public List getMyOrg(ThirdStaffOrgsFormDTO formDTO) { + //0、验证码是否正确 + String rightSmsCode = captchaRedis.getSmsCode(formDTO.getMobile()); + if (!formDTO.getSmsCode().equals(rightSmsCode)) { + logger.error(String.format("验证码错误code[%s],msg[%s]",EpmetErrorCode.MOBILE_CODE_ERROR.getCode(),EpmetErrorCode.MOBILE_CODE_ERROR.getMsg())); + throw new RenException(EpmetErrorCode.MOBILE_CODE_ERROR.getCode()); + } + //1.根据appId查询对应客户Id + Result resultDTO = epmetThirdFeignClient.getCustomerMsg(formDTO.getAppId()); + if (!resultDTO.success()) { + logger.error(String.format("根据appId查询客户Id失败,对应appId->" + formDTO.getAppId())); + throw new RenException(resultDTO.getMsg()); + } + PaCustomerDTO customer = resultDTO.getData().getCustomer(); + + //7.28 根据appId只能存在一个客户Id,后边的批量操作逻辑 + //2.根据手机号查询到用户信息 + ThirdCustomerStaffFormDTO dto = new ThirdCustomerStaffFormDTO(); + dto.setCustomerId(customer.getId()); + dto.setMobile(formDTO.getMobile()); + Result> customerStaffResult = epmetUserOpenFeignClient.getCustsomerStaffByIdAndPhone(dto); + if (!customerStaffResult.success()) { + logger.error(String.format("手机验证码登录异常,手机号[%s],code[%s],msg[%s]", formDTO.getMobile(), customerStaffResult.getCode(), customerStaffResult.getMsg())); + throw new RenException(customerStaffResult.getCode()); + } + + //3、查询用户所有的组织信息 + List customerIdList = new ArrayList<>(); + for (CustomerStaffDTO customerStaffDTO : customerStaffResult.getData()) { + customerIdList.add(customerStaffDTO.getCustomerId()); + } + StaffOrgFormDTO staffOrgFormDTO = new StaffOrgFormDTO(); + staffOrgFormDTO.setCustomerIdList(customerIdList); + Result> result = govOrgOpenFeignClient.getStaffOrgList(staffOrgFormDTO); + if(result.success()&&null!=result.getData()){ + return result.getData(); + } + logger.error(String .format("手机验证码获取组织,调用%s服务失败,入参手机号%s,验证码%s,返回错误码%s,错误提示信息%s", ServiceConstant.GOV_ORG_SERVER,formDTO.getMobile(),formDTO.getSmsCode(),result.getCode(),result.getMsg())); + return new ArrayList<>(); } /** - * @Description 生成token - * @Date 2020/4/18 23:04 + * @param formDTO + * @return + * @author sun + * @description 单客户-手机号密码获取组织 **/ - private void saveGovTokenDto(String orgId, - String customerId, - String staffId, - WxMaJscode2SessionResult wxMaJscode2SessionResult, - String token) { - int expire = jwtTokenProperties.getExpire(); - GovTokenDto govTokenDto = new GovTokenDto(); - govTokenDto.setApp(LoginConstant.APP_GOV); - govTokenDto.setClient(LoginConstant.CLIENT_WXMP); - govTokenDto.setUserId(staffId); - govTokenDto.setOpenId(wxMaJscode2SessionResult.getOpenid()); - govTokenDto.setSessionKey(wxMaJscode2SessionResult.getSessionKey()); - govTokenDto.setUnionId(null == wxMaJscode2SessionResult.getUnionid() ? "" : wxMaJscode2SessionResult.getUnionid()); - govTokenDto.setToken(token); - govTokenDto.setUpdateTime(System.currentTimeMillis()); - govTokenDto.setExpireTime(jwtTokenUtils.getExpiration(token).getTime()); - govTokenDto.setRootAgencyId(orgId); - govTokenDto.setCustomerId(customerId); + @Override + public List getMyOrgByPassword(ThirdStaffOrgsFormDTO formDTO) { + //0.根据appId查询对应客户Id + Result resultDTO = epmetThirdFeignClient.getCustomerMsg(formDTO.getAppId()); + if (!resultDTO.success()) { + logger.error(String.format("根据appId查询客户Id失败,对应appId->" + formDTO.getAppId())); + throw new RenException(resultDTO.getMsg()); + } + PaCustomerDTO customer = resultDTO.getData().getCustomer(); + //7.28 上边根据appId只能锁定一条客户id,后边的批量循环操作暂不做调整,还是使用之前的代码 sun + //1、根据手机号查询到用户信息 + ThirdCustomerStaffFormDTO dto = new ThirdCustomerStaffFormDTO(); + dto.setCustomerId(customer.getId()); + dto.setMobile(formDTO.getMobile()); + Result> customerStaffResult = epmetUserOpenFeignClient.getCustsomerStaffByIdAndPhone(dto); + if (!customerStaffResult.success()) { + logger.error(String.format("手机密码登录异常,手机号[%s],code[%s],msg[%s]", formDTO.getMobile(), customerStaffResult.getCode(), customerStaffResult.getMsg())); + throw new RenException(customerStaffResult.getCode()); + } + //2、密码是否正确 + List customerStaffList=customerStaffResult.getData(); + //3、查询用户所有的组织信息 + List customerIdList = new ArrayList<>(); + //是否设置过密码 + boolean havePasswordFlag=false; + //密码是否正确 + boolean passwordRightFlag=false; + for (CustomerStaffDTO customerStaffDTO : customerStaffList) { + if(StringUtils.isNotBlank(customerStaffDTO.getPassword())){ + havePasswordFlag=true; + }else{ + logger.warn(String.format("当前用户:手机号%s,客户Id%s下未设置密码.",formDTO.getMobile(),customerStaffDTO.getCustomerId())); + continue; + } + if (!PasswordUtils.matches(formDTO.getPassword(), customerStaffDTO.getPassword())) { + logger.warn(String.format("当前用户:手机号%s,客户Id%s密码匹配错误.",formDTO.getMobile(),customerStaffDTO.getCustomerId())); - //设置部门,网格,角色列表 - govTokenDto.setDeptIdList(getDeptartmentIdList(staffId)); - govTokenDto.setGridIdList(getGridIdList(staffId)); - CustomerAgencyDTO agency = getAgencyByStaffId(staffId); - if (agency != null) { - govTokenDto.setAgencyId(agency.getId()); - govTokenDto.setRoleList(queryGovStaffRoles(staffId, agency.getId())); + }else{ + logger.warn(String.format("当前用户:手机号%s,客户Id%s密码匹配正确.",formDTO.getMobile(),customerStaffDTO.getCustomerId())); + passwordRightFlag=true; + customerIdList.add(customerStaffDTO.getCustomerId()); + } } - govTokenDto.setOrgIdPath(getOrgIdPath(staffId)); - cpUserDetailRedis.set(govTokenDto, expire); - logger.info("截止时间:" + DateUtils.format(jwtTokenUtils.getExpiration(token), "yyyy-MM-dd HH:mm:ss")); + //根据手机号查出来所有用户,密码都为空,表明用户未激活账户,未设置密码 + if(!havePasswordFlag){ + logger.error(String.format("当前手机号(%s)下所有账户都未设置密码,请先使用验证码登录激活账户",formDTO.getMobile())); + throw new RenException(EpmetErrorCode.PASSWORD_ERROR.getCode()); + } + //密码错误 + if(!passwordRightFlag){ + logger.error(String.format("根据当前手机号(%s)密码未找到所属组织,密码错误",formDTO.getMobile())); + throw new RenException(EpmetErrorCode.PASSWORD_ERROR.getCode()); + } + StaffOrgFormDTO staffOrgFormDTO = new StaffOrgFormDTO(); + staffOrgFormDTO.setCustomerIdList(customerIdList); + Result> result = govOrgOpenFeignClient.getStaffOrgList(staffOrgFormDTO); + if(result.success()&&null!=result.getData()){ + return result.getData(); + } + logger.error(String .format("手机验证码获取组织,调用%s服务失败,入参手机号%s,密码%s,返回错误码%s,错误提示信息%s", + ServiceConstant.GOV_ORG_SERVER, + formDTO.getMobile(), + formDTO.getPassword(), + result.getCode(), + result.getMsg())); + return new ArrayList<>(); } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml index 2024c79005..20632a7f3c 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml @@ -96,6 +96,9 @@ WHERE del_flag = '0' AND app_id = #{appId} + AND AUTHORIZATION_FLAG = '1' + ORDER BY CREATED_TIME DESC + LIMIT 1 + + \ No newline at end of file From 7110bccfcc347bd4c673e37f9f18fc57a607b419 Mon Sep 17 00:00:00 2001 From: zxc <954985706@qq.com> Date: Tue, 28 Jul 2020 13:33:16 +0800 Subject: [PATCH 20/38] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E6=96=B9=E5=B9=B3=E5=8F=B0-=E6=8E=88=E6=9D=83=E5=9B=9E?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ComponentVerifyTicketServiceImpl.java | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java index 74f723aed1..2cbb986d40 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java @@ -241,23 +241,25 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe String post = HttpClientManager.getInstance().sendPostByJSON(WxMaCodeConstant.API_CREATE_PREAUTHCODE_URL + accessToken, JSON.toJSONString(jsonObject)).getData(); log.info(String.format(POST_RESULT,post)); Map hashMap = JSON.parseObject(post, Map.class); - preAuthCode = hashMap.get(ModuleConstant.PRE_AUTH_CODE).toString(); - Integer expiresIn = (Integer) hashMap.get(ModuleConstant.EXPIRES_IN); - Date expiresInTime = this.countExpirationTime(expiresIn.toString()); - if (StringUtils.isNotEmpty(preAuthCode)) { - //预授权码 存DB - PreAuthTokenFormDTO formDTO = new PreAuthTokenFormDTO(); - formDTO.setPreAuthToken(preAuthCode); - formDTO.setExpiresInTime(expiresInTime); - //先逻辑删除,在插入DB - preAuthTokenDao.updateOldPreAuthCode(); - preAuthTokenDao.insertPreAuthToken(formDTO); - //预授权码 放入缓存 - redisThird.setPreAuthCode(preAuthCode); - } else { - throw new RuntimeException(FAILURE_GET_PRE_AUTH_CODE); + if (!hashMap.containsKey(ModuleConstant.ERR_MSG)) { + preAuthCode = hashMap.get(ModuleConstant.PRE_AUTH_CODE).toString(); + Integer expiresIn = (Integer) hashMap.get(ModuleConstant.EXPIRES_IN); + Date expiresInTime = this.countExpirationTime(expiresIn.toString()); + if (StringUtils.isNotEmpty(preAuthCode)) { + //预授权码 存DB + PreAuthTokenFormDTO formDTO = new PreAuthTokenFormDTO(); + formDTO.setPreAuthToken(preAuthCode); + formDTO.setExpiresInTime(expiresInTime); + //先逻辑删除,在插入DB + preAuthTokenDao.updateOldPreAuthCode(); + preAuthTokenDao.insertPreAuthToken(formDTO); + //预授权码 放入缓存 + redisThird.setPreAuthCode(preAuthCode); + } else { + throw new RuntimeException(FAILURE_GET_PRE_AUTH_CODE); + } + log.info(END_GET_PRE_AUTH_CODE); } - log.info(END_GET_PRE_AUTH_CODE); return preAuthCode; } From 10ffb1410350033ddf1398000813921ade342450 Mon Sep 17 00:00:00 2001 From: zxc <954985706@qq.com> Date: Tue, 28 Jul 2020 13:37:25 +0800 Subject: [PATCH 21/38] =?UTF-8?q?epmet-third=E6=9C=8D=E5=8A=A1=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-third/epmet-third-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml index 42619a92cf..c01da3eb9d 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml +++ b/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.67 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.68 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index 7a44b88d3b..14971a6d1a 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.67 + 0.0.68 com.epmet From bc53127b0896b97d59bcc0a8788710b5c7e22a82 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 28 Jul 2020 13:41:26 +0800 Subject: [PATCH 22/38] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-auth/deploy/docker-compose-dev.yml | 2 +- epmet-auth/pom.xml | 2 +- .../epmet-third-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-third/epmet-third-server/pom.xml | 2 +- .../gov-org/gov-org-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/gov-org/gov-org-server/pom.xml | 2 +- epmet-user/epmet-user-server/deploy/docker-compose-dev.yml | 2 +- epmet-user/epmet-user-server/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/epmet-auth/deploy/docker-compose-dev.yml b/epmet-auth/deploy/docker-compose-dev.yml index e32e5e5432..7ee9697721 100644 --- a/epmet-auth/deploy/docker-compose-dev.yml +++ b/epmet-auth/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-auth-server: container_name: epmet-auth-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-auth:0.3.56 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-auth:0.3.57 ports: - "8081:8081" network_mode: host # 使用现有网络 diff --git a/epmet-auth/pom.xml b/epmet-auth/pom.xml index 8ffde60165..489c6b5373 100644 --- a/epmet-auth/pom.xml +++ b/epmet-auth/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.56 + 0.3.57 com.epmet epmet-cloud diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml index c01da3eb9d..2e14a16b14 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml +++ b/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.68 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.69 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index 14971a6d1a..6ffa32a944 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.68 + 0.0.69 com.epmet diff --git a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml index 0b247eae18..095e7300fd 100644 --- a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-org-server: container_name: gov-org-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.76 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.77 ports: - "8092:8092" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index 3d9f8fd97c..785e47bf18 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.76 + 0.3.77 com.epmet gov-org diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml index 418139a0b9..9806ec7434 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml +++ b/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.82 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.83 ports: - "8087:8087" network_mode: host # 不会创建新的网络 diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index 1160d9ec41..4429a5abfd 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.82 + 0.3.83 com.epmet epmet-user From 76d2b218284b8ab5470bf6f58936a78dca423b48 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 28 Jul 2020 13:41:33 +0800 Subject: [PATCH 23/38] =?UTF-8?q?epmet=5Fheart=20db=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=EF=BC=8Cuser=5Fbase=5Finfo=E6=B7=BB=E5=8A=A0flywaysql=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/epmet_heart.sql | 424 ++++++++++++++++++ .../migration/V0.0.5__create_userbaseinfo.sql | 22 + 2 files changed, 446 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql create mode 100644 epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.5__create_userbaseinfo.sql diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql new file mode 100644 index 0000000000..c2b485aaf5 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql @@ -0,0 +1,424 @@ +/* + Navicat Premium Data Transfer + + Source Server : 外网192.168.1.130 + Source Server Type : MySQL + Source Server Version : 50728 + Source Host : 118.190.150.119:47306 + Source Schema : epmet_heart + + Target Server Type : MySQL + Target Server Version : 50728 + File Encoding : 65001 + + Date: 28/07/2020 13:38:27 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for act_content +-- ---------------------------- +DROP TABLE IF EXISTS `act_content`; +CREATE TABLE `act_content` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', + `ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动id:act_info.id', + `CONTENT` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容', + `CONTENT_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容类型 图片:img;文字:text', + `ORDER_NUM` int(11) NOT NULL COMMENT '内容顺序 从1开始', + `DEL_FLAG` int(11) NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) 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_customized +-- ---------------------------- +DROP TABLE IF EXISTS `act_customized`; +CREATE TABLE `act_customized` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(客户如果没配置,默认的值写在代码里)', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `TITLE_NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标题:eg: 志愿者去哪儿', + `HOTLINE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '咨询热线', + `ACT_LIST_NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动列表', + `HEART_RANK_NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '爱心榜', + `ACT_REVIEW_NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动回顾', + `MY_ACT_NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '我的活动', + `REVISION` int(11) NOT NULL DEFAULT 0 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 '更新时间', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci 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 +-- ---------------------------- +DROP TABLE IF EXISTS `act_info`; +CREATE TABLE `act_info` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `TITLE` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动标题', + `COVER_PIC` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动封面', + `SIGN_UP_START_TIME` datetime(0) NOT NULL COMMENT '报名开始时间', + `SIGN_UP_END_TIME` datetime(0) NOT NULL COMMENT '报名截止时间', + `REQUIREMENT` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '招募要求', + `ACT_START_TIME` datetime(0) NOT NULL COMMENT '活动开始时间', + `ACT_END_TIME` datetime(0) NOT NULL COMMENT '活动结束时间', + `ACT_ADDRESS` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动地点', + `ACT_LONGITUDE` decimal(32, 10) NOT NULL COMMENT '活动位置经度', + `ACT_LATITUDE` decimal(32, 10) NOT NULL COMMENT '活动位置纬度', + `SIGN_IN_START_TIME` datetime(0) NOT NULL COMMENT '打卡开始时间', + `SIGN_IN_END_TIME` datetime(0) NOT NULL COMMENT '打卡截止时间', + `SIGN_IN_ADDRESS` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动签到打卡地点', + `SIGN_IN_LONGITUDE` decimal(32, 10) NOT NULL COMMENT '活动签到打卡位置经度', + `SIGN_IN_LATITUDE` decimal(32, 10) NOT NULL COMMENT '活动签到打卡位置纬度', + `SIGN_IN_RADIUS` int(11) NOT NULL COMMENT '活动签到打卡半径(单位:米)', + `ACT_QUOTA_CATEGORY` tinyint(1) NOT NULL DEFAULT 0 COMMENT '活动名额类型(0-不限名额,1-固定名额)', + `ACT_QUOTA` int(11) NULL DEFAULT 0 COMMENT '活动名额', + `ACT_STATUS` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '活动状态(\r\n已发布/报名中:published;\r\n已取消:canceled;\r\n已结束:finished)', + `CANCEL_REASON` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '活动取消的原因', + `CANCEL_TIME` datetime(0) NULL DEFAULT NULL COMMENT '取消活动的时间', + `SPONSOR_CONTACTS` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '联系人', + `SPONSOR_TEL` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '联系电话', + `SPONSOR_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '发布名义:网格主办:grid;组织主办:agency', + `SPONSOR_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主办方id(机关或网格的id)', + `SPONSOR_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动主办方名称(机关或网格的名称)', + `PID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '发布单位的上一级组织id,如果是以网格发布,此列存储的是网格所属机关的上一级机关', + `REWARD` int(11) NOT NULL DEFAULT 0 COMMENT '活动奖励积分', + `VOLUNTEER_LIMIT` tinyint(1) NOT NULL COMMENT '身份限制:1只有志愿者才可以参加活动0不限制志愿者身份', + `AUDIT_SWITCH` tinyint(1) NOT NULL COMMENT '审核开关:1报名人员需要人工审核0不需要', + `ACTUAL_START_TIME` datetime(0) NULL DEFAULT NULL COMMENT '活动实际开始时间', + `ACTUAL_END_TIME` datetime(0) NULL DEFAULT NULL COMMENT '活动实际结束时间', + `SERVICE_MIN` int(11) NULL DEFAULT NULL COMMENT '活动共计时长(服务时间)单位:分钟', + `SUMMARY_FLAG` tinyint(1) NOT NULL DEFAULT 0 COMMENT '1已经总结0未总结', + `REVISION` int(11) NOT NULL DEFAULT 0 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 '更新时间', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除标识', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动信息' ROW_FORMAT = Compact; + +-- ---------------------------- +-- Table structure for act_live_pic +-- ---------------------------- +DROP TABLE IF EXISTS `act_live_pic`; +CREATE TABLE `act_live_pic` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', + `LIVE_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '实况ID:act_live.id', + `PIC_URL` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '图片地址', + `SORT` int(11) NOT NULL COMMENT '排序从1开始', + `REVISION` int(11) 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 '更新时间', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标志', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动实况图片表' ROW_FORMAT = Compact; + +-- ---------------------------- +-- Table structure for act_live_rec +-- ---------------------------- +DROP TABLE IF EXISTS `act_live_rec`; +CREATE TABLE `act_live_rec` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', + `ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动id: act_info.id', + `USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id', + `LONGITUDE` decimal(32, 10) NULL DEFAULT NULL COMMENT '实况打卡位置经度', + `LATITUDE` decimal(32, 10) NULL DEFAULT NULL COMMENT '实况打卡位置纬度', + `ADDRESS` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实况打卡地址', + `DESC` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实况打卡描述', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记', + `REVISION` int(11) NOT NULL DEFAULT 0 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, + INDEX `epmet_act_user_clock_log_ACT_USER_ID_IDX`(`ACT_ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动实况记录' ROW_FORMAT = Compact; + +-- ---------------------------- +-- Table structure for act_operation_rec +-- ---------------------------- +DROP TABLE IF EXISTS `act_operation_rec`; +CREATE TABLE `act_operation_rec` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', + `ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动id', + `TYPE` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '发布:publish;\r\n取消活动:cancel;\r\n结束活动:finish\r\n重新编辑:update', + `NOTICE_USER` tinyint(1) NOT NULL DEFAULT 0 COMMENT '1通知用户0不通知,取消活动时默认true', + `REMARK` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注,取消活动时此列有值', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记', + `REVISION` int(11) NOT NULL DEFAULT 0 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_point_log +-- ---------------------------- +DROP TABLE IF EXISTS `act_point_log`; +CREATE TABLE `act_point_log` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(给分或者不给分,以及重新处理插入本表)', + `ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动id', + `USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id', + `POINT_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '加积分:add ; 减积分:subtract', + `POINTS` int(11) NOT NULL COMMENT '积分值', + `OPERATE_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作类型:\r\n同意给分agree; 不给分:deny;重新处理: reset', + `REMARK` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注:拒绝给分和重新处理时录入的理由', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标识 0-否,1-是', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人(工作人员id)', + `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_sign_in_pic +-- ---------------------------- +DROP TABLE IF EXISTS `act_sign_in_pic`; +CREATE TABLE `act_sign_in_pic` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', + `SIGN_IN_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '签到记录ID:act_sign_in_record.id', + `PIC_URL` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '图片地址', + `SORT` int(11) NOT NULL COMMENT '排序从1开始', + `REVISION` int(11) 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 '更新时间', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标志', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动签到图片表' ROW_FORMAT = Compact; + +-- ---------------------------- +-- Table structure for act_sign_in_rec +-- ---------------------------- +DROP TABLE IF EXISTS `act_sign_in_rec`; +CREATE TABLE `act_sign_in_rec` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', + `ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动id:act_info.id', + `USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id', + `LONGITUDE` decimal(32, 10) NOT NULL COMMENT '签到位置经度', + `LATITUDE` decimal(32, 10) NOT NULL COMMENT '签到位置纬度', + `ADDRESS` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '签到地址', + `DESC` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '签到描述', + `SYNC_LIVE` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0不同步实况1同步到实况记录', + `LIVE_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实况id,党sync_live=1时此列有值', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记', + `REVISION` int(11) NOT NULL DEFAULT 0 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_statistical +-- ---------------------------- +DROP TABLE IF EXISTS `act_statistical`; +CREATE TABLE `act_statistical` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(活动结束后插入本表)', + `ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动id', + `SIGNUP_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '已报名总人数(已报名/待审核auditing,审核通过passed,审核不通过refused取消报名canceld总人数)', + `AUDITING_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '待审核', + `PASSED_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '审核通过', + `REFUSED_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '审核不通过总人数', + `CANCELD_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '取消报名的人数', + `SIGNED_IN_USER_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '活动已签到人数', + `REWARD_USER_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '发放积分总人数', + `DENY_REWARD_USER_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '拒绝发放积分总人数', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除标识', + `REVISION` int(11) NOT NULL DEFAULT 0 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_summary +-- ---------------------------- +DROP TABLE IF EXISTS `act_summary`; +CREATE TABLE `act_summary` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键ID', + `ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动ID:act_info.id', + `CONTENT` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容', + `CONTENT_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容类型 图片:img;文字:text', + `ORDER_NUM` int(11) NOT NULL COMMENT '内容顺序 从1开始', + `DEL_FLAG` int(11) NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) 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_user_log +-- ---------------------------- +DROP TABLE IF EXISTS `act_user_log`; +CREATE TABLE `act_user_log` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', + `ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动ID', + `USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户ID', + `OPERATION_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作类型(已报名/待审核auditing,\r\n审核通过passed,\r\n审核不通过refused\r\n取消报名canceled,\r\n)', + `REASON` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作备注:(1)审核不通过的原因\r\n(2)取消报名的原因|\r\n(3)拒绝发放积分的理由\r\n(4)重新处理的理由', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL DEFAULT 0 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 = Compact; + +-- ---------------------------- +-- Table structure for act_user_relation +-- ---------------------------- +DROP TABLE IF EXISTS `act_user_relation`; +CREATE TABLE `act_user_relation` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(用户-活动一对一,报名取消再报名也只有一条记录)', + `ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动ID', + `USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户ID', + `STATUS` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '当前状态(已报名/待审核auditing,\r\n审核通过passed,\r\n审核不通过refused\r\n取消报名canceled,\r\n)', + `PASSED_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '审核通过类型:auto, manual', + `AUDIT_TIME` datetime(0) NULL DEFAULT NULL COMMENT '审核时间(同意、拒绝的时间)', + `FAILURE_REASON` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '未通过原因', + `CANCEL_TIME` datetime(0) NULL DEFAULT NULL COMMENT '取消报名的时间', + `CANCEL_REASON` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户取消报名的原因', + `PROCESS_FLAG` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '已处理: handled; 默认\"\",重新处理时reward_flag置为空字符串', + `SIGN_IN_FLAG` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '已签到:signed_in; 默认\"\"', + `REWARD_FLAG` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '已给分:agree, 不给分:deny 默认\"\"', + `DENY_REWARD_REASON` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '拒绝发放积分备注', + `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, + INDEX `epmet_act_user_relation_ACT_ID_IDX`(`ACT_ID`, `USER_ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户活动关系表' ROW_FORMAT = Compact; + +-- ---------------------------- +-- Table structure for heart_user_info +-- ---------------------------- +DROP TABLE IF EXISTS `heart_user_info`; +CREATE TABLE `heart_user_info` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(用户提交报名成功后,插入本表)', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id', + `VOLUNTEER_FLAG` tinyint(1) NOT NULL COMMENT '1是志愿者,0不是志愿者(志愿者注册成功后需要来更新值)', + `KINDNESS_TIME` int(11) NOT NULL DEFAULT 0 COMMENT '爱心时长(单位:分钟)(参与并签到了的活动,实际结束-实际开始)签到的。未签到但是有积分的\r\n', + `PARTICIPATION_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '实际参与活动个数(签到+1)', + `OBTAIN_POINT_NUM` int(11) NOT NULL DEFAULT 0 COMMENT '参与活动并获得积分的次数(结束活动时,如果给用户发放积分则该数值+1)', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记', + `REVISION` int(11) NOT NULL DEFAULT 0 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 latest_act_content +-- ---------------------------- +DROP TABLE IF EXISTS `latest_act_content`; +CREATE TABLE `latest_act_content` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', + `ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动id:latest_act_info.id', + `CONTENT` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容', + `CONTENT_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容类型 图片:img;文字:text', + `ORDER_NUM` int(11) NOT NULL COMMENT '内容顺序 从1开始', + `DEL_FLAG` int(11) NOT NULL DEFAULT 0 COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) 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 latest_act_info +-- ---------------------------- +DROP TABLE IF EXISTS `latest_act_info`; +CREATE TABLE `latest_act_info` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `TITLE` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '活动标题', + `COVER_PIC` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '活动封面', + `SIGN_UP_START_TIME` datetime(0) NULL DEFAULT NULL COMMENT '报名开始时间', + `SIGN_UP_END_TIME` datetime(0) NULL DEFAULT NULL COMMENT '报名截止时间', + `REQUIREMENT` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '招募要求', + `ACT_START_TIME` datetime(0) NULL DEFAULT NULL COMMENT '活动开始时间', + `ACT_END_TIME` datetime(0) NULL DEFAULT NULL COMMENT '活动结束时间', + `ACT_ADDRESS` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '活动地点', + `ACT_LONGITUDE` decimal(32, 10) NULL DEFAULT NULL COMMENT '活动位置经度', + `ACT_LATITUDE` decimal(32, 10) NULL DEFAULT NULL COMMENT '活动位置纬度', + `SIGN_IN_START_TIME` datetime(0) NULL DEFAULT NULL COMMENT '打卡开始时间', + `SIGN_IN_END_TIME` datetime(0) NULL DEFAULT NULL COMMENT '打卡截止时间', + `SIGN_IN_ADDRESS` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '活动签到打卡地点', + `SIGN_IN_LONGITUDE` decimal(32, 10) NULL DEFAULT NULL COMMENT '活动签到打卡位置经度', + `SIGN_IN_LATITUDE` decimal(32, 10) NULL DEFAULT NULL COMMENT '活动签到打卡位置纬度', + `SIGN_IN_RADIUS` int(11) NULL DEFAULT NULL COMMENT '活动签到打卡半径(单位:米)', + `ACT_QUOTA_CATEGORY` tinyint(1) NULL DEFAULT NULL COMMENT '活动名额类型(0-不限名额,1-固定名额)', + `ACT_QUOTA` int(11) NULL DEFAULT 0 COMMENT '活动名额', + `SPONSOR_CONTACTS` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系人', + `SPONSOR_TEL` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系电话', + `SPONSOR_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '主办方类型:网格主办:grid;组织主办:agency', + `SPONSOR_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '主办方id(机关或网格的id)', + `SPONSOR_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '活动主办方名称(机关或网格的名称)', + `PID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '如果以网格名义发布,存储空字符串\"\"', + `REWARD` int(11) NULL DEFAULT 0 COMMENT '活动奖励积分', + `VOLUNTEER_LIMIT` tinyint(1) NULL DEFAULT NULL COMMENT '身份限制:1只有志愿者才可以参加活动0不限制志愿者身份', + `AUDIT_SWITCH` tinyint(1) NULL DEFAULT NULL COMMENT '审核开关:1报名人员需要人工审核0不需要', + `REVISION` int(11) NOT NULL DEFAULT 0 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 '更新时间', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除标识', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '最近一次编辑的活动信息' ROW_FORMAT = Compact; + +-- ---------------------------- +-- Table structure for volunteer_info +-- ---------------------------- +DROP TABLE IF EXISTS `volunteer_info`; +CREATE TABLE `volunteer_info` ( + `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(志愿者注册后插入本表)', + `USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id', + `CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户id', + `VOLUNTEER_INTRODUCE` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '志愿者自我介绍', + `VOLUNTEER_SIGNATURE` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '志愿者签名', + `DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记', + `REVISION` int(11) NOT NULL DEFAULT 0 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; + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.5__create_userbaseinfo.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.5__create_userbaseinfo.sql new file mode 100644 index 0000000000..1e5dfda23b --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.5__create_userbaseinfo.sql @@ -0,0 +1,22 @@ +CREATE TABLE `user_base_info` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `USER_ID` varchar(64) NOT NULL COMMENT '用户id', + `MOBILE` varchar(20) DEFAULT NULL COMMENT '手机号(注册手机号)', + `SURNAME` varchar(32) DEFAULT NULL COMMENT '姓氏', + `NAME` varchar(32) DEFAULT NULL COMMENT '名', + `REAL_NAME` varchar(50) DEFAULT NULL COMMENT '姓+名', + `ID_NUM` varchar(50) DEFAULT '' COMMENT '身份证号', + `GENDER` varchar(1) DEFAULT NULL COMMENT '性别(1男2女0未知)', + `STREET` varchar(128) DEFAULT '' COMMENT '街道', + `DISTRICT` varchar(128) DEFAULT '' COMMENT '小区名称', + `BUILDING_ADDRESS` varchar(128) DEFAULT '' COMMENT '楼栋单元', + `NICKNAME` varchar(64) DEFAULT '' COMMENT '昵称(目前来源于微信昵称,后续系统可支持用户有昵称)', + `HEAD_IMG_URL` varchar(1024) DEFAULT '' COMMENT '头像(目前来源于微信,后续系统顾客支持上传头像)', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户基础信息'; \ No newline at end of file From 5f5de3477011a88be7a738b99d3b17a1fcc5e045 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 28 Jul 2020 13:45:08 +0800 Subject: [PATCH 24/38] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-auth/deploy/docker-compose-test.yml | 2 +- .../epmet-third-server/deploy/docker-compose-test.yml | 2 +- .../gov-org/gov-org-server/deploy/docker-compose-test.yml | 2 +- epmet-user/epmet-user-server/deploy/docker-compose-test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-auth/deploy/docker-compose-test.yml b/epmet-auth/deploy/docker-compose-test.yml index e71cca12c3..6f97df8be2 100644 --- a/epmet-auth/deploy/docker-compose-test.yml +++ b/epmet-auth/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-auth-server: container_name: epmet-auth-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-auth:0.3.56 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-auth:0.3.57 ports: - "8081:8081" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml index c441095225..d76ca430a6 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-server:0.0.67 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-server:0.0.69 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml index a912b71cc2..acb18fd19b 100644 --- a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-org-server: container_name: gov-org-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-org-server:0.3.76 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-org-server:0.3.77 ports: - "8092:8092" network_mode: host # 使用现有网络 diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-test.yml b/epmet-user/epmet-user-server/deploy/docker-compose-test.yml index 3a291ea73e..e492ad73d4 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-test.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-user-server:0.3.81 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-user-server:0.3.83 ports: - "8087:8087" network_mode: host # 不会创建新的网络 From 3947c351207b96df71eb757c42da4b5391928d22 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 28 Jul 2020 14:13:03 +0800 Subject: [PATCH 25/38] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=20insertOrUpdate=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/UserBaseInfoServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java index e730a8dd13..eee8febb7e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java @@ -219,7 +219,9 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl Date: Tue, 28 Jul 2020 14:25:54 +0800 Subject: [PATCH 26/38] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=20insertOrUpdate=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/result/UserBaseInfoResultDTO.java | 2 +- .../main/java/com/epmet/feign/EpmetUserOpenFeignClient.java | 4 ++-- .../java/com/epmet/service/impl/UserBaseInfoServiceImpl.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBaseInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBaseInfoResultDTO.java index 96d90db4ef..c674685ee5 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBaseInfoResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBaseInfoResultDTO.java @@ -14,7 +14,7 @@ import java.io.Serializable; @Data public class UserBaseInfoResultDTO implements Serializable { private static final long serialVersionUID = 3124057264557384333L; - @JsonIgnore + private String id; /** diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 70116e6e91..b70d1fcf07 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -24,8 +24,8 @@ import java.util.List; * @author yinzuomei@elink-cn.com * @date 2020/6/4 13:09 */ -//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserOpenFeignClientFallback.class, url = "localhost:8087") -@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserOpenFeignClientFallback.class) +@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserOpenFeignClientFallback.class, url = "localhost:8087") +//@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserOpenFeignClientFallback.class) public interface EpmetUserOpenFeignClient { /** diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java index c2ba3d143b..f441b7d229 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java @@ -221,7 +221,7 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl Date: Tue, 28 Jul 2020 14:32:57 +0800 Subject: [PATCH 27/38] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-commons/epmet-commons-tools/pom.xml | 9 ++ .../epmet/commons/tools/utils/FileUtils.java | 80 +++++++++++------ .../tools/utils/HttpClientManager.java | 23 ++--- .../service/impl/CodeCustomerServiceImpl.java | 2 + .../epmet/service/impl/CodeServiceImpl.java | 85 ++++--------------- .../wxapi/constant/WxMaCodeConstant.java | 4 +- .../service/impl/WxMaCodeServiceImpl.java | 3 +- 7 files changed, 92 insertions(+), 114 deletions(-) diff --git a/epmet-commons/epmet-commons-tools/pom.xml b/epmet-commons/epmet-commons-tools/pom.xml index 01d92799d7..1a21a9a30e 100644 --- a/epmet-commons/epmet-commons-tools/pom.xml +++ b/epmet-commons/epmet-commons-tools/pom.xml @@ -133,6 +133,15 @@ org.apache.httpcomponents httpmime + + org.apache.httpcomponents + httpmime + + + commons-httpclient + commons-httpclient + 3.1 + diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/FileUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/FileUtils.java index a9623b7cde..f309630863 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/FileUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/FileUtils.java @@ -1,37 +1,65 @@ package com.epmet.commons.tools.utils; import java.io.File; +import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; +/** + * @author kamui + */ public class FileUtils { - /** - * 创建临时文件. - * - * @param inputStream 输入文件流 - * @param name 文件名 - * @param ext 扩展名 - * @param tmpDirFile 临时文件夹目录 - */ - public static File createTmpFile(InputStream inputStream, String name, String ext, File tmpDirFile) throws IOException { - File resultFile = File.createTempFile(name, '.' + ext, tmpDirFile); - - resultFile.deleteOnExit(); - org.apache.commons.io.FileUtils.copyToFile(inputStream, resultFile); - return resultFile; - } - - /** - * 创建临时文件. - * - * @param inputStream 输入文件流 - * @param name 文件名 - * @param ext 扩展名 - */ - public static File createTmpFile(InputStream inputStream, String name, String ext) throws IOException { - return createTmpFile(inputStream, name, ext, Files.createTempDirectory("weixin-java-tools-temp").toFile()); - } + /** + * 创建临时文件 + * + * @param inputStream + * @param name 文件名 + * @param ext 扩展名 + * @param tmpDirFile 临时文件夹目录 + */ + public static File createTmpFile(InputStream inputStream, String name, String ext, File tmpDirFile) throws IOException { + File tmpFile; + if (tmpDirFile == null) { + tmpFile = File.createTempFile(name, '.' + ext); + } else { + tmpFile = File.createTempFile(name, '.' + ext, tmpDirFile); + } + + tmpFile.deleteOnExit(); + FileOutputStream fos = new FileOutputStream(tmpFile); + try { + int read = 0; + byte[] bytes = new byte[1024 * 100]; + while ((read = inputStream.read(bytes)) != -1) { + fos.write(bytes, 0, read); + } + + fos.flush(); + } catch (Exception e) { + + } finally { + if (fos != null) { + try { + fos.close(); + } catch (IOException e) { + } + } + + } + return tmpFile; + } + + /** + * 创建临时文件 + * + * @param inputStream + * @param name 文件名 + * @param ext 扩展名 + */ + public static File createTmpFile(InputStream inputStream, String name, String ext) throws IOException { + return createTmpFile(inputStream, name, ext, null); + } } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java index 151ad8e10d..7d456a6707 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java @@ -22,7 +22,6 @@ import org.apache.http.config.RegistryBuilder; import org.apache.http.conn.socket.ConnectionSocketFactory; import org.apache.http.conn.socket.PlainConnectionSocketFactory; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; -import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; import org.apache.http.entity.mime.HttpMultipartMode; import org.apache.http.entity.mime.MultipartEntityBuilder; @@ -171,20 +170,14 @@ public class HttpClientManager { try { HttpPost httppost = new HttpPost(url); httppost.setConfig(requestConfig); - String boundaryStr = "------------" + System.currentTimeMillis(); - httppost.addHeader("Connection", "keep-alive"); - httppost.addHeader("Accept", "*/*"); - httppost.addHeader("Content-Type", "multipart/form-data;boundary=" + boundaryStr); - httppost.addHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0) "); - MultipartEntityBuilder meb = MultipartEntityBuilder.create(); - meb.setBoundary(boundaryStr).setCharset(StandardCharsets.UTF_8).setMode(HttpMultipartMode.BROWSER_COMPATIBLE); - meb.addBinaryBody("media", file, ContentType.APPLICATION_OCTET_STREAM, file.getName()); - HttpEntity entity = meb.build(); - httppost.setEntity(entity); -// FileBody fileBody = new FileBody(file); -// HttpEntity reqEntity = MultipartEntityBuilder.create() -// .addPart("media", fileBody).build(); -// httppost.setEntity(reqEntity); + if (file != null) { + HttpEntity entity = MultipartEntityBuilder + .create() + .addBinaryBody("media", file) + .setMode(HttpMultipartMode.RFC6532) + .build(); + httppost.setEntity(entity); + } return execute(httppost,false); } catch (Exception e) { log.error("send exception", e); diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeCustomerServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeCustomerServiceImpl.java index 1962b917a9..c250644044 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeCustomerServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeCustomerServiceImpl.java @@ -89,6 +89,7 @@ public class CodeCustomerServiceImpl extends BaseServiceImpl { + List sortList = + wxResult.getData().stream().sorted(Comparator.comparing(WxMaTemplateResult::getCreateTime).reversed()).collect(Collectors.toList()); + sortList.forEach(temp -> { TemplateListResultDTO dto = new TemplateListResultDTO(); dto.setId(temp.getTemplateId()); dto.setUserVersion(temp.getUserVersion()); dto.setUserDesc(temp.getUserDesc()); - dto.setCreateTime(DateUtils.formatTimestamp(temp.getCreateTime(), DateUtils.DATE_PATTERN)); + dto.setCreateTime(DateUtils.formatTimestamp(temp.getCreateTime(), DateUtils.DATE_TIME_PATTERN)); resultList.add(dto); }); return resultList; @@ -101,14 +103,6 @@ public class CodeServiceImpl implements CodeService { return codeExtDTO.getExtJson(); } - public static void main(String[] args) { - String json = "{\"extEnable\":true,\"extAppid\":\"wx2679392c4cc2af22\",\"directCommit\":false,\"ext\":{\"extAppid\":\"wx2679392c4cc2af22\",\"footbar\":{\"work\":{\"name\":\"工作\",\"pageTile\":\"工作\"},\"org\":{\"name\":\"组织\",\"pageTile\":\"组织\"},\"data\":{\"name\":\"数据\",\"pageTile\":\"数据\"},\"find\":{\"name\":\"更多\",\"pageTile\":\"更多\"}}}}"; - WxExtJson wxExtJson = JSONObject.parseObject(json, WxExtJson.class); - wxExtJson.setExtAppid("123456"); - wxExtJson.getExt().setExtAppid("123456"); - String extJson = JSON.toJSONString(wxExtJson); - System.out.println(extJson); - } @Override @Transactional(rollbackFor = Exception.class) @@ -122,14 +116,11 @@ public class CodeServiceImpl implements CodeService { if (null == authInfo) { throw new RenException("未授权"); } - if (!isJson(formDTO.getExtJson())) { - throw new RenException("第三方配置不是有效的Json"); - } - - WxExtJson wxExtJson = JSONObject.parseObject(formDTO.getExtJson(), WxExtJson.class); + String extJson = getExtJson(formDTO); + WxExtJson wxExtJson = JSONObject.parseObject(extJson, WxExtJson.class); wxExtJson.setExtAppid(authInfo.getAuthorizerAppid()); wxExtJson.getExt().setExtAppid(authInfo.getAuthorizerAppid()); - String extJson = JSON.toJSONString(wxExtJson); + extJson = JSON.toJSONString(wxExtJson); CodeExtDTO codeExtDTO = codeExtService.getExtByCustomer(formDTO.getCustomerId(), formDTO.getClientType()); if (null == codeExtDTO) { codeExtDTO = new CodeExtDTO(); @@ -373,7 +364,7 @@ public class CodeServiceImpl implements CodeService { //获取上传代码信息 CodeCustomerDTO codeCustomerDTO = codeCustomerService.get(formDTO.getCodeId()); if (null != codeCustomerDTO.getQrCode()) { - result.setQrcode(codeCustomerDTO.getQrCode()); + result.setQrcode(codeCustomerDTO.getQrCode()); return result; } //是否授权 @@ -409,8 +400,8 @@ public class CodeServiceImpl implements CodeService { @Override public String mediaUpload(MediaUploadFormDTO formDTO) { try { - Result uploadWxImg = ossFeignClient.uploadWxImg(formDTO.getMedia()); - File file = new File(uploadWxImg.getData().getUrl()); + File file = new File(formDTO.getMedia().getOriginalFilename()); + FileUtils.copyInputStreamToFile(formDTO.getMedia().getInputStream(), file); //获取上传代码信息 CodeCustomerDTO codeCustomerDTO = codeCustomerService.get(formDTO.getCodeId()); //获取小程序调用令牌 @@ -443,50 +434,4 @@ public class CodeServiceImpl implements CodeService { codeOperationHistoryService.save(operationDTO); } - /** - * 校验是否是Json - * - * @param content - * @return boolean - * @author zhaoqifeng - * @date 2020/7/17 15:43 - */ - private boolean isJson(String content) { - try { - JSONObject jsonStr = JSONObject.parseObject(content); - return true; - } catch (Exception e) { - return false; - } - } - - private byte[] toPrimitives(Byte[] oBytes) { - byte[] bytes = new byte[oBytes.length]; - - for (int i = 0; i < oBytes.length; i++) { - bytes[i] = oBytes[i]; - } - return bytes; - } - - private void byteToFile(byte[] bytes) - { - try - { - // 根据绝对路径初始化文件 - File localFile = new File("."); - if (!localFile.exists()) - { - localFile.createNewFile(); - } - // 输出流 - OutputStream os = new FileOutputStream(localFile); - os.write(bytes); - os.close(); - } - catch (Exception e) - { - e.printStackTrace(); - } - } } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java index 9302f876ff..6d82fae8da 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java @@ -159,10 +159,10 @@ public interface WxMaCodeConstant { /** * 新增临时素材 */ - String MEDIA_UPLOAD_URL = "https://api.weixin.qq.com/wxa/setwebviewdomain"; + String MEDIA_UPLOAD_URL = "https://api.weixin.qq.com/cgi-bin/media/upload"; /** - * 新增临时素材 + * 获取模板列表 */ String GET_TEMPLATE_URL = "https://api.weixin.qq.com/wxa/gettemplatelist"; diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java index 97f7cac543..e6fcafb53f 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java @@ -156,7 +156,7 @@ public class WxMaCodeServiceImpl implements WxMaCodeService { return result; } WxMaAuditStatusResult auditStatusResult = JSONObject.parseObject(statusResult.getData(), WxMaAuditStatusResult.class); - if (!auditStatusResult.success()){ + if (!auditStatusResult.success()) { result.setErrorCode(auditStatusResult.getErrcode()); result.setErrorMsg(WxMaErrorMsgEnum.findMsgByCode(auditStatusResult.getErrcode())); return result; @@ -269,6 +269,7 @@ public class WxMaCodeServiceImpl implements WxMaCodeService { WxMaUploadMediaResult mediaInfo = gson.fromJson(mediaResult.getData(), WxMaUploadMediaResult.class); result.setErrorCode(mediaInfo.getErrCode()); result.setErrorMsg(WxMaErrorMsgEnum.findMsgByCode(mediaInfo.getErrCode())); + result.ok(mediaInfo); return result; } From 6f7f1fd4d96e6cfd840574d998edaa9c7a479c6f Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 28 Jul 2020 14:39:50 +0800 Subject: [PATCH 28/38] =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-third/epmet-third-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml index 2e14a16b14..56c505c3f4 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml +++ b/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.69 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.70 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index 6ffa32a944..45bb1d2b10 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.69 + 0.0.70 com.epmet From 23d532bb52ab2e836c8f5d6f03ba4bb31ad85298 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 28 Jul 2020 15:26:50 +0800 Subject: [PATCH 29/38] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=A2=E6=88=B7app?= =?UTF-8?q?=E8=A1=A8=20=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.2__addCutomerApp.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 epmet-module/oper-crm/oper-crm-server/src/main/resources/db/migration/V0.0.2__addCutomerApp.sql diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/resources/db/migration/V0.0.2__addCutomerApp.sql b/epmet-module/oper-crm/oper-crm-server/src/main/resources/db/migration/V0.0.2__addCutomerApp.sql new file mode 100644 index 0000000000..9f90c2dd6c --- /dev/null +++ b/epmet-module/oper-crm/oper-crm-server/src/main/resources/db/migration/V0.0.2__addCutomerApp.sql @@ -0,0 +1,16 @@ +CREATE TABLE `customer_app` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `APP_ID` varchar(128) NOT NULL COMMENT '小程序的appId', + `CLIENT` varchar(32) NOT NULL COMMENT 'resi,work', + `SECRET` varchar(255) DEFAULT NULL COMMENT 'app的secret', + `ENABLE_FLAG` int(1) NOT NULL DEFAULT '0' COMMENT '0:停用,1:启用', + `DEL_FLAG` int(11) NOT NULL DEFAULT '0' COMMENT '删除标识:0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE, + UNIQUE KEY `unx_app_id` (`APP_ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='客户app表'; \ No newline at end of file From c85e86ad7d3c89a57c61bc5fbbcfe6b51d5ade2a Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Tue, 28 Jul 2020 15:29:16 +0800 Subject: [PATCH 30/38] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/VolunteerInfoServiceImpl.java | 19 +++++- .../dto/result/ResiUserBaseInfoResultDTO.java | 66 +++++++++++++++++++ .../controller/UserBaseInfoController.java | 18 ++++- .../com/epmet/controller/UserController.java | 2 +- .../java/com/epmet/dao/UserBaseInfoDao.java | 15 ++++- .../epmet/service/UserBaseInfoService.java | 14 +++- .../service/impl/UserBaseInfoServiceImpl.java | 8 ++- .../main/resources/mapper/UserBaseInfoDao.xml | 20 +++++- 8 files changed, 154 insertions(+), 8 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/ResiUserBaseInfoResultDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java index 182da8e261..e6f0ae3173 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java @@ -91,7 +91,7 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl customerUserDetail(@RequestBody IssueInitiatorFormDTO param){ return new Result().ok(userBaseInfoService.customerUserDetail(param.getUserId())); } + + /** + * 获取用户基础信息 + * + * @param tokenDTO + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 15:20 2020-07-28 + **/ + @PostMapping("selecuserbaseinfo") + public Result selecUserBaseInfo(@LoginUser TokenDto tokenDTO){ + return userBaseInfoService.selecUserBaseInfoByUserId(tokenDTO.getUserId()); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java index 773bc61a08..d607eba501 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java @@ -139,7 +139,7 @@ public class UserController { * @Date 14:51 2020-07-23 **/ @PostMapping("updateUserBaseAndWxUserInfo") - public Result updateUserBaseAndWxUserInfo(@RequestBody WxUserInfoFormDTO wxUserInfoFormDTO) { ; + public Result updateUserBaseAndWxUserInfo(@RequestBody WxUserInfoFormDTO wxUserInfoFormDTO) { ValidatorUtils.validateEntity(wxUserInfoFormDTO); return userService.updateWxUserInfo(wxUserInfoFormDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java index f5ca5fc3aa..1afb03057f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserBaseInfoDao.java @@ -18,10 +18,13 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.result.ResiUserBaseInfoResultDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.dto.result.UserWechatResultDTO; import com.epmet.entity.UserBaseInfoEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 用户基础信息 @@ -49,4 +52,14 @@ public interface UserBaseInfoDao extends BaseDao { * @Date 2020/7/22 9:46 **/ UserWechatResultDTO selectUserWechatByUserId(String userId); -} \ No newline at end of file + + /** + * 获取用户基础信息 + * + * @param userId + * @return com.epmet.dto.result.ResiUserBaseInfoResultDTO + * @Author zhangyong + * @Date 15:20 2020-07-28 + **/ + ResiUserBaseInfoResultDTO selecUserBaseInfoByUserId(@Param("userId") String userId); +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java index c2512b3e8b..03786a14a9 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBaseInfoService.java @@ -19,8 +19,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.Result; import com.epmet.dto.UserBaseInfoDTO; import com.epmet.dto.result.CustomerUserDetailResultDTO; +import com.epmet.dto.result.ResiUserBaseInfoResultDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.entity.UserBaseInfoEntity; @@ -130,4 +132,14 @@ public interface UserBaseInfoService extends BaseService { * @date 2020.07.27 01:34 **/ CustomerUserDetailResultDTO customerUserDetail(String userId); -} \ No newline at end of file + + /** + * 获取用户基础信息 + * + * @param userId + * @return com.epmet.commons.tools.utils.Result + * @Author zhangyong + * @Date 15:20 2020-07-28 + **/ + Result selecUserBaseInfoByUserId(String userId); +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java index f441b7d229..20865a94bb 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java @@ -32,6 +32,7 @@ import com.epmet.dto.UserBaseInfoDTO; import com.epmet.dto.UserResiInfoDTO; import com.epmet.dto.UserWechatDTO; import com.epmet.dto.result.CustomerUserDetailResultDTO; +import com.epmet.dto.result.ResiUserBaseInfoResultDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.entity.UserBaseInfoEntity; import com.epmet.redis.UserBaseInfoRedis; @@ -254,5 +255,8 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl selecUserBaseInfoByUserId(String userId) { + return new Result().ok(baseDao.selecUserBaseInfoByUserId(userId)); + } +} diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml index 1bc8034712..ad00b043c6 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml @@ -68,4 +68,22 @@ uw.DEL_FLAG = '0' AND uw.USER_ID = #{userId} - \ No newline at end of file + + + + From 6ef3d1afac4df9b66cb6dbd22ea8db787795feee Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 28 Jul 2020 15:31:07 +0800 Subject: [PATCH 31/38] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/CodeCustomerService.java | 2 +- .../service/impl/CodeCustomerServiceImpl.java | 4 ++-- .../epmet/service/impl/CodeServiceImpl.java | 24 +++++++++---------- .../mapper/CodeOperationHistoryDao.xml | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeCustomerService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeCustomerService.java index fc2190a39d..588b428c5d 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeCustomerService.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeCustomerService.java @@ -72,7 +72,7 @@ public interface CodeCustomerService extends BaseService { * @author generator * @date 2020-07-09 */ - void save(CodeCustomerDTO dto); + String save(CodeCustomerDTO dto); /** * 默认更新 diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeCustomerServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeCustomerServiceImpl.java index c250644044..92c1b86a9c 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeCustomerServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeCustomerServiceImpl.java @@ -86,10 +86,10 @@ public class CodeCustomerServiceImpl extends BaseServiceImpl Date: Tue, 28 Jul 2020 15:33:11 +0800 Subject: [PATCH 32/38] =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-third/epmet-third-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml index 56c505c3f4..ec07fc012f 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml +++ b/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.70 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.71 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index 45bb1d2b10..626fd07677 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.70 + 0.0.71 com.epmet From d985cde2781d0fa2e51c3531652e136bb18265a3 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 28 Jul 2020 15:36:10 +0800 Subject: [PATCH 33/38] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/CodeServiceImpl.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java index 8b8d4890ae..85979d119d 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java @@ -133,21 +133,21 @@ public class CodeServiceImpl implements CodeService { codeExtDTO.setExtJson(extJson); codeExtService.update(codeExtDTO); -// WxMaCodeCommitReq request = ConvertUtils.sourceToTarget(formDTO, WxMaCodeCommitReq.class); -// request.setExtJson(extJson); -// //调用微信API上传代码 -// WxResult wxResult = wxMaCodeService.commit(authInfo.getAuthorizerAccessToken(), request); -// //上传失败,抛出异常 -// if (!wxResult.success()) { -// saveOperation(formDTO.getCustomerId(), null, formDTO.getUserVersion(), CodeConstant.OPER_UPLOAD, wxResult.getErrorMsg()); -// throw new RenException(wxResult.getErrorCode(), wxResult.getErrorMsg()); -// } + WxMaCodeCommitReq request = ConvertUtils.sourceToTarget(formDTO, WxMaCodeCommitReq.class); + request.setExtJson(extJson); + //调用微信API上传代码 + WxResult wxResult = wxMaCodeService.commit(authInfo.getAuthorizerAccessToken(), request); + //上传失败,抛出异常 + if (!wxResult.success()) { + saveOperation(formDTO.getCustomerId(), null, formDTO.getUserVersion(), CodeConstant.OPER_UPLOAD, wxResult.getErrorMsg()); + throw new RenException(wxResult.getErrorCode(), wxResult.getErrorMsg()); + } //获取客户信息 CustomerDTO customerDTO = new CustomerDTO(); customerDTO.setId(formDTO.getCustomerId()); PaCustomerDTO paCustomerDTO = paCustomerService.get(formDTO.getCustomerId()); //将之前上传信息删除 -// codeCustomerService.deleteCode(formDTO.getCustomerId(), formDTO.getClientType()); + codeCustomerService.deleteCode(formDTO.getCustomerId(), formDTO.getClientType()); //将上传信息存入表中 CodeCustomerDTO codeCustomerDTO = ConvertUtils.sourceToTarget(formDTO, CodeCustomerDTO.class); From 019f8a05e9d4ab0e972a8ecfb57e57050797894c Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 28 Jul 2020 15:37:41 +0800 Subject: [PATCH 34/38] =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-third/epmet-third-server/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml index ec07fc012f..3a37834c79 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-dev.yml +++ b/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.71 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-server:0.0.72 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-third/epmet-third-server/pom.xml b/epmet-module/epmet-third/epmet-third-server/pom.xml index 626fd07677..0e8a2f07e2 100644 --- a/epmet-module/epmet-third/epmet-third-server/pom.xml +++ b/epmet-module/epmet-third/epmet-third-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.71 + 0.0.72 com.epmet From a012dbb7655372c3a6dd2d64e8965cec5f0a470a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 28 Jul 2020 16:28:34 +0800 Subject: [PATCH 35/38] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=AB=AF-heart?= =?UTF-8?q?=E8=81=94=E8=B0=83bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/work/CanceledActResultDTO.java | 5 +++ .../dto/result/work/FinishedActResultDTO.java | 5 +++ .../result/work/InProgressActResultDTO.java | 5 +++ .../dto/result/work/JoinedUserResultDTO.java | 6 +++ .../epmet/controller/WorkActController.java | 2 +- .../service/impl/GrantPointsServiceImpl.java | 3 ++ .../service/impl/WorkActDraftServiceImpl.java | 2 + .../service/impl/WorkActServiceImpl.java | 29 +++++++++++++-- .../service/impl/WorkActUserServiceImpl.java | 37 ++++++++++++++++--- .../resources/db/migration/epmet_heart.sql | 3 +- .../src/main/resources/mapper/ActInfoDao.xml | 11 ++++-- 11 files changed, 91 insertions(+), 17 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java index 887a457b4e..4c8b013287 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java @@ -52,4 +52,9 @@ public class CanceledActResultDTO implements Serializable { * 活动取消的原因 */ private String cancelReason; + + /** + * 活动地点 + */ + private String actAddress; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java index 25f9d7e46b..6a23d0498b 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java @@ -53,4 +53,9 @@ public class FinishedActResultDTO implements Serializable { */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") private Date actualEndTime; + + /** + * 活动地点 + */ + private String actAddress; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java index 5e25e5fab0..c7c73f6a96 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java @@ -77,4 +77,9 @@ public class InProgressActResultDTO implements Serializable { @JsonIgnore @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") private Date signUpStartTime; + + /** + * 活动地点 + */ + private String actAddress; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/JoinedUserResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/JoinedUserResultDTO.java index 821364850a..aae8d212e7 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/JoinedUserResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/JoinedUserResultDTO.java @@ -51,6 +51,12 @@ public class JoinedUserResultDTO implements Serializable { */ private Boolean signInFlag; + /** + * 已签到:signed_in; 默认"" + */ + @JsonIgnore + private String signInFlagStr; + /** * true: 是志愿者 false : 不是志愿者 */ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java index 7deae2b1af..81fd46ce1e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java @@ -73,7 +73,7 @@ public class WorkActController { * @return com.epmet.commons.tools.utils.Result * @param formDTO * @author yinzuomei - * @description 进行中活动列表 + * @description 进行中-活动列表 * @Date 2020/7/23 21:24 **/ @PostMapping("inprogresslist") diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/GrantPointsServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/GrantPointsServiceImpl.java index ccdab4e19e..d761445c55 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/GrantPointsServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/GrantPointsServiceImpl.java @@ -21,6 +21,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.List; @@ -104,6 +105,7 @@ public class GrantPointsServiceImpl implements GrantPointsService { * @Date 2020/7/24 13:34 **/ @Override + @Transactional(rollbackFor = Exception.class) public void agree(GrantPointsFormDTO formDTO) { //是否是待处理 ActUserRelationDTO actUserRelationDTO=actUserRelationService.get(formDTO.getActUserRelationId()); @@ -148,6 +150,7 @@ public class GrantPointsServiceImpl implements GrantPointsService { * @Date 2020/7/24 15:03 **/ @Override + @Transactional(rollbackFor = Exception.class) public void deny(GrantPointsFormDTO formDTO) { //是否是待处理 ActUserRelationDTO actUserRelationDTO=actUserRelationService.get(formDTO.getActUserRelationId()); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java index a1b008430e..1af9e0522b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActDraftServiceImpl.java @@ -16,6 +16,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.Date; @@ -92,6 +93,7 @@ public class WorkActDraftServiceImpl implements WorkActDraftService { * @Date 2020/7/21 14:00 **/ @Override + @Transactional(rollbackFor = Exception.class) public SaveActDraftResultDTO saveAct(DraftActInfoFormDTO formDTO) { //保存活动属性 LatestActInfoDTO latestActInfoDTO=this.constructLatestActInfoDTO(formDTO); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java index 0a78b35470..39f8bc5226 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java @@ -534,28 +534,41 @@ public class WorkActServiceImpl implements WorkActService { // 活动状态:报名中:signing_up;截止报名: end_sign_up; 已开始: in_progress; 已报满: enough if (nowDate.compareTo(inProgressActResultDTO.getSignUpEndTime()) == -1 || nowDate.compareTo(inProgressActResultDTO.getSignUpEndTime()) == 0) { + logger.info(String.format("当前时间%s报名截止时间%s处于报名中", + DateUtils.format(nowDate,DateUtils.DATE_TIME_PATTERN), + DateUtils.format(inProgressActResultDTO.getSignUpEndTime(),DateUtils.DATE_TIME_PATTERN))); //截止报名时间之前(包含报名时间截止时间点) if (!inProgressActResultDTO.getActQuotaCategory()) { //如果是不限制名额,则显示报名中 inProgressActResultDTO.setStatus("signing_up"); + logger.info("活动不限制名额,界面显示 报名中"); continue; } else { //固定名额,且已报名人数<活动需要人数显示报名中 if (inProgressActResultDTO.getActQuota() > inProgressActResultDTO.getSignedUp()) { + logger.info("活动限制名额,未报满,界面显示报名中"); inProgressActResultDTO.setStatus("signing_up"); continue; } else if (inProgressActResultDTO.getActQuota().equals(inProgressActResultDTO.getSignedUp())) { inProgressActResultDTO.setStatus("enough"); + logger.info("活动限制名额,且已报满,界面显示已报满"); continue; } } } else if (nowDate.compareTo(inProgressActResultDTO.getSignUpEndTime()) == 1 - || nowDate.compareTo(inProgressActResultDTO.getActStartTime()) == -1) { + &&nowDate.compareTo(inProgressActResultDTO.getActStartTime()) == -1) { + logger.info(String.format("当前时间%s报名截止时间%s活动预计开始时间%s界面显示截止报名", + DateUtils.format(nowDate,DateUtils.DATE_TIME_PATTERN), + DateUtils.format(inProgressActResultDTO.getSignUpEndTime(),DateUtils.DATE_TIME_PATTERN), + DateUtils.format(inProgressActResultDTO.getActStartTime(),DateUtils.DATE_TIME_PATTERN))); //活动报名截止-活动预计开始之间显示截止报名 inProgressActResultDTO.setStatus("end_sign_up"); continue; } else if (nowDate.compareTo(inProgressActResultDTO.getActStartTime()) == 1 || nowDate.compareTo(inProgressActResultDTO.getActStartTime()) == 0) { + logger.info(String.format("当前时间%s活动预计开始时间%s界面显示已开始", + DateUtils.format(nowDate,DateUtils.DATE_TIME_PATTERN), + DateUtils.format(inProgressActResultDTO.getActStartTime(),DateUtils.DATE_TIME_PATTERN))); //活动预计开始时间点之后,包含活动预计开始时间点,显示 已开始 inProgressActResultDTO.setStatus("in_progress"); continue; @@ -596,6 +609,7 @@ public class WorkActServiceImpl implements WorkActService { * @Date 2020/7/26 17:26 **/ @Override + @Transactional(rollbackFor = Exception.class) public void cancelAct(CancelActFormDTO formDTO) { ActInfoDTO actInfoDTO=actInfoService.get(formDTO.getActId()); if(null==actInfoDTO){ @@ -671,6 +685,7 @@ public class WorkActServiceImpl implements WorkActService { * @Date 2020/7/26 19:49 **/ @Override + @Transactional(rollbackFor = Exception.class) public void saveActualTime(SaveActualTimeFormDTO formDTO) { if(formDTO.getActualStartTime().compareTo(formDTO.getActualEndTime())!=-1){ throw new RenException(EpmetErrorCode.ACT_ACTUAL_START_TIME_ERROR.getCode()); @@ -736,6 +751,7 @@ public class WorkActServiceImpl implements WorkActService { * @Date 2020/7/26 21:48 **/ @Override + @Transactional(rollbackFor = Exception.class) public void finishAct(String actId) { ActInfoDTO actInfoDTO=actInfoService.get(actId); if(null==actInfoDTO){ @@ -862,10 +878,13 @@ public class WorkActServiceImpl implements WorkActService { if(!actInfoDTO.getCreatedBy().equals(loginUserUtil.getLoginUserId())){ throw new RenException(EpmetErrorCode.REQUIRE_PERMISSION.getCode()); } + //如果活动设置的分支大于0,需要判断是否已经处理完毕 //待处理事项为空时才可以结束活动 - List list=actUserRelationDao.selectInProgress(actInfoDTO.getId()); - if(null!=list&&list.size()>0){ - throw new RenException(EpmetErrorCode.HAVE_HANDLE.getCode()); + if(actInfoDTO.getReward()>0){ + List list=actUserRelationDao.selectInProgress(actInfoDTO.getId()); + if(null!=list&&list.size()>0){ + throw new RenException(EpmetErrorCode.HAVE_HANDLE.getCode()); + } } //先填写实际开始时间、实际结束时间 if(null==actInfoDTO.getActualStartTime()||null==actInfoDTO.getActualEndTime()){ @@ -882,6 +901,7 @@ public class WorkActServiceImpl implements WorkActService { * @Date 2020/7/27 10:45 **/ @Override + @Transactional(rollbackFor = Exception.class) public void summaryAct(SummaryActFormDTO formDTO) { ActInfoDTO actInfoDTO=actInfoService.get(formDTO.getActId()); if(null==actInfoDTO){ @@ -958,6 +978,7 @@ public class WorkActServiceImpl implements WorkActService { * @Date 2020/7/27 13:55 **/ @Override + @Transactional(rollbackFor = Exception.class) public PublishActResultDTO rePublish(RePublishFormDTO rePublishFormDTO) { ActInfoDTO originalActInfo=actInfoService.get(rePublishFormDTO.getActId()); if(null==originalActInfo){ diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java index c2f121e972..87d8575e03 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java @@ -13,11 +13,15 @@ import com.epmet.constant.ReadFlagConstant; import com.epmet.dao.ActInfoDao; import com.epmet.dao.ActUserLogDao; import com.epmet.dao.ActUserRelationDao; +import com.epmet.dto.ActInfoDTO; import com.epmet.dto.ActUserLogDTO; import com.epmet.dto.ActUserRelationDTO; import com.epmet.dto.HeartUserInfoDTO; import com.epmet.dto.form.UserMessageFormDTO; -import com.epmet.dto.form.work.*; +import com.epmet.dto.form.work.AactUserDetailFormDTO; +import com.epmet.dto.form.work.ActIdFormDTO; +import com.epmet.dto.form.work.AuditUserFormDTO; +import com.epmet.dto.form.work.UserHistoricalActFormDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.dto.result.work.*; import com.epmet.entity.ActInfoEntity; @@ -25,6 +29,7 @@ import com.epmet.entity.ActUserLogEntity; import com.epmet.entity.ActUserRelationEntity; import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.service.ActInfoService; import com.epmet.service.ActUserRelationService; import com.epmet.service.HeartUserInfoService; import com.epmet.service.WorkActUserService; @@ -32,6 +37,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.Date; @@ -62,6 +68,8 @@ public class WorkActUserServiceImpl implements WorkActUserService { private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; @Autowired private LoginUserUtil loginUserUtil; + @Autowired + private ActInfoService actInfoService; /** * @param formDTO * @return java.util.List @@ -358,6 +366,7 @@ public class WorkActUserServiceImpl implements WorkActUserService { * @Date 2020/7/23 17:30 **/ @Override + @Transactional(rollbackFor = Exception.class) public void auditPass(String actUserRelationId) { ActUserRelationEntity actUserRelationEntity=actUserRelationDao.selectById(actUserRelationId); if(null==actUserRelationEntity||!ActConstant.ACT_USER_STATUS_AUDITING.equals(actUserRelationEntity.getStatus())){ @@ -404,6 +413,7 @@ public class WorkActUserServiceImpl implements WorkActUserService { * @Date 2020/7/23 18:14 **/ @Override + @Transactional(rollbackFor = Exception.class) public void auditRefuse(AuditUserFormDTO formDTO) { ActUserRelationEntity actUserRelationEntity=actUserRelationDao.selectById(formDTO.getActUserRelationId()); if(null==actUserRelationEntity||!ActConstant.ACT_USER_STATUS_AUDITING.equals(actUserRelationEntity.getStatus())){ @@ -451,6 +461,11 @@ public class WorkActUserServiceImpl implements WorkActUserService { **/ @Override public List queryJoinUserList(ActIdFormDTO formDTO) { + ActInfoDTO actInfoDTO=actInfoService.get(formDTO.getActId()); + if(null==actInfoDTO){ + logger.error("act_info is null"); + return new ArrayList<>(); + } List list=actInfoDao.queryJoinUserList(formDTO.getActId()); if(null!=list&&list.size()>0){ //查询已通过审核的人员id集合 @@ -458,11 +473,21 @@ public class WorkActUserServiceImpl implements WorkActUserService { //根据已通过的人员集合,查询出用户基本信息 List userInfoList=this.queryUserBaseInfoList(userIdList); for(JoinedUserResultDTO joinedUserResultDTO:list){ - //积分描述赋值 - if(ActConstant.ACT_USER_STATUS_AGREE.equals(joinedUserResultDTO.getRewardFlag())){ - joinedUserResultDTO.setPointsDes(String.format("积分+%s",joinedUserResultDTO.getReward())); - }else if(ActConstant.ACT_USER_STATUS_DENY.equals(joinedUserResultDTO.getRewardFlag())){ - joinedUserResultDTO.setPointsDes("积分+0"); + if(actInfoDTO.getActStatus().equals(ActConstant.ACT_STATUS_FINISHED)){ + //积分描述赋值 + if(ActConstant.ACT_USER_STATUS_AGREE.equals(joinedUserResultDTO.getRewardFlag())){ + joinedUserResultDTO.setPointsDes(String.format("积分+%s",joinedUserResultDTO.getReward())); + }else if(ActConstant.ACT_USER_STATUS_DENY.equals(joinedUserResultDTO.getRewardFlag())){ + joinedUserResultDTO.setPointsDes("积分+0"); + } + }else{ + logger.info("当前活动未结束,活动状态:"+actInfoDTO.getActStatus()); + joinedUserResultDTO.setPointsDes(StrConstant.EPMETY_STR); + } + if(ActConstant.ACT_USER_STATUS_SIGNED_IN.equals(joinedUserResultDTO.getSignInFlagStr())){ + joinedUserResultDTO.setSignInFlag(true); + }else{ + joinedUserResultDTO.setSignInFlag(false); } //志愿者标识赋值 joinedUserResultDTO.setVolunteerFlag(this.getVolunteerFlag(joinedUserResultDTO.getUserId())); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql index c2b485aaf5..67ee2b23de 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql +++ b/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 13:38:27 + Date: 28/07/2020 15:17:47 */ SET NAMES utf8mb4; @@ -175,7 +175,6 @@ CREATE TABLE `act_point_log` ( `ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键(给分或者不给分,以及重新处理插入本表)', `ACT_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动id', `USER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户id', - `POINT_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '加积分:add ; 减积分:subtract', `POINTS` int(11) NOT NULL COMMENT '积分值', `OPERATE_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作类型:\r\n同意给分agree; 不给分:deny;重新处理: reset', `REMARK` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注:拒绝给分和重新处理时录入的理由', diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml index 2c83ec6ded..3828a814f8 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml @@ -483,7 +483,8 @@ AND ( aur.`STATUS` = 'auditing' OR aur.`STATUS` = 'passed' ) ) AS signedUp, ai.SIGN_UP_END_TIME as signUpEndTime, - ai.SIGN_UP_START_TIME as signUpStartTime + ai.SIGN_UP_START_TIME as signUpStartTime, + ai.ACT_ADDRESS as actAddress FROM act_info ai WHERE @@ -502,7 +503,8 @@ ai.ACT_START_TIME AS actStartTime, ai.ACT_END_TIME AS actEndTime, ai.CANCEL_TIME AS cancelTime, - ai.CANCEL_REASON AS cancelReason + ai.CANCEL_REASON AS cancelReason, + ai.ACT_ADDRESS as actAddress FROM act_info ai WHERE @@ -522,7 +524,8 @@ ai.ACT_START_TIME AS actStartTime, ai.ACT_END_TIME AS actEndTime, ai.ACTUAL_START_TIME as actualStartTime, - ai.ACTUAL_END_TIME as actualEndTime + ai.ACTUAL_END_TIME as actualEndTime, + ai.ACT_ADDRESS as actAddress FROM act_info ai WHERE @@ -539,7 +542,7 @@ aur.id as actUserRelationId, aur.ACT_ID , aur.USER_ID , - aur.SIGN_IN_FLAG, + aur.SIGN_IN_FLAG as signInFlagStr, aur.CREATED_TIME as signUpTime, ai.REWARD, aur.REWARD_FLAG, From 928ab40a4df9454a31b19337e7fad1885baba822 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 28 Jul 2020 16:31:46 +0800 Subject: [PATCH 36/38] =?UTF-8?q?=E4=BF=AE=E6=94=B9heart+1,user+1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-heart-server/deploy/docker-compose-dev.yml | 2 +- epmet-module/epmet-heart/epmet-heart-server/pom.xml | 2 +- epmet-user/epmet-user-server/deploy/docker-compose-dev.yml | 2 +- epmet-user/epmet-user-server/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml index a0a80e2b1a..98dfa4eb08 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml +++ b/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.4 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.5 ports: - "8111:8111" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml index 7f9cd25c89..428cba0d77 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.4 + 0.0.5 com.epmet epmet-heart diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml index 9806ec7434..143c47e3aa 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml +++ b/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.83 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.84 ports: - "8087:8087" network_mode: host # 不会创建新的网络 diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index 4429a5abfd..417e633995 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.83 + 0.3.84 com.epmet epmet-user From 1363658a6870462d9e893bb5031dd363930ee7ab Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 28 Jul 2020 16:37:49 +0800 Subject: [PATCH 37/38] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-third-server/deploy/docker-compose-test.yml | 2 +- .../gov-mine/gov-mine-server/deploy/docker-compose-test.yml | 2 +- .../gov-voice/gov-voice-server/deploy/docker-compose-test.yml | 2 +- .../oper-customize-server/deploy/docker-compose-test.yml | 2 +- .../resi-mine/resi-mine-server/deploy/docker-compose-test.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml index d76ca430a6..eed3eaec16 100644 --- a/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-third/epmet-third-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-third-server: container_name: epmet-third-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-server:0.0.69 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-server:0.0.72 ports: - "8110:8110" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-test.yml b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-test.yml index 0c48b30542..d6a47aeee8 100644 --- a/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-mine/gov-mine-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-mine-server: container_name: gov-mine-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-mine-server:0.3.32 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-mine-server:0.3.33 ports: - "8098:8098" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-test.yml b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-test.yml index 534a815584..3f21aa2d58 100644 --- a/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-test.yml +++ b/epmet-module/gov-voice/gov-voice-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-voice-server: container_name: gov-voice-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-voice-server:0.3.59 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-voice-server:0.3.62 ports: - "8105:8105" network_mode: host # 使用现有网络 diff --git a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-test.yml b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-test.yml index 5ad7b7d001..43b168ab93 100644 --- a/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-test.yml +++ b/epmet-module/oper-customize/oper-customize-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: oper-customize-server: container_name: oper-customize-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/oper-customize-server:0.3.23 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/oper-customize-server:0.3.24 ports: - "8089:8089" network_mode: host # 使用现有网络 diff --git a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-test.yml b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-test.yml index d373324986..d9d59523fe 100644 --- a/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-test.yml +++ b/epmet-module/resi-mine/resi-mine-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: resi-mine-server: container_name: resi-mine-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/resi-mine-server:0.3.29 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/resi-mine-server:0.3.30 ports: - "8094:8094" network_mode: host # 使用现有网络 From 68c7bb09c5b6ab225a09c12b3b4d4c135ac88e66 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 28 Jul 2020 16:42:00 +0800 Subject: [PATCH 38/38] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-user/epmet-user-server/deploy/docker-compose-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-test.yml b/epmet-user/epmet-user-server/deploy/docker-compose-test.yml index e492ad73d4..4552ed3118 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-test.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-test.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-test - image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-user-server:0.3.83 + image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-user-server:0.3.84 ports: - "8087:8087" network_mode: host # 不会创建新的网络