diff --git a/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/topic/excel/TopicExcel.java b/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/topic/excel/TopicExcel.java index 659b5b853..d68f664c8 100644 --- a/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/topic/excel/TopicExcel.java +++ b/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/topic/excel/TopicExcel.java @@ -36,7 +36,7 @@ public class TopicExcel { @Excel(name = "发言人") private String nickname; - @Excel(name = "时间") + @Excel(name = "时间", format = "yyyy-MM-dd HH:mm:ss") private Date createdTime; @Excel(name = "话题内容") diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActBannerDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActBannerDTO.java new file mode 100644 index 000000000..3795181e8 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActBannerDTO.java @@ -0,0 +1,97 @@ +/** + * 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; + + +/** + * 爱心互助活动banner 爱心互助活动banner + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-19 + */ +@Data +public class ActBannerDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 活动ID + */ + private String actId; + + /** + * 标题 + */ + private String title; + + /** + * banner图片 + */ + private String bannerImg; + + /** + * banner类型 0-活动,1-连接 + */ + private String bannerType; + + /** + * 连接地址 + */ + private String url; + + /** + * 上下架状态 0-下架,1-上架 + */ + private String status; + + /** + * 上下架时间 + */ + private Date statusTime; + + /** + * banner位置 0-顶部 + */ + private String bannerPosition; + + /** + * 浏览数量 + */ + private Integer browseNum; + + /** + * 创建部门ID + */ + private Long deptId; + + /** + * 创建时间 + */ + private Date createdTime; + + +} \ No newline at end of file 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 8490f7ce5..1a0555939 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 @@ -190,5 +190,23 @@ public class ActInfoDTO implements Serializable { */ private Integer reward; + /** + * 活动名额类型 + */ + private Integer actQuotaCategory; + /** + * 活动下架原因 + */ + private String cancelReason; + + /** + * 是否展示banner + */ + private String isBanner; + /** + * banner地址 + */ + private String bannerUrl; + } \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActInfoFormDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActInfoFormDTO.java index e1872ae8d..a1380c881 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActInfoFormDTO.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActInfoFormDTO.java @@ -19,6 +19,7 @@ package com.elink.esua.epdc.activity.form; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; @@ -37,6 +38,7 @@ public class ActInfoFormDTO implements Serializable { /** * 主键 */ + @NotBlank(message = "id不能为空") private String id; /** @@ -189,5 +191,16 @@ public class ActInfoFormDTO implements Serializable { */ private Integer reward; + /** + * 活动名额类型 + */ + private Integer actQuotaCategory; + + /** + * 活动下架原因 + */ + @NotBlank(message = "下架原因不能为空") + private String cancelReason; + } \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActUserRelationAuditFormDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActUserRelationAuditFormDTO.java new file mode 100644 index 000000000..190b1becc --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActUserRelationAuditFormDTO.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.activity.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.Date; + + +/** + * 用户活动关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-16 + */ +@Data +public class ActUserRelationAuditFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @NotBlank(message = "id不能为空") + private String id; + + /** + * 活动ID + */ + private String actId; + + /** + * 用户ID + */ + private String userId; + + /** + * 用户昵称 + */ + private String nickname; + + /** + * 用户头像 + */ + private String faceImg; + + /** + * 党员标识(0-否,1-是) + */ + private String partyFlag; + + /** + * 报名人真实姓名 + */ + private String realName; + + /** + * 性别(0-女,1-男) + */ + private String sex; + + /** + * 年龄 + */ + private Integer age; + + /** + * 联系电话 + */ + private String mobile; + + /** + * 身份证号 + */ + private String identityNo; + + /** + * 当前状态(0-报名,1-审核通过,2-打卡,3-取消报名,4-审核不通过) + */ + private String status; + + /** + * 未通过原因(仅当未通过时录入,并读取) + */ + @NotBlank(message = "原因不能为空") + private String failureReason; + + /** + * 审核时间 + */ + private Date auditTime; + + /** + * 报名时间 + */ + private Date signupTime; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/result/ActInfoResultDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/result/ActInfoResultDTO.java index cc2dac2ab..85aa75d78 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/result/ActInfoResultDTO.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/result/ActInfoResultDTO.java @@ -190,5 +190,15 @@ public class ActInfoResultDTO implements Serializable { */ private Integer reward; + /** + * 活动名额类型 + */ + private Integer actQuotaCategory; + + /** + * 活动下架原因 + */ + private String cancelReason; + } \ No newline at end of file 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 new file mode 100644 index 000000000..e6b54b0c4 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/result/ActUserRelationResultDTO.java @@ -0,0 +1,113 @@ +/** + * 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.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 用户活动关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-16 + */ +@Data +public class ActUserRelationResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 活动ID + */ + private String actId; + + /** + * 用户ID + */ + private String userId; + + /** + * 用户昵称 + */ + private String nickname; + + /** + * 用户头像 + */ + private String faceImg; + + /** + * 党员标识(0-否,1-是) + */ + private String partyFlag; + + /** + * 报名人真实姓名 + */ + private String realName; + + /** + * 性别(0-女,1-男) + */ + private String sex; + + /** + * 年龄 + */ + private Integer age; + + /** + * 联系电话 + */ + private String mobile; + + /** + * 身份证号 + */ + private String identityNo; + + /** + * 当前状态(0-报名,1-审核通过,2-打卡,3-取消报名,4-审核不通过) + */ + private String status; + + /** + * 未通过原因(仅当未通过时录入,并读取) + */ + private String failureReason; + + /** + * 审核时间 + */ + private Date auditTime; + + /** + * 报名时间 + */ + private Date signupTime; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/constant/ActStateConstant.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/constant/ActStateConstant.java new file mode 100644 index 000000000..981547c13 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/constant/ActStateConstant.java @@ -0,0 +1,47 @@ +package com.elink.esua.epdc.constant; + +public interface ActStateConstant { + /** + * 活动状态-上架 + */ + String ACT_INFO_STATUS_GROUNDING = "1"; + /** + * 活动状态-下架 + */ + String ACT_INFO_STATUS_UNDERCARRIAGE = "0"; + + /** + * 活动BANNER状态-上架 + */ + String ACT_BANNER_STATUS_GROUNDING = "1"; + /** + * 活动BANNER状态-下架 + */ + String ACT_BANNER_STATUS_UNDERCARRIAGE = "0"; + + /** + * 活动报名状态-报名 + */ + String ACT_USER_RELATION_STATUS_APPLY = "0"; + /** + * 活动报名状态-通过 + */ + String ACT_USER_RELATION_STATUS_AUDITPASS = "1"; + + /** + * 活动报名状态-打卡 + */ + String ACT_USER_RELATION_STATUS_CLOCK = "2"; + + /** + * 活动报名状态-取消 + */ + String ACT_USER_RELATION_STATUS_CANCEL = "3"; + /** + * 活动报名状态-审核驳回 + */ + String ACT_USER_RELATION_STATUS_AUDITREJECT = "4"; + + +} + diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActBannerController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActBannerController.java new file mode 100644 index 000000000..fd5881f7d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActBannerController.java @@ -0,0 +1,98 @@ +/** + * 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.ActBannerDTO; +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.excel.ActBannerExcel; +import com.elink.esua.epdc.modules.activity.service.ActBannerService; +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; + + +/** + * 爱心互助活动banner 爱心互助活动banner + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-19 + */ +@RestController +@RequestMapping("actbanner") +public class ActBannerController { + + @Autowired + private ActBannerService actBannerService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = actBannerService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + ActBannerDTO data = actBannerService.get(id); + return new Result().ok(data); + } + @GetMapping("grounding/{id}") + public Result grounding(@PathVariable("id") String id){ + return actBannerService.grounding(id); + } + + @PostMapping + public Result save(@RequestBody ActBannerDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + actBannerService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody ActBannerDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + actBannerService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + actBannerService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = actBannerService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, ActBannerExcel.class); + } + +} \ 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/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 483d3384c..31e49dce0 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 @@ -17,8 +17,12 @@ package com.elink.esua.epdc.modules.activity.controller; +import com.elink.esua.epdc.activity.ActBannerDTO; import com.elink.esua.epdc.activity.ActInfoDTO; +import com.elink.esua.epdc.activity.form.ActInfoFormDTO; +import com.elink.esua.epdc.activity.result.ActInfoResultDTO; import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; 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; @@ -26,12 +30,16 @@ 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.constant.ActStateConstant; import com.elink.esua.epdc.modules.activity.excel.ActInfoExcel; +import com.elink.esua.epdc.modules.activity.service.ActBannerService; import com.elink.esua.epdc.modules.activity.service.ActInfoService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; +import java.util.Date; import java.util.List; import java.util.Map; @@ -48,11 +56,17 @@ public class ActInfoController { @Autowired private ActInfoService actInfoService; + @Autowired + private ActBannerService actBannerService; @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = actInfoService.page(params); - return new Result>().ok(page); + public Result> page(@RequestParam Map params){ + if(SecurityUser.getDeptId() != null){ + params.put("deptId", SecurityUser.getDeptId()); + } + System.out.println(params); + PageData page = actInfoService.getActInfoPageFromPC(params); + return new Result>().ok(page); } @GetMapping("{id}") @@ -62,11 +76,30 @@ public class ActInfoController { } @PostMapping + @Transactional(rollbackFor=Exception.class) public Result save(@RequestBody ActInfoDTO dto){ //效验数据 + dto.setActStatus(ActStateConstant.ACT_INFO_STATUS_GROUNDING); + dto.setPublishTime(new Date()); + if(SecurityUser.getDeptId() != null){ + dto.setDeptId(SecurityUser.getDeptId()); + } System.out.println(dto); ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + ActBannerDTO bannerDto = new ActBannerDTO(); actInfoService.save(dto); + //保存banner信息 + bannerDto.setActId(dto.getId()); + bannerDto.setTitle(dto.getTitle()); + bannerDto.setBannerImg(dto.getBannerUrl()); + bannerDto.setBannerType("0"); + bannerDto.setBannerPosition("0"); + bannerDto.setUrl(""); + bannerDto.setStatus(dto.getIsBanner()); + bannerDto.setStatusTime(new Date()); + bannerDto.setDeptId(dto.getDeptId()); + ValidatorUtils.validateEntity(bannerDto, AddGroup.class, DefaultGroup.class); + actBannerService.save(bannerDto); return new Result(); } @@ -77,6 +110,12 @@ public class ActInfoController { actInfoService.update(dto); return new Result(); } + @PostMapping("cancel") + public Result cancel(@RequestBody ActInfoFormDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + return actInfoService.cancel(dto); + } @DeleteMapping public Result delete(@RequestBody String[] ids){ diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActUserRelationController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActUserRelationController.java index 6de4355eb..b71d136c4 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActUserRelationController.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/controller/ActUserRelationController.java @@ -18,6 +18,8 @@ package com.elink.esua.epdc.modules.activity.controller; import com.elink.esua.epdc.activity.ActUserRelationDTO; +import com.elink.esua.epdc.activity.form.ActUserRelationAuditFormDTO; +import com.elink.esua.epdc.activity.result.ActUserRelationResultDTO; 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; @@ -44,14 +46,14 @@ import java.util.Map; @RestController @RequestMapping("actuserrelation") public class ActUserRelationController { - + @Autowired private ActUserRelationService actUserRelationService; @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = actUserRelationService.page(params); - return new Result>().ok(page); + public Result> page(@RequestParam Map params){ + PageData page = actUserRelationService.getActUserRelationPageFromPC(params); + return new Result>().ok(page); } @GetMapping("{id}") @@ -75,6 +77,12 @@ public class ActUserRelationController { actUserRelationService.update(dto); return new Result(); } + @PostMapping("audit") + public Result audit(@RequestBody ActUserRelationAuditFormDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + return actUserRelationService.audit(dto); + } @DeleteMapping public Result delete(@RequestBody String[] ids){ diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActBannerDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActBannerDao.java new file mode 100644 index 000000000..1ea4b2c20 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActBannerDao.java @@ -0,0 +1,33 @@ +/** + * 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.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.modules.activity.entity.ActBannerEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 爱心互助活动banner 爱心互助活动banner + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-19 + */ +@Mapper +public interface ActBannerDao extends BaseDao { + +} \ 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/dao/ActInfoDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActInfoDao.java index cbe71c78f..b8dbf07fa 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActInfoDao.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActInfoDao.java @@ -17,10 +17,14 @@ package com.elink.esua.epdc.modules.activity.dao; +import com.elink.esua.epdc.activity.result.ActInfoResultDTO; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; import com.elink.esua.epdc.modules.activity.entity.ActInfoEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; +import java.util.Map; + /** * 活动信息表 * @@ -29,5 +33,13 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ActInfoDao extends BaseDao { + /** + * 活动列表 + * @Params: [params] + * @Return: java.util.List + * @Author: liuchuang + * @Date: 2019/9/5 19:42 + */ + List getActInfoPageFromPC(Map params); } \ 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/dao/ActUserRelationDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActUserRelationDao.java index 45b9ba67d..a9cf59c7f 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActUserRelationDao.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActUserRelationDao.java @@ -18,12 +18,16 @@ package com.elink.esua.epdc.modules.activity.dao; import com.elink.esua.epdc.activity.ActUserRelationDTO; +import com.elink.esua.epdc.activity.result.ActUserRelationResultDTO; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.modules.activity.entity.ActUserRelationEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; +import java.util.Map; + /** * 用户活动关系表 * @@ -41,4 +45,13 @@ public interface ActUserRelationDao extends BaseDao { int isSignUp(@Param("userId")String userId, @Param("actId")String actId); Result selectOneActUserRelationInfo(@Param("userId")String userId, @Param("actId")String actId); + + /** + * 报名列表 + * @Params: [params] + * @Return: java.util.List + * @Author: liuchuang + * @Date: 2019/9/5 19:42 + */ + List getActUserRelationPageFromPC(Map params); } \ 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/entity/ActBannerEntity.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActBannerEntity.java new file mode 100644 index 000000000..ac89c08e3 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActBannerEntity.java @@ -0,0 +1,91 @@ +/** + * 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; + +/** + * 爱心互助活动banner 爱心互助活动banner + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-19 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_act_banner") +public class ActBannerEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 活动ID + */ + private String actId; + + /** + * 标题 + */ + private String title; + + /** + * banner图片 + */ + private String bannerImg; + + /** + * banner类型 0-活动,1-连接 + */ + private String bannerType; + + /** + * 连接地址 + */ + private String url; + + /** + * 上下架状态 0-下架,1-上架 + */ + private String status; + + /** + * 上下架时间 + */ + private Date statusTime; + + /** + * banner位置 0-顶部 + */ + private String bannerPosition; + + /** + * 浏览数量 + */ + private Integer browseNum; + + /** + * 创建部门ID + */ + private Long deptId; + +} \ 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/entity/ActInfoEntity.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java index bd8aa3200..9213764a6 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java @@ -98,6 +98,10 @@ public class ActInfoEntity extends BaseEpdcEntity { * 活动签到打卡地点 */ private String signinAddress; + /** + * 活动下架原因 + */ + private String cancelReason; /** * 活动签到打卡位置经度 @@ -188,5 +192,9 @@ public class ActInfoEntity extends BaseEpdcEntity { * 活动奖励积分 */ private Integer reward; + /** + * 活动名额类型 + */ + private Integer actQuotaCategory; } \ 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/excel/ActBannerExcel.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/excel/ActBannerExcel.java new file mode 100644 index 000000000..d0e75687d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/excel/ActBannerExcel.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.modules.activity.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 爱心互助活动banner 爱心互助活动banner + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-19 + */ +@Data +public class ActBannerExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "活动ID") + private String actId; + + @Excel(name = "标题") + private String title; + + @Excel(name = "banner图片") + private String bannerImg; + + @Excel(name = "banner类型 0-活动,1-连接") + private String bannerType; + + @Excel(name = "连接地址") + private String url; + + @Excel(name = "上下架状态 0-下架,1-上架") + private String status; + + @Excel(name = "上下架时间") + private Date statusTime; + + @Excel(name = "banner位置 0-顶部") + private String bannerPosition; + + @Excel(name = "浏览数量") + private Integer browseNum; + + @Excel(name = "创建部门ID") + private Long deptId; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "删除标识 0-否,1-是") + private String delFlag; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ 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/redis/ActBannerRedis.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/redis/ActBannerRedis.java new file mode 100644 index 000000000..c4e3632b2 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/redis/ActBannerRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 爱心互助活动banner 爱心互助活动banner + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-19 + */ +@Component +public class ActBannerRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ 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/service/ActBannerService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActBannerService.java new file mode 100644 index 000000000..229a8bac9 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActBannerService.java @@ -0,0 +1,98 @@ +/** + * 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.ActBannerDTO; +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.modules.activity.entity.ActBannerEntity; + +import java.util.List; +import java.util.Map; + +/** + * 爱心互助活动banner 爱心互助活动banner + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-19 + */ +public interface ActBannerService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2019-12-19 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2019-12-19 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return ActBannerDTO + * @author generator + * @date 2019-12-19 + */ + ActBannerDTO get(String id); + + Result grounding(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2019-12-19 + */ + void save(ActBannerDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2019-12-19 + */ + void update(ActBannerDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2019-12-19 + */ + void delete(String[] ids); +} \ 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/service/ActInfoService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActInfoService.java index 5020ca039..c072f4399 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActInfoService.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/ActInfoService.java @@ -18,8 +18,11 @@ package com.elink.esua.epdc.modules.activity.service; import com.elink.esua.epdc.activity.ActInfoDTO; +import com.elink.esua.epdc.activity.form.ActInfoFormDTO; +import com.elink.esua.epdc.activity.result.ActInfoResultDTO; import com.elink.esua.epdc.commons.mybatis.service.BaseService; import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.modules.activity.entity.ActInfoEntity; import java.util.List; @@ -43,6 +46,8 @@ public interface ActInfoService extends BaseService { */ PageData page(Map params); + PageData getActInfoPageFromPC(Map params); + /** * 默认查询 * @@ -83,6 +88,8 @@ public interface ActInfoService extends BaseService { */ void update(ActInfoDTO dto); + Result cancel(ActInfoFormDTO dto); + /** * 批量删除 * 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 e372f2229..cccd2905d 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,8 @@ package com.elink.esua.epdc.modules.activity.service; +import com.elink.esua.epdc.activity.form.ActUserRelationAuditFormDTO; +import com.elink.esua.epdc.activity.result.ActUserRelationResultDTO; import com.elink.esua.epdc.commons.mybatis.service.BaseService; import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.activity.ActUserRelationDTO; @@ -64,6 +66,8 @@ public interface ActUserRelationService extends BaseService getActUserRelationPageFromPC (Map params); + /** * 默认保存 * @@ -84,6 +88,8 @@ public interface ActUserRelationService extends BaseService + * 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.ActBannerDTO; +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.commons.tools.utils.Result; +import com.elink.esua.epdc.constant.ActStateConstant; +import com.elink.esua.epdc.modules.activity.dao.ActBannerDao; +import com.elink.esua.epdc.modules.activity.entity.ActBannerEntity; +import com.elink.esua.epdc.modules.activity.redis.ActBannerRedis; +import com.elink.esua.epdc.modules.activity.service.ActBannerService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 爱心互助活动banner 爱心互助活动banner + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-19 + */ +@Service +public class ActBannerServiceImpl extends BaseServiceImpl implements ActBannerService { + + @Autowired + private ActBannerRedis actBannerRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, ActBannerDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, ActBannerDTO.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 ActBannerDTO get(String id) { + ActBannerEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ActBannerDTO.class); + } + @Override + public Result grounding(String id) { + ActBannerEntity entity = baseDao.selectById(id); + ActBannerEntity updateEntity = new ActBannerEntity(); + updateEntity.setId(id); + updateEntity.setStatusTime(new Date()); + // 上架 + if (ActStateConstant.ACT_BANNER_STATUS_UNDERCARRIAGE.equals(entity.getStatus())) { + updateEntity.setStatus(ActStateConstant.ACT_BANNER_STATUS_GROUNDING); + updateById(updateEntity); + // 下架 + } else if (ActStateConstant.ACT_BANNER_STATUS_GROUNDING.equals(entity.getStatus())) { + updateEntity.setStatus(ActStateConstant.ACT_BANNER_STATUS_UNDERCARRIAGE); + updateById(updateEntity); + } + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ActBannerDTO dto) { + ActBannerEntity entity = ConvertUtils.sourceToTarget(dto, ActBannerEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ActBannerDTO dto) { + ActBannerEntity entity = ConvertUtils.sourceToTarget(dto, ActBannerEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ 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/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 9497e5efe..00f5d22b0 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 @@ -20,11 +20,15 @@ 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.ActInfoDTO; +import com.elink.esua.epdc.activity.form.ActInfoFormDTO; +import com.elink.esua.epdc.activity.result.ActInfoResultDTO; 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.commons.tools.utils.Result; +import com.elink.esua.epdc.constant.ActStateConstant; import com.elink.esua.epdc.modules.activity.dao.ActInfoDao; import com.elink.esua.epdc.modules.activity.entity.ActInfoEntity; import com.elink.esua.epdc.modules.activity.redis.ActInfoRedis; @@ -36,6 +40,7 @@ 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; @@ -59,6 +64,12 @@ public class ActInfoServiceImpl extends BaseServiceImpl getActInfoPageFromPC(Map params) { + IPage page = getPage(params); + List list = baseDao.getActInfoPageFromPC(params); + return new PageData<>(list, page.getTotal()); + } @Override public List list(Map params) { @@ -95,6 +106,22 @@ public class ActInfoServiceImpl extends BaseServiceImpl 0) { + return new Result().error("已过报名时间不可取消"); + } + ActInfoEntity updateEntity = new ActInfoEntity(); + updateEntity.setId(dto.getId()); + updateEntity.setCancelReason(dto.getCancelReason()); + updateEntity.setActStatus(ActStateConstant.ACT_INFO_STATUS_UNDERCARRIAGE); + updateById(updateEntity); + return new Result(); + } @Override @Transactional(rollbackFor = Exception.class) 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 6e28c55a0..82111f92b 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 @@ -21,11 +21,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.elink.esua.epdc.activity.ActUserLogDTO; import com.elink.esua.epdc.activity.ActUserRelationDTO; +import com.elink.esua.epdc.activity.form.ActUserRelationAuditFormDTO; +import com.elink.esua.epdc.activity.result.ActUserRelationResultDTO; import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; import com.elink.esua.epdc.commons.tools.constant.FieldConstant; import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.constant.ActStateConstant; import com.elink.esua.epdc.modules.activity.dao.ActUserRelationDao; import com.elink.esua.epdc.modules.activity.entity.ActUserRelationEntity; import com.elink.esua.epdc.modules.activity.redis.ActUserRelationRedis; @@ -64,6 +67,12 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl getActUserRelationPageFromPC(Map params) { + IPage page = getPage(params); + List list = baseDao.getActUserRelationPageFromPC(params); + return new PageData<>(list, page.getTotal()); + } @Override public List list(Map params) { @@ -100,6 +109,21 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file 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 b9fcdf147..53b9b9321 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 @@ -59,6 +59,7 @@ + @@ -74,6 +75,57 @@ + \ No newline at end of file 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 7beafb12a..3a2880e9c 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 @@ -25,6 +25,28 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file