+ * 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-client/src/main/java/com/epmet/dto/result/resi/ResiActRegistrationResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActRegistrationResultDTO.java
new file mode 100644
index 0000000000..96ca7a6e61
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActRegistrationResultDTO.java
@@ -0,0 +1,27 @@
+package com.epmet.dto.result.resi;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 活动报名 - 返回值
+ *
+ * @Auther: zhangyong
+ * @Date: 2020-07-28 16:22
+ */
+@Data
+public class ResiActRegistrationResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 异常编码
+ */
+ private Integer flag;
+
+ /**
+ * 提示信息
+ */
+ private String tip;
+}
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-client/src/main/java/com/epmet/dto/result/work/LatestDraftActInfoResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/LatestDraftActInfoResultDTO.java
index 89d5c1e4ec..7906c364d5 100644
--- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/LatestDraftActInfoResultDTO.java
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/LatestDraftActInfoResultDTO.java
@@ -165,5 +165,5 @@ public class LatestDraftActInfoResultDTO implements Serializable {
/**
* 活动内容-
*/
- private List actContentList;
+ private List actContent;
}
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..1ae781d21c 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.8
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..20462901b2 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.8com.epmetepmet-heart
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..d2a3efec16 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
@@ -131,7 +131,7 @@ public class ResiActListController {
return actInfoService.latestAct(formDto);
}
- /*
+ /**
* 正在进行中的活动
* 进入活动的快捷入口, 前端只取第一条
*
@@ -158,8 +158,6 @@ public class ResiActListController {
return actInfoService.actLookBack(formDto);
}
- //
-
/**
* 活动详情
*
@@ -217,8 +215,6 @@ public class ResiActListController {
return actLiveRecService.liveRecList(map);
}
- //
-
/**
* 取消活动报名
*
@@ -235,16 +231,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);
}
@@ -299,12 +294,12 @@ public class ResiActListController {
*
* @param tokenDto
* @param formDTO
- * @return com.epmet.commons.tools.utils.Result
+ * @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
- * @Date 16:46 2020-07-23
+ * @Date 16:26 2020-07-28
**/
@PostMapping("registration")
- public Result registration(@LoginUser TokenDto tokenDto, @RequestBody ResiActRegistrationFormDTO formDTO) {
+ public Result registration(@LoginUser TokenDto tokenDto, @RequestBody ResiActRegistrationFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ResiActRegistrationFormDTO.AddUserInternalGroup.class);
return actUserRelationService.registration(tokenDto, formDTO);
}
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/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/ActUserRelationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActUserRelationService.java
index f3a135ee6a..a290d59c5f 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActUserRelationService.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActUserRelationService.java
@@ -24,6 +24,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.ActUserRelationDTO;
import com.epmet.dto.form.resi.ResiActRegistrationFormDTO;
import com.epmet.dto.form.resi.ResiActUserCancelSignUpFormDTO;
+import com.epmet.dto.result.resi.ResiActRegistrationResultDTO;
import com.epmet.entity.ActUserRelationEntity;
import org.apache.ibatis.annotations.Param;
@@ -145,9 +146,9 @@ public interface ActUserRelationService extends BaseService>
* @Author zhangyong
- * @Date 16:46 2020-07-23
+ * @Date 15:54 2020-07-28
**/
- Result registration(TokenDto tokenDto, ResiActRegistrationFormDTO formDTO);
+ Result registration(TokenDto tokenDto, ResiActRegistrationFormDTO formDTO);
}
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..f7b0da4e16 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(EpmetErrorCode.NOT_IN_THE_SIGN_IN_RANGE.getMsg());
+ 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/ActLiveRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActLiveRecServiceImpl.java
index ef55f849ab..81304f99ba 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
@@ -23,7 +23,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.MqConstant;
import com.epmet.commons.tools.constant.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.dto.form.mq.eventmsg.BasePointEventMsg;
import com.epmet.commons.tools.enums.EventEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
@@ -109,7 +109,7 @@ public class ActLiveRecServiceImpl extends BaseServiceImpl dataContainer = new ArrayList<>();
for (int k = 0; k < actLives.size(); k++) {
- Map base = new HashMap<>();
+ Map base = new HashMap<>(NumConstant.ONE);
base.put("nickname", userWxInfos.getData().get(k).getNickname());
base.put("headImg", userWxInfos.getData().get(k).getHeadImgUrl());
base.put("desc", actLives.get(k).getDesc());
@@ -221,13 +221,14 @@ public class ActLiveRecServiceImpl extends BaseServiceImpl actPointEventMsgList=new ArrayList<>();
- ActPointEventMsg actPointEventMsg=new ActPointEventMsg();
+ List actPointEventMsgList=new ArrayList<>();
+ BasePointEventMsg actPointEventMsg=new BasePointEventMsg();
actPointEventMsg.setCustomerId(formDTO.getCustomerId());
actPointEventMsg.setUserId(formDTO.getUserId());
actPointEventMsg.setActionFlag(MqConstant.PLUS);
actPointEventMsg.setIsCommon(false);
actPointEventMsg.setRemark(remark);
+ actPointEventMsg.setSourceId(formDTO.getActId());
actPointEventMsgList.add(actPointEventMsg);
mqBaseMsgDTO.setMsg(JSON.toJSONString(actPointEventMsgList));
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..c84e1efa93 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
@@ -39,6 +39,7 @@ import com.epmet.dto.ActUserRelationDTO;
import com.epmet.dto.form.resi.ResiActRegistrationFormDTO;
import com.epmet.dto.form.resi.ResiActUserCancelSignUpFormDTO;
import com.epmet.dto.result.UserRoleResultDTO;
+import com.epmet.dto.result.resi.ResiActRegistrationResultDTO;
import com.epmet.entity.ActUserLogEntity;
import com.epmet.entity.ActUserRelationEntity;
import com.epmet.entity.HeartUserInfoEntity;
@@ -54,10 +55,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.*;
/**
* 用户活动关系表
@@ -81,7 +79,7 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl page(Map params) {
@@ -197,9 +195,10 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl registration(TokenDto tokenDto, ResiActRegistrationFormDTO formDTO) {
formDTO.setUserId(tokenDto.getUserId());
boolean satisfy = false;
+ ResiActRegistrationResultDTO resultDTO = new ResiActRegistrationResultDTO();
// 查询活动信息
ActInfoDTO actInfoDTO = actInfoService.get(formDTO.getActId());
// >0 当前用户是志愿者
@@ -207,15 +206,35 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl().ok(resultDTO);
+ }
} else {
// 活动不限制志愿者身份,但要求是 居民身份, 当前用户是否满足条件
satisfy = this.resiParticipationAct(formDTO.getUserId());
+ if (!satisfy){
+ logger.info(EpmetErrorCode.CANNOT_AUDIT_WARM.getMsg());
+ resultDTO.setFlag(EpmetErrorCode.CANNOT_AUDIT_WARM.getCode());
+ resultDTO.setTip(EpmetErrorCode.CANNOT_AUDIT_WARM.getMsg());
+ return new Result().ok(resultDTO);
+ }
}
if (satisfy){
// 开始报名
- this.actStartSignUp(actInfoDTO, formDTO, volunteerFlag);
+ boolean actTimeConflict = this.actStartSignUp(actInfoDTO, formDTO, volunteerFlag);
+ if (!actTimeConflict){
+ logger.info(EpmetErrorCode.ACT_TIME_CONFLICT.getMsg());
+ resultDTO.setFlag(EpmetErrorCode.ACT_TIME_CONFLICT.getCode());
+ resultDTO.setTip(EpmetErrorCode.ACT_TIME_CONFLICT.getMsg());
+ return new Result().ok(resultDTO);
+ }
}
- return new Result();
+ resultDTO.setFlag(EpmetErrorCode.ACT_REGISTRATION_SUCCESS.getCode());
+ resultDTO.setTip(EpmetErrorCode.ACT_REGISTRATION_SUCCESS.getMsg());
+ return new Result().ok(resultDTO);
}
/**
@@ -228,7 +247,7 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl NumConstant.ZERO){
@@ -237,8 +256,7 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl NumConstant.ZERO){
signUp = false;
- logger.info("报名失败。您本次报名活动时间与已报名活动时间间隔较短,为了不影响您已报名的活动,请选择其他时间的活动,谢谢。");
- throw new RenException(EpmetErrorCode.ACT_TIME_CONFLICT.getCode());
+ return signUp;
}
} else {
// 3.第一次报名
@@ -249,7 +267,8 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl NumConstant.ZERO){
satisfy = true;
return satisfy;
- } else {
- logger.info("活动报名失败,请先认证志愿者");
- throw new RenException(EpmetErrorCode.NON_CERTIFIED_VOLUNTEER.getCode());
}
+ return satisfy;
}
/**
@@ -289,12 +306,7 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl> leaderboard(ResiActBaseFormDTO formDTO) {
- List resultDTOS = new ArrayList<>();
+ List resultDtoS = new ArrayList<>();
// 获取排好序的 排行榜
List leaderboardList = baseDao.selectListLeaderboard(formDTO);
if (leaderboardList.size() > NumConstant.ZERO){
@@ -151,14 +151,14 @@ public class HeartUserInfoServiceImpl extends BaseServiceImpl>().ok(resultDTOS);
+ return new Result>().ok(resultDtoS);
}
@Override
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..7d219aca27 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
@@ -22,7 +22,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.MqConstant;
import com.epmet.commons.tools.constant.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.dto.form.mq.eventmsg.BasePointEventMsg;
import com.epmet.commons.tools.enums.EventEnum;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
@@ -33,7 +33,6 @@ import com.epmet.dao.VolunteerInfoDao;
import com.epmet.dto.HeartUserInfoDTO;
import com.epmet.dto.form.WxUserInfoFormDTO;
import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO;
-import com.epmet.entity.ActUserRelationEntity;
import com.epmet.entity.VolunteerInfoEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.redis.VolunteerInfoRedis;
@@ -91,7 +90,7 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl actPointEventMsgList=new ArrayList<>();
- ActPointEventMsg actPointEventMsg=new ActPointEventMsg();
+ List actPointEventMsgList=new ArrayList<>();
+ BasePointEventMsg actPointEventMsg=new BasePointEventMsg();
actPointEventMsg.setCustomerId(formDTO.getCustomerId());
actPointEventMsg.setUserId(formDTO.getUserId());
actPointEventMsg.setActionFlag(MqConstant.PLUS);
@@ -118,4 +117,21 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl actContentList=latestActContentService.selectActContentList(latestAct.getActDraftId());
- latestAct.setActContentList(actContentList);
+ latestAct.setActContent(actContentList);
}
return latestAct;
}else{
@@ -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..b435c6088a 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
@@ -3,11 +3,10 @@ package com.epmet.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.tools.constant.AppClientConstant;
-import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.MqConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO;
-import com.epmet.commons.tools.dto.form.mq.eventmsg.ActPointEventMsg;
+import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg;
import com.epmet.commons.tools.enums.EventEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
@@ -122,8 +121,9 @@ public class WorkActServiceImpl implements WorkActService {
sponsorResultDTO.setAgencyGridList(ConvertUtils.sourceToTarget(result.getData().getAgencyGridList(), Grid.class));
return sponsorResultDTO;
}
+ }else{
+ logger.error("当前用户id获取为空");
}
- logger.error("当前用户id获取为空");
return null;
}
@@ -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,14 +685,15 @@ 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){
+ Date actualStartTime= DateUtils.minStrToSecondDate(formDTO.getActualStartTime());
+ Date actualEndTime= DateUtils.minStrToSecondDate(formDTO.getActualEndTime());
+ if(actualStartTime.compareTo(actualEndTime)!=-1){
throw new RenException(EpmetErrorCode.ACT_ACTUAL_START_TIME_ERROR.getCode());
}
ActInfoDTO actInfoDTO=actInfoService.get(formDTO.getActId());
- Date actualStartTime= DateUtils.minStrToSecondDate(formDTO.getActualStartTime());
actInfoDTO.setActualStartTime(actualStartTime);
- Date actualEndTime= DateUtils.minStrToSecondDate(formDTO.getActualEndTime());
actInfoDTO.setActualEndTime(actualEndTime);
actInfoDTO.setServiceMin(DateUtils.calculateMin(actualStartTime,actualEndTime));
actInfoService.update(actInfoDTO);
@@ -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){
@@ -762,7 +778,7 @@ public class WorkActServiceImpl implements WorkActService {
private void grantActPoints(ActInfoDTO actInfoDTO) {
//查询已经给分的用户
QueryWrapper wrapper = new QueryWrapper<>();
- wrapper.eq(StringUtils.isNotBlank(actInfoDTO.getId()), FieldConstant.ID, actInfoDTO.getId())
+ wrapper.eq(StringUtils.isNotBlank(actInfoDTO.getId()), "ACT_ID", actInfoDTO.getId())
.eq("PROCESS_FLAG",ActConstant.HANDLED)
.eq("REWARD_FLAG",ActConstant.ACT_USER_STATUS_AGREE);
List actUserRelationEntityList=actUserRelationDao.selectList(wrapper);
@@ -783,19 +799,21 @@ public class WorkActServiceImpl implements WorkActService {
mqBaseMsgDTO.setEventClass(EventEnum.ACTIVE_SEND_POINT.getEventClass());
//事件code
mqBaseMsgDTO.setEventTag(EventEnum.ACTIVE_SEND_POINT.getEventTag());
- List actPointEventMsgList=new ArrayList<>();
+ List basePointEventMsgArrayList=new ArrayList<>();
for(ActUserRelationEntity actUserRelationEntity:actUserRelationEntityList){
- ActPointEventMsg actPointEventMsg=new ActPointEventMsg();
- actPointEventMsg.setOpAgencyId(opAgencyId);
- actPointEventMsg.setCustomerId(actInfoDTO.getCustomerId());
- actPointEventMsg.setUserId(actUserRelationEntity.getUserId());
- actPointEventMsg.setActionFlag(MqConstant.PLUS);
- actPointEventMsg.setPoint(actInfoDTO.getReward());
- actPointEventMsg.setIsCommon(true);
- actPointEventMsg.setRemark(remark);
- actPointEventMsgList.add(actPointEventMsg);
- }
- mqBaseMsgDTO.setMsg(JSON.toJSONString(actPointEventMsgList));
+ BasePointEventMsg basePointEventMsg=new BasePointEventMsg();
+ basePointEventMsg.setOpAgencyId(opAgencyId);
+ basePointEventMsg.setCustomerId(actInfoDTO.getCustomerId());
+ basePointEventMsg.setUserId(actUserRelationEntity.getUserId());
+ basePointEventMsg.setActionFlag(MqConstant.PLUS);
+ basePointEventMsg.setPoint(actInfoDTO.getReward());
+ basePointEventMsg.setIsCommon(true);
+ basePointEventMsg.setRemark(remark);
+ basePointEventMsg.setSourceId(actInfoDTO.getId());
+ basePointEventMsg.setOperatorId(loginUserUtil.getLoginUserId());
+ basePointEventMsgArrayList.add(basePointEventMsg);
+ }
+ mqBaseMsgDTO.setMsg(JSON.toJSONString(basePointEventMsgArrayList));
Result result=SendMqMsgUtils.sendMsg(mqBaseMsgDTO);
if(!result.success()){
logger.error("活动积分发放失败");
@@ -862,10 +880,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 +903,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 +980,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
new file mode 100644
index 0000000000..67ee2b23de
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/epmet_heart.sql
@@ -0,0 +1,423 @@
+/*
+ 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 15:17:47
+*/
+
+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',
+ `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-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..2c0bff8748 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
@@ -59,7 +59,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress,
- IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
+ i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'signing_up' AS actCurrentState, -- 活动状态:报名中,未报满
@@ -85,7 +85,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress,
- IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
+ i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'enough' AS actCurrentState, -- 活动状态:报名中,已报满
@@ -112,7 +112,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress,
- IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
+ i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'end_sign_up' AS actCurrentState, -- 活动状态:未开始
@@ -138,7 +138,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress,
- IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
+ i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'in_progress' AS actCurrentState, -- 活动状态:进行中
@@ -164,7 +164,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress,
- IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
+ i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'finished' AS actCurrentState, -- 活动状态:已结束
@@ -190,7 +190,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress,
- IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
+ i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'auditing' AS actCurrentState -- 活动状态
@@ -213,7 +213,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress,
- IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
+ i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'passed' AS actCurrentState -- 活动状态
@@ -236,7 +236,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress,
- IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
+ i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'refused' AS actCurrentState -- 活动状态
@@ -259,7 +259,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress,
- IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
+ i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'canceld' AS actCurrentState -- 活动状态
@@ -282,7 +282,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress,
- IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory,
+ i.ACT_QUOTA_CATEGORY actQuotaCategory,
i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
case
@@ -391,12 +391,12 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress,
- IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
+ i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
i.REWARD reward,
i.REQUIREMENT requirement,
- IF(i.VOLUNTEER_LIMIT = 1, true , false ) as volunteerLimit, -- 是否是志愿者(true:只有志愿者才可以参加活动1,false: 只要是居民就可以参加活动0)
+ i.VOLUNTEER_LIMIT volunteerLimit, -- 是否是志愿者(true:只有志愿者才可以参加活动1,false: 只要是居民就可以参加活动0)
i.SPONSOR_NAME sponsor,
DATE_FORMAT(i.ACTUAL_START_TIME,'%Y-%m-%d %H:%i') actualStartTime,
DATE_FORMAT(i.ACTUAL_END_TIME,'%Y-%m-%d %H:%i') actualEndTime,
@@ -420,7 +420,7 @@
DATE_FORMAT(i.ACT_START_TIME,'%Y-%m-%d %H:%i') actStartTime,
DATE_FORMAT(i.ACT_END_TIME,'%Y-%m-%d %H:%i') actEndTime,
i.ACT_ADDRESS actAddress,
- IF(i.ACT_QUOTA_CATEGORY = 1, true , false ) as actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
+ i.ACT_QUOTA_CATEGORY actQuotaCategory, -- 活动名额类型(true:固定名额(1) false: 不限制名额(0))
i.ACT_QUOTA actQuota,
i.SPONSOR_CONTACTS contacts,
i.SPONSOR_TEL tel,
@@ -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,
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-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointActionLogDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointActionLogDTO.java
index 254e53bbd6..113572b051 100644
--- a/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointActionLogDTO.java
+++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/UserPointActionLogDTO.java
@@ -53,6 +53,11 @@ public class UserPointActionLogDTO implements Serializable {
*/
private String actionFlag;
+ /**
+ * 来源Id,可以是活动Id
+ * */
+ private String sourceId;
+
/**
* 来源ID 当来源为积分调整时 通过事件Id查找规则ID计算出分数 通过EVENT_ID能查出RUIE_ID
*/
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
index 4a5aff0a09..7920d68c66 100644
--- 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
@@ -44,10 +44,12 @@ public class PointVerificationFormDTO implements Serializable {
@NotBlank(message = "当前工作人员Id不能为空", groups = PointVerificationGroup.class)
private String operatorId;
-
+ @NotBlank(message = "缺失经度信息" , groups = PointVerificationGroup.class)
private String longitude;
+ @NotBlank(message = "缺失维度信息" , groups = PointVerificationGroup.class)
private String dimension;
+ @NotBlank(message = "缺失地址信息" , groups = PointVerificationGroup.class)
private String address;
}
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
index 8741ae49c6..c9cbe06642 100644
--- 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
@@ -26,7 +26,7 @@ public class WorkPointVerificationFormDTO implements Serializable {
private String timeParam;
@Min(1)
- private Integer pageNo;
+ private Integer pageNo = 1;
- private Integer pageSize;
+ private Integer pageSize = 20;
}
diff --git a/epmet-module/epmet-point/epmet-point-client/src/main/java/dto/form/SendPointFormDTO.java b/epmet-module/epmet-point/epmet-point-client/src/main/java/dto/form/SendPointFormDTO.java
index ae4c7aeeba..fef7e11cc5 100644
--- a/epmet-module/epmet-point/epmet-point-client/src/main/java/dto/form/SendPointFormDTO.java
+++ b/epmet-module/epmet-point/epmet-point-client/src/main/java/dto/form/SendPointFormDTO.java
@@ -14,5 +14,50 @@ import lombok.Data;
@Data
public class SendPointFormDTO {
private String pointDesc;
+
+ /**
+ * 积分
+ * */
private Integer point;
+
+ /**
+ * 操作人机关id
+ */
+ private String opAgencyId;
+
+ /**
+ * 操作人Id,当有固定的操作人时,传入此值,如果没有则为空
+ * */
+ private String operatorId;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+ /**
+ * 被操作用户id
+ */
+ private String userId;
+
+ /**
+ * 加减分标识 plus/minus
+ */
+ private String actionFlag;
+
+
+ /**
+ * 是否是通用事件,通用事件不走规则
+ */
+ private Boolean isCommon;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+ /**
+ * 业务id eg:活动id
+ */
+ private String sourceId;
+
}
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 20460ab5a4..f30b3a56a9 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.4
+ image: 192.168.1.130:10080/epmet-cloud-dev/epmet-point-server:0.0.6
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 3285affd5b..1f76d70f96 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.4
+ 0.0.6epmet-pointcom.epmet
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 0f2876f74f..c30ee3c1d6 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,10 +1,13 @@
package com.epmet.controller;
+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.CustomerUserFormDTO;
import com.epmet.dto.form.IssueInitiatorFormDTO;
+import com.epmet.dto.form.PointAdjustmentFormDTO;
import com.epmet.dto.result.CustomerUser4PointResultDTO;
import com.epmet.dto.result.CustomerUserDetailResultDTO;
import com.epmet.dto.result.PointAdjustmentResultDTO;
@@ -69,5 +72,21 @@ public class AdjustmentController {
ValidatorUtils.validateEntity(param, IssueInitiatorFormDTO.UserIdGroup.class);
return new Result>().ok(pointAdjustmentLogService.adjustRecord(param));
}
+
+ /**
+ * @Description 积分调整
+ * @param param
+ * @return
+ * @author wangc
+ * @date 2020.07.27 13:52
+ **/
+ @PostMapping("adjust")
+ public Result adjustPoint(@LoginUser TokenDto token, @RequestBody PointAdjustmentFormDTO param){
+ param.setOperatorId(token.getUserId());
+ param.setCustomerId(token.getCustomerId());
+ ValidatorUtils.validateEntity(param, PointAdjustmentFormDTO.PointAdjustmentGroup.class);
+ pointAdjustmentLogService.adjustPoint(param);
+ return new Result();
+ }
}
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 8f81e46de2..5b1445db95 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
@@ -1,5 +1,16 @@
package com.epmet.controller;
+import com.epmet.common.token.annotation.Login;
+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.PointVerificationFormDTO;
+import com.epmet.dto.result.PointVerificationResultDTO;
+import com.epmet.service.PointVerificationLogService;
+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;
@@ -12,5 +23,22 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("work/exchange")
public class ExchangeController {
+ @Autowired
+ private PointVerificationLogService pointVerificationLogService;
+
+ /**
+ * @Description 积分核销
+ * @param verificationParam
+ * @return
+ * @author wangc
+ * @date 2020.07.27 14:03
+ **/
+ @PostMapping("execute")
+ public Result execute(@LoginUser TokenDto token, @RequestBody PointVerificationFormDTO verificationParam){
+ verificationParam.setOperatorId(token.getUserId());
+ ValidatorUtils.validateEntity(verificationParam, PointVerificationFormDTO.PointVerificationGroup.class);
+ return new Result().ok(pointVerificationLogService.verifyPoint(verificationParam));
+ }
+
}
diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/MqPointCallbackController.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/MqPointCallbackController.java
index 51146befb0..10b21cf105 100644
--- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/MqPointCallbackController.java
+++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/MqPointCallbackController.java
@@ -46,7 +46,7 @@ public class MqPointCallbackController {
}
SendPointFormDTO formDTO = ConvertUtils.sourceToTarget(mqMsg.getMsg(), SendPointFormDTO.class);
try {
- //TODO 调用调整积分方法去给用户加减积分 userPointActionLogService.
+ userPointActionLogService.grantPoint(formDTO);
} catch (Exception e) {
logger.error("activeSendPoint consume fail,msg:{}",JSON.toJSONString(mqMsg.getMsg()));
throw new RenException(EpmetErrorCode.SERVER_ERROR.getMsg());
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 9138df614f..5b90380b88 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
@@ -54,5 +54,5 @@ public interface PointVerificationLogDao extends BaseDao selectStaffVerificationLog(String staffId, Date startDate, Date endDate);
+ List selectStaffVerificationLog(@Param("staffId") String staffId, @Param("startDate") Date startDate,@Param("endDate") Date endDate);
}
\ No newline at end of file
diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointActionLogEntity.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointActionLogEntity.java
index 4c72c5659a..b52ed79b2f 100644
--- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointActionLogEntity.java
+++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/entity/UserPointActionLogEntity.java
@@ -54,10 +54,15 @@ public class UserPointActionLogEntity extends BaseEpmetEntity {
private String actionFlag;
/**
- * 来源ID 当来源为积分调整时 通过事件Id查找规则ID计算出分数 通过EVENT_ID能查出RUIE_ID
+ * 当来源为积分调整时 通过事件Id查找规则ID计算出分数 通过EVENT_ID能查出RUIE_ID
*/
private String eventId;
+ /**
+ * 来源Id,可以是活动Id
+ * */
+ private String sourceId;
+
/**
* 活动描述 获取积分的原因,相关内容,用来拼接【用户参加了xxx活动获取?积分】的文案,取活动的名称;【积分调整文案】;其他……
如果是管理员手动调整扣减积分,ACTION_FLAG为"minus",但是不会生成核销记录,核销记录只保存用户使用积分兑换商品的核销详情
diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointActionLogService.java b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointActionLogService.java
index 84d6379e22..81873314f7 100644
--- a/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointActionLogService.java
+++ b/epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/UserPointActionLogService.java
@@ -23,6 +23,7 @@ import com.epmet.dto.UserPointActionLogDTO;
import com.epmet.dto.form.CommonPageUserFormDTO;
import com.epmet.dto.result.ResiPointLogListResultDTO;
import com.epmet.entity.UserPointActionLogEntity;
+import dto.form.SendPointFormDTO;
import java.util.List;
import java.util.Map;
@@ -104,5 +105,13 @@ public interface UserPointActionLogService extends BaseService getMyPointRecord(CommonPageUserFormDTO pageUser);
+ /**
+ * @Description 消息网关回调进行积分发放
+ * @param grantPointParam
+ * @return
+ * @author wangc
+ * @date 2020.07.29 09:11
+ **/
+ void grantPoint(SendPointFormDTO grantPointParam);
}
\ 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
index 220dc525e7..a78e6f70bf 100644
--- 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
@@ -178,7 +178,7 @@ public class PointAdjustmentLogServiceImpl extends BaseServiceImpl NumConstant.ZERO){
point *= NumConstant.ONE_NEG;
}
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 0cfe6d642f..319b3fa0ce 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
@@ -185,11 +185,24 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl dataList =
baseDao.selectStaffVerificationLog(verificationParam.getStaffId(),getFirstDayDateOfMonth(date),getLastDayOfMonth(date));
- result.setTotalPoint(
- dataList.stream().mapToInt(o -> o.getPoint()).sum()
- );
+ if(NumConstant.ONE < verificationParam.getPageNo()){
+ result.setTotalPoint(
+ dataList.stream().mapToInt(o -> o.getPoint()).sum()
+ );
+ }else{
+ int fromIndex = verificationParam.getPageNo() * verificationParam.getPageSize();
+ int toIndex = (verificationParam.getPageNo() + 1) * verificationParam.getPageSize();
+ if(toIndex > dataList.size()) {
+ toIndex = dataList.size();
+ }
+ dataList = dataList.subList(fromIndex,toIndex);
+ }
+
List userIds = dataList.stream().map(data -> data.getUserId()).collect(Collectors.toList());
Result> userInfo =
epmetUserOpenFeignClient.queryUserBaseInfo(userIds);
@@ -223,7 +236,8 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl implements UserPointActionLogService {
+ @Autowired
+ private UserPointTotalService userPointTotalService;
+ @Autowired
+ private UserPointStatisticalDailyService userPointStatisticalDailyService;
@Override
public PageData page(Map params) {
@@ -131,4 +145,62 @@ public class UserPointActionLogServiceImpl extends BaseServiceImpl NumConstant.ZERO){
+ //保证负数
+ grantPointParam.setPoint(grantPointParam.getPoint() * NumConstant.ONE_NEG);
+ }
+ }else{
+ //加
+ if(grantPointParam.getPoint() < NumConstant.ZERO){
+ //保证正数
+ grantPointParam.setPoint(grantPointParam.getPoint() * NumConstant.ONE_NEG);
+ }
+ }
+ //1.新增用户积分行为记录
+ UserPointActionLogEntity action = new UserPointActionLogEntity();
+ action.setCustomerId(grantPointParam.getCustomerId());
+ action.setPoint(grantPointParam.getPoint());
+ action.setEventStatement(grantPointParam.getPointDesc());
+ action.setEventName(EventEnum.ACTIVE_SEND_POINT.getEventDesc());
+ action.setEventId(EventEnum.ACTIVE_INSERT_LIVE.getEventTag());
+ action.setActionFlag(grantPointParam.getActionFlag());
+ action.setUserId(grantPointParam.getUserId());
+ action.setCreatedBy(grantPointParam.getOperatorId());
+ action.setUpdatedBy(grantPointParam.getOperatorId());
+ action.setSourceId(grantPointParam.getSourceId());
+ action.setOperatorAgencyId(grantPointParam.getOpAgencyId());
+ baseDao.insert(action);
+ //2.新增/修改用户积分日统计
+ DimIdGenerator.DimIdBean dimVal = DimIdGenerator.getDimIdBean(new Date());
+ UserPointStatisticalDailyEntity statistical = ConvertUtils.sourceToTarget(dimVal,UserPointStatisticalDailyEntity.class);
+ statistical.setPointChange(grantPointParam.getPoint());
+ statistical.setActionFlag(grantPointParam.getActionFlag());
+ statistical.setCustomerId(grantPointParam.getCustomerId());
+ statistical.setUserId(grantPointParam.getUserId());
+ statistical.setCreatedBy(grantPointParam.getOperatorId());
+ statistical.setUpdatedBy(grantPointParam.getOperatorId());
+ userPointStatisticalDailyService.insertOrUpdate(statistical);
+ //3.新增/修改用户总积分
+ UserPointTotalEntity point = new UserPointTotalEntity();
+ point.setCustomerId(grantPointParam.getCustomerId());
+ point.setUserId(grantPointParam.getUserId());
+ point.setTotalPoint(grantPointParam.getPoint());
+ point.setUsablePoint(grantPointParam.getPoint());
+ point.setUsedPoint(NumConstant.ZERO);
+ point.setCreatedBy(grantPointParam.getOperatorId());
+ point.setUpdatedBy(grantPointParam.getOperatorId());
+ userPointTotalService.insertOrUpdate(point);
+ }
+
}
\ No newline at end of file
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 851a65ecca..51537b8fac 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
@@ -147,19 +147,24 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl 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()){
+ return result;
+ }else {
+ 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) {
+ ResiPointRankResultDTO myself = null;
+ Optional opt = rankList.stream().filter(obj -> StringUtils.equals(obj.getUserId(), pointRankFormDTO.getUserId())).findFirst();
+ if(opt.isPresent()){
+ myself = opt.get();
o.setMyPoint(myself.getTotalPoint());
o.setMyRanking(myself.getRank());
- } else {
+ }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);
@@ -167,8 +172,9 @@ public class UserPointStatisticalDailyServiceImpl extends BaseServiceImpl rankList.size()) {
toIndex = rankList.size();
}
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 741e5ad54f..e2ab66cde8 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
@@ -156,29 +156,34 @@ public class UserPointTotalServiceImpl extends BaseServiceImpl StringUtils.equals(obj.getUserId(), pointRankFormDTO.getUserId())).findFirst().get();
- if (null != myself) {
+ ResiPointRankResultDTO myself = null;
+ Optional opt = rankList.stream().filter(obj -> StringUtils.equals(obj.getUserId(), pointRankFormDTO.getUserId())).findFirst();
+ if(opt.isPresent()){
+ myself = opt.get();
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();
+
+ int fromIndex = (pointRankFormDTO.getPageNo() - 1) * pointRankFormDTO.getPageSize();
+ int toIndex = pointRankFormDTO.getPageNo() * pointRankFormDTO.getPageSize();
if(toIndex > rankList.size()) {
toIndex = rankList.size();
}
@@ -218,7 +223,7 @@ public class UserPointTotalServiceImpl extends BaseServiceImpl
+
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 f8a5d074ec..633b3f75fa 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
@@ -25,38 +25,42 @@
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 1603237883..cc797271a4 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
@@ -48,7 +48,7 @@
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/MessagePushTextDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/MessagePushTextDao.xml
new file mode 100644
index 0000000000..2afb8a99e8
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/MessagePushTextDao.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+ INSERT INTO message_push_text ( ID, TO_USER_NAME, FROM_USER_NAME, WECHAT_CREATE_TIME, MSG_TYPE, CONTENT, MSG_ID, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
+ VALUES
+ (
+ REPLACE ( UUID(), '-', '' ),
+ #{ToUserName},
+ #{FromUserName},
+ #{weChatCreateTime},
+ #{MsgType},
+ #{Content},
+ #{MsgId},
+ #{delFlag},
+ #{revision},
+ #{createdBy},
+ NOW(),
+ #{updatedBy},
+ NOW()
+ )
+
+
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/MiniInfoDao.xml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/MiniInfoDao.xml
index bd326a8c0c..8b210f2f94 100644
--- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/MiniInfoDao.xml
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/MiniInfoDao.xml
@@ -51,5 +51,6 @@
WHERE
del_flag = 0
AND user_name = #{toUserName}
+ LIMIT 1
\ No newline at end of file
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-org/gov-org-server/deploy/docker-compose-dev.yml b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml
index 095e7300fd..e498824314 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.77
+ image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.79
ports:
- "8092:8092"
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-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml
index 785e47bf18..7d1d3fcd05 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.77
+ 0.3.79com.epmetgov-org
diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml
index 222d4cc6d3..2d548065f3 100644
--- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml
+++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml
@@ -121,7 +121,7 @@
-
\ 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 d3edc68319..cfacc58191 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
@@ -103,6 +103,7 @@
user_base_info base on wechat.USER_ID = base.USER_ID
WHERE
wechat.DEL_FLAG = '0'
+ AND (wechat.NICKNAME IS NOT NULL OR wechat.NICKNAME ]]> '')
wechat.USER_ID = #{item}