From 1d87cc03d01d125b0cd0ee18273ce41d52c4d3b1 Mon Sep 17 00:00:00 2001 From: liuchuang <123456> Date: Fri, 3 Sep 2021 16:19:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=96=B0=E5=A2=9E=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=E5=8F=82=E4=B8=8E=E6=97=B6=E9=97=B4=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epdc-admin/epdc-admin-server/pom.xml | 16 +-- esua-epdc/epdc-auth/pom.xml | 16 +-- esua-epdc/epdc-gateway/pom.xml | 20 +-- .../ApiActUserRelationController.java | 43 +++++-- .../feign/AppActUserRelationFeignClient.java | 18 ++- ...AppActUserRelationFeignClientFallback.java | 12 +- .../epdc/service/ActUserRelationService.java | 17 ++- .../impl/ActUserRelationServiceImpl.java | 15 ++- .../elink/esua/epdc/activity/ActInfoDTO.java | 6 + .../esua/epdc/activity/ActPeriodDTO.java | 86 +++++++++++++ .../esua/epdc/activity/ActPeriodUserDTO.java | 81 ++++++++++++ .../epdc/activity/ActUserRelationDTO.java | 8 +- .../epdc/activity/form/ActInfoAppFormDTO.java | 7 +- .../activity/form/EpdcActSignupFormDTO.java | 29 +++++ .../result/ActUserRelationResultDTO.java | 7 ++ .../epdc-heart/epdc-heart-server/pom.xml | 16 +-- .../controller/ActInfoController.java | 5 +- .../controller/ActPeriodController.java | 84 +++++++++++++ .../controller/ActPeriodUserController.java | 87 +++++++++++++ .../AppActUserRelationController.java | 21 +++- .../modules/activity/dao/ActPeriodDao.java | 66 ++++++++++ .../activity/dao/ActPeriodUserDao.java | 56 +++++++++ .../activity/entity/ActPeriodEntity.java | 56 +++++++++ .../activity/entity/ActPeriodUserEntity.java | 51 ++++++++ .../activity/service/ActPeriodService.java | 115 +++++++++++++++++ .../service/ActPeriodUserService.java | 116 +++++++++++++++++ .../service/ActUserRelationService.java | 11 ++ .../service/impl/ActInfoServiceImpl.java | 84 +++++++++++-- .../service/impl/ActPeriodServiceImpl.java | 117 ++++++++++++++++++ .../impl/ActPeriodUserServiceImpl.java | 111 +++++++++++++++++ .../impl/ActUserRelationServiceImpl.java | 31 ++++- .../resources/mapper/activity/ActInfoDao.xml | 4 + .../mapper/activity/ActPeriodDao.xml | 37 ++++++ .../mapper/activity/ActPeriodUserDao.xml | 40 ++++++ .../mapper/activity/ActUserRelationDao.xml | 17 ++- 35 files changed, 1424 insertions(+), 82 deletions(-) create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActPeriodDTO.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActPeriodUserDTO.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/EpdcActSignupFormDTO.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActPeriodController.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActPeriodUserController.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActPeriodDao.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActPeriodUserDao.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActPeriodEntity.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActPeriodUserEntity.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActPeriodService.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActPeriodUserService.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActPeriodServiceImpl.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActPeriodUserServiceImpl.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActPeriodDao.xml create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActPeriodUserDao.xml diff --git a/esua-epdc/epdc-admin/epdc-admin-server/pom.xml b/esua-epdc/epdc-admin/epdc-admin-server/pom.xml index 4a83d3bb..2aa659a7 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/pom.xml +++ b/esua-epdc/epdc-admin/epdc-admin-server/pom.xml @@ -145,10 +145,10 @@ 9092 dev - 2 - 114.215.125.123 - 9603 - epdc!redis@master1405 + 11 + r-m5eh5czgb1nucti6azpd.redis.rds.aliyuncs.com + 10001 + elink!888 @@ -188,10 +188,10 @@ 11002 test - 2 - 114.215.125.123 - 9603 - epdc!redis@master1405 + 11 + r-m5eh5czgb1nucti6azpd.redis.rds.aliyuncs.com + 10001 + elink!888 diff --git a/esua-epdc/epdc-auth/pom.xml b/esua-epdc/epdc-auth/pom.xml index e0f7b9b7..0444007d 100644 --- a/esua-epdc/epdc-auth/pom.xml +++ b/esua-epdc/epdc-auth/pom.xml @@ -107,10 +107,10 @@ dev - 2 - 114.215.125.123 - 9603 - epdc!redis@master1405 + 11 + r-m5eh5czgb1nucti6azpd.redis.rds.aliyuncs.com + 10001 + elink!888 false @@ -128,10 +128,10 @@ test - 2 - 114.215.125.123 - 9603 - epdc!redis@master1405 + 11 + r-m5eh5czgb1nucti6azpd.redis.rds.aliyuncs.com + 10001 + elink!888 true diff --git a/esua-epdc/epdc-gateway/pom.xml b/esua-epdc/epdc-gateway/pom.xml index 7cf88fec..bbea9275 100644 --- a/esua-epdc/epdc-gateway/pom.xml +++ b/esua-epdc/epdc-gateway/pom.xml @@ -93,16 +93,16 @@ dev - 2 - 114.215.125.123 - 9603 - epdc!redis@master1405 + 11 + r-m5eh5czgb1nucti6azpd.redis.rds.aliyuncs.com + 10001 + elink!888 lb://epdc-auth-server - - http://127.0.0.1:9092 + lb://epdc-admin-server + lb://epdc-activiti-server lb://epdc-api-server @@ -158,10 +158,10 @@ test - 2 - 114.215.125.123 - 9603 - epdc!redis@master1405 + 11 + r-m5eh5czgb1nucti6azpd.redis.rds.aliyuncs.com + 10001 + elink!888 lb://epdc-auth-server diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiActUserRelationController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiActUserRelationController.java index e11cfeda..cd1bb856 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiActUserRelationController.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiActUserRelationController.java @@ -1,9 +1,8 @@ package com.elink.esua.epdc.controller; -import com.elink.esua.epdc.activity.ActUserRelationDTO; -import com.elink.esua.epdc.activity.AppActUserCancelsignupDTO; -import com.elink.esua.epdc.activity.AppActUserClockLogDTO; -import com.elink.esua.epdc.activity.AppClockListDTO; +import cn.hutool.core.collection.CollectionUtil; +import com.elink.esua.epdc.activity.*; +import com.elink.esua.epdc.activity.form.EpdcActSignupFormDTO; import com.elink.esua.epdc.activity.result.AppActInfoDTO; import com.elink.esua.epdc.common.token.dto.TokenDto; import com.elink.esua.epdc.commons.tools.annotation.LoginUser; @@ -26,7 +25,9 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.util.ArrayList; import java.util.Date; +import java.util.List; /** * APP活动相关接口 @@ -54,10 +55,8 @@ public class ApiActUserRelationController { * @date 2019/12/13 14:41 */ @PostMapping("signup") - public Result activitySignUp(@LoginUser TokenDto tokenDto, String actId) { - if (StringUtils.isBlank(actId)) { - return new Result().error("活动id不能为空"); - } + public Result activitySignUp(@LoginUser TokenDto tokenDto, @RequestBody EpdcActSignupFormDTO formDto) { + ValidatorUtils.validateEntity(formDto); //验证是否为志愿者 Result isVolunteer = appUserService.getVolunteerCountById(tokenDto); int code = isVolunteer.getCode(); @@ -69,7 +68,7 @@ public class ApiActUserRelationController { EpdcUserInfoResultDTO epdcUserInfoResultDTO = userInfo.getData(); ActUserRelationDTO actUserRelationDTO = new ActUserRelationDTO(); - actUserRelationDTO.setActId(actId); + actUserRelationDTO.setActId(formDto.getActId()); actUserRelationDTO.setUserId(tokenDto.getUserId()); actUserRelationDTO.setNickname(tokenDto.getNickname()); actUserRelationDTO.setFaceImg(tokenDto.getFaceImg()); @@ -79,6 +78,19 @@ public class ApiActUserRelationController { actUserRelationDTO.setPartyFlag(YesOrNoEnum.NO.value()); } + // 参与活动时间段 + if (CollectionUtil.isEmpty(formDto.getActPeriodId())) { + return new Result().error("请选择参与活动时间段"); + } + List periods = new ArrayList<>(); + for (String actPeriodId: + formDto.getActPeriodId()) { + ActPeriodDTO period = new ActPeriodDTO(); + period.setActId(actPeriodId); + periods.add(period); + } + actUserRelationDTO.setPeriods(periods); + String identityNo = epdcUserInfoResultDTO.getIdentityNo(); String identityNoVerification = IdentityNoUtils.IdentityNoVerification(identityNo); @@ -183,4 +195,17 @@ public class ApiActUserRelationController { return actUserRelationService.clockAddressDetail(actId); } + + /** + * 获取活动可参与时间段 + * + * @param actId + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author lc + * @since 2021/9/3 15:54 + */ + @GetMapping("getActPeriods") + public Result> getActPeriods(String actId) { + return actUserRelationService.listOfActPeriods(actId); + } } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AppActUserRelationFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AppActUserRelationFeignClient.java index 6bfa1a43..1a89edc3 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AppActUserRelationFeignClient.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/AppActUserRelationFeignClient.java @@ -1,9 +1,6 @@ package com.elink.esua.epdc.feign; -import com.elink.esua.epdc.activity.ActUserRelationDTO; -import com.elink.esua.epdc.activity.AppActUserCancelsignupDTO; -import com.elink.esua.epdc.activity.AppActUserClockLogDTO; -import com.elink.esua.epdc.activity.AppClockListDTO; +import com.elink.esua.epdc.activity.*; import com.elink.esua.epdc.activity.result.AppActInfoDTO; import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; import com.elink.esua.epdc.commons.tools.utils.Result; @@ -14,6 +11,8 @@ import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; +import java.util.List; + /** * * 活动报名管理 @@ -72,4 +71,15 @@ public interface AppActUserRelationFeignClient { **/ @GetMapping(value = "heart/appactuserrelation/selectListV2ActUserRelation",consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) Result selectListV2ActUserRelation(EpdcClockListV2FormDTO epdcClockListV2FormDTO); + + /** + * 获取活动可参与时间段 + * + * @param actId + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author lc + * @since 2021/9/3 15:54 + */ + @GetMapping(value = "heart/appactuserrelation/getActPeriods/{actId}",consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) + Result> getActPeriods(@PathVariable("actId") String actId); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AppActUserRelationFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AppActUserRelationFeignClientFallback.java index 95473ce3..6635604c 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AppActUserRelationFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/AppActUserRelationFeignClientFallback.java @@ -1,9 +1,6 @@ package com.elink.esua.epdc.feign.fallback; -import com.elink.esua.epdc.activity.ActUserRelationDTO; -import com.elink.esua.epdc.activity.AppActUserCancelsignupDTO; -import com.elink.esua.epdc.activity.AppActUserClockLogDTO; -import com.elink.esua.epdc.activity.AppClockListDTO; +import com.elink.esua.epdc.activity.*; import com.elink.esua.epdc.activity.result.AppActInfoDTO; import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; @@ -12,6 +9,8 @@ import com.elink.esua.epdc.dto.form.EpdcClockListV2FormDTO; import com.elink.esua.epdc.feign.AppActUserRelationFeignClient; import org.springframework.stereotype.Component; +import java.util.List; + /** * @Author:wanggongfeng * @Date:2019/12/16 15:11 @@ -48,4 +47,9 @@ public class AppActUserRelationFeignClientFallback implements AppActUserRelation return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "selectListV2ActUserRelation", epdcClockListV2FormDTO); } + @Override + public Result> getActPeriods(String actId) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getActPeriods", actId); + } + } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/ActUserRelationService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/ActUserRelationService.java index e81512a1..ce1e30b3 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/ActUserRelationService.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/ActUserRelationService.java @@ -1,13 +1,12 @@ package com.elink.esua.epdc.service; -import com.elink.esua.epdc.activity.ActUserRelationDTO; -import com.elink.esua.epdc.activity.AppActUserCancelsignupDTO; -import com.elink.esua.epdc.activity.AppActUserClockLogDTO; -import com.elink.esua.epdc.activity.AppClockListDTO; +import com.elink.esua.epdc.activity.*; import com.elink.esua.epdc.activity.result.AppActInfoDTO; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.form.EpdcClockListV2FormDTO; +import java.util.List; + /** * @author wanggongfeng * @date 2019/12/17 9:50 @@ -61,4 +60,14 @@ public interface ActUserRelationService { * @return com.elink.esua.epdc.commons.tools.utils.Result **/ Result getV2ClockList(EpdcClockListV2FormDTO epdcClockListV2FormDTO); + + /** + * 获取活动可参与时间段 + * + * @param actId + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author lc + * @since 2021/9/3 15:55 + */ + Result> listOfActPeriods(String actId); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/ActUserRelationServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/ActUserRelationServiceImpl.java index 3a8605ac..c2f0a659 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/ActUserRelationServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/ActUserRelationServiceImpl.java @@ -1,9 +1,6 @@ package com.elink.esua.epdc.service.impl; -import com.elink.esua.epdc.activity.ActUserRelationDTO; -import com.elink.esua.epdc.activity.AppActUserCancelsignupDTO; -import com.elink.esua.epdc.activity.AppActUserClockLogDTO; -import com.elink.esua.epdc.activity.AppClockListDTO; +import com.elink.esua.epdc.activity.*; import com.elink.esua.epdc.activity.result.AppActInfoDTO; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.form.EpdcClockListV2FormDTO; @@ -13,6 +10,8 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + /** * @author wanggongfeng @@ -58,6 +57,12 @@ public class ActUserRelationServiceImpl implements ActUserRelationService { @Override public Result getV2ClockList(EpdcClockListV2FormDTO epdcClockListV2FormDTO) { Result result = actInfoFeignClient.selectListV2ActUserRelation(epdcClockListV2FormDTO); - return result; } + return result; + } + + @Override + public Result> listOfActPeriods(String actId) { + return actInfoFeignClient.getActPeriods(actId); + } } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java index 74ae79c8..3a26152b 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java @@ -22,6 +22,7 @@ import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; +import java.util.List; /** * 活动信息表 @@ -249,4 +250,9 @@ public class ActInfoDTO implements Serializable { * 置顶人 */ private String topUserName; + + /** + * 活动详细时间段 + */ + private List periods; } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActPeriodDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActPeriodDTO.java new file mode 100644 index 00000000..929525ba --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActPeriodDTO.java @@ -0,0 +1,86 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.activity; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 活动详细时间段表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-09-02 + */ +@Data +public class ActPeriodDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 活动ID + */ + private String actId; + + /** + * 活动开始时间 + */ + private Date actPeriodStartTime; + + /** + * 活动结束时间 + */ + private Date actPeriodEndTime; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 删除标识 0:未删除 1:删除 + */ + private String delFlag; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActPeriodUserDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActPeriodUserDTO.java new file mode 100644 index 00000000..8fa36c55 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActPeriodUserDTO.java @@ -0,0 +1,81 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.activity; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 活动详细时间段用户关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-09-02 + */ +@Data +public class ActPeriodUserDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 活动详细时间段表ID + */ + private String actPeriodId; + + /** + * 活动用户关系表ID + */ + private String actUserRelationId; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 删除标识 0:未删除 1:删除 + */ + private String delFlag; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActUserRelationDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActUserRelationDTO.java index e365873d..44eee3a1 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActUserRelationDTO.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActUserRelationDTO.java @@ -21,6 +21,7 @@ import lombok.Data; import java.io.Serializable; import java.util.Date; +import java.util.List; /** @@ -134,4 +135,9 @@ public class ActUserRelationDTO implements Serializable { */ private Date updatedTime; -} \ No newline at end of file + /** + * 活动详细时间段 + */ + private List periods; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActInfoAppFormDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActInfoAppFormDTO.java index 336779df..164ed79a 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActInfoAppFormDTO.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActInfoAppFormDTO.java @@ -65,4 +65,9 @@ public class ActInfoAppFormDTO implements Serializable { */ private String actId; -} \ No newline at end of file + /** + * 活动主办方 + */ + private String sponsor; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/EpdcActSignupFormDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/EpdcActSignupFormDTO.java new file mode 100644 index 00000000..109feb09 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/EpdcActSignupFormDTO.java @@ -0,0 +1,29 @@ +package com.elink.esua.epdc.activity.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; + +/** + * 活动报名 + */ +@Data +public class EpdcActSignupFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 活动ID + */ + @NotBlank(message = "活动ID不能为空") + private String actId; + + /** + * 参与活动时间段 + */ + @NotNull(message = "参与活动时间段不能为空") + private List actPeriodId; +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/result/ActUserRelationResultDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/result/ActUserRelationResultDTO.java index 3dd7800b..78ffbf31 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/result/ActUserRelationResultDTO.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/result/ActUserRelationResultDTO.java @@ -17,10 +17,12 @@ package com.elink.esua.epdc.activity.result; +import com.elink.esua.epdc.activity.ActPeriodDTO; import lombok.Data; import java.io.Serializable; import java.util.Date; +import java.util.List; /** @@ -125,4 +127,9 @@ public class ActUserRelationResultDTO implements Serializable { * 报名时间 "2020-10-15 10:56:20" */ private String signupTimeString; + + /** + * 活动详细时间段 + */ + private List periods; } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml index b59a9355..bde6fb53 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/pom.xml @@ -156,10 +156,10 @@ 9060 - 2 - 114.215.125.123 - 9603 - epdc!redis@master1405 + 11 + r-m5eh5czgb1nucti6azpd.redis.rds.aliyuncs.com + 10001 + elink!888 @@ -188,10 +188,10 @@ 11012 - 2 - 114.215.125.123 - 9603 - epdc!redis@master1405 + 11 + r-m5eh5czgb1nucti6azpd.redis.rds.aliyuncs.com + 10001 + elink!888 diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActInfoController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActInfoController.java index 9050fea9..5fd0657b 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActInfoController.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActInfoController.java @@ -53,7 +53,7 @@ import java.util.Map; @RestController @RequestMapping("actinfo") public class ActInfoController { - + @Autowired private ActInfoService actInfoService; @@ -64,7 +64,6 @@ public class ActInfoController { if(SecurityUser.getDeptId() != null){ params.put("deptId", SecurityUser.getDeptId()); } - System.out.println(params); PageData page = actInfoService.getActInfoPageFromPC(params); return new Result>().ok(page); } @@ -137,4 +136,4 @@ public class ActInfoController { ValidatorUtils.validateEntity(formDto); return actInfoService.modifyActTopFlag(formDto); } -} \ No newline at end of file +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActPeriodController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActPeriodController.java new file mode 100644 index 00000000..917356e4 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActPeriodController.java @@ -0,0 +1,84 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.activity.controller; + +import com.elink.esua.epdc.activity.ActPeriodDTO; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.modules.activity.service.ActPeriodService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + + +/** + * 活动详细时间段表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-09-02 + */ +@RestController +@RequestMapping("actperiod") +public class ActPeriodController { + + @Autowired + private ActPeriodService actPeriodService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = actPeriodService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + ActPeriodDTO data = actPeriodService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody ActPeriodDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + actPeriodService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody ActPeriodDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + actPeriodService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + actPeriodService.delete(ids); + return new Result(); + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActPeriodUserController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActPeriodUserController.java new file mode 100644 index 00000000..4f51b20e --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActPeriodUserController.java @@ -0,0 +1,87 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.activity.controller; + +import com.elink.esua.epdc.activity.ActPeriodUserDTO; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.modules.activity.service.ActPeriodUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 活动详细时间段用户关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-09-02 + */ +@RestController +@RequestMapping("actperioduser") +public class ActPeriodUserController { + + @Autowired + private ActPeriodUserService actPeriodUserService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = actPeriodUserService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + ActPeriodUserDTO data = actPeriodUserService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody ActPeriodUserDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + actPeriodUserService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody ActPeriodUserDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + actPeriodUserService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + actPeriodUserService.delete(ids); + return new Result(); + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/AppActUserRelationController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/AppActUserRelationController.java index 56369dd3..c4640f2b 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/AppActUserRelationController.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/AppActUserRelationController.java @@ -17,6 +17,7 @@ package com.elink.esua.epdc.modules.activity.controller; +import com.elink.esua.epdc.activity.ActPeriodDTO; import com.elink.esua.epdc.activity.ActUserRelationDTO; import com.elink.esua.epdc.activity.AppActUserCancelsignupDTO; import com.elink.esua.epdc.activity.AppClockListDTO; @@ -27,6 +28,8 @@ import com.elink.esua.epdc.modules.activity.service.ActUserRelationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.util.List; + /** * 用户活动关系表 * @@ -67,7 +70,7 @@ public class AppActUserRelationController { * @return */ @GetMapping("selectListActUserRelation/{actId}") - public Result selectListActUserRelation(@PathVariable("actId")String actId){ + public Result selectListActUserRelation(@PathVariable("actId") String actId){ return actUserRelationService.selectListActUserRelation(actId); } @@ -87,8 +90,22 @@ public class AppActUserRelationController { * @return */ @GetMapping("AutoAuditActUser/{actId}") - public Result AutoAuditActUser(@PathVariable("actId")String actId){ + public Result AutoAuditActUser(@PathVariable("actId") String actId){ return actUserRelationService.updateAuditDefaultStatus(actId); } + /** + * 获取活动可参与时间段 + * + * @param actId + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author lc + * @since 2021/9/3 15:54 + */ + @GetMapping("getActPeriods/{actId}") + public Result> getActPeriods(@PathVariable("actId") String actId) { + List data = actUserRelationService.listOfActPeriods(actId); + return new Result>().ok(data); + } + } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActPeriodDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActPeriodDao.java new file mode 100644 index 00000000..86d40f20 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActPeriodDao.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.activity.dao; + +import com.elink.esua.epdc.activity.ActPeriodDTO; +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.modules.activity.entity.ActPeriodEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 活动详细时间段表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-09-02 + */ +@Mapper +public interface ActPeriodDao extends BaseDao { + + /** + * 查询活动已报名的时间段 + * + * @param actId + * @return java.util.List + * @author lc + * @since 2021/9/2 16:02 + */ + List selectPeriodsAlreadySignIn(String actId); + + /** + * 删除活动时间段 + * + * @param actId + * @return void + * @author lc + * @since 2021/9/2 15:30 + */ + void modifyDelFlagByActId(String actId); + + /** + * 获取活动时间段 + * + * @param actId + * @return java.util.List + * @author lc + * @since 2021/9/2 16:29 + */ + List selectListOfActPeriodsByActId(String actId); + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActPeriodUserDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActPeriodUserDao.java new file mode 100644 index 00000000..0be7135c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActPeriodUserDao.java @@ -0,0 +1,56 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.activity.dao; + +import com.elink.esua.epdc.activity.ActPeriodDTO; +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.modules.activity.entity.ActPeriodUserEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 活动详细时间段用户关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-09-02 + */ +@Mapper +public interface ActPeriodUserDao extends BaseDao { + + /** + * 获取用户报名时间段 + * + * @param actUserRelationId + * @return java.util.List + * @author lc + * @since 2021/9/2 20:06 + */ + List selectListOfSignInActPeriodsByActUserRelationId(String actUserRelationId); + + /** + * 删除参与活动时间段记录 + * + * @param actUserRelationId + * @return void + * @author lc + * @since 2021/9/3 15:47 + */ + void modifyActPeriodUserDelFlagByActUserRelationId(String actUserRelationId); + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActPeriodEntity.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActPeriodEntity.java new file mode 100644 index 00000000..93b15538 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActPeriodEntity.java @@ -0,0 +1,56 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.activity.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 活动详细时间段表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_act_period") +public class ActPeriodEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 活动ID + */ + private String actId; + + /** + * 活动开始时间 + */ + private Date actPeriodStartTime; + + /** + * 活动结束时间 + */ + private Date actPeriodEndTime; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActPeriodUserEntity.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActPeriodUserEntity.java new file mode 100644 index 00000000..68f186f8 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActPeriodUserEntity.java @@ -0,0 +1,51 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.activity.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 活动详细时间段用户关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_act_period_user") +public class ActPeriodUserEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 活动详细时间段表ID + */ + private String actPeriodId; + + /** + * 活动用户关系表ID + */ + private String actUserRelationId; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActPeriodService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActPeriodService.java new file mode 100644 index 00000000..abf4986f --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActPeriodService.java @@ -0,0 +1,115 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.activity.service; + +import com.elink.esua.epdc.activity.ActPeriodDTO; +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.modules.activity.entity.ActPeriodEntity; + +import java.util.List; +import java.util.Map; + +/** + * 活动详细时间段表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-09-02 + */ +public interface ActPeriodService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-09-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-09-02 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ActPeriodDTO + * @author generator + * @date 2021-09-02 + */ + ActPeriodDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-02 + */ + void save(ActPeriodDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-02 + */ + void update(ActPeriodDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-09-02 + */ + void delete(String[] ids); + + /** + * 删除活动时间段 + * + * @param actId + * @return void + * @author lc + * @since 2021/9/2 15:28 + */ + void removeActPeriodsByActId(String actId); + + /** + * 获取活动时间段 + * + * @param actId + * @return java.util.List + * @author lc + * @since 2021/9/2 16:13 + */ + List listOfActPeriodsByActId(String actId); +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActPeriodUserService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActPeriodUserService.java new file mode 100644 index 00000000..d5f51426 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActPeriodUserService.java @@ -0,0 +1,116 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.activity.service; + +import com.elink.esua.epdc.activity.ActPeriodDTO; +import com.elink.esua.epdc.activity.ActPeriodUserDTO; +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.modules.activity.entity.ActPeriodUserEntity; + +import java.util.List; +import java.util.Map; + +/** + * 活动详细时间段用户关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-09-02 + */ +public interface ActPeriodUserService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-09-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-09-02 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ActPeriodUserDTO + * @author generator + * @date 2021-09-02 + */ + ActPeriodUserDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-02 + */ + void save(ActPeriodUserDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-09-02 + */ + void update(ActPeriodUserDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-09-02 + */ + void delete(String[] ids); + + /** + * 获取用户报名时间段 + * + * @param actUserRelationId + * @return java.util.List + * @author lc + * @since 2021/9/2 20:05 + */ + List listOfSignInActPeriodsByActUserRelationId(String actUserRelationId); + + /** + * 删除参与活动时间段记录 + * + * @param actUserRelationId + * @return void + * @author lc + * @since 2021/9/3 15:45 + */ + void removeActPeriodUserByActUserRelationId(String actUserRelationId); +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActUserRelationService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActUserRelationService.java index 049201a2..d700eb73 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActUserRelationService.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActUserRelationService.java @@ -17,6 +17,7 @@ package com.elink.esua.epdc.modules.activity.service; +import com.elink.esua.epdc.activity.ActPeriodDTO; import com.elink.esua.epdc.activity.ActUserRelationDTO; import com.elink.esua.epdc.activity.AppActUserCancelsignupDTO; import com.elink.esua.epdc.activity.AppClockListDTO; @@ -183,4 +184,14 @@ public interface ActUserRelationService extends BaseService **/ Result selectListV2ActUserRelation(EpdcClockListV2FormDTO formDTO); + + /** + * 获取活动可参与时间段 + * + * @param actId + * @return java.util.List + * @author lc + * @since 2021/9/3 16:00 + */ + List listOfActPeriods(String actId); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java index bb907f61..600457fa 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java @@ -17,12 +17,10 @@ package com.elink.esua.epdc.modules.activity.service.impl; +import cn.hutool.core.collection.CollectionUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.elink.esua.epdc.activity.ActBannerDTO; -import com.elink.esua.epdc.activity.ActInfoDTO; -import com.elink.esua.epdc.activity.ActUserReadDTO; -import com.elink.esua.epdc.activity.ActUserRelationDTO; +import com.elink.esua.epdc.activity.*; import com.elink.esua.epdc.activity.form.ActInfoAppFormDTO; import com.elink.esua.epdc.activity.form.ActInfoFormDTO; import com.elink.esua.epdc.activity.form.ActSignInListFormDTO; @@ -54,12 +52,10 @@ import com.elink.esua.epdc.dto.ScheduleJobDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO; import com.elink.esua.epdc.modules.activity.dao.*; -import com.elink.esua.epdc.modules.activity.entity.ActBannerEntity; -import com.elink.esua.epdc.modules.activity.entity.ActInfoEntity; -import com.elink.esua.epdc.modules.activity.entity.ActUserClockLogEntity; -import com.elink.esua.epdc.modules.activity.entity.ActUserRelationEntity; +import com.elink.esua.epdc.modules.activity.entity.*; import com.elink.esua.epdc.modules.activity.service.ActBannerService; import com.elink.esua.epdc.modules.activity.service.ActInfoService; +import com.elink.esua.epdc.modules.activity.service.ActPeriodService; import com.elink.esua.epdc.modules.activity.service.ActUserReadService; import com.elink.esua.epdc.modules.async.NewsTask; import com.elink.esua.epdc.modules.feign.AdminFeignClient; @@ -109,6 +105,8 @@ public class ActInfoServiceImpl extends BaseServiceImpl page(Map params) { @@ -145,12 +143,18 @@ public class ActInfoServiceImpl extends BaseServiceImpl periods = actPeriodService.listOfActPeriodsByActId(id); + ActInfoDTO dto = ConvertUtils.sourceToTarget(entity, ActInfoDTO.class); + dto.setPeriods(periods); + return dto; } @Override @Transactional(rollbackFor = Exception.class) public Result save(ActInfoDTO dto) { + // 校验活动详细时间段 + this.checkActPeriods(dto); //内容审核 - start Boolean isConReview = null; String userName = null; @@ -193,6 +197,8 @@ public class ActInfoServiceImpl extends BaseServiceImpl 0 + || periodEndTime.compareTo(dto.getActStartTime()) < 0 + || periodEndTime.compareTo(dto.getActEndTime()) > 0 + || periodEndTime.compareTo(periodStartTime) < 0) { + throw new RenException("活动时间段需在活动开始至活动结束时间内,且活动时间段结束时间需在活动时间段开始时间之后"); + } + if (i>0) { + if (periodStartTime.compareTo(periodEndTimeTmp) < 0) { + throw new RenException("活动时间段之间有重复时间,请调整后重新提交"); + } + } + periodEndTimeTmp = periodEndTime; + } + } + + /** + * 保存/修改活动时间段 + * + * @param periods + * @param actId + * @return void + * @author lc + * @since 2021/9/2 15:27 + */ + private void saveOrUpdateActPeriods(List periods, String actId) { + // 删除活动已有的时间段 + actPeriodService.removeActPeriodsByActId(actId); + // 保存活动时间段 + for (ActPeriodDTO dto: + periods) { + dto.setActId(actId); + actPeriodService.save(dto); + } + } } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActPeriodServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActPeriodServiceImpl.java new file mode 100644 index 00000000..b8226e72 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActPeriodServiceImpl.java @@ -0,0 +1,117 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.activity.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.activity.ActPeriodDTO; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.exception.RenException; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.modules.activity.dao.ActPeriodDao; +import com.elink.esua.epdc.modules.activity.entity.ActPeriodEntity; +import com.elink.esua.epdc.modules.activity.service.ActPeriodService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 活动详细时间段表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-09-02 + */ +@Service +public class ActPeriodServiceImpl extends BaseServiceImpl implements ActPeriodService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ActPeriodDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ActPeriodDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ActPeriodDTO get(String id) { + ActPeriodEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ActPeriodDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ActPeriodDTO dto) { + ActPeriodEntity entity = ConvertUtils.sourceToTarget(dto, ActPeriodEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ActPeriodDTO dto) { + ActPeriodEntity entity = ConvertUtils.sourceToTarget(dto, ActPeriodEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void removeActPeriodsByActId(String actId) { + // 校验活动是否已有人报名,有人报名后不能修改活动时间段 + List periods = baseDao.selectPeriodsAlreadySignIn(actId); + if (CollectionUtil.isNotEmpty(periods)) { + throw new RenException("活动时间段已有人报名,不能修改"); + } + baseDao.modifyDelFlagByActId(actId); + } + + @Override + public List listOfActPeriodsByActId(String actId) { + return baseDao.selectListOfActPeriodsByActId(actId); + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActPeriodUserServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActPeriodUserServiceImpl.java new file mode 100644 index 00000000..40898c17 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActPeriodUserServiceImpl.java @@ -0,0 +1,111 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.activity.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.activity.ActPeriodDTO; +import com.elink.esua.epdc.activity.ActPeriodUserDTO; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.modules.activity.dao.ActPeriodUserDao; +import com.elink.esua.epdc.modules.activity.entity.ActPeriodUserEntity; +import com.elink.esua.epdc.modules.activity.service.ActPeriodUserService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 活动详细时间段用户关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-09-02 + */ +@Service +public class ActPeriodUserServiceImpl extends BaseServiceImpl implements ActPeriodUserService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ActPeriodUserDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ActPeriodUserDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public ActPeriodUserDTO get(String id) { + ActPeriodUserEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ActPeriodUserDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ActPeriodUserDTO dto) { + ActPeriodUserEntity entity = ConvertUtils.sourceToTarget(dto, ActPeriodUserEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ActPeriodUserDTO dto) { + ActPeriodUserEntity entity = ConvertUtils.sourceToTarget(dto, ActPeriodUserEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public List listOfSignInActPeriodsByActUserRelationId(String actUserRelationId) { + return baseDao.selectListOfSignInActPeriodsByActUserRelationId(actUserRelationId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void removeActPeriodUserByActUserRelationId(String actUserRelationId) { + baseDao.modifyActPeriodUserDelFlagByActUserRelationId(actUserRelationId); + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserRelationServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserRelationServiceImpl.java index a5815b36..9364b23d 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserRelationServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserRelationServiceImpl.java @@ -55,9 +55,7 @@ import com.elink.esua.epdc.modules.activity.entity.ActInfoEntity; import com.elink.esua.epdc.modules.activity.entity.ActUserLogEntity; import com.elink.esua.epdc.modules.activity.entity.ActUserPointsLogEntity; import com.elink.esua.epdc.modules.activity.entity.ActUserRelationEntity; -import com.elink.esua.epdc.modules.activity.service.ActInfoService; -import com.elink.esua.epdc.modules.activity.service.ActUserPointsLogService; -import com.elink.esua.epdc.modules.activity.service.ActUserRelationService; +import com.elink.esua.epdc.modules.activity.service.*; import com.elink.esua.epdc.modules.async.NewsTask; import com.elink.esua.epdc.modules.feign.AdminFeignClient; import com.elink.esua.epdc.modules.feign.PointsFeignClient; @@ -101,6 +99,11 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -149,7 +152,10 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl periods = actPeriodUserService.listOfSignInActPeriodsByActUserRelationId(id); + ActUserRelationDTO dto = ConvertUtils.sourceToTarget(entity, ActUserRelationDTO.class); + dto.setPeriods(periods); + return dto; } @Override @@ -179,7 +185,6 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl listOfActPeriods(String actId) { + return actPeriodService.listOfActPeriodsByActId(actId); + } + } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActInfoDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActInfoDao.xml index c7589eba..9b1fd355 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActInfoDao.xml +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActInfoDao.xml @@ -191,6 +191,9 @@ AND actInfo.ID = #{actId} + + AND actInfo.SPONSOR like concat('%', #{sponsor}, '%') + #{timestamp} @@ -503,6 +506,7 @@ eai.PUNISHMENT_POINTS as punishmentPoints, eai.REQUIREMENT as requirement, eai.ACT_CONTENT as actContent, + eai.SPONSOR as sponsor, ACT_NEWS_CONTENT as actNewsContent from epdc_act_info eai where eai.DEL_FLAG='0' diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActPeriodDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActPeriodDao.xml new file mode 100644 index 00000000..81e0933d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActPeriodDao.xml @@ -0,0 +1,37 @@ + + + + + + + + + update epdc_act_period set del_flag = '1' where act_id = #{actId} + + + + + diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActPeriodUserDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActPeriodUserDao.xml new file mode 100644 index 00000000..7cb63ffd --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActPeriodUserDao.xml @@ -0,0 +1,40 @@ + + + + + + + + + update epdc_act_period_user set del_flag = '1' where ACT_USER_RELATION_ID = #{actUserRelationId} + + + diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActUserRelationDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActUserRelationDao.xml index 58587ffb..874e2def 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActUserRelationDao.xml +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActUserRelationDao.xml @@ -42,6 +42,10 @@ + + + +