From 323bbbdcb92af9d5973793e9fa1fba0878c2118d Mon Sep 17 00:00:00 2001 From: Jackwang Date: Sat, 28 Aug 2021 19:07:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/VolunteerController.java | 94 +++++++++++++++ .../controller/VolunteerOrgController.java | 94 +++++++++++++++ .../VolunteerOrgRelationController.java | 94 +++++++++++++++ .../modules/volunteer/dao/VolunteerDao.java | 33 +++++ .../volunteer/dao/VolunteerOrgDao.java | 33 +++++ .../dao/VolunteerOrgRelationDao.java | 33 +++++ .../volunteer/entity/VolunteerEntity.java | 113 ++++++++++++++++++ .../volunteer/entity/VolunteerOrgEntity.java | 76 ++++++++++++ .../entity/VolunteerOrgRelationEntity.java | 51 ++++++++ .../volunteer/excel/VolunteerExcel.java | 101 ++++++++++++++++ .../volunteer/excel/VolunteerOrgExcel.java | 77 ++++++++++++ .../excel/VolunteerOrgRelationExcel.java | 62 ++++++++++ .../volunteer/redis/VolunteerOrgRedis.java | 47 ++++++++ .../redis/VolunteerOrgRelationRedis.java | 47 ++++++++ .../volunteer/redis/VolunteerRedis.java | 47 ++++++++ .../service/VolunteerOrgRelationService.java | 96 +++++++++++++++ .../service/VolunteerOrgService.java | 96 +++++++++++++++ .../volunteer/service/VolunteerService.java | 96 +++++++++++++++ .../impl/VolunteerOrgRelationServiceImpl.java | 104 ++++++++++++++++ .../service/impl/VolunteerOrgServiceImpl.java | 104 ++++++++++++++++ .../service/impl/VolunteerServiceImpl.java | 104 ++++++++++++++++ .../mapper/volunteer/VolunteerDao.xml | 32 +++++ .../mapper/volunteer/VolunteerOrgDao.xml | 24 ++++ .../volunteer/VolunteerOrgRelationDao.xml | 19 +++ 24 files changed, 1677 insertions(+) create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerController.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerOrgController.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerOrgRelationController.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerDao.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerOrgDao.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerOrgRelationDao.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerEntity.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerOrgEntity.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerOrgRelationEntity.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerExcel.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerOrgExcel.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerOrgRelationExcel.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerOrgRedis.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerOrgRelationRedis.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerRedis.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerOrgRelationService.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerOrgService.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerService.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerOrgRelationServiceImpl.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerOrgServiceImpl.java create mode 100644 epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerServiceImpl.java create mode 100644 epdc-cloud-heart/src/main/resources/mapper/volunteer/VolunteerDao.xml create mode 100644 epdc-cloud-heart/src/main/resources/mapper/volunteer/VolunteerOrgDao.xml create mode 100644 epdc-cloud-heart/src/main/resources/mapper/volunteer/VolunteerOrgRelationDao.xml diff --git a/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerController.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerController.java new file mode 100644 index 0000000..28dafd2 --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerController.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.VolunteerExcel; +import com.elink.esua.epdc.modules.volunteer.service.VolunteerService; +import com.elink.esua.epdc.volunteer.VolunteerDTO; +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-08-28 + */ +@RestController +@RequestMapping("volunteer") +public class VolunteerController { + + @Autowired + private VolunteerService volunteerService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = volunteerService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + VolunteerDTO data = volunteerService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody VolunteerDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + volunteerService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody VolunteerDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + volunteerService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + volunteerService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = volunteerService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, VolunteerExcel.class); + } + +} \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerOrgController.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerOrgController.java new file mode 100644 index 0000000..d36fbc0 --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerOrgController.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.VolunteerOrgExcel; +import com.elink.esua.epdc.modules.volunteer.service.VolunteerOrgService; +import com.elink.esua.epdc.volunteer.VolunteerOrgDTO; +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-08-28 + */ +@RestController +@RequestMapping("volunteerorg") +public class VolunteerOrgController { + + @Autowired + private VolunteerOrgService volunteerOrgService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = volunteerOrgService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + VolunteerOrgDTO data = volunteerOrgService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody VolunteerOrgDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + volunteerOrgService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody VolunteerOrgDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + volunteerOrgService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + volunteerOrgService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = volunteerOrgService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, VolunteerOrgExcel.class); + } + +} \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerOrgRelationController.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerOrgRelationController.java new file mode 100644 index 0000000..f3d4e34 --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerOrgRelationController.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.VolunteerOrgRelationExcel; +import com.elink.esua.epdc.modules.volunteer.service.VolunteerOrgRelationService; +import com.elink.esua.epdc.volunteer.VolunteerOrgRelationDTO; +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-08-28 + */ +@RestController +@RequestMapping("volunteerorgrelation") +public class VolunteerOrgRelationController { + + @Autowired + private VolunteerOrgRelationService volunteerOrgRelationService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = volunteerOrgRelationService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + VolunteerOrgRelationDTO data = volunteerOrgRelationService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody VolunteerOrgRelationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + volunteerOrgRelationService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody VolunteerOrgRelationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + volunteerOrgRelationService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + volunteerOrgRelationService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = volunteerOrgRelationService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, VolunteerOrgRelationExcel.class); + } + +} \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerDao.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerDao.java new file mode 100644 index 0000000..f1352da --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerDao.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.VolunteerEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 志愿者信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-08-28 + */ +@Mapper +public interface VolunteerDao extends BaseDao { + +} \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerOrgDao.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerOrgDao.java new file mode 100644 index 0000000..c2e1080 --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerOrgDao.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.VolunteerOrgEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 志愿者组织 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-08-28 + */ +@Mapper +public interface VolunteerOrgDao extends BaseDao { + +} \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerOrgRelationDao.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerOrgRelationDao.java new file mode 100644 index 0000000..b19818a --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerOrgRelationDao.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.VolunteerOrgRelationEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 志愿者组织关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-08-28 + */ +@Mapper +public interface VolunteerOrgRelationDao extends BaseDao { + +} \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerEntity.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerEntity.java new file mode 100644 index 0000000..f3e4969 --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerEntity.java @@ -0,0 +1,113 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.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-08-28 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_volunteer") +public class VolunteerEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 姓名 + */ + private String name; + + /** + * 身份证 + */ + private String idcard; + + /** + * 电话 + */ + private String mobile; + + /** + * 自我介绍 + */ + private String describe; + + /** + * 认证状态:0审核中 1审核通过 2审核驳回 + */ + private String state; + + /** + * 审核理由 + */ + private String reason; + + /** + * 用户ID + */ + private String userId; + + /** + * 头像地址 + */ + private String url; + + /** + * 党员标识:0否1是 + */ + private String partyFlag; + + /** + * 部门ID + */ + private String deptId; + + /** + * 部门名称 + */ + private String deptName; + + /** + * 所有部门ID + */ + private String allDeptIds; + + /** + * 所有部门名称 + */ + private String allDeptNames; + + /** + * 父所有部门 + */ + private String parentDeptIds; + + /** + * 父所有部门 + */ + private String parentDeptNames; + +} \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerOrgEntity.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerOrgEntity.java new file mode 100644 index 0000000..11e254d --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerOrgEntity.java @@ -0,0 +1,76 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.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; + +import java.util.Date; + +/** + * 志愿者组织 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-08-28 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_volunteer_org") +public class VolunteerOrgEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 组织名称 + */ + private String volunteerOrgName; + + /** + * 组织编码 + */ + private String volunteerOrgCode; + + /** + * 是否启用:0启用 1禁用 + */ + private String isOpen; + + /** + * 排序 + */ + private Integer sort; + + /** + * 负责人 + */ + private String headName; + + /** + * 负责电话 + */ + private String mobile; + + /** + * 地址 + */ + private String address; + +} \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerOrgRelationEntity.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerOrgRelationEntity.java new file mode 100644 index 0000000..cc7b1d0 --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerOrgRelationEntity.java @@ -0,0 +1,51 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.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-08-28 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_volunteer_org_relation") +public class VolunteerOrgRelationEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 志愿者id + */ + private String volunteerId; + + /** + * 志愿组织id + */ + private Integer volunteerOrgId; + +} \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerExcel.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerExcel.java new file mode 100644 index 0000000..1112a3f --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerExcel.java @@ -0,0 +1,101 @@ +/** + * 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-08-28 + */ +@Data +public class VolunteerExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "姓名") + private String name; + + @Excel(name = "身份证") + private String idcard; + + @Excel(name = "电话") + private String mobile; + + @Excel(name = "自我介绍") + private String describe; + + @Excel(name = "认证状态:0审核中 1审核通过 2审核驳回") + private String state; + + @Excel(name = "审核理由") + private String reason; + + @Excel(name = "用户ID") + private String userId; + + @Excel(name = "头像地址") + private String url; + + @Excel(name = "党员标识:0否1是") + private String partyFlag; + + @Excel(name = "部门ID") + private String deptId; + + @Excel(name = "部门名称") + private String deptName; + + @Excel(name = "所有部门ID") + private String allDeptIds; + + @Excel(name = "所有部门名称") + private String allDeptNames; + + @Excel(name = "父所有部门") + private String parentDeptIds; + + @Excel(name = "父所有部门") + private String parentDeptNames; + + @Excel(name = "删除标识 0-否,1-是") + private String delFlag; + + @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; + + +} \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerOrgExcel.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerOrgExcel.java new file mode 100644 index 0000000..6d605fe --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerOrgExcel.java @@ -0,0 +1,77 @@ +/** + * 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-08-28 + */ +@Data +public class VolunteerOrgExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "组织名称") + private String volunteerOrgName; + + @Excel(name = "组织编码") + private String volunteerOrgCode; + + @Excel(name = "是否启用:0启用 1禁用") + private String isOpen; + + @Excel(name = "排序") + private Integer sort; + + @Excel(name = "负责人") + private String headName; + + @Excel(name = "负责电话") + private String mobile; + + @Excel(name = "地址") + private String address; + + @Excel(name = "删除标识 0-否,1-是") + private String delFlag; + + @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; + + +} \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerOrgRelationExcel.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerOrgRelationExcel.java new file mode 100644 index 0000000..148d1cc --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerOrgRelationExcel.java @@ -0,0 +1,62 @@ +/** + * 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-08-28 + */ +@Data +public class VolunteerOrgRelationExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "志愿者id") + private String volunteerId; + + @Excel(name = "志愿组织id") + private Integer volunteerOrgId; + + @Excel(name = "删除标识 0-否,1-是") + private String delFlag; + + @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; + + +} \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerOrgRedis.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerOrgRedis.java new file mode 100644 index 0000000..59824e6 --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerOrgRedis.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-08-28 + */ +@Component +public class VolunteerOrgRedis { + @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/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerOrgRelationRedis.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerOrgRelationRedis.java new file mode 100644 index 0000000..20a7710 --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerOrgRelationRedis.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-08-28 + */ +@Component +public class VolunteerOrgRelationRedis { + @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/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerRedis.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerRedis.java new file mode 100644 index 0000000..d30b389 --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerRedis.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-08-28 + */ +@Component +public class VolunteerRedis { + @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/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerOrgRelationService.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerOrgRelationService.java new file mode 100644 index 0000000..5906e59 --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerOrgRelationService.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.VolunteerOrgRelationEntity; +import com.elink.esua.epdc.volunteer.VolunteerOrgRelationDTO; + +import java.util.List; +import java.util.Map; + +/** + * 志愿者组织关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-08-28 + */ +public interface VolunteerOrgRelationService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-08-28 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-08-28 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return VolunteerOrgRelationDTO + * @author generator + * @date 2021-08-28 + */ + VolunteerOrgRelationDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-08-28 + */ + void save(VolunteerOrgRelationDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-08-28 + */ + void update(VolunteerOrgRelationDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-08-28 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerOrgService.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerOrgService.java new file mode 100644 index 0000000..1f28521 --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerOrgService.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.VolunteerOrgEntity; +import com.elink.esua.epdc.volunteer.VolunteerOrgDTO; + +import java.util.List; +import java.util.Map; + +/** + * 志愿者组织 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-08-28 + */ +public interface VolunteerOrgService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-08-28 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-08-28 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return VolunteerOrgDTO + * @author generator + * @date 2021-08-28 + */ + VolunteerOrgDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-08-28 + */ + void save(VolunteerOrgDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-08-28 + */ + void update(VolunteerOrgDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-08-28 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerService.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerService.java new file mode 100644 index 0000000..bd7b167 --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerService.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.VolunteerEntity; +import com.elink.esua.epdc.volunteer.VolunteerDTO; + +import java.util.List; +import java.util.Map; + +/** + * 志愿者信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-08-28 + */ +public interface VolunteerService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-08-28 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-08-28 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return VolunteerDTO + * @author generator + * @date 2021-08-28 + */ + VolunteerDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-08-28 + */ + void save(VolunteerDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-08-28 + */ + void update(VolunteerDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-08-28 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerOrgRelationServiceImpl.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerOrgRelationServiceImpl.java new file mode 100644 index 0000000..108c00a --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerOrgRelationServiceImpl.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.VolunteerOrgRelationDao; +import com.elink.esua.epdc.modules.volunteer.entity.VolunteerOrgRelationEntity; +import com.elink.esua.epdc.modules.volunteer.service.VolunteerOrgRelationService; +import com.elink.esua.epdc.volunteer.VolunteerOrgRelationDTO; +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 com.elink.esua.epdc.modules.volunteer.redis.VolunteerOrgRelationRedis; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 志愿者组织关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-08-28 + */ +@Service +public class VolunteerOrgRelationServiceImpl extends BaseServiceImpl implements VolunteerOrgRelationService { + + @Autowired + private VolunteerOrgRelationRedis volunteerOrgRelationRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, VolunteerOrgRelationDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, VolunteerOrgRelationDTO.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 VolunteerOrgRelationDTO get(String id) { + VolunteerOrgRelationEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, VolunteerOrgRelationDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(VolunteerOrgRelationDTO dto) { + VolunteerOrgRelationEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerOrgRelationEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(VolunteerOrgRelationDTO dto) { + VolunteerOrgRelationEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerOrgRelationEntity.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/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerOrgServiceImpl.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerOrgServiceImpl.java new file mode 100644 index 0000000..f756df8 --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerOrgServiceImpl.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.VolunteerOrgDao; +import com.elink.esua.epdc.modules.volunteer.entity.VolunteerOrgEntity; +import com.elink.esua.epdc.modules.volunteer.redis.VolunteerOrgRedis; +import com.elink.esua.epdc.modules.volunteer.service.VolunteerOrgService; +import com.elink.esua.epdc.volunteer.VolunteerOrgDTO; +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-08-28 + */ +@Service +public class VolunteerOrgServiceImpl extends BaseServiceImpl implements VolunteerOrgService { + + @Autowired + private VolunteerOrgRedis volunteerOrgRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, VolunteerOrgDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, VolunteerOrgDTO.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 VolunteerOrgDTO get(String id) { + VolunteerOrgEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, VolunteerOrgDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(VolunteerOrgDTO dto) { + VolunteerOrgEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerOrgEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(VolunteerOrgDTO dto) { + VolunteerOrgEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerOrgEntity.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/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerServiceImpl.java b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerServiceImpl.java new file mode 100644 index 0000000..a4355f1 --- /dev/null +++ b/epdc-cloud-heart/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerServiceImpl.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.VolunteerDao; +import com.elink.esua.epdc.modules.volunteer.entity.VolunteerEntity; +import com.elink.esua.epdc.modules.volunteer.redis.VolunteerRedis; +import com.elink.esua.epdc.modules.volunteer.service.VolunteerService; +import com.elink.esua.epdc.volunteer.VolunteerDTO; +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-08-28 + */ +@Service +public class VolunteerServiceImpl extends BaseServiceImpl implements VolunteerService { + + @Autowired + private VolunteerRedis volunteerRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, VolunteerDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, VolunteerDTO.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 VolunteerDTO get(String id) { + VolunteerEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, VolunteerDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(VolunteerDTO dto) { + VolunteerEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(VolunteerDTO dto) { + VolunteerEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerEntity.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/epdc-cloud-heart/src/main/resources/mapper/volunteer/VolunteerDao.xml b/epdc-cloud-heart/src/main/resources/mapper/volunteer/VolunteerDao.xml new file mode 100644 index 0000000..3358faa --- /dev/null +++ b/epdc-cloud-heart/src/main/resources/mapper/volunteer/VolunteerDao.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/resources/mapper/volunteer/VolunteerOrgDao.xml b/epdc-cloud-heart/src/main/resources/mapper/volunteer/VolunteerOrgDao.xml new file mode 100644 index 0000000..0af1231 --- /dev/null +++ b/epdc-cloud-heart/src/main/resources/mapper/volunteer/VolunteerOrgDao.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epdc-cloud-heart/src/main/resources/mapper/volunteer/VolunteerOrgRelationDao.xml b/epdc-cloud-heart/src/main/resources/mapper/volunteer/VolunteerOrgRelationDao.xml new file mode 100644 index 0000000..b82930e --- /dev/null +++ b/epdc-cloud-heart/src/main/resources/mapper/volunteer/VolunteerOrgRelationDao.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file