From b2ca6017987ff4771f5b9ac182677cae8294c1b6 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 16 Nov 2021 14:17:56 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E5=BF=97=E6=84=BF=E8=80=85=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../esua/epdc/volunteer/VolunteerTeamDTO.java | 97 ++++++++++++++++ .../epdc/volunteer/VolunteerTeamTypeDTO.java | 86 +++++++++++++++ .../epdc/volunteer/VolunteerUnionDTO.java | 92 ++++++++++++++++ .../controller/VolunteerTeamController.java | 94 ++++++++++++++++ .../VolunteerTeamTypeController.java | 94 ++++++++++++++++ .../controller/VolunteerUnionController.java | 94 ++++++++++++++++ .../volunteer/dao/VolunteerTeamDao.java | 33 ++++++ .../volunteer/dao/VolunteerTeamTypeDao.java | 34 ++++++ .../volunteer/dao/VolunteerUnionDao.java | 34 ++++++ .../volunteer/entity/VolunteerTeamEntity.java | 63 +++++++++++ .../entity/VolunteerTeamTypeEntity.java | 82 ++++++++++++++ .../entity/VolunteerUnionEntity.java | 58 ++++++++++ .../volunteer/excel/VolunteerTeamExcel.java | 71 ++++++++++++ .../excel/VolunteerTeamTypeExcel.java | 65 +++++++++++ .../volunteer/excel/VolunteerUnionExcel.java | 68 ++++++++++++ .../volunteer/redis/VolunteerTeamRedis.java | 47 ++++++++ .../redis/VolunteerTeamTypeRedis.java | 47 ++++++++ .../volunteer/redis/VolunteerUnionRedis.java | 47 ++++++++ .../service/VolunteerTeamService.java | 96 ++++++++++++++++ .../service/VolunteerTeamTypeService.java | 96 ++++++++++++++++ .../service/VolunteerUnionService.java | 95 ++++++++++++++++ .../impl/VolunteerTeamServiceImpl.java | 104 ++++++++++++++++++ .../impl/VolunteerTeamTypeServiceImpl.java | 104 ++++++++++++++++++ .../impl/VolunteerUnionServiceImpl.java | 104 ++++++++++++++++++ .../mapper/volunteer/VolunteerTeamDao.xml | 22 ++++ .../mapper/volunteer/VolunteerTeamTypeDao.xml | 20 ++++ .../mapper/volunteer/VolunteerUnionDao.xml | 21 ++++ .../epdc/dto/VlounteerTeamRealationDTO.java | 92 ++++++++++++++++ .../esua/epdc/dto/VolunteerPioneerDTO.java | 97 ++++++++++++++++ .../VlounteerTeamRealationController.java | 94 ++++++++++++++++ .../VolunteerPioneerController.java | 94 ++++++++++++++++ .../epdc/dao/VlounteerTeamRealationDao.java | 33 ++++++ .../esua/epdc/dao/VolunteerPioneerDao.java | 33 ++++++ .../entity/VlounteerTeamRealationEntity.java | 61 ++++++++++ .../epdc/entity/VolunteerPioneerEntity.java | 66 +++++++++++ .../excel/VlounteerTeamRealationExcel.java | 68 ++++++++++++ .../epdc/excel/VolunteerPioneerExcel.java | 71 ++++++++++++ .../redis/VlounteerTeamRealationRedis.java | 47 ++++++++ .../epdc/redis/VolunteerPioneerRedis.java | 47 ++++++++ .../VlounteerTeamRealationService.java | 95 ++++++++++++++++ .../epdc/service/VolunteerPioneerService.java | 95 ++++++++++++++++ .../VlounteerTeamRealationServiceImpl.java | 104 ++++++++++++++++++ .../impl/VolunteerPioneerServiceImpl.java | 104 ++++++++++++++++++ .../mapper/VlounteerTeamRealationDao.xml | 21 ++++ .../resources/mapper/VolunteerPioneerDao.xml | 22 ++++ 45 files changed, 3112 insertions(+) create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamDTO.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamTypeDTO.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerUnionDTO.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerUnionController.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamEntity.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamTypeEntity.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerUnionEntity.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamExcel.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamTypeExcel.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerUnionExcel.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamRedis.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamTypeRedis.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerUnionRedis.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerUnionService.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamTypeServiceImpl.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml create mode 100644 esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerPioneerDTO.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VlounteerTeamRealationEntity.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerPioneerEntity.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VlounteerTeamRealationExcel.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VolunteerPioneerExcel.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VlounteerTeamRealationRedis.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VolunteerPioneerRedis.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamDTO.java new file mode 100644 index 00000000..ab8d73e6 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamDTO.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.volunteer; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 志愿团队 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VolunteerTeamDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 团队名称 + */ + private String teamName; + + /** + * 团队类别 + */ + private String teamType; + + /** + * 联系人 + */ + private String contacts; + + /** + * 联系电话 + */ + private String phone; + + /** + * 团队介绍 + */ + private String content; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 删除标识 + */ + private String delFlag; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamTypeDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamTypeDTO.java new file mode 100644 index 00000000..e9bc84e4 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamTypeDTO.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.volunteer; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 志愿团队类别 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VolunteerTeamTypeDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 标识号 + */ + private Long id; + + /** + * 类别名称 + */ + private String typeName; + + /** + * 类别编码 + */ + private String typeCode; + + /** + * 排序 + */ + private Integer sort; + + /** + * 启用标识 0-启用,1-未启用 + */ + private String bannerFlag; + + /** + * 删除标识 0:未删除 1:删除 + */ + private Integer delFlag; + + /** + * 创建者 + */ + private Long creator; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 更新者 + */ + private Long updater; + + /** + * 更新时间 + */ + private Date updateDate; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerUnionDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerUnionDTO.java new file mode 100644 index 00000000..3d349a8a --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerUnionDTO.java @@ -0,0 +1,92 @@ +/** + * 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.volunteer; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 共建联盟 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VolunteerUnionDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 联盟名称 + */ + private String unionName; + + /** + * 联系人 + */ + private String contacts; + + /** + * 联系电话 + */ + private String phone; + + /** + * 团队介绍 + */ + private String content; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 删除标识 + */ + private String delFlag; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java new file mode 100644 index 00000000..50462166 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java @@ -0,0 +1,94 @@ +/** + * 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.volunteer.controller; + +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.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.modules.volunteer.excel.VolunteerTeamExcel; +import com.elink.esua.epdc.modules.volunteer.service.VolunteerTeamService; +import com.elink.esua.epdc.volunteer.VolunteerTeamDTO; +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-11-16 + */ +@RestController +@RequestMapping("volunteerteam") +public class VolunteerTeamController { + + @Autowired + private VolunteerTeamService volunteerTeamService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = volunteerTeamService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + VolunteerTeamDTO data = volunteerTeamService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody VolunteerTeamDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + volunteerTeamService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody VolunteerTeamDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + volunteerTeamService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + volunteerTeamService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = volunteerTeamService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, VolunteerTeamExcel.class); + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java new file mode 100644 index 00000000..7de8f49f --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java @@ -0,0 +1,94 @@ +/** + * 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.volunteer.controller; + +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.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.modules.volunteer.excel.VolunteerTeamTypeExcel; +import com.elink.esua.epdc.modules.volunteer.service.VolunteerTeamTypeService; +import com.elink.esua.epdc.volunteer.VolunteerTeamTypeDTO; +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-11-16 + */ +@RestController +@RequestMapping("volunteerteamtype") +public class VolunteerTeamTypeController { + + @Autowired + private VolunteerTeamTypeService volunteerTeamTypeService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = volunteerTeamTypeService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + VolunteerTeamTypeDTO data = volunteerTeamTypeService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody VolunteerTeamTypeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + volunteerTeamTypeService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody VolunteerTeamTypeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + volunteerTeamTypeService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + volunteerTeamTypeService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = volunteerTeamTypeService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, VolunteerTeamTypeExcel.class); + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerUnionController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerUnionController.java new file mode 100644 index 00000000..5bb32efd --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerUnionController.java @@ -0,0 +1,94 @@ +/** + * 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.volunteer.controller; + +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.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.modules.volunteer.excel.VolunteerUnionExcel; +import com.elink.esua.epdc.modules.volunteer.service.VolunteerUnionService; +import com.elink.esua.epdc.volunteer.VolunteerUnionDTO; +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-11-16 + */ +@RestController +@RequestMapping("volunteerunion") +public class VolunteerUnionController { + + @Autowired + private VolunteerUnionService volunteerUnionService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = volunteerUnionService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + VolunteerUnionDTO data = volunteerUnionService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody VolunteerUnionDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + volunteerUnionService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody VolunteerUnionDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + volunteerUnionService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + volunteerUnionService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = volunteerUnionService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, VolunteerUnionExcel.class); + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java new file mode 100644 index 00000000..d12b4703 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.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.volunteer.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 志愿团队 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Mapper +public interface VolunteerTeamDao extends BaseDao { + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java new file mode 100644 index 00000000..9875a395 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java @@ -0,0 +1,34 @@ +/** + * 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.volunteer.dao; + + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamTypeEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 志愿团队类别 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Mapper +public interface VolunteerTeamTypeDao extends BaseDao { + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java new file mode 100644 index 00000000..69f8e8f0 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java @@ -0,0 +1,34 @@ +/** + * 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.volunteer.dao; + + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.modules.volunteer.entity.VolunteerUnionEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 共建联盟 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Mapper +public interface VolunteerUnionDao extends BaseDao { + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamEntity.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamEntity.java new file mode 100644 index 00000000..0804be3c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamEntity.java @@ -0,0 +1,63 @@ +/** + * 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.volunteer.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 志愿团队 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_volunteer_team") +public class VolunteerTeamEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 团队名称 + */ + private String teamName; + + /** + * 团队类别 + */ + private String teamType; + + /** + * 联系人 + */ + private String contacts; + + /** + * 联系电话 + */ + private String phone; + + /** + * 团队介绍 + */ + private String content; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamTypeEntity.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamTypeEntity.java new file mode 100644 index 00000000..08e633b6 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamTypeEntity.java @@ -0,0 +1,82 @@ +/** + * 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.volunteer.entity; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 志愿团队类别 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_volunteer_team_type") +public class VolunteerTeamTypeEntity extends BaseEntity { + + private static final long serialVersionUID = 1L; + + + /** + * 类别名称 + */ + private String typeName; + + /** + * 类别编码 + */ + private String typeCode; + + /** + * 排序 + */ + private Integer sort; + + /** + * 启用标识 0-启用,1-未启用 + */ + private String bannerFlag; + + /** + * 删除标识 0:未删除 1:删除 + */ + @TableField(fill = FieldFill.INSERT) + private Integer delFlag; + + + /** + * 更新者 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private Long updater; + + /** + * 更新时间 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date updateDate; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerUnionEntity.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerUnionEntity.java new file mode 100644 index 00000000..a212e02c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerUnionEntity.java @@ -0,0 +1,58 @@ +/** + * 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.volunteer.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 共建联盟 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_volunteer_union") +public class VolunteerUnionEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 联盟名称 + */ + private String unionName; + + /** + * 联系人 + */ + private String contacts; + + /** + * 联系电话 + */ + private String phone; + + /** + * 团队介绍 + */ + private String content; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamExcel.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamExcel.java new file mode 100644 index 00000000..c7831c71 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamExcel.java @@ -0,0 +1,71 @@ +/** + * 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.volunteer.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 志愿团队 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VolunteerTeamExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "团队名称") + private String teamName; + + @Excel(name = "团队类别") + private String teamType; + + @Excel(name = "联系人") + private String contacts; + + @Excel(name = "联系电话") + private String phone; + + @Excel(name = "团队介绍") + private String content; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "删除标识") + private String delFlag; + + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamTypeExcel.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamTypeExcel.java new file mode 100644 index 00000000..29896f31 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamTypeExcel.java @@ -0,0 +1,65 @@ +/** + * 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.volunteer.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 志愿团队类别 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VolunteerTeamTypeExcel { + + @Excel(name = "标识号") + private Long id; + + @Excel(name = "类别名称") + private String typeName; + + @Excel(name = "类别编码") + private String typeCode; + + @Excel(name = "排序") + private Integer sort; + + @Excel(name = "启用标识 0-启用,1-未启用") + private String bannerFlag; + + @Excel(name = "删除标识 0:未删除 1:删除") + private Integer delFlag; + + @Excel(name = "创建者") + private Long creator; + + @Excel(name = "创建时间") + private Date createDate; + + @Excel(name = "更新者") + private Long updater; + + @Excel(name = "更新时间") + private Date updateDate; + + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerUnionExcel.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerUnionExcel.java new file mode 100644 index 00000000..1e1a962d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerUnionExcel.java @@ -0,0 +1,68 @@ +/** + * 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.volunteer.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 共建联盟 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VolunteerUnionExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "联盟名称") + private String unionName; + + @Excel(name = "联系人") + private String contacts; + + @Excel(name = "联系电话") + private String phone; + + @Excel(name = "团队介绍") + private String content; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "删除标识") + private String delFlag; + + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamRedis.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamRedis.java new file mode 100644 index 00000000..1815e398 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamRedis.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.volunteer.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 志愿团队 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Component +public class VolunteerTeamRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamTypeRedis.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamTypeRedis.java new file mode 100644 index 00000000..f4fc9d3d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamTypeRedis.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.volunteer.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 志愿团队类别 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Component +public class VolunteerTeamTypeRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerUnionRedis.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerUnionRedis.java new file mode 100644 index 00000000..df10e76f --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerUnionRedis.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.volunteer.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 共建联盟 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Component +public class VolunteerUnionRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java new file mode 100644 index 00000000..0344ed1d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java @@ -0,0 +1,96 @@ +/** + * 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.volunteer.service; + + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity; +import com.elink.esua.epdc.volunteer.VolunteerTeamDTO; + +import java.util.List; +import java.util.Map; + +/** + * 志愿团队 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +public interface VolunteerTeamService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return VolunteerTeamDTO + * @author generator + * @date 2021-11-16 + */ + VolunteerTeamDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void save(VolunteerTeamDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void update(VolunteerTeamDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-16 + */ + void delete(String[] ids); +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java new file mode 100644 index 00000000..886e1b86 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java @@ -0,0 +1,96 @@ +/** + * 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.volunteer.service; + + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamTypeEntity; +import com.elink.esua.epdc.volunteer.VolunteerTeamTypeDTO; + +import java.util.List; +import java.util.Map; + +/** + * 志愿团队类别 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +public interface VolunteerTeamTypeService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return VolunteerTeamTypeDTO + * @author generator + * @date 2021-11-16 + */ + VolunteerTeamTypeDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void save(VolunteerTeamTypeDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void update(VolunteerTeamTypeDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-16 + */ + void delete(String[] ids); +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerUnionService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerUnionService.java new file mode 100644 index 00000000..105acd82 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerUnionService.java @@ -0,0 +1,95 @@ +/** + * 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.volunteer.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.modules.volunteer.entity.VolunteerUnionEntity; +import com.elink.esua.epdc.volunteer.VolunteerUnionDTO; + +import java.util.List; +import java.util.Map; + +/** + * 共建联盟 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +public interface VolunteerUnionService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return VolunteerUnionDTO + * @author generator + * @date 2021-11-16 + */ + VolunteerUnionDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void save(VolunteerUnionDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void update(VolunteerUnionDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-16 + */ + void delete(String[] ids); +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java new file mode 100644 index 00000000..3782df91 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.volunteer.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.modules.volunteer.dao.VolunteerTeamDao; +import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity; +import com.elink.esua.epdc.modules.volunteer.redis.VolunteerTeamRedis; +import com.elink.esua.epdc.modules.volunteer.service.VolunteerTeamService; +import com.elink.esua.epdc.volunteer.VolunteerTeamDTO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 志愿团队 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Service +public class VolunteerTeamServiceImpl extends BaseServiceImpl implements VolunteerTeamService { + + @Autowired + private VolunteerTeamRedis volunteerTeamRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, VolunteerTeamDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, VolunteerTeamDTO.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 VolunteerTeamDTO get(String id) { + VolunteerTeamEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, VolunteerTeamDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(VolunteerTeamDTO dto) { + VolunteerTeamEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerTeamEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(VolunteerTeamDTO dto) { + VolunteerTeamEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerTeamEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamTypeServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamTypeServiceImpl.java new file mode 100644 index 00000000..ebd10b76 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamTypeServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.volunteer.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.modules.volunteer.dao.VolunteerTeamTypeDao; +import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamTypeEntity; +import com.elink.esua.epdc.modules.volunteer.redis.VolunteerTeamTypeRedis; +import com.elink.esua.epdc.modules.volunteer.service.VolunteerTeamTypeService; +import com.elink.esua.epdc.volunteer.VolunteerTeamTypeDTO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 志愿团队类别 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Service +public class VolunteerTeamTypeServiceImpl extends BaseServiceImpl implements VolunteerTeamTypeService { + + @Autowired + private VolunteerTeamTypeRedis volunteerTeamTypeRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, "create_date", false), + getWrapper(params) + ); + return getPageData(page, VolunteerTeamTypeDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, VolunteerTeamTypeDTO.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 VolunteerTeamTypeDTO get(String id) { + VolunteerTeamTypeEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, VolunteerTeamTypeDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(VolunteerTeamTypeDTO dto) { + VolunteerTeamTypeEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerTeamTypeEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(VolunteerTeamTypeDTO dto) { + VolunteerTeamTypeEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerTeamTypeEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java new file mode 100644 index 00000000..e99370db --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.volunteer.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.modules.volunteer.dao.VolunteerUnionDao; +import com.elink.esua.epdc.modules.volunteer.entity.VolunteerUnionEntity; +import com.elink.esua.epdc.modules.volunteer.redis.VolunteerUnionRedis; +import com.elink.esua.epdc.modules.volunteer.service.VolunteerUnionService; +import com.elink.esua.epdc.volunteer.VolunteerUnionDTO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 共建联盟 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Service +public class VolunteerUnionServiceImpl extends BaseServiceImpl implements VolunteerUnionService { + + @Autowired + private VolunteerUnionRedis volunteerUnionRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, VolunteerUnionDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, VolunteerUnionDTO.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 VolunteerUnionDTO get(String id) { + VolunteerUnionEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, VolunteerUnionDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(VolunteerUnionDTO dto) { + VolunteerUnionEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerUnionEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(VolunteerUnionDTO dto) { + VolunteerUnionEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerUnionEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml new file mode 100644 index 00000000..c3f96316 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml new file mode 100644 index 00000000..aad526c4 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml new file mode 100644 index 00000000..8679a7f4 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java new file mode 100644 index 00000000..e8b2392a --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java @@ -0,0 +1,92 @@ +/** + * 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.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 志愿者-志愿团队关联表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VlounteerTeamRealationDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 志愿者id + */ + private String volunteerId; + + /** + * 团队id + */ + private String teamId; + + /** + * 团队名称 + */ + private String teamName; + + /** + * 团队类别 + */ + private String teamType; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 删除标识 + */ + private String delFlag; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerPioneerDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerPioneerDTO.java new file mode 100644 index 00000000..fb20793e --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerPioneerDTO.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.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 志愿先锋 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VolunteerPioneerDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 志愿者id + */ + private String volunteerId; + + /** + * 照片 + */ + private String imgUrl; + + /** + * 上下架标识 0-上架,1-下架 + */ + private String bannerFlag; + + /** + * 事迹描述 + */ + private String content; + + /** + * 排序 + */ + private Integer sort; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 删除标识 + */ + private String delFlag; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java new file mode 100644 index 00000000..d7f92fc1 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java @@ -0,0 +1,94 @@ +/** + * 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.controller; + +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.dto.VlounteerTeamRealationDTO; +import com.elink.esua.epdc.excel.VlounteerTeamRealationExcel; +import com.elink.esua.epdc.service.VlounteerTeamRealationService; +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-11-16 + */ +@RestController +@RequestMapping("vlounteerteamrealation") +public class VlounteerTeamRealationController { + + @Autowired + private VlounteerTeamRealationService vlounteerTeamRealationService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = vlounteerTeamRealationService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + VlounteerTeamRealationDTO data = vlounteerTeamRealationService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody VlounteerTeamRealationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + vlounteerTeamRealationService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody VlounteerTeamRealationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + vlounteerTeamRealationService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + vlounteerTeamRealationService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = vlounteerTeamRealationService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, VlounteerTeamRealationExcel.class); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java new file mode 100644 index 00000000..bc150f27 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java @@ -0,0 +1,94 @@ +/** + * 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.controller; + +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.dto.VolunteerPioneerDTO; +import com.elink.esua.epdc.excel.VolunteerPioneerExcel; +import com.elink.esua.epdc.service.VolunteerPioneerService; +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-11-16 + */ +@RestController +@RequestMapping("volunteerpioneer") +public class VolunteerPioneerController { + + @Autowired + private VolunteerPioneerService volunteerPioneerService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = volunteerPioneerService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + VolunteerPioneerDTO data = volunteerPioneerService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody VolunteerPioneerDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + volunteerPioneerService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody VolunteerPioneerDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + volunteerPioneerService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + volunteerPioneerService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = volunteerPioneerService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, VolunteerPioneerExcel.class); + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java new file mode 100644 index 00000000..9b5a016d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.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.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.entity.VlounteerTeamRealationEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 志愿者-志愿团队关联表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Mapper +public interface VlounteerTeamRealationDao extends BaseDao { + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.java new file mode 100644 index 00000000..7ac5c1ee --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.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.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.entity.VolunteerPioneerEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 志愿先锋 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Mapper +public interface VolunteerPioneerDao extends BaseDao { + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VlounteerTeamRealationEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VlounteerTeamRealationEntity.java new file mode 100644 index 00000000..6dc3866f --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VlounteerTeamRealationEntity.java @@ -0,0 +1,61 @@ +/** + * 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.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-11-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_vlounteer_team_realation") +public class VlounteerTeamRealationEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 志愿者id + */ + private String volunteerId; + + /** + * 团队id + */ + private String teamId; + + /** + * 团队名称 + */ + private String teamName; + + /** + * 团队类别 + */ + private String teamType; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerPioneerEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerPioneerEntity.java new file mode 100644 index 00000000..24844a88 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerPioneerEntity.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.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-11-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_volunteer_pioneer") +public class VolunteerPioneerEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 志愿者id + */ + private String volunteerId; + + /** + * 照片 + */ + private String imgUrl; + + /** + * 上下架标识 0-上架,1-下架 + */ + private String bannerFlag; + + /** + * 事迹描述 + */ + private String content; + + /** + * 排序 + */ + private Integer sort; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VlounteerTeamRealationExcel.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VlounteerTeamRealationExcel.java new file mode 100644 index 00000000..c325c244 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VlounteerTeamRealationExcel.java @@ -0,0 +1,68 @@ +/** + * 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.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 志愿者-志愿团队关联表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VlounteerTeamRealationExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "志愿者id") + private String volunteerId; + + @Excel(name = "团队id") + private String teamId; + + @Excel(name = "团队名称") + private String teamName; + + @Excel(name = "团队类别") + private String teamType; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "删除标识") + private String delFlag; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VolunteerPioneerExcel.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VolunteerPioneerExcel.java new file mode 100644 index 00000000..6a2b903c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VolunteerPioneerExcel.java @@ -0,0 +1,71 @@ +/** + * 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.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 志愿先锋 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VolunteerPioneerExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "志愿者id") + private String volunteerId; + + @Excel(name = "照片") + private String imgUrl; + + @Excel(name = "上下架标识 0-上架,1-下架") + private String bannerFlag; + + @Excel(name = "事迹描述") + private String content; + + @Excel(name = "排序") + private Integer sort; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "删除标识") + private String delFlag; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VlounteerTeamRealationRedis.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VlounteerTeamRealationRedis.java new file mode 100644 index 00000000..7a6ad55d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VlounteerTeamRealationRedis.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.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 志愿者-志愿团队关联表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Component +public class VlounteerTeamRealationRedis { + @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-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VolunteerPioneerRedis.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VolunteerPioneerRedis.java new file mode 100644 index 00000000..09de5a0c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VolunteerPioneerRedis.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.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 志愿先锋 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Component +public class VolunteerPioneerRedis { + @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-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java new file mode 100644 index 00000000..71f802f9 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java @@ -0,0 +1,95 @@ +/** + * 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.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.VlounteerTeamRealationDTO; +import com.elink.esua.epdc.entity.VlounteerTeamRealationEntity; + +import java.util.List; +import java.util.Map; + +/** + * 志愿者-志愿团队关联表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +public interface VlounteerTeamRealationService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return VlounteerTeamRealationDTO + * @author generator + * @date 2021-11-16 + */ + VlounteerTeamRealationDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void save(VlounteerTeamRealationDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void update(VlounteerTeamRealationDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-16 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java new file mode 100644 index 00000000..d166d6a3 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java @@ -0,0 +1,95 @@ +/** + * 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.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.VolunteerPioneerDTO; +import com.elink.esua.epdc.entity.VolunteerPioneerEntity; + +import java.util.List; +import java.util.Map; + +/** + * 志愿先锋 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +public interface VolunteerPioneerService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return VolunteerPioneerDTO + * @author generator + * @date 2021-11-16 + */ + VolunteerPioneerDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void save(VolunteerPioneerDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void update(VolunteerPioneerDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-16 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java new file mode 100644 index 00000000..7e0d86c5 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +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.dao.VlounteerTeamRealationDao; +import com.elink.esua.epdc.dto.VlounteerTeamRealationDTO; +import com.elink.esua.epdc.entity.VlounteerTeamRealationEntity; +import com.elink.esua.epdc.redis.VlounteerTeamRealationRedis; +import com.elink.esua.epdc.service.VlounteerTeamRealationService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 志愿者-志愿团队关联表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Service +public class VlounteerTeamRealationServiceImpl extends BaseServiceImpl implements VlounteerTeamRealationService { + + @Autowired + private VlounteerTeamRealationRedis vlounteerTeamRealationRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, VlounteerTeamRealationDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, VlounteerTeamRealationDTO.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 VlounteerTeamRealationDTO get(String id) { + VlounteerTeamRealationEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, VlounteerTeamRealationDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(VlounteerTeamRealationDTO dto) { + VlounteerTeamRealationEntity entity = ConvertUtils.sourceToTarget(dto, VlounteerTeamRealationEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(VlounteerTeamRealationDTO dto) { + VlounteerTeamRealationEntity entity = ConvertUtils.sourceToTarget(dto, VlounteerTeamRealationEntity.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-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java new file mode 100644 index 00000000..87e8cf71 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +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.dao.VolunteerPioneerDao; +import com.elink.esua.epdc.dto.VolunteerPioneerDTO; +import com.elink.esua.epdc.entity.VolunteerPioneerEntity; +import com.elink.esua.epdc.redis.VolunteerPioneerRedis; +import com.elink.esua.epdc.service.VolunteerPioneerService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 志愿先锋 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Service +public class VolunteerPioneerServiceImpl extends BaseServiceImpl implements VolunteerPioneerService { + + @Autowired + private VolunteerPioneerRedis volunteerPioneerRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, VolunteerPioneerDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, VolunteerPioneerDTO.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 VolunteerPioneerDTO get(String id) { + VolunteerPioneerEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, VolunteerPioneerDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(VolunteerPioneerDTO dto) { + VolunteerPioneerEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerPioneerEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(VolunteerPioneerDTO dto) { + VolunteerPioneerEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerPioneerEntity.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-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml new file mode 100644 index 00000000..380bc1b6 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml new file mode 100644 index 00000000..441bfdaa --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 4847e1d0aad4693f86257434eb15e0f3cd0b64fe Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 16 Nov 2021 15:45:59 +0800 Subject: [PATCH 02/13] =?UTF-8?q?=E5=85=B1=E5=BB=BA=E8=81=94=E7=9B=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/volunteer/dao/VolunteerUnionDao.java | 5 +++++ .../service/impl/VolunteerUnionServiceImpl.java | 13 ++++++++----- .../mapper/volunteer/VolunteerUnionDao.xml | 15 +++++++++++++++ 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java index 69f8e8f0..08c77711 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java @@ -20,8 +20,12 @@ package com.elink.esua.epdc.modules.volunteer.dao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; import com.elink.esua.epdc.modules.volunteer.entity.VolunteerUnionEntity; +import com.elink.esua.epdc.volunteer.VolunteerUnionDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; +import java.util.Map; + /** * 共建联盟 * @@ -31,4 +35,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface VolunteerUnionDao extends BaseDao { + List getPageList(Map params); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java index e99370db..4181b683 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java @@ -51,11 +51,14 @@ public class VolunteerUnionServiceImpl extends BaseServiceImpl page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, VolunteerUnionDTO.class); +// IPage page = baseDao.selectPage( +// getPage(params, FieldConstant.CREATED_TIME, false), +// getWrapper(params) +// ); +// return getPageData(page, VolunteerUnionDTO.class); + IPage page = getPage(params); + List list = baseDao.getPageList(params); + return new PageData<>(list, page.getTotal()); } @Override diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml index 8679a7f4..5347d71d 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml @@ -16,6 +16,21 @@ + From e29f3ad03ab04eb43db6b466dcc5a68c38b8cd45 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 16 Nov 2021 17:42:17 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E5=BF=97=E6=84=BF=E5=85=88=E9=94=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../esua/epdc/dto/VolunteerPioneerDTO.java | 5 +++ .../controller/VolunteerInfoController.java | 13 +++++++ .../VolunteerPioneerController.java | 19 ++++++++-- .../elink/esua/epdc/dao/VolunteerInfoDao.java | 9 +++++ .../esua/epdc/dao/VolunteerPioneerDao.java | 19 ++++++++-- .../epdc/service/VolunteerInfoService.java | 9 +++++ .../epdc/service/VolunteerPioneerService.java | 12 ++++++- .../impl/VolunteerInfoServiceImpl.java | 8 +++++ .../impl/VolunteerPioneerServiceImpl.java | 35 ++++++++++++++----- .../resources/mapper/VolunteerInfoDao.xml | 14 ++++++++ .../resources/mapper/VolunteerPioneerDao.xml | 19 +++++++++- 11 files changed, 147 insertions(+), 15 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerPioneerDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerPioneerDTO.java index fb20793e..2eab79f5 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerPioneerDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerPioneerDTO.java @@ -39,6 +39,11 @@ public class VolunteerPioneerDTO implements Serializable { */ private String id; + /** + * 姓名 + */ + private String realName; + /** * 志愿者id */ diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java index 04654fab..d35ec90d 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java @@ -271,5 +271,18 @@ public class VolunteerInfoController { return volunteerInfoService.handleVolunteerPoints(formDTO); } + /** + * @describe: 志愿先锋模块获取志愿者列表 + * @author wangtong + * @date 2021/11/16 16:19 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + @GetMapping("getVolunteerListForPionner") + public Result> getVolunteerListForPionner(@RequestParam Map params) { + PageData page = volunteerInfoService.getVolunteerListForPionner(params); + return new Result>().ok(page); + } + } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java index bc150f27..d53c6737 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java @@ -23,8 +23,9 @@ 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.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.NoticeDTO; import com.elink.esua.epdc.dto.VolunteerPioneerDTO; import com.elink.esua.epdc.excel.VolunteerPioneerExcel; import com.elink.esua.epdc.service.VolunteerPioneerService; @@ -45,7 +46,7 @@ import java.util.Map; @RestController @RequestMapping("volunteerpioneer") public class VolunteerPioneerController { - + @Autowired private VolunteerPioneerService volunteerPioneerService; @@ -91,4 +92,16 @@ public class VolunteerPioneerController { ExcelUtils.exportExcelToTarget(response, null, list, VolunteerPioneerExcel.class); } -} \ No newline at end of file + /** + * @describe: 志愿先锋 上下架 + * @author wangtong + * @date 2021/11/16 17:36 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @PutMapping("handleIsUpDown") + public Result handleIsUpDown(@RequestBody VolunteerPioneerDTO dto) { + return volunteerPioneerService.handleIsUpDown(dto); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java index 2888fcf5..db20d2c7 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java @@ -177,4 +177,13 @@ public interface VolunteerInfoDao extends BaseDao { * @return java.util.List **/ List selectListOfOrganizationInfo(String deptId); + + /** + * @describe: 志愿先锋模块获取志愿者列表 + * @author wangtong + * @date 2021/11/16 16:19 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + List getUserListForVolunteerOrg(Map params); } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.java index 7ac5c1ee..039d46ca 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.java @@ -18,8 +18,13 @@ package com.elink.esua.epdc.dao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.VolunteerPioneerDTO; import com.elink.esua.epdc.entity.VolunteerPioneerEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; /** * 志愿先锋 @@ -29,5 +34,15 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface VolunteerPioneerDao extends BaseDao { - -} \ No newline at end of file + + List getPageList(Map params); + + /** + * @describe: 通过id查询详情 + * @author wangtong + * @date 2021/11/16 17:12 + * @params [id] + * @return com.elink.esua.epdc.dto.VolunteerPioneerDTO + */ + VolunteerPioneerDTO selectDetailById(@Param("id") String id); +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java index a781fb83..d3da3a84 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java @@ -270,4 +270,13 @@ public interface VolunteerInfoService extends BaseService { * @Date 2019/12/13 15:10 **/ Result handleVolunteerPoints(EpdcVolunteerPointsFormDTO formDTO); + + /** + * @describe: 志愿先锋模块获取志愿者列表 + * @author wangtong + * @date 2021/11/16 16:19 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + PageData getVolunteerListForPionner(Map params); } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java index d166d6a3..a7873839 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java @@ -19,6 +19,7 @@ package com.elink.esua.epdc.service; import com.elink.esua.epdc.commons.mybatis.service.BaseService; import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.VolunteerPioneerDTO; import com.elink.esua.epdc.entity.VolunteerPioneerEntity; @@ -92,4 +93,13 @@ public interface VolunteerPioneerService extends BaseService getVolunteerListForPionner(Map params) { + IPage page = getPage(params); + //查询 + List list = baseDao.getUserListForVolunteerOrg(params); + return getPageData(list, page.getTotal(), VolunteerInfoDTO.class); + } + /** * 组织机构信息处理 * diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java index 87e8cf71..4a470b50 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java @@ -23,6 +23,7 @@ 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.dao.VolunteerPioneerDao; import com.elink.esua.epdc.dto.VolunteerPioneerDTO; import com.elink.esua.epdc.entity.VolunteerPioneerEntity; @@ -51,11 +52,14 @@ public class VolunteerPioneerServiceImpl extends BaseServiceImpl page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, VolunteerPioneerDTO.class); +// IPage page = baseDao.selectPage( +// getPage(params, FieldConstant.CREATED_TIME, false), +// getWrapper(params) +// ); +// return getPageData(page, VolunteerPioneerDTO.class); + IPage page = getPage(params); + List list = baseDao.getPageList(params); + return new PageData<>(list, page.getTotal()); } @Override @@ -76,14 +80,14 @@ public class VolunteerPioneerServiceImpl extends BaseServiceImpl + diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml index 441bfdaa..c194059e 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml @@ -17,6 +17,23 @@ + + - \ No newline at end of file + From ded04f15783a60229744468d85e4bc48e461652f Mon Sep 17 00:00:00 2001 From: Jackwang Date: Thu, 18 Nov 2021 10:47:41 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E5=BF=97=E6=84=BF=E5=9B=A2=E9=98=9F?= =?UTF-8?q?=E7=B1=BB=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/VolunteerTeamTypeServiceImpl.java | 52 ++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamTypeServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamTypeServiceImpl.java index ebd10b76..339b49c6 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamTypeServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamTypeServiceImpl.java @@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.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.modules.volunteer.dao.VolunteerTeamTypeDao; @@ -52,7 +53,7 @@ public class VolunteerTeamTypeServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( - getPage(params, "create_date", false), + getPage(params, "sort", true), getWrapper(params) ); return getPageData(page, VolunteerTeamTypeDTO.class); @@ -83,13 +84,62 @@ public class VolunteerTeamTypeServiceImpl extends BaseServiceImpl 0) { + throw new RenException("您输入的编码已存在"); + } + } + + String categoryName = dto.getTypeName(); + if (StringUtils.isNotBlank(categoryName)) { + if (getNameCount(dto) > 0) { + throw new RenException("您输入的名称已存在"); + } + } + VolunteerTeamTypeEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerTeamTypeEntity.class); insert(entity); } + public Integer getCodeCount(VolunteerTeamTypeDTO dto) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq("type_code", dto.getTypeCode()); + wrapper.eq("del_flag", "0"); + if(null != dto.getId()){ + wrapper.ne("id", dto.getId()); + } + return baseDao.selectCount(wrapper); + } + + public Integer getNameCount(VolunteerTeamTypeDTO dto) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq("type_name", dto.getTypeName()); + wrapper.eq("del_flag", "0"); + if(null != dto.getId()){ + wrapper.ne("id", dto.getId()); + } + return baseDao.selectCount(wrapper); + } + @Override @Transactional(rollbackFor = Exception.class) public void update(VolunteerTeamTypeDTO dto) { + + String categoryCode = dto.getTypeCode(); + if (StringUtils.isNotBlank(categoryCode)) { + if (getCodeCount(dto) > 0) { + throw new RenException("您输入的编码已存在"); + } + } + + String categoryName = dto.getTypeName(); + if (StringUtils.isNotBlank(categoryName)) { + if (getNameCount(dto) > 0) { + throw new RenException("您输入的名称已存在"); + } + } + VolunteerTeamTypeEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerTeamTypeEntity.class); updateById(entity); } From 216df9bb89ddccee91723bf6f5c9db8014defd28 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Thu, 18 Nov 2021 15:48:06 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=85=B3=E8=81=94?= =?UTF-8?q?=E5=BF=97=E6=84=BF=E5=9B=A2=E9=98=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../elink/esua/epdc/activity/ActInfoDTO.java | 15 ++++++++++++ .../esua/epdc/volunteer/VolunteerTeamDTO.java | 5 ++++ .../activity/entity/ActInfoEntity.java | 5 ++++ .../service/impl/ActInfoServiceImpl.java | 14 ++++++++++- .../controller/VolunteerTeamController.java | 14 ++++++++++- .../VolunteerTeamTypeController.java | 12 ++++++++++ .../volunteer/dao/VolunteerTeamDao.java | 14 +++++++++++ .../volunteer/dao/VolunteerTeamTypeDao.java | 10 ++++++++ .../service/VolunteerTeamService.java | 12 ++++++++++ .../service/VolunteerTeamTypeService.java | 10 ++++++++ .../impl/VolunteerTeamServiceImpl.java | 16 +++++++++++++ .../impl/VolunteerTeamTypeServiceImpl.java | 7 ++++++ .../mapper/volunteer/VolunteerTeamDao.xml | 23 +++++++++++++++++++ .../mapper/volunteer/VolunteerTeamTypeDao.xml | 6 +++++ 14 files changed, 161 insertions(+), 2 deletions(-) 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 3a26152b..2502dfe8 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 @@ -50,6 +50,21 @@ public class ActInfoDTO implements Serializable { */ private String headPic; + /** + * 志愿团队类型 + */ + private String teamType; + + /** + * 志愿团队id + */ + private String teamId; + + /** + * 志愿团队名称 + */ + private String teamName; + /** * 报名开始时间 */ diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamDTO.java index ab8d73e6..0133b9df 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamDTO.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamDTO.java @@ -49,6 +49,11 @@ public class VolunteerTeamDTO implements Serializable { */ private String teamType; + /** + * 类别名称 + */ + private String typeName; + /** * 联系人 */ 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 f8b62ada..00a4b459 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 @@ -83,6 +83,11 @@ public class ActInfoEntity extends BaseEpdcEntity { */ private String actAddress; + /** + * 志愿团队id + */ + private String teamId; + /** * 默认状态 */ 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 6df03a80..befdfa4d 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 @@ -52,7 +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.*; +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.service.ActBannerService; import com.elink.esua.epdc.modules.activity.service.ActInfoService; import com.elink.esua.epdc.modules.activity.service.ActPeriodService; @@ -63,6 +66,8 @@ import com.elink.esua.epdc.modules.feign.ContentSecurityFeignClient; import com.elink.esua.epdc.modules.feign.JobFeignClient; import com.elink.esua.epdc.modules.feign.UserInfoFeignClient; import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO; +import com.elink.esua.epdc.modules.volunteer.dao.VolunteerTeamDao; +import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -102,6 +107,8 @@ public class ActInfoServiceImpl extends BaseServiceImpl periods = actPeriodService.listOfActPeriodsByActId(id); ActInfoDTO dto = ConvertUtils.sourceToTarget(entity, ActInfoDTO.class); dto.setPeriods(periods); + if(StringUtils.isNotBlank(dto.getTeamId())){ + VolunteerTeamEntity volunteerTeamEntity = volunteerTeamDao.selectById(dto.getTeamId()); + dto.setTeamType(volunteerTeamEntity.getTeamType()); + dto.setTeamName(volunteerTeamEntity.getTeamName()); + } return dto; } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java index 50462166..54b79ab0 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java @@ -51,7 +51,7 @@ public class VolunteerTeamController { @GetMapping("page") public Result> page(@RequestParam Map params){ - PageData page = volunteerTeamService.page(params); + PageData page = volunteerTeamService.getPageList(params); return new Result>().ok(page); } @@ -91,4 +91,16 @@ public class VolunteerTeamController { ExcelUtils.exportExcelToTarget(response, null, list, VolunteerTeamExcel.class); } + /** + * @describe: 通过团队类别获取团队列表 + * @author wangtong + * @date 2021/11/18 14:47 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getTeamListByType") + public Result getTeamListByType(@RequestParam Map params){ + return volunteerTeamService.getTeamListByType(params); + } + } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java index 7de8f49f..62ec56b5 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java @@ -91,4 +91,16 @@ public class VolunteerTeamTypeController { ExcelUtils.exportExcelToTarget(response, null, list, VolunteerTeamTypeExcel.class); } + /** + * @describe: 查询所有志愿团队类别 + * @author wangtong + * @date 2021/11/18 10:55 + * @params [] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getTeamTypeList") + public Result getTeamTypeList(){ + return volunteerTeamTypeService.getTeamTypeList(); + } + } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java index d12b4703..b2b92f45 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java @@ -19,8 +19,12 @@ package com.elink.esua.epdc.modules.volunteer.dao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity; +import com.elink.esua.epdc.volunteer.VolunteerTeamDTO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; +import java.util.Map; + /** * 志愿团队 * @@ -30,4 +34,14 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface VolunteerTeamDao extends BaseDao { + List getPageList(Map params); + + /** + * @describe: 通过团队类别获取团队列表 + * @author wangtong + * @date 2021/11/18 14:47 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + List getTeamListByType(Map params); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java index 9875a395..e0abfa96 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java @@ -22,6 +22,8 @@ import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamTypeEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 志愿团队类别 * @@ -31,4 +33,12 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface VolunteerTeamTypeDao extends BaseDao { + /** + * @describe: 查询所有志愿团队类别 + * @author wangtong + * @date 2021/11/18 10:55 + * @params [] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + List getTeamTypeList(); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java index 0344ed1d..8e33907c 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java @@ -20,6 +20,7 @@ package com.elink.esua.epdc.modules.volunteer.service; 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.volunteer.entity.VolunteerTeamEntity; import com.elink.esua.epdc.volunteer.VolunteerTeamDTO; @@ -93,4 +94,15 @@ public interface VolunteerTeamService extends BaseService { * @date 2021-11-16 */ void delete(String[] ids); + + PageData getPageList(Map params); + + /** + * @describe: 通过团队类别获取团队列表 + * @author wangtong + * @date 2021/11/18 14:47 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getTeamListByType(Map params); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java index 886e1b86..925d779a 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java @@ -20,6 +20,7 @@ package com.elink.esua.epdc.modules.volunteer.service; 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.volunteer.entity.VolunteerTeamTypeEntity; import com.elink.esua.epdc.volunteer.VolunteerTeamTypeDTO; @@ -93,4 +94,13 @@ public interface VolunteerTeamTypeService extends BaseService getPageList(Map params) { + IPage page = getPage(params); + List list = baseDao.getPageList(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public Result getTeamListByType(Map params) { + List list = baseDao.getTeamListByType(params); + return new Result().ok(list); + } + @Override public List list(Map params) { List entityList = baseDao.selectList(getWrapper(params)); @@ -101,4 +115,6 @@ public class VolunteerTeamServiceImpl extends BaseServiceImpl result = baseDao.getTeamTypeList(); + return new Result().ok(result); + } + } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml index c3f96316..e7b4a031 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml @@ -17,6 +17,29 @@ + + diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml index aad526c4..22068baa 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml @@ -15,6 +15,12 @@ + From 7037ced5a61beb55ae82db2fe9000788d68ac48d Mon Sep 17 00:00:00 2001 From: Jackwang Date: Thu, 18 Nov 2021 17:20:25 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E5=9B=A2=E9=98=9F=E6=88=90=E5=91=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epdc/dto/VlounteerTeamRealationDTO.java | 10 +++++++ .../VlounteerTeamRealationController.java | 21 ++++++++++++--- .../epdc/dao/VlounteerTeamRealationDao.java | 19 +++++++++++-- .../VlounteerTeamRealationService.java | 14 +++++++++- .../VlounteerTeamRealationServiceImpl.java | 23 ++++++++++++++-- .../mapper/VlounteerTeamRealationDao.xml | 27 ++++++++++++++++++- 6 files changed, 105 insertions(+), 9 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java index e8b2392a..77625dcf 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java @@ -59,6 +59,16 @@ public class VlounteerTeamRealationDTO implements Serializable { */ private String teamType; + /** + * 成员姓名 + */ + private String realName; + + /** + * 手机号 + */ + private String mobile; + /** * 乐观锁 */ diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java index d7f92fc1..60216194 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java @@ -23,9 +23,10 @@ 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.commons.tools.validator.group.UpdateGroup; import com.elink.esua.epdc.dto.VlounteerTeamRealationDTO; +import com.elink.esua.epdc.dto.VolunteerInfoDTO; import com.elink.esua.epdc.excel.VlounteerTeamRealationExcel; import com.elink.esua.epdc.service.VlounteerTeamRealationService; import org.springframework.beans.factory.annotation.Autowired; @@ -45,7 +46,7 @@ import java.util.Map; @RestController @RequestMapping("vlounteerteamrealation") public class VlounteerTeamRealationController { - + @Autowired private VlounteerTeamRealationService vlounteerTeamRealationService; @@ -91,4 +92,18 @@ public class VlounteerTeamRealationController { ExcelUtils.exportExcelToTarget(response, null, list, VlounteerTeamRealationExcel.class); } -} \ No newline at end of file + + /** + * @describe: 通过志愿团队id获取志愿者信息 + * @author wangtong + * @date 2021/11/18 16:26 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + @GetMapping("getVolunteerListByTeamId") + public Result> getVolunteerListByTeamId(@RequestParam Map params) { + PageData page = vlounteerTeamRealationService.getVolunteerListByTeamId(params); + return new Result>().ok(page); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java index 9b5a016d..dd35052c 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java @@ -18,9 +18,14 @@ package com.elink.esua.epdc.dao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.VlounteerTeamRealationDTO; import com.elink.esua.epdc.entity.VlounteerTeamRealationEntity; +import com.elink.esua.epdc.entity.VolunteerInfoEntity; import org.apache.ibatis.annotations.Mapper; +import java.util.List; +import java.util.Map; + /** * 志愿者-志愿团队关联表 * @@ -29,5 +34,15 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface VlounteerTeamRealationDao extends BaseDao { - -} \ No newline at end of file + + List getPageList(Map params); + + /** + * @describe: 通过志愿团队id获取志愿者信息 + * @author wangtong + * @date 2021/11/18 16:26 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + List getVolunteerListByTeamId(Map params); +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java index 71f802f9..6ec5891d 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java @@ -20,6 +20,7 @@ package com.elink.esua.epdc.service; import com.elink.esua.epdc.commons.mybatis.service.BaseService; import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.dto.VlounteerTeamRealationDTO; +import com.elink.esua.epdc.dto.VolunteerInfoDTO; import com.elink.esua.epdc.entity.VlounteerTeamRealationEntity; import java.util.List; @@ -92,4 +93,15 @@ public interface VlounteerTeamRealationService extends BaseService getPageList(Map params); + + /** + * @describe: 通过志愿团队id获取志愿者信息 + * @author wangtong + * @date 2021/11/18 16:26 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + PageData getVolunteerListByTeamId(Map params); +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java index 7e0d86c5..909868ae 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java @@ -20,12 +20,14 @@ package com.elink.esua.epdc.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; -import com.elink.esua.epdc.commons.tools.constant.FieldConstant; import com.elink.esua.epdc.dao.VlounteerTeamRealationDao; import com.elink.esua.epdc.dto.VlounteerTeamRealationDTO; +import com.elink.esua.epdc.dto.VolunteerInfoDTO; import com.elink.esua.epdc.entity.VlounteerTeamRealationEntity; +import com.elink.esua.epdc.entity.VolunteerInfoEntity; import com.elink.esua.epdc.redis.VlounteerTeamRealationRedis; import com.elink.esua.epdc.service.VlounteerTeamRealationService; import org.apache.commons.lang3.StringUtils; @@ -58,6 +60,21 @@ public class VlounteerTeamRealationServiceImpl extends BaseServiceImpl getPageList(Map params) { + IPage page = getPage(params); + List list = baseDao.getPageList(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public PageData getVolunteerListByTeamId(Map params) { + IPage page = getPage(params); + //查询 + List list = baseDao.getVolunteerListByTeamId(params); + return getPageData(list, page.getTotal(), VolunteerInfoDTO.class); + } + @Override public List list(Map params) { List entityList = baseDao.selectList(getWrapper(params)); @@ -101,4 +118,6 @@ public class VlounteerTeamRealationServiceImpl extends BaseServiceImpl + + - \ No newline at end of file + + From 6042f4ad8880090970522d6d77699db981ef0481 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Mon, 22 Nov 2021 18:03:21 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E5=BF=97=E6=84=BF=E8=80=85=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ApiVolunteerRankController.java | 118 +++++++++++++++++- .../esua/epdc/feign/ActInfoFeignClient.java | 50 ++++++++ .../esua/epdc/feign/UserFeignClient.java | 40 ++++++ .../fallback/ActInfoFeignClientFallback.java | 26 ++++ .../fallback/UserFeignClientFallback.java | 20 +++ .../epdc/service/AppVolunteerRankService.java | 83 ++++++++++++ .../impl/AppVolunteerRankServiceImpl.java | 58 ++++++++- .../epdc/activity/form/ActInfoAppFormDTO.java | 5 + .../modules/feign/UserInfoFeignClient.java | 11 ++ .../fallback/UserInfoFeignClientFallback.java | 7 ++ .../controller/VolunteerTeamController.java | 25 ++++ .../controller/VolunteerUnionController.java | 25 ++++ .../volunteer/dao/VolunteerTeamDao.java | 20 +++ .../volunteer/dao/VolunteerUnionDao.java | 10 ++ .../service/VolunteerTeamService.java | 19 +++ .../service/VolunteerUnionService.java | 20 +++ .../impl/VolunteerTeamServiceImpl.java | 30 +++++ .../impl/VolunteerUnionServiceImpl.java | 17 +++ .../resources/mapper/activity/ActInfoDao.xml | 3 + .../mapper/volunteer/VolunteerTeamDao.xml | 17 +++ .../mapper/volunteer/VolunteerTeamTypeDao.xml | 1 + .../mapper/volunteer/VolunteerUnionDao.xml | 8 ++ .../esua/epdc/dto/TeamVolunteerListDTO.java | 25 ++++ .../epdc/dto/VlounteerTeamRealationDTO.java | 19 --- .../epdc/dto/VolunteerDetailResultDTO.java | 43 +++++++ .../esua/epdc/dto/VolunteerTeamFormDTO.java | 32 +++++ .../esua/epdc/dto/VolunteerUnionFormDTO.java | 39 ++++++ .../EpdcCompleteVolunteerInfoFormDTO.java | 5 + .../EpdcCompleteVolunteerInfoV2FormDTO.java | 5 + .../VlounteerTeamRealationController.java | 39 +++++- .../VolunteerPioneerController.java | 27 +++- .../epdc/dao/VlounteerTeamRealationDao.java | 29 ++++- .../esua/epdc/dao/VolunteerPioneerDao.java | 10 ++ .../entity/VlounteerTeamRealationEntity.java | 14 +-- .../esua/epdc/entity/VolunteerInfoEntity.java | 5 + .../VlounteerTeamRealationService.java | 31 ++++- .../epdc/service/VolunteerPioneerService.java | 19 +++ .../VlounteerTeamRealationServiceImpl.java | 31 ++++- .../impl/VolunteerPioneerServiceImpl.java | 17 ++- .../mapper/VlounteerTeamRealationDao.xml | 27 ++++ .../resources/mapper/VolunteerPioneerDao.xml | 9 ++ 41 files changed, 994 insertions(+), 45 deletions(-) create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/TeamVolunteerListDTO.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerDetailResultDTO.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerTeamFormDTO.java create mode 100644 esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerUnionFormDTO.java diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiVolunteerRankController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiVolunteerRankController.java index 97874a24..1cd1c452 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiVolunteerRankController.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiVolunteerRankController.java @@ -1,16 +1,19 @@ package com.elink.esua.epdc.controller; +import com.elink.esua.epdc.common.token.dto.TokenDto; +import com.elink.esua.epdc.commons.tools.annotation.LoginUser; import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.dto.VolunteerPioneerDTO; +import com.elink.esua.epdc.dto.VolunteerTeamFormDTO; +import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.dto.form.EpdcAppVolunteerRankFormDTO; import com.elink.esua.epdc.dto.result.EpdcAppVolunteerRankDTO; import com.elink.esua.epdc.service.AppVolunteerRankService; import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -39,7 +42,116 @@ public class ApiVolunteerRankController { Result> data = appVolunteerRankService.leaderboard(formDto); List list2 = ConvertUtils.sourceToTarget(data.getData(), EpdcAppVolunteerRankDTO.class); return new Result().ok(list2); + } + + /** + * @describe: 小程序-志愿先锋-列表 + * @author wangtong + * @date 2021/11/22 10:41 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + @GetMapping("getVolunteerPioneerList") + public Result> getVolunteerPioneerList( VolunteerTeamFormDTO dto){ + return appVolunteerRankService.getVolunteerPioneerList(dto); + } + + /** + * @describe: 小程序-志愿先锋-详情 + * @author wangtong + * @date 2021/11/22 10:54 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + @GetMapping("getVolunteerPioneerDetail") + public Result getVolunteerPioneerDetail( VolunteerTeamFormDTO dto){ + return appVolunteerRankService.getVolunteerPioneerDetail(dto); + } + + /** + * @describe: 小程序-共建联盟-列表 + * @author wangtong + * @date 2021/11/22 11:06 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getVolunteerUnionList") + public Result getVolunteerUnionList( VolunteerUnionFormDTO dto){ + return appVolunteerRankService.getVolunteerUnionList(dto); + } + + /** + * @describe: 小程序-共建联盟-详情 + * @author wangtong + * @date 2021/11/22 11:12 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getVolunteerUnionDetail") + public Result getVolunteerUnionDetail(VolunteerUnionFormDTO dto){ + return appVolunteerRankService.getVolunteerUnionDetail(dto); + } + + /** + * @describe: 查询所有志愿团队类别 + * @author wangtong + * @date 2021/11/18 10:55 + * @params [] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getTeamTypeList") + public Result getTeamTypeList(){ + return appVolunteerRankService.getTeamTypeList(); + } + + + /** + * @describe: 小程序-志愿团队-列表 + * @author wangtong + * @date 2021/11/22 14:45 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getAppTeamListByType") + public Result getAppTeamListByType( VolunteerUnionFormDTO dto){ + return appVolunteerRankService.getAppTeamListByType(dto); + } + + /** + * @describe: 志愿团队-详情 + * @author wangtong + * @date 2021/11/22 15:19 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getAppTeamDetail") + public Result getAppTeamDetail(@LoginUser TokenDto userDetail, VolunteerUnionFormDTO dto){ + return appVolunteerRankService.getAppTeamDetail(userDetail,dto); + } + /** + * @describe: 小程序-志愿团队-详情-成员列表 + * @author wangtong + * @date 2021/11/22 16:13 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getTeamVolunteerList") + public Result getTeamVolunteerList(VolunteerTeamFormDTO dto) { + return appVolunteerRankService.getTeamVolunteerList(dto); } + /** + * @describe: 小程序-志愿团队-加入团队 + * @author wangtong + * @date 2021/11/22 16:22 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @PostMapping("joinTeam") + public Result joinTeam(@RequestBody VolunteerTeamFormDTO dto) { + return appVolunteerRankService.joinTeam(dto); + } + + } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java index 618dba24..12743ebd 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java @@ -6,6 +6,7 @@ import com.elink.esua.epdc.activity.result.*; import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.config.FeignRequestInterceptor; +import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.feign.fallback.ActInfoFeignClientFallback; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.http.MediaType; @@ -140,4 +141,53 @@ public interface ActInfoFeignClient { @PostMapping(value ="heart/epdc-app/actsigninqrcode/signin", consumes = MediaType.APPLICATION_JSON_VALUE) Result scanSignIn(ActSignInFormDTO formDto); + /** + * @describe: 小程序-共建联盟-列表 + * @author wangtong + * @date 2021/11/22 11:06 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping(value ="heart/volunteerunion/getVolunteerUnionList", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getVolunteerUnionList(VolunteerUnionFormDTO formDto); + + /** + * @describe: 小程序-共建联盟-详情 + * @author wangtong + * @date 2021/11/22 11:12 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping(value ="heart/volunteerunion/getVolunteerUnionDetail", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getVolunteerUnionDetail(VolunteerUnionFormDTO formDto); + + /** + * @describe: 查询所有志愿团队类别 + * @author wangtong + * @date 2021/11/18 10:55 + * @params [] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping(value ="heart/volunteerteamtype/getTeamTypeList") + Result getTeamTypeList(); + + /** + * @describe: 小程序-志愿团队-列表 + * @author wangtong + * @date 2021/11/22 14:45 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping(value ="heart/volunteerteam/getAppTeamListByType", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getAppTeamListByType(VolunteerUnionFormDTO formDto); + + /** + * @describe: 志愿团队-详情 + * @author wangtong + * @date 2021/11/22 15:19 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping(value ="heart/volunteerteam/getAppTeamDetail", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getAppTeamDetail(VolunteerUnionFormDTO formDto); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java index da2ad4f6..900c3bc4 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java @@ -652,4 +652,44 @@ public interface UserFeignClient { **/ @PostMapping("app-user/user/combineVolunteerUser") Result combineVolunteerUser(CombineVolunteerUserFormDTO combineVolunteerUserFormDTO); + + /** + * @describe: 小程序-志愿先锋-列表 + * @author wangtong + * @date 2021/11/22 10:41 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + @GetMapping(value = "app-user/volunteerpioneer/getVolunteerPioneerList", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getVolunteerPioneerList(VolunteerTeamFormDTO formDto); + + /** + * @describe: 小程序-志愿先锋-详情 + * @author wangtong + * @date 2021/11/22 10:54 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + @GetMapping(value = "app-user/volunteerpioneer/getVolunteerPioneerDetail", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getVolunteerPioneerDetail(VolunteerTeamFormDTO formDto); + + /** + * @describe: 小程序-志愿团队-详情-成员列表 + * @author wangtong + * @date 2021/11/22 16:13 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping(value = "app-user/vlounteerteamrealation/getTeamVolunteerList", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getTeamVolunteerList(VolunteerTeamFormDTO formDto); + + /** + * @describe: 小程序-志愿团队-加入团队 + * @author wangtong + * @date 2021/11/22 16:22 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @PostMapping(value = "app-user/vlounteerteamrealation/joinTeam", consumes = MediaType.APPLICATION_JSON_VALUE) + Result joinTeam(VolunteerTeamFormDTO formDto); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java index c2a6283a..39013300 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java @@ -6,6 +6,7 @@ import com.elink.esua.epdc.activity.result.*; import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.feign.ActInfoFeignClient; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.PathVariable; @@ -80,4 +81,29 @@ public class ActInfoFeignClientFallback implements ActInfoFeignClient { return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "scanSignIn", formDto); } + @Override + public Result getVolunteerUnionList(VolunteerUnionFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getVolunteerUnionList", formDto); + } + + @Override + public Result getVolunteerUnionDetail(VolunteerUnionFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getVolunteerUnionDetail", formDto); + } + + @Override + public Result getTeamTypeList() { + return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getTeamTypeList"); + } + + @Override + public Result getAppTeamListByType(VolunteerUnionFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getAppTeamListByType", formDto); + } + + @Override + public Result getAppTeamDetail(VolunteerUnionFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getAppTeamDetail", formDto); + } + } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java index 1966b7a6..489c6c57 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java @@ -317,4 +317,24 @@ public class UserFeignClientFallback implements UserFeignClient { public Result combineVolunteerUser(CombineVolunteerUserFormDTO combineVolunteerUserFormDTO) { return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "combineVolunteerUser", combineVolunteerUserFormDTO); } + + @Override + public Result getVolunteerPioneerList(VolunteerTeamFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getVolunteerPioneerList", formDto); + } + + @Override + public Result getVolunteerPioneerDetail(VolunteerTeamFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getVolunteerPioneerDetail", formDto); + } + + @Override + public Result getTeamVolunteerList(VolunteerTeamFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getTeamVolunteerList", formDto); + } + + @Override + public Result joinTeam(VolunteerTeamFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "joinTeam", formDto); + } } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java index cce726de..60025869 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java @@ -6,6 +6,8 @@ import com.elink.esua.epdc.activity.result.ActApplyDetailResultDTO; import com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO; import com.elink.esua.epdc.common.token.dto.TokenDto; import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.VolunteerTeamFormDTO; +import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.dto.form.EpdcAppVolunteerRankFormDTO; import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO; @@ -48,4 +50,85 @@ public interface AppVolunteerRankService { * @return com.elink.esua.epdc.commons.tools.utils.Result **/ Result applyActDetail(String id); + + /** + * @describe: 小程序-志愿先锋-列表 + * @author wangtong + * @date 2021/11/22 10:41 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + Result getVolunteerPioneerList(VolunteerTeamFormDTO dto); + + /** + * @describe: 小程序-志愿先锋-详情 + * @author wangtong + * @date 2021/11/22 10:54 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + Result getVolunteerPioneerDetail(VolunteerTeamFormDTO dto); + + /** + * @describe: 小程序-共建联盟-列表 + * @author wangtong + * @date 2021/11/22 11:06 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getVolunteerUnionList(VolunteerUnionFormDTO dto); + + /** + * @describe: 小程序-共建联盟-详情 + * @author wangtong + * @date 2021/11/22 11:12 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getVolunteerUnionDetail(VolunteerUnionFormDTO dto); + + /** + * @describe: 查询所有志愿团队类别 + * @author wangtong + * @date 2021/11/18 10:55 + * @params [] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getTeamTypeList(); + + /** + * @describe: 小程序-志愿团队-列表 + * @author wangtong + * @date 2021/11/22 14:45 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getAppTeamListByType(VolunteerUnionFormDTO dto); + + /** + * @describe: 志愿团队-详情 + * @author wangtong + * @date 2021/11/22 15:19 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getAppTeamDetail(TokenDto userDetail, VolunteerUnionFormDTO dto); + + /** + * @describe: 小程序-志愿团队-详情-成员列表 + * @author wangtong + * @date 2021/11/22 16:13 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getTeamVolunteerList(VolunteerTeamFormDTO dto); + + /** + * @describe: 小程序-志愿团队-加入团队 + * @author wangtong + * @date 2021/11/22 16:22 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result joinTeam(VolunteerTeamFormDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java index 622dd8de..7c9b9c8a 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java @@ -6,10 +6,12 @@ import com.elink.esua.epdc.activity.result.ActApplyDetailResultDTO; import com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO; import com.elink.esua.epdc.common.token.dto.TokenDto; import com.elink.esua.epdc.commons.tools.utils.Result; -import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.dto.*; import com.elink.esua.epdc.dto.form.EpdcAppVolunteerRankFormDTO; +import com.elink.esua.epdc.feign.ActInfoFeignClient; import com.elink.esua.epdc.feign.AdminFeignClient; import com.elink.esua.epdc.feign.AppVolunteerRankFeignClient; +import com.elink.esua.epdc.feign.UserFeignClient; import com.elink.esua.epdc.service.AppVolunteerRankService; import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO; import lombok.extern.slf4j.Slf4j; @@ -31,6 +33,11 @@ public class AppVolunteerRankServiceImpl implements AppVolunteerRankService { private AppVolunteerRankFeignClient appVolunteerRankFeignClient; @Autowired private AdminFeignClient adminFeignClient; + @Autowired + private ActInfoFeignClient actInfoFeignClient; + @Autowired + private UserFeignClient userFeignClient; + /** * 获取排行榜 * @Author wanggongfeng @@ -81,4 +88,53 @@ public class AppVolunteerRankServiceImpl implements AppVolunteerRankService { return appVolunteerRankFeignClient.applyActDetail(id); } + @Override + public Result getVolunteerPioneerList(VolunteerTeamFormDTO dto) { + return userFeignClient.getVolunteerPioneerList(dto); + } + + @Override + public Result getVolunteerPioneerDetail(VolunteerTeamFormDTO dto) { + return userFeignClient.getVolunteerPioneerDetail(dto); + } + + @Override + public Result getVolunteerUnionList(VolunteerUnionFormDTO dto) { + return actInfoFeignClient.getVolunteerUnionList(dto); + } + + @Override + public Result getVolunteerUnionDetail(VolunteerUnionFormDTO dto) { + return actInfoFeignClient.getVolunteerUnionDetail(dto); + } + + @Override + public Result getTeamTypeList() { + return actInfoFeignClient.getTeamTypeList(); + } + + @Override + public Result getAppTeamListByType(VolunteerUnionFormDTO dto) { + return actInfoFeignClient.getAppTeamListByType(dto); + } + + @Override + public Result getAppTeamDetail(TokenDto userDetail, VolunteerUnionFormDTO dto) { + if (null == userDetail) { + return new Result().error("获取用户信息失败"); + } + dto.setUserId(userDetail.getUserId()); + return actInfoFeignClient.getAppTeamDetail(dto); + } + + @Override + public Result getTeamVolunteerList(VolunteerTeamFormDTO dto) { + return userFeignClient.getTeamVolunteerList(dto); + } + + @Override + public Result joinTeam(VolunteerTeamFormDTO dto) { + return userFeignClient.joinTeam(dto); + } + } 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 164ed79a..8de6d711 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 @@ -70,4 +70,9 @@ public class ActInfoAppFormDTO implements Serializable { */ private String sponsor; + /** + * 志愿团队id + */ + private String teamId; + } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java index 044c387f..4800acc5 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java @@ -3,7 +3,9 @@ package com.elink.esua.epdc.modules.feign; import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.UserDTO; +import com.elink.esua.epdc.dto.VolunteerDetailResultDTO; import com.elink.esua.epdc.dto.VolunteerInfoDTO; +import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO; @@ -110,4 +112,13 @@ public interface UserInfoFeignClient { @PostMapping(value = "app-user/volunteerinfo/handleVolunteerPoints", consumes = MediaType.APPLICATION_JSON_VALUE) Result handleVolunteerPoints(EpdcVolunteerPointsFormDTO formDTO); + /** + * @describe: 通过用户信息和志愿团队id获取志愿者信息 + * @author wangtong + * @date 2021/11/22 15:34 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping(value = "app-user/vlounteerteamrealation/getVolunteerWithTeamState", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getVolunteerWithTeamState(VolunteerUnionFormDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java index cfb9419a..c393d58e 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java @@ -4,7 +4,9 @@ import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.UserDTO; +import com.elink.esua.epdc.dto.VolunteerDetailResultDTO; import com.elink.esua.epdc.dto.VolunteerInfoDTO; +import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO; @@ -61,4 +63,9 @@ public class UserInfoFeignClientFallback implements UserInfoFeignClient { public Result handleVolunteerPoints(EpdcVolunteerPointsFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "handleVolunteerPoints", formDTO); } + + @Override + public Result getVolunteerWithTeamState(VolunteerUnionFormDTO dto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getVolunteerWithTeamState", dto); + } } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java index 54b79ab0..ff35c046 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java @@ -25,6 +25,7 @@ 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.DefaultGroup; import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.modules.volunteer.excel.VolunteerTeamExcel; import com.elink.esua.epdc.modules.volunteer.service.VolunteerTeamService; import com.elink.esua.epdc.volunteer.VolunteerTeamDTO; @@ -103,4 +104,28 @@ public class VolunteerTeamController { return volunteerTeamService.getTeamListByType(params); } + /** + * @describe: 小程序-志愿团队-列表 + * @author wangtong + * @date 2021/11/22 14:45 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getAppTeamListByType") + public Result getAppTeamListByType(@RequestBody VolunteerUnionFormDTO dto){ + return volunteerTeamService.getAppTeamListByType(dto); + } + + /** + * @describe: 志愿团队-详情 + * @author wangtong + * @date 2021/11/22 15:19 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getAppTeamDetail") + public Result getAppTeamDetail(@RequestBody VolunteerUnionFormDTO dto){ + return volunteerTeamService.getAppTeamDetail(dto); + } + } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerUnionController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerUnionController.java index 5bb32efd..4b54e4c3 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerUnionController.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerUnionController.java @@ -25,6 +25,7 @@ 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.DefaultGroup; import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.modules.volunteer.excel.VolunteerUnionExcel; import com.elink.esua.epdc.modules.volunteer.service.VolunteerUnionService; import com.elink.esua.epdc.volunteer.VolunteerUnionDTO; @@ -91,4 +92,28 @@ public class VolunteerUnionController { ExcelUtils.exportExcelToTarget(response, null, list, VolunteerUnionExcel.class); } + /** + * @describe: 小程序-共建联盟-列表 + * @author wangtong + * @date 2021/11/22 11:06 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getVolunteerUnionList") + public Result getVolunteerUnionList(@RequestBody VolunteerUnionFormDTO dto){ + return volunteerUnionService.getVolunteerUnionList(dto); + } + + /** + * @describe: 小程序-共建联盟-详情 + * @author wangtong + * @date 2021/11/22 11:12 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getVolunteerUnionDetail") + public Result getVolunteerUnionDetail(@RequestBody VolunteerUnionFormDTO dto){ + return volunteerUnionService.getVolunteerUnionDetail(dto); + } + } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java index b2b92f45..31cdcbf4 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java @@ -18,6 +18,8 @@ package com.elink.esua.epdc.modules.volunteer.dao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.VolunteerDetailResultDTO; +import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity; import com.elink.esua.epdc.volunteer.VolunteerTeamDTO; import org.apache.ibatis.annotations.Mapper; @@ -44,4 +46,22 @@ public interface VolunteerTeamDao extends BaseDao { * @return com.elink.esua.epdc.commons.tools.utils.Result */ List getTeamListByType(Map params); + + /** + * @describe: 小程序-志愿团队-列表 + * @author wangtong + * @date 2021/11/22 14:45 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + List getAppTeamListByType(VolunteerUnionFormDTO formDto); + + /** + * @describe: 志愿团队-详情 + * @author wangtong + * @date 2021/11/22 15:19 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + VolunteerDetailResultDTO getAppTeamDetail(VolunteerUnionFormDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java index 08c77711..2c84b304 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java @@ -19,6 +19,7 @@ package com.elink.esua.epdc.modules.volunteer.dao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.modules.volunteer.entity.VolunteerUnionEntity; import com.elink.esua.epdc.volunteer.VolunteerUnionDTO; import org.apache.ibatis.annotations.Mapper; @@ -36,4 +37,13 @@ import java.util.Map; public interface VolunteerUnionDao extends BaseDao { List getPageList(Map params); + + /** + * @describe: 小程序-共建联盟-列表 + * @author wangtong + * @date 2021/11/22 11:06 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + List getVolunteerPioneerList(VolunteerUnionFormDTO formDto); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java index 8e33907c..51508e54 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java @@ -21,6 +21,7 @@ package com.elink.esua.epdc.modules.volunteer.service; import com.elink.esua.epdc.commons.mybatis.service.BaseService; import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity; import com.elink.esua.epdc.volunteer.VolunteerTeamDTO; @@ -105,4 +106,22 @@ public interface VolunteerTeamService extends BaseService { * @return com.elink.esua.epdc.commons.tools.utils.Result */ Result getTeamListByType(Map params); + + /** + * @describe: 小程序-志愿团队-列表 + * @author wangtong + * @date 2021/11/22 14:45 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getAppTeamListByType(VolunteerUnionFormDTO dto); + + /** + * @describe: 志愿团队-详情 + * @author wangtong + * @date 2021/11/22 15:19 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getAppTeamDetail(VolunteerUnionFormDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerUnionService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerUnionService.java index 105acd82..37dde3da 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerUnionService.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerUnionService.java @@ -19,6 +19,8 @@ package com.elink.esua.epdc.modules.volunteer.service; import com.elink.esua.epdc.commons.mybatis.service.BaseService; import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.modules.volunteer.entity.VolunteerUnionEntity; import com.elink.esua.epdc.volunteer.VolunteerUnionDTO; @@ -92,4 +94,22 @@ public interface VolunteerUnionService extends BaseService * @date 2021-11-16 */ void delete(String[] ids); + + /** + * @describe: 小程序-共建联盟-列表 + * @author wangtong + * @date 2021/11/22 11:06 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getVolunteerUnionList(VolunteerUnionFormDTO dto); + + /** + * @describe: 小程序-共建联盟-详情 + * @author wangtong + * @date 2021/11/22 11:12 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getVolunteerUnionDetail(VolunteerUnionFormDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java index 21c372e0..3e764345 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java @@ -21,9 +21,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.constant.NumConstant; +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.utils.Result; +import com.elink.esua.epdc.dto.VolunteerDetailResultDTO; +import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; +import com.elink.esua.epdc.modules.feign.UserInfoFeignClient; import com.elink.esua.epdc.modules.volunteer.dao.VolunteerTeamDao; import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity; import com.elink.esua.epdc.modules.volunteer.redis.VolunteerTeamRedis; @@ -50,6 +55,9 @@ public class VolunteerTeamServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -72,6 +80,28 @@ public class VolunteerTeamServiceImpl extends BaseServiceImpl list = baseDao.getAppTeamListByType(formDto); + return new Result().ok(list); + } + + @Override + public Result getAppTeamDetail(VolunteerUnionFormDTO dto) { + VolunteerDetailResultDTO result = baseDao.getAppTeamDetail(dto); + + Result volunteerResult = userInfoFeignClient.getVolunteerWithTeamState(dto); + if (!volunteerResult.success() || volunteerResult.getData() == null) { + throw new RenException("获取志愿者信息失败"); + } + VolunteerDetailResultDTO volunteerDTO = volunteerResult.getData(); + result.setJoinFlag(volunteerDTO.getJoinFlag()); + result.setVolunteerId(volunteerDTO.getVolunteerId()); + return new Result().ok(result); + } + @Override public List list(Map params) { List entityList = baseDao.selectList(getWrapper(params)); diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java index 4181b683..363266b0 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java @@ -21,8 +21,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.constant.NumConstant; 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.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.modules.volunteer.dao.VolunteerUnionDao; import com.elink.esua.epdc.modules.volunteer.entity.VolunteerUnionEntity; import com.elink.esua.epdc.modules.volunteer.redis.VolunteerUnionRedis; @@ -104,4 +107,18 @@ public class VolunteerUnionServiceImpl extends BaseServiceImpl list = baseDao.getVolunteerPioneerList(formDto); + return new Result().ok(list); + } + + @Override + public Result getVolunteerUnionDetail(VolunteerUnionFormDTO dto) { + VolunteerUnionEntity entity = baseDao.selectById(dto.getId()); + return new Result().ok(entity); + } + } 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 160a1a2e..e2d86583 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 @@ -203,6 +203,9 @@ AND actInfo.ID = #{actId} + + AND actInfo.TEAM_ID = #{teamId} + AND actInfo.SPONSOR like concat('%', #{sponsor}, '%') diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml index e7b4a031..aa41697c 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml @@ -40,6 +40,23 @@ and TEAM_TYPE=#{teamType} order by CREATED_TIME desc + + diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml index 22068baa..fa64161d 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml @@ -19,6 +19,7 @@ SELECT * FROM `epdc_volunteer_team_type` where del_flag='0' + and banner_flag = '0' order by sort asc diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml index 5347d71d..b2c2f872 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml @@ -31,6 +31,14 @@ order by CREATED_TIME desc + diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/TeamVolunteerListDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/TeamVolunteerListDTO.java new file mode 100644 index 00000000..bcebd8b0 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/TeamVolunteerListDTO.java @@ -0,0 +1,25 @@ +package com.elink.esua.epdc.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @program: esua-epdc + * @description: + * @author: wangtong + * @create: 2021-11-22 16:15 + **/ +@Data +public class TeamVolunteerListDTO implements Serializable { + + private String id; + + private String faceImg; + + private String partyFLag; + + private String realName; + + private String introduce; +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java index 77625dcf..dee54b33 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java @@ -49,25 +49,6 @@ public class VlounteerTeamRealationDTO implements Serializable { */ private String teamId; - /** - * 团队名称 - */ - private String teamName; - - /** - * 团队类别 - */ - private String teamType; - - /** - * 成员姓名 - */ - private String realName; - - /** - * 手机号 - */ - private String mobile; /** * 乐观锁 diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerDetailResultDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerDetailResultDTO.java new file mode 100644 index 00000000..082ea2af --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerDetailResultDTO.java @@ -0,0 +1,43 @@ +package com.elink.esua.epdc.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @program: esua-epdc + * @description: + * @author: wangtong + * @create: 2021-11-22 15:19 + **/ +@Data +public class VolunteerDetailResultDTO implements Serializable { + + + /** + * 主键 + */ + private String id; + + /** + * 团队名称 + */ + private String teamName; + + /** + * 团队介绍 + */ + private String content; + + /** + * 是否已加入 + */ + private Boolean joinFlag; + + /** + * 志愿者id + */ + private String volunteerId; + + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerTeamFormDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerTeamFormDTO.java new file mode 100644 index 00000000..c28d49c4 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerTeamFormDTO.java @@ -0,0 +1,32 @@ +package com.elink.esua.epdc.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @program: esua-epdc + * @description: + * @author: wangtong + * @create: 2021-11-22 10:40 + **/ +@Data +public class VolunteerTeamFormDTO implements Serializable { + + /** + * 页码,从1开始 + */ + private Integer pageIndex; + + /** + * 页容量,默认10页 + */ + private Integer pageSize ; + + + private String id; + + private String volunteerId; + + private String teamId; +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerUnionFormDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerUnionFormDTO.java new file mode 100644 index 00000000..b862e79a --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerUnionFormDTO.java @@ -0,0 +1,39 @@ +package com.elink.esua.epdc.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @program: esua-epdc + * @description: + * @author: wangtong + * @create: 2021-11-22 11:04 + **/ +@Data +public class VolunteerUnionFormDTO implements Serializable { + + /** + * 页码,从1开始 + */ + private Integer pageIndex; + + /** + * 页容量,默认10页 + */ + private Integer pageSize ; + + + private String id; + + /** + *类别编码 + */ + private String typeCode; + + /** + *用户id + */ + private String userId; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcCompleteVolunteerInfoFormDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcCompleteVolunteerInfoFormDTO.java index f6a0cf22..a09dade8 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcCompleteVolunteerInfoFormDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcCompleteVolunteerInfoFormDTO.java @@ -108,5 +108,10 @@ public class EpdcCompleteVolunteerInfoFormDTO implements Serializable { */ private String volunteerDept; + /** + * 团队id + */ + private String teamId; + } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/v2/EpdcCompleteVolunteerInfoV2FormDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/v2/EpdcCompleteVolunteerInfoV2FormDTO.java index 51a92554..d85496c5 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/v2/EpdcCompleteVolunteerInfoV2FormDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/v2/EpdcCompleteVolunteerInfoV2FormDTO.java @@ -129,5 +129,10 @@ public class EpdcCompleteVolunteerInfoV2FormDTO implements Serializable { */ private String volunteerDeptId; + /** + * 团队id + */ + private String teamId; + } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java index 60216194..472b659c 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java @@ -25,8 +25,7 @@ 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.DefaultGroup; import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; -import com.elink.esua.epdc.dto.VlounteerTeamRealationDTO; -import com.elink.esua.epdc.dto.VolunteerInfoDTO; +import com.elink.esua.epdc.dto.*; import com.elink.esua.epdc.excel.VlounteerTeamRealationExcel; import com.elink.esua.epdc.service.VlounteerTeamRealationService; import org.springframework.beans.factory.annotation.Autowired; @@ -106,4 +105,40 @@ public class VlounteerTeamRealationController { return new Result>().ok(page); } + /** + * @describe: 小程序-通过用户信息和志愿团队id获取志愿者信息 + * @author wangtong + * @date 2021/11/22 16:03 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getVolunteerWithTeamState") + public Result getVolunteerWithTeamState(@RequestBody VolunteerUnionFormDTO dto) { + return vlounteerTeamRealationService.getVolunteerWithTeamState(dto); + } + + /** + * @describe: 小程序-志愿团队-详情-成员列表 + * @author wangtong + * @date 2021/11/22 16:13 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getTeamVolunteerList") + public Result> getTeamVolunteerList(@RequestBody VolunteerTeamFormDTO dto) { + List page = vlounteerTeamRealationService.getTeamVolunteerList(dto); + return new Result>().ok(page); + } + + /** + * @describe: 小程序-志愿团队-加入团队 + * @author wangtong + * @date 2021/11/22 16:22 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @PostMapping("joinTeam") + public Result joinTeam(@RequestBody VolunteerTeamFormDTO dto) { + return vlounteerTeamRealationService.joinTeam(dto); + } } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java index d53c6737..0f4ffcc8 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java @@ -25,8 +25,8 @@ 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.DefaultGroup; import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; -import com.elink.esua.epdc.dto.NoticeDTO; import com.elink.esua.epdc.dto.VolunteerPioneerDTO; +import com.elink.esua.epdc.dto.VolunteerTeamFormDTO; import com.elink.esua.epdc.excel.VolunteerPioneerExcel; import com.elink.esua.epdc.service.VolunteerPioneerService; import org.springframework.beans.factory.annotation.Autowired; @@ -104,4 +104,29 @@ public class VolunteerPioneerController { return volunteerPioneerService.handleIsUpDown(dto); } + /** + * @describe: 小程序-志愿先锋-列表 + * @author wangtong + * @date 2021/11/22 10:41 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + @GetMapping("getVolunteerPioneerList") + public Result> getVolunteerPioneerList(@RequestBody VolunteerTeamFormDTO dto){ + List page = volunteerPioneerService.getVolunteerPioneerList(dto); + return new Result>().ok(page); + } + + /** + * @describe: 小程序-志愿先锋-详情 + * @author wangtong + * @date 2021/11/22 10:54 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + @GetMapping("getVolunteerPioneerDetail") + public Result getVolunteerPioneerDetail(@RequestBody VolunteerTeamFormDTO dto){ + return volunteerPioneerService.getVolunteerPioneerDetail(dto); + } + } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java index dd35052c..47c22550 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java @@ -18,7 +18,7 @@ package com.elink.esua.epdc.dao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; -import com.elink.esua.epdc.dto.VlounteerTeamRealationDTO; +import com.elink.esua.epdc.dto.*; import com.elink.esua.epdc.entity.VlounteerTeamRealationEntity; import com.elink.esua.epdc.entity.VolunteerInfoEntity; import org.apache.ibatis.annotations.Mapper; @@ -45,4 +45,31 @@ public interface VlounteerTeamRealationDao extends BaseDao> */ List getVolunteerListByTeamId(Map params); + + /** + * @describe: 通过用户信息和志愿团队id获取志愿者信息 + * @author wangtong + * @date 2021/11/22 16:03 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + VolunteerDetailResultDTO getVolunteerWithTeamState(VolunteerUnionFormDTO dto); + + /** + * @describe: 小程序-志愿团队-详情-成员列表 + * @author wangtong + * @date 2021/11/22 16:13 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + List getVolunteerPioneerList(VolunteerTeamFormDTO formDto); + + /** + * @describe: 通过团队id和志愿者id查询数据 + * @author wangtong + * @date 2021/11/22 16:23 + * @params [dto] + * @return com.elink.esua.epdc.entity.VlounteerTeamRealationEntity + */ + VlounteerTeamRealationEntity selectByTeamIdAngVolunteerId(VolunteerTeamFormDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.java index 039d46ca..2b490c1f 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.java @@ -19,6 +19,7 @@ package com.elink.esua.epdc.dao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; import com.elink.esua.epdc.dto.VolunteerPioneerDTO; +import com.elink.esua.epdc.dto.VolunteerTeamFormDTO; import com.elink.esua.epdc.entity.VolunteerPioneerEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -45,4 +46,13 @@ public interface VolunteerPioneerDao extends BaseDao { * @return com.elink.esua.epdc.dto.VolunteerPioneerDTO */ VolunteerPioneerDTO selectDetailById(@Param("id") String id); + + /** + * @describe: 小程序-志愿先锋-列表 + * @author wangtong + * @date 2021/11/22 10:45 + * @params [formDto] + * @return java.util.List + */ + List getVolunteerPioneerList(VolunteerTeamFormDTO formDto); } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VlounteerTeamRealationEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VlounteerTeamRealationEntity.java index 6dc3866f..3eef851c 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VlounteerTeamRealationEntity.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VlounteerTeamRealationEntity.java @@ -18,13 +18,10 @@ package com.elink.esua.epdc.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; - /** * 志愿者-志愿团队关联表 * @@ -48,14 +45,5 @@ public class VlounteerTeamRealationEntity extends BaseEpdcEntity { */ private String teamId; - /** - * 团队名称 - */ - private String teamName; - - /** - * 团队类别 - */ - private String teamType; -} \ No newline at end of file +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerInfoEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerInfoEntity.java index d86786c6..75f53f1f 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerInfoEntity.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerInfoEntity.java @@ -78,6 +78,11 @@ public class VolunteerInfoEntity extends DeptScope { */ private Integer participationNum; + /** + * 团队id + */ + private String teamId; + /** * 网格ID diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java index 6ec5891d..90e9c8a7 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java @@ -19,8 +19,8 @@ package com.elink.esua.epdc.service; import com.elink.esua.epdc.commons.mybatis.service.BaseService; import com.elink.esua.epdc.commons.tools.page.PageData; -import com.elink.esua.epdc.dto.VlounteerTeamRealationDTO; -import com.elink.esua.epdc.dto.VolunteerInfoDTO; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.*; import com.elink.esua.epdc.entity.VlounteerTeamRealationEntity; import java.util.List; @@ -104,4 +104,31 @@ public interface VlounteerTeamRealationService extends BaseService> */ PageData getVolunteerListByTeamId(Map params); + + /** + * @describe: 通过用户信息和志愿团队id获取志愿者信息 + * @author wangtong + * @date 2021/11/22 16:03 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getVolunteerWithTeamState(VolunteerUnionFormDTO dto); + + /** + * @describe: 小程序-志愿团队-详情-成员列表 + * @author wangtong + * @date 2021/11/22 16:13 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + List getTeamVolunteerList(VolunteerTeamFormDTO dto); + + /** + * @describe: 小程序-志愿团队-加入团队 + * @author wangtong + * @date 2021/11/22 16:22 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result joinTeam(VolunteerTeamFormDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java index a7873839..12cd3d1f 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java @@ -21,6 +21,7 @@ import com.elink.esua.epdc.commons.mybatis.service.BaseService; import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.VolunteerPioneerDTO; +import com.elink.esua.epdc.dto.VolunteerTeamFormDTO; import com.elink.esua.epdc.entity.VolunteerPioneerEntity; import java.util.List; @@ -102,4 +103,22 @@ public interface VolunteerPioneerService extends BaseService> + */ + List getVolunteerPioneerList(VolunteerTeamFormDTO dto); + + /** + * @describe: 小程序-志愿先锋-详情 + * @author wangtong + * @date 2021/11/22 10:54 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + Result getVolunteerPioneerDetail(VolunteerTeamFormDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java index 909868ae..a82ff447 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java @@ -21,11 +21,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.constant.NumConstant; 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.dao.VlounteerTeamRealationDao; -import com.elink.esua.epdc.dto.VlounteerTeamRealationDTO; -import com.elink.esua.epdc.dto.VolunteerInfoDTO; +import com.elink.esua.epdc.dto.*; import com.elink.esua.epdc.entity.VlounteerTeamRealationEntity; import com.elink.esua.epdc.entity.VolunteerInfoEntity; import com.elink.esua.epdc.redis.VlounteerTeamRealationRedis; @@ -75,6 +76,32 @@ public class VlounteerTeamRealationServiceImpl extends BaseServiceImpl getTeamVolunteerList(VolunteerTeamFormDTO formDto) { + int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize(); + formDto.setPageIndex(pageIndex); + return baseDao.getVolunteerPioneerList(formDto); + } + + @Override + public Result joinTeam(VolunteerTeamFormDTO dto) { + VlounteerTeamRealationEntity checkFlag = baseDao.selectByTeamIdAngVolunteerId(dto); + if(checkFlag != null){ + return new Result().error("此志愿者已加入该团队"); + } + VlounteerTeamRealationEntity entity = new VlounteerTeamRealationEntity(); + entity.setTeamId(dto.getTeamId()); + entity.setVolunteerId(dto.getVolunteerId()); + baseDao.insert(entity); + return new Result(); + } + @Override public List list(Map params) { List entityList = baseDao.selectList(getWrapper(params)); diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java index 4a470b50..90607f42 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java @@ -20,12 +20,14 @@ package com.elink.esua.epdc.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.constant.NumConstant; 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.dao.VolunteerPioneerDao; import com.elink.esua.epdc.dto.VolunteerPioneerDTO; +import com.elink.esua.epdc.dto.VolunteerTeamFormDTO; import com.elink.esua.epdc.entity.VolunteerPioneerEntity; import com.elink.esua.epdc.redis.VolunteerPioneerRedis; import com.elink.esua.epdc.service.VolunteerPioneerService; @@ -120,4 +122,17 @@ public class VolunteerPioneerServiceImpl extends BaseServiceImpl getVolunteerPioneerList(VolunteerTeamFormDTO formDto) { + int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize(); + formDto.setPageIndex(pageIndex); + return baseDao.getVolunteerPioneerList(formDto); + } + + @Override + public Result getVolunteerPioneerDetail(VolunteerTeamFormDTO dto) { + VolunteerPioneerEntity entity = baseDao.selectById(dto.getId()); + return new Result().ok(entity); + } + } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml index 14d402ae..c2208fc0 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml @@ -41,6 +41,33 @@ order by v.CREATED_TIME desc + + + diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml index c194059e..5570657d 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml @@ -34,6 +34,15 @@ where vp.DEL_FLAG='0' and vp.id=#{id} + From 8f95a569f97c6cc32d7686e6035ed7f96350eade Mon Sep 17 00:00:00 2001 From: Jackwang Date: Tue, 23 Nov 2021 15:34:19 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E6=96=B9=E6=B3=95=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../esua/epdc/service/impl/AppVolunteerRankServiceImpl.java | 2 ++ .../com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java | 2 +- .../volunteer/service/impl/VolunteerTeamServiceImpl.java | 3 +++ .../src/main/resources/mapper/activity/ActInfoDao.xml | 2 +- .../esua/epdc/controller/VlounteerTeamRealationController.java | 2 +- .../epdc/service/impl/VlounteerTeamRealationServiceImpl.java | 3 +++ 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java index 7c9b9c8a..5670a193 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java @@ -124,6 +124,8 @@ public class AppVolunteerRankServiceImpl implements AppVolunteerRankService { return new Result().error("获取用户信息失败"); } dto.setUserId(userDetail.getUserId()); + log.info("getAppTeamDetail-userDetail"+userDetail); + log.info("getAppTeamDetail-dto"+dto); return actInfoFeignClient.getAppTeamDetail(dto); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java index 4800acc5..f3236812 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java @@ -119,6 +119,6 @@ public interface UserInfoFeignClient { * @params [dto] * @return com.elink.esua.epdc.commons.tools.utils.Result */ - @GetMapping(value = "app-user/vlounteerteamrealation/getVolunteerWithTeamState", consumes = MediaType.APPLICATION_JSON_VALUE) + @PostMapping(value = "app-user/vlounteerteamrealation/getVolunteerWithTeamState", consumes = MediaType.APPLICATION_JSON_VALUE) Result getVolunteerWithTeamState(VolunteerUnionFormDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java index 3e764345..26d4dcd9 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java @@ -34,6 +34,7 @@ import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity; import com.elink.esua.epdc.modules.volunteer.redis.VolunteerTeamRedis; import com.elink.esua.epdc.modules.volunteer.service.VolunteerTeamService; import com.elink.esua.epdc.volunteer.VolunteerTeamDTO; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -49,6 +50,7 @@ import java.util.Map; * @author qu qu@elink-cn.com * @since v1.0.0 2021-11-16 */ +@Slf4j @Service public class VolunteerTeamServiceImpl extends BaseServiceImpl implements VolunteerTeamService { @@ -90,6 +92,7 @@ public class VolunteerTeamServiceImpl extends BaseServiceImpl volunteerResult = userInfoFeignClient.getVolunteerWithTeamState(dto); 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 e2d86583..a7e7745f 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 @@ -186,7 +186,7 @@ ( SELECT i.ID, i.TITLE, i.HEAD_PIC, i.ACT_START_TIME, i.ACT_END_TIME, i.PUBLISH_TIME, i.ACT_ADDRESS, i.ACT_QUOTA, i.CLOCK_NUM, i.SIGNUP_END_TIME, i.CREATED_TIME, i.ACT_QUOTA_CATEGORY, - i.TOP_FLAG, i.DEL_FLAG, i.ACT_STATUS, i.SPONSOR, IFNULL(SUM(p.ACT_PERIOD_SIGNUP_NUM), 0) ACT_PERIOD_SIGNUP_NUM, i.SIGNUP_NUM + i.TOP_FLAG, i.DEL_FLAG, i.ACT_STATUS, i.SPONSOR, IFNULL(SUM(p.ACT_PERIOD_SIGNUP_NUM), 0) ACT_PERIOD_SIGNUP_NUM, i.SIGNUP_NUM,i.TEAM_ID FROM epdc_act_info i LEFT JOIN epdc_act_period p ON i.ID = p.ACT_ID AND p.DEL_FLAG = '0' diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java index 472b659c..f0bc0372 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java @@ -112,7 +112,7 @@ public class VlounteerTeamRealationController { * @params [dto] * @return com.elink.esua.epdc.commons.tools.utils.Result */ - @GetMapping("getVolunteerWithTeamState") + @PostMapping("getVolunteerWithTeamState") public Result getVolunteerWithTeamState(@RequestBody VolunteerUnionFormDTO dto) { return vlounteerTeamRealationService.getVolunteerWithTeamState(dto); } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java index a82ff447..0a3a5db3 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java @@ -31,6 +31,7 @@ import com.elink.esua.epdc.entity.VlounteerTeamRealationEntity; import com.elink.esua.epdc.entity.VolunteerInfoEntity; import com.elink.esua.epdc.redis.VlounteerTeamRealationRedis; import com.elink.esua.epdc.service.VlounteerTeamRealationService; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -46,6 +47,7 @@ import java.util.Map; * @author qu qu@elink-cn.com * @since v1.0.0 2021-11-16 */ +@Slf4j @Service public class VlounteerTeamRealationServiceImpl extends BaseServiceImpl implements VlounteerTeamRealationService { @@ -78,6 +80,7 @@ public class VlounteerTeamRealationServiceImpl extends BaseServiceImpl Date: Wed, 24 Nov 2021 09:51:59 +0800 Subject: [PATCH 09/13] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/EpdcCompleteUserInfoDTO.java | 5 +++++ .../epdc/controller/ApiAppUserController.java | 1 + .../ApiVolunteerRankController.java | 6 +++--- .../esua/epdc/feign/ActInfoFeignClient.java | 3 ++- .../fallback/ActInfoFeignClientFallback.java | 5 +++-- .../epdc/service/AppVolunteerRankService.java | 2 +- .../epdc/service/impl/AppUserServiceImpl.java | 1 + .../impl/AppVolunteerRankServiceImpl.java | 4 ++-- .../VolunteerTeamTypeController.java | 20 ++++++++++++++++--- .../volunteer/dao/VolunteerTeamTypeDao.java | 12 ++++++++++- .../service/VolunteerTeamTypeService.java | 12 ++++++++++- .../impl/VolunteerTeamTypeServiceImpl.java | 11 ++++++++-- .../mapper/volunteer/VolunteerTeamTypeDao.xml | 11 ++++++++++ .../elink/esua/epdc/dto/VolunteerInfoDTO.java | 5 +++++ .../epdc/dao/VlounteerTeamRealationDao.java | 10 ++++++++++ .../esua/epdc/entity/VolunteerInfoEntity.java | 5 ----- .../impl/VolunteerInfoServiceImpl.java | 17 ++++++++++++++++ .../mapper/VlounteerTeamRealationDao.xml | 4 ++++ .../resources/mapper/VolunteerInfoDao.xml | 14 +++++++------ 19 files changed, 121 insertions(+), 27 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java index a380c7dd..7507a3d7 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java @@ -103,4 +103,9 @@ public class EpdcCompleteUserInfoDTO implements Serializable { * 志愿者所属部门 */ private String volunteerDeptId; + + /** + * 志愿团队id + */ + private String teamId; } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppUserController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppUserController.java index b7a5688a..941b6f04 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppUserController.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppUserController.java @@ -273,6 +273,7 @@ public class ApiAppUserController { public Result prepareCompleteUserInfo(@LoginUser TokenDto tokenDto) { return appUserService.prepareCompleteUserInfo(tokenDto); } + /** * 获取邀请记录 * diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiVolunteerRankController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiVolunteerRankController.java index 1cd1c452..0cbd320d 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiVolunteerRankController.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiVolunteerRankController.java @@ -93,15 +93,15 @@ public class ApiVolunteerRankController { } /** - * @describe: 查询所有志愿团队类别 + * @describe: 小程序-查询所有志愿团队类别 * @author wangtong * @date 2021/11/18 10:55 * @params [] * @return com.elink.esua.epdc.commons.tools.utils.Result */ @GetMapping("getTeamTypeList") - public Result getTeamTypeList(){ - return appVolunteerRankService.getTeamTypeList(); + public Result getTeamTypeList(VolunteerTeamFormDTO formDto){ + return appVolunteerRankService.getTeamTypeList(formDto); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java index 12743ebd..cb106617 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java @@ -6,6 +6,7 @@ import com.elink.esua.epdc.activity.result.*; import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.config.FeignRequestInterceptor; +import com.elink.esua.epdc.dto.VolunteerTeamFormDTO; import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.feign.fallback.ActInfoFeignClientFallback; import org.springframework.cloud.openfeign.FeignClient; @@ -169,7 +170,7 @@ public interface ActInfoFeignClient { * @return com.elink.esua.epdc.commons.tools.utils.Result */ @GetMapping(value ="heart/volunteerteamtype/getTeamTypeList") - Result getTeamTypeList(); + Result getTeamTypeList(VolunteerTeamFormDTO formDto); /** * @describe: 小程序-志愿团队-列表 diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java index 39013300..a29b7199 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java @@ -6,6 +6,7 @@ import com.elink.esua.epdc.activity.result.*; import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.VolunteerTeamFormDTO; import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.feign.ActInfoFeignClient; import org.springframework.stereotype.Component; @@ -92,8 +93,8 @@ public class ActInfoFeignClientFallback implements ActInfoFeignClient { } @Override - public Result getTeamTypeList() { - return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getTeamTypeList"); + public Result getTeamTypeList(VolunteerTeamFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getTeamTypeList",formDto); } @Override diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java index 60025869..112eb53d 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java @@ -94,7 +94,7 @@ public interface AppVolunteerRankService { * @params [] * @return com.elink.esua.epdc.commons.tools.utils.Result */ - Result getTeamTypeList(); + Result getTeamTypeList(VolunteerTeamFormDTO formDto); /** * @describe: 小程序-志愿团队-列表 diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java index 6dfac9af..189dde70 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java @@ -949,6 +949,7 @@ public class AppUserServiceImpl implements AppUserService { dto.setIntroduce(volunteerInfoDTO.getData().getIntroduce()); dto.setVolunteerTagId(volunteerInfoDTO.getData().getTagId()); dto.setVolunteerDeptId(volunteerInfoDTO.getData().getVolunteerDeptId()); + dto.setTeamId(volunteerInfoDTO.getData().getTeamId()); // 如果用户表的身份证号为空,则尝试使用志愿者表中的身份证 if (null == dto.getIdentityNo() || "".equals(dto.getIdentityNo())) { dto.setIdentityNo(volunteerInfoDTO.getData().getIdentityNo()); diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java index 5670a193..7bde9fc6 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java @@ -109,8 +109,8 @@ public class AppVolunteerRankServiceImpl implements AppVolunteerRankService { } @Override - public Result getTeamTypeList() { - return actInfoFeignClient.getTeamTypeList(); + public Result getTeamTypeList(VolunteerTeamFormDTO formDto) { + return actInfoFeignClient.getTeamTypeList(formDto); } @Override diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java index 62ec56b5..2fc17706 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java @@ -25,6 +25,7 @@ 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.DefaultGroup; import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.VolunteerTeamFormDTO; import com.elink.esua.epdc.modules.volunteer.excel.VolunteerTeamTypeExcel; import com.elink.esua.epdc.modules.volunteer.service.VolunteerTeamTypeService; import com.elink.esua.epdc.volunteer.VolunteerTeamTypeDTO; @@ -92,15 +93,28 @@ public class VolunteerTeamTypeController { } /** - * @describe: 查询所有志愿团队类别 + * @describe: 小程序-查询所有志愿团队类别 * @author wangtong * @date 2021/11/18 10:55 * @params [] * @return com.elink.esua.epdc.commons.tools.utils.Result */ @GetMapping("getTeamTypeList") - public Result getTeamTypeList(){ - return volunteerTeamTypeService.getTeamTypeList(); + public Result getTeamTypeList(@RequestBody VolunteerTeamFormDTO formDto){ + return volunteerTeamTypeService.getTeamTypeList(formDto); + } + + + /** + * @describe: 查询所有志愿团队类别 + * @author wangtong + * @date 2021/11/24 9:23 + * @params [formDto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getSysTeamTypeList") + public Result getSysTeamTypeList(VolunteerTeamFormDTO formDto){ + return volunteerTeamTypeService.getSysTeamTypeList(formDto); } } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java index e0abfa96..fc590439 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java @@ -19,6 +19,7 @@ package com.elink.esua.epdc.modules.volunteer.dao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.VolunteerTeamFormDTO; import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamTypeEntity; import org.apache.ibatis.annotations.Mapper; @@ -33,6 +34,15 @@ import java.util.List; @Mapper public interface VolunteerTeamTypeDao extends BaseDao { + /** + * @describe: 小程序-查询所有志愿团队类别 + * @author wangtong + * @date 2021/11/18 10:55 + * @params [] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + List getTeamTypeList(VolunteerTeamFormDTO formDto); + /** * @describe: 查询所有志愿团队类别 * @author wangtong @@ -40,5 +50,5 @@ public interface VolunteerTeamTypeDao extends BaseDao { * @params [] * @return com.elink.esua.epdc.commons.tools.utils.Result */ - List getTeamTypeList(); + List getSysTeamTypeList(VolunteerTeamFormDTO formDto); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java index 925d779a..3bd0df46 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java @@ -21,6 +21,7 @@ package com.elink.esua.epdc.modules.volunteer.service; import com.elink.esua.epdc.commons.mybatis.service.BaseService; import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.VolunteerTeamFormDTO; import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamTypeEntity; import com.elink.esua.epdc.volunteer.VolunteerTeamTypeDTO; @@ -102,5 +103,14 @@ public interface VolunteerTeamTypeService extends BaseService result = baseDao.getTeamTypeList(); + public Result getTeamTypeList(VolunteerTeamFormDTO formDto) { + List result = baseDao.getTeamTypeList(formDto); + return new Result().ok(result); + } + + @Override + public Result getSysTeamTypeList(VolunteerTeamFormDTO formDto) { + List result = baseDao.getSysTeamTypeList(formDto); return new Result().ok(result); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml index fa64161d..5e73bdfa 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml @@ -16,6 +16,17 @@ + - select m.*, - vt.tag_id - from epdc_volunteer_info m - left join epdc_volunteer_tag_relation vt on vt.VOLUNTEER_ID = m.id and vt.del_flag = '0' - where m.DEL_FLAG='0' - and m.USER_ID=#{userId} + select m.*, + vt.tag_id, + tv.TEAM_ID + from epdc_volunteer_info m + left join epdc_volunteer_tag_relation vt on vt.VOLUNTEER_ID = m.id and vt.del_flag = '0' + left join epdc_vlounteer_team_realation tv on tv.VOLUNTEER_ID= m.id and tv.DEL_FLAG='0' + where m.DEL_FLAG='0' + and m.USER_ID=#{userId} From fea4b3a1e5ae5361919a7e5712ba2024494d86e1 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Wed, 24 Nov 2021 11:19:21 +0800 Subject: [PATCH 10/13] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../elink/esua/epdc/service/impl/AppUserServiceImpl.java | 1 + .../esua/epdc/service/impl/VolunteerInfoServiceImpl.java | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java index 189dde70..4880982c 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java @@ -1551,6 +1551,7 @@ public class AppUserServiceImpl implements AppUserService { @Override public Result volunteerV2Authenticate(TokenDto tokenDto, EpdcCompleteVolunteerInfoV2FormDTO formDto) { + log.info("insertV2VolunteerInfo=dto:"+formDto); logger.info("志愿者认证wxCode=" + formDto.getWxCode() + ";userId=" + tokenDto.getUserId()); if (StringUtils.isEmpty(formDto.getVolunteerSignature())) { formDto.setVolunteerSignature("在水一方,志在四方"); diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java index a733a9d3..9c8e67c5 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java @@ -52,6 +52,7 @@ import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; import com.elink.esua.epdc.service.UserTagRelationService; import com.elink.esua.epdc.service.VolunteerInfoService; import com.elink.esua.epdc.service.VolunteerTagRelationService; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -65,6 +66,7 @@ import java.util.*; * @author qu qu@elink-cn.com * @since v1.0.0 2019-12-11 */ +@Slf4j @Service public class VolunteerInfoServiceImpl extends BaseServiceImpl implements VolunteerInfoService { @@ -430,7 +432,7 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl insertV2VolunteerInfo(EpdcCompleteVolunteerInfoV2FormDTO formDTO) { - + log.info("insertV2VolunteerInfo=dto:"+formDTO); VolunteerInfoEntity volunteerEntity = ConvertUtils.sourceToTarget(formDTO, VolunteerInfoEntity.class); // 补全其他字段 @@ -462,7 +464,7 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl Date: Wed, 24 Nov 2021 15:52:01 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/AppVolunteerRankServiceImpl.java | 1 + .../epdc/modules/activity/dao/ActInfoDao.java | 9 +++++ .../modules/feign/UserInfoFeignClient.java | 10 ++++++ .../fallback/UserInfoFeignClientFallback.java | 5 +++ .../impl/VolunteerTeamServiceImpl.java | 34 ++++++++++++++++--- .../resources/mapper/activity/ActInfoDao.xml | 4 +++ .../VlounteerTeamRealationController.java | 17 ++++++++++ .../epdc/dao/VlounteerTeamRealationDao.java | 9 +++++ .../VlounteerTeamRealationService.java | 9 +++++ .../VlounteerTeamRealationServiceImpl.java | 8 +++++ .../mapper/VlounteerTeamRealationDao.xml | 6 ++++ 11 files changed, 108 insertions(+), 4 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java index 7bde9fc6..3c816210 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java @@ -136,6 +136,7 @@ public class AppVolunteerRankServiceImpl implements AppVolunteerRankService { @Override public Result joinTeam(VolunteerTeamFormDTO dto) { + log.info("joinTeam-dto:"+dto); return userFeignClient.joinTeam(dto); } 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 e14101a1..066fbc2b 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 @@ -160,4 +160,13 @@ public interface ActInfoDao extends BaseDao { * @return void **/ void updateActTopFlagById(ActTopFormDTO formDto); + + /** + * @describe: 通过teamId获取活动信息 + * @author wangtong + * @date 2021/11/24 15:26 + * @params [teamId] + * @return java.util.List + */ + List selectByTeamId(@Param("teamId") String teamId); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java index f3236812..1947a6e3 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java @@ -121,4 +121,14 @@ public interface UserInfoFeignClient { */ @PostMapping(value = "app-user/vlounteerteamrealation/getVolunteerWithTeamState", consumes = MediaType.APPLICATION_JSON_VALUE) Result getVolunteerWithTeamState(VolunteerUnionFormDTO dto); + + /** + * @describe: 通过teamId查询志愿者 + * @author wangtong + * @date 2021/11/24 15:35 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @PostMapping(value = "app-user/vlounteerteamrealation/selectVolunteerByTeamId", consumes = MediaType.APPLICATION_JSON_VALUE) + Result selectVolunteerByTeamId(VolunteerUnionFormDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java index c393d58e..cf5ae130 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java @@ -68,4 +68,9 @@ public class UserInfoFeignClientFallback implements UserInfoFeignClient { public Result getVolunteerWithTeamState(VolunteerUnionFormDTO dto) { return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getVolunteerWithTeamState", dto); } + + @Override + public Result selectVolunteerByTeamId(VolunteerUnionFormDTO dto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "selectVolunteerByTeamId", dto); + } } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java index 26d4dcd9..b4d8be3c 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java @@ -17,6 +17,7 @@ package com.elink.esua.epdc.modules.volunteer.service.impl; +import com.alibaba.nacos.client.naming.utils.CollectionUtils; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; @@ -27,7 +28,10 @@ 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.dto.VolunteerDetailResultDTO; +import com.elink.esua.epdc.dto.VolunteerInfoDTO; import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; +import com.elink.esua.epdc.modules.activity.dao.ActInfoDao; +import com.elink.esua.epdc.modules.activity.entity.ActInfoEntity; import com.elink.esua.epdc.modules.feign.UserInfoFeignClient; import com.elink.esua.epdc.modules.volunteer.dao.VolunteerTeamDao; import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity; @@ -60,6 +64,9 @@ public class VolunteerTeamServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -97,11 +104,12 @@ public class VolunteerTeamServiceImpl extends BaseServiceImpl volunteerResult = userInfoFeignClient.getVolunteerWithTeamState(dto); if (!volunteerResult.success() || volunteerResult.getData() == null) { - throw new RenException("获取志愿者信息失败"); + result.setJoinFlag(false); + }else{ + VolunteerDetailResultDTO volunteerDTO = volunteerResult.getData(); + result.setJoinFlag(volunteerDTO.getJoinFlag()); + result.setVolunteerId(volunteerDTO.getVolunteerId()); } - VolunteerDetailResultDTO volunteerDTO = volunteerResult.getData(); - result.setJoinFlag(volunteerDTO.getJoinFlag()); - result.setVolunteerId(volunteerDTO.getVolunteerId()); return new Result().ok(result); } @@ -144,6 +152,24 @@ public class VolunteerTeamServiceImpl extends BaseServiceImpl actList = actInfoDao.selectByTeamId(id); + if(!CollectionUtils.isEmpty(actList)){ + throw new RenException("该团队已关联活动,暂时不可删除"); + } + //检测是否有团队成员 + VolunteerUnionFormDTO dto = new VolunteerUnionFormDTO(); + dto.setId(id); + Result> volunteerList = userInfoFeignClient.selectVolunteerByTeamId(dto); + if (!volunteerList.success() ) { + throw new RenException("获取团队成员信息有误,请稍后再试"); + } + List vList = volunteerList.getData(); + if(!CollectionUtils.isEmpty(vList)){ + throw new RenException("该团队已关联团队成员,暂时不可删除"); + } + } // 逻辑删除(@TableLogic 注解) baseDao.deleteBatchIds(Arrays.asList(ids)); } 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 a7e7745f..1b06118f 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 @@ -604,4 +604,8 @@ ORDER BY t.SIGNIN_START_TIME DESC LIMIT #{pageIndex}, #{pageSize} + diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java index f0bc0372..98e39f9b 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java @@ -127,6 +127,9 @@ public class VlounteerTeamRealationController { @GetMapping("getTeamVolunteerList") public Result> getTeamVolunteerList(@RequestBody VolunteerTeamFormDTO dto) { List page = vlounteerTeamRealationService.getTeamVolunteerList(dto); + if( page == null){ + return new Result<>(); + } return new Result>().ok(page); } @@ -141,4 +144,18 @@ public class VlounteerTeamRealationController { public Result joinTeam(@RequestBody VolunteerTeamFormDTO dto) { return vlounteerTeamRealationService.joinTeam(dto); } + + /** + * @describe: 通过teamId查询志愿者 + * @author wangtong + * @date 2021/11/24 15:37 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @PostMapping("selectVolunteerByTeamId") + public Result selectVolunteerByTeamId(@RequestBody VolunteerUnionFormDTO dto) { + return vlounteerTeamRealationService.selectVolunteerByTeamId(dto); + } + + } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java index 4f809857..10a55916 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java @@ -82,4 +82,13 @@ public interface VlounteerTeamRealationDao extends BaseDao selectVolunteerByTeamId(VolunteerUnionFormDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java index 90e9c8a7..d0f8a192 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java @@ -131,4 +131,13 @@ public interface VlounteerTeamRealationService extends BaseService volunteerList = baseDao.selectVolunteerByTeamId(dto); + return new Result().ok(volunteerList); + } + @Override public List list(Map params) { List entityList = baseDao.selectList(getWrapper(params)); diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml index 655d1b92..6c8f6e3e 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml @@ -47,6 +47,7 @@ FROM `epdc_volunteer_info` v left join epdc_vlounteer_team_realation r on r.VOLUNTEER_ID=v.id and r.TEAM_ID=#{id} + and r.DEL_FLAG='0' where v.DEL_FLAG='0' and USER_ID = #{userId} @@ -60,6 +61,7 @@ left join epdc_volunteer_info vi on vi.id=re.VOLUNTEER_ID and vi.DEL_FLAG='0' left join epdc_user u on vi.USER_ID=u.id and u.DEL_FLAG='0' where re.TEAM_ID=#{id} + and re.DEL_FLAG='0' + select * from epdc_vlounteer_team_realation where TEAM_ID=#{id} + AND DEL_FLAG='0' + From c35c91bfc3761e77e00839c48179b4e7c713307d Mon Sep 17 00:00:00 2001 From: Jackwang Date: Thu, 25 Nov 2021 16:24:43 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E5=BF=97=E6=84=BF=E8=80=85=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/EpdcCompleteUserInfoDTO.java | 8 +++++- .../esua/epdc/feign/ActInfoFeignClient.java | 10 ++++++++ .../fallback/ActInfoFeignClientFallback.java | 5 ++++ .../epdc/service/impl/AppUserServiceImpl.java | 16 +++++++++++- .../controller/VolunteerTeamController.java | 12 +++++++++ .../volunteer/dao/VolunteerTeamDao.java | 9 +++++++ .../service/VolunteerTeamService.java | 9 +++++++ .../impl/VolunteerTeamServiceImpl.java | 7 ++++++ .../resources/mapper/activity/ActInfoDao.xml | 3 ++- .../mapper/volunteer/VolunteerTeamDao.xml | 8 ++++++ .../elink/esua/epdc/dto/VolunteerInfoDTO.java | 3 ++- .../esua/epdc/dto/VolunteerUnionFormDTO.java | 6 +++++ .../elink/esua/epdc/dao/VolunteerInfoDao.java | 9 +++++++ .../VlounteerTeamRealationServiceImpl.java | 2 +- .../impl/VolunteerInfoServiceImpl.java | 25 ++++++++++--------- .../resources/mapper/VolunteerInfoDao.xml | 10 +++++--- 16 files changed, 122 insertions(+), 20 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java index 7507a3d7..65a23643 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java @@ -4,6 +4,7 @@ import lombok.Data; import javax.validation.constraints.NotBlank; import java.io.Serializable; +import java.util.List; /** * @author work@yujt.net.cn @@ -107,5 +108,10 @@ public class EpdcCompleteUserInfoDTO implements Serializable { /** * 志愿团队id */ - private String teamId; + private List teamIds; + + /** + * 已加入的志愿团队名称 + */ + private List teamNames; } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java index cb106617..feb8da73 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java @@ -191,4 +191,14 @@ public interface ActInfoFeignClient { */ @GetMapping(value ="heart/volunteerteam/getAppTeamDetail", consumes = MediaType.APPLICATION_JSON_VALUE) Result getAppTeamDetail(VolunteerUnionFormDTO formDto); + + /** + * @describe: 获取团队名称 + * @author wangtong + * @date 2021/11/25 15:43 + * @params [teamDto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping(value ="heart/volunteerteam/selectTeamNameByIds", consumes = MediaType.APPLICATION_JSON_VALUE) + Result selectTeamNameByIds(VolunteerUnionFormDTO teamDto); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java index a29b7199..a3829479 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java @@ -107,4 +107,9 @@ public class ActInfoFeignClientFallback implements ActInfoFeignClient { return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getAppTeamDetail", formDto); } + @Override + public Result selectTeamNameByIds(VolunteerUnionFormDTO teamDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "selectTeamNameByIds", teamDto); + } + } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java index 4880982c..907d549f 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java @@ -8,6 +8,7 @@ import cn.binarywang.wx.miniapp.util.crypt.WxMaCryptUtils; import cn.hutool.core.date.DateUtil; import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSONObject; +import com.alibaba.nacos.client.naming.utils.CollectionUtils; import com.elink.esua.epdc.async.GroupTask; import com.elink.esua.epdc.async.PartyGroupTask; import com.elink.esua.epdc.common.token.dto.TokenDto; @@ -119,6 +120,9 @@ public class AppUserServiceImpl implements AppUserService { @Autowired private PointsFeignClient pointsFeignClient; + @Autowired + private ActInfoFeignClient actInfoFeignClient; + //private static String USER_FACE = "https://epdc.elinkchina.com.cn/esua-epdc/static/default/default_user_face.png"; private static String USER_FACE = "https://epdc-shibei.elinkservice.cn/epdcFile/M00/00/00/CgUipV3wgl6Afm4cAAAa8QfEb00266_big.png"; @@ -949,7 +953,17 @@ public class AppUserServiceImpl implements AppUserService { dto.setIntroduce(volunteerInfoDTO.getData().getIntroduce()); dto.setVolunteerTagId(volunteerInfoDTO.getData().getTagId()); dto.setVolunteerDeptId(volunteerInfoDTO.getData().getVolunteerDeptId()); - dto.setTeamId(volunteerInfoDTO.getData().getTeamId()); + //获取团队名称 + if(!CollectionUtils.isEmpty(volunteerInfoDTO.getData().getTeamIds())){ + log.info("prepareCompleteUserInfo-volunteerInfoDTO:"+volunteerInfoDTO); + VolunteerUnionFormDTO teamDto = new VolunteerUnionFormDTO(); + teamDto.setTeamIds(volunteerInfoDTO.getData().getTeamIds()); + Result> teamResult = actInfoFeignClient.selectTeamNameByIds(teamDto); + log.info("prepareCompleteUserInfo-teamResult:"+teamResult); + if (teamResult.success() && null != teamResult.getData()) { + dto.setTeamNames(teamResult.getData()); + } + } // 如果用户表的身份证号为空,则尝试使用志愿者表中的身份证 if (null == dto.getIdentityNo() || "".equals(dto.getIdentityNo())) { dto.setIdentityNo(volunteerInfoDTO.getData().getIdentityNo()); diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java index ff35c046..0d5ac069 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java @@ -128,4 +128,16 @@ public class VolunteerTeamController { return volunteerTeamService.getAppTeamDetail(dto); } + /** + * @describe: 获取团队名称 + * @author wangtong + * @date 2021/11/25 15:45 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("selectTeamNameByIds") + public Result selectTeamNameByIds(@RequestBody VolunteerUnionFormDTO dto){ + return volunteerTeamService.selectTeamNameByIds(dto); + } + } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java index 31cdcbf4..315e2f00 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java @@ -64,4 +64,13 @@ public interface VolunteerTeamDao extends BaseDao { * @return com.elink.esua.epdc.commons.tools.utils.Result */ VolunteerDetailResultDTO getAppTeamDetail(VolunteerUnionFormDTO dto); + + /** + * @describe: 获取团队名称 + * @author wangtong + * @date 2021/11/25 15:46 + * @params [dto] + * @return java.util.List + */ + List selectTeamNameByIds(VolunteerUnionFormDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java index 51508e54..fd9154ef 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java @@ -124,4 +124,13 @@ public interface VolunteerTeamService extends BaseService { * @return com.elink.esua.epdc.commons.tools.utils.Result */ Result getAppTeamDetail(VolunteerUnionFormDTO dto); + + /** + * @describe: 获取团队名称 + * @author wangtong + * @date 2021/11/25 15:49 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result selectTeamNameByIds(VolunteerUnionFormDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java index b4d8be3c..51dcef95 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java @@ -113,6 +113,13 @@ public class VolunteerTeamServiceImpl extends BaseServiceImpl teamNames = baseDao.selectTeamNameByIds(dto); + return new Result().ok(teamNames); + } + @Override public List list(Map params) { List entityList = baseDao.selectList(getWrapper(params)); 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 1b06118f..7beea5a0 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 @@ -196,6 +196,7 @@ and relation.USER_ID = #{userId} and relation.STATUS not in ('3','4') and actInfo.ID = relation.ACT_ID + left join epdc_volunteer_team vt on actInfo.TEAM_ID=vt.id WHERE actInfo.DEL_FLAG = '0' and actInfo.ACT_STATUS = '1' #{timestamp} @@ -207,7 +208,7 @@ AND actInfo.TEAM_ID = #{teamId} - AND actInfo.SPONSOR like concat('%', #{sponsor}, '%') + AND vt.TEAM_NAME like concat('%', #{sponsor}, '%') #{timestamp} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml index aa41697c..c2b3a543 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml @@ -57,6 +57,14 @@ where DEL_FLAG='0' and id=#{id} + diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerInfoDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerInfoDTO.java index f79b8b35..2a96262f 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerInfoDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerInfoDTO.java @@ -22,6 +22,7 @@ import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; +import java.util.List; /** @@ -236,5 +237,5 @@ public class VolunteerInfoDTO implements Serializable { /** * 志愿团队id */ - private String teamId; + private List teamIds; } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerUnionFormDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerUnionFormDTO.java index b862e79a..6275da58 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerUnionFormDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerUnionFormDTO.java @@ -3,6 +3,7 @@ package com.elink.esua.epdc.dto; import lombok.Data; import java.io.Serializable; +import java.util.List; /** * @program: esua-epdc @@ -36,4 +37,9 @@ public class VolunteerUnionFormDTO implements Serializable { */ private String userId; + /** + * 志愿团队id + */ + private List teamIds; + } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java index db20d2c7..464fdf61 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java @@ -186,4 +186,13 @@ public interface VolunteerInfoDao extends BaseDao { * @return com.elink.esua.epdc.commons.tools.utils.Result> */ List getUserListForVolunteerOrg(Map params); + + /** + * @describe: 通过志愿者id查询所在的志愿团队id + * @author wangtong + * @date 2021/11/25 15:32 + * @params [volunteerId] + * @return java.util.List + */ + List selectTeamIdsByVolunteerId(@Param("volunteerId") String volunteerId); } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java index b843ddbc..c91b98fa 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java @@ -99,7 +99,7 @@ public class VlounteerTeamRealationServiceImpl extends BaseServiceImpl getVolunteerInfoDTOByUserId(String userId) { - return new Result().ok(baseDao.selectOneVolunteerInfoDTO(userId)); + VolunteerInfoDTO resutlt = baseDao.selectOneVolunteerInfoDTO(userId); + resutlt.setTeamIds(baseDao.selectTeamIdsByVolunteerId(resutlt.getId())); + return new Result().ok(resutlt); } /** @@ -464,7 +465,7 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl select m.*, - vt.tag_id, - tv.TEAM_ID + vt.tag_id from epdc_volunteer_info m left join epdc_volunteer_tag_relation vt on vt.VOLUNTEER_ID = m.id and vt.del_flag = '0' - left join epdc_vlounteer_team_realation tv on tv.VOLUNTEER_ID= m.id and tv.DEL_FLAG='0' where m.DEL_FLAG='0' and m.USER_ID=#{userId} @@ -354,4 +352,10 @@ order by vi.CREATED_TIME desc + From 639befe121a0b4f6679366aa4e85a616c5926e31 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Thu, 25 Nov 2021 17:13:55 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E5=9B=A2=E9=98=9F=E6=88=90=E5=91=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/VlounteerTeamRealationDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml index 6c8f6e3e..5197c83c 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml @@ -56,7 +56,7 @@ u.FACE_IMG, u.PARTY_FLAG, u.REAL_NAME, - vi.INTRODUCE + vi.VOLUNTEER_SIGNATURE as introduce from epdc_vlounteer_team_realation re left join epdc_volunteer_info vi on vi.id=re.VOLUNTEER_ID and vi.DEL_FLAG='0' left join epdc_user u on vi.USER_ID=u.id and u.DEL_FLAG='0'