75 changed files with 4846 additions and 14 deletions
@ -0,0 +1,102 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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 typeName; |
|||
|
|||
/** |
|||
* 联系人 |
|||
*/ |
|||
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; |
|||
|
|||
} |
|||
@ -0,0 +1,86 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
|||
@ -0,0 +1,92 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
|||
@ -0,0 +1,143 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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.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; |
|||
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<PageData<VolunteerTeamDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<VolunteerTeamDTO> page = volunteerTeamService.getPageList(params); |
|||
return new Result<PageData<VolunteerTeamDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<VolunteerTeamDTO> get(@PathVariable("id") String id){ |
|||
VolunteerTeamDTO data = volunteerTeamService.get(id); |
|||
return new Result<VolunteerTeamDTO>().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<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<VolunteerTeamDTO> list = volunteerTeamService.list(params); |
|||
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<String, Object> params){ |
|||
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); |
|||
} |
|||
|
|||
/** |
|||
* @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); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,120 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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.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; |
|||
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<PageData<VolunteerTeamTypeDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<VolunteerTeamTypeDTO> page = volunteerTeamTypeService.page(params); |
|||
return new Result<PageData<VolunteerTeamTypeDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<VolunteerTeamTypeDTO> get(@PathVariable("id") String id){ |
|||
VolunteerTeamTypeDTO data = volunteerTeamTypeService.get(id); |
|||
return new Result<VolunteerTeamTypeDTO>().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<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<VolunteerTeamTypeDTO> list = volunteerTeamTypeService.list(params); |
|||
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(@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); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,119 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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.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; |
|||
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<PageData<VolunteerUnionDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<VolunteerUnionDTO> page = volunteerUnionService.page(params); |
|||
return new Result<PageData<VolunteerUnionDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<VolunteerUnionDTO> get(@PathVariable("id") String id){ |
|||
VolunteerUnionDTO data = volunteerUnionService.get(id); |
|||
return new Result<VolunteerUnionDTO>().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<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<VolunteerUnionDTO> list = volunteerUnionService.list(params); |
|||
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); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,76 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 志愿团队 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2021-11-16 |
|||
*/ |
|||
@Mapper |
|||
public interface VolunteerTeamDao extends BaseDao<VolunteerTeamEntity> { |
|||
|
|||
List<VolunteerTeamDTO> getPageList(Map<String, Object> params); |
|||
|
|||
/** |
|||
* @describe: 通过团队类别获取团队列表 |
|||
* @author wangtong |
|||
* @date 2021/11/18 14:47 |
|||
* @params [params] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
*/ |
|||
List<VolunteerTeamDTO> getTeamListByType(Map<String, Object> params); |
|||
|
|||
/** |
|||
* @describe: 小程序-志愿团队-列表 |
|||
* @author wangtong |
|||
* @date 2021/11/22 14:45 |
|||
* @params [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
*/ |
|||
List<VolunteerTeamEntity> 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); |
|||
|
|||
/** |
|||
* @describe: 获取团队名称 |
|||
* @author wangtong |
|||
* @date 2021/11/25 15:46 |
|||
* @params [dto] |
|||
* @return java.util.List<java.lang.String> |
|||
*/ |
|||
List<String> selectTeamNameByIds(VolunteerUnionFormDTO dto); |
|||
} |
|||
@ -0,0 +1,54 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 志愿团队类别 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2021-11-16 |
|||
*/ |
|||
@Mapper |
|||
public interface VolunteerTeamTypeDao extends BaseDao<VolunteerTeamTypeEntity> { |
|||
|
|||
/** |
|||
* @describe: 小程序-查询所有志愿团队类别 |
|||
* @author wangtong |
|||
* @date 2021/11/18 10:55 |
|||
* @params [] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
*/ |
|||
List<VolunteerTeamTypeEntity> getTeamTypeList(VolunteerTeamFormDTO formDto); |
|||
|
|||
/** |
|||
* @describe: 查询所有志愿团队类别 |
|||
* @author wangtong |
|||
* @date 2021/11/18 10:55 |
|||
* @params [] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
*/ |
|||
List<VolunteerTeamTypeEntity> getSysTeamTypeList(VolunteerTeamFormDTO formDto); |
|||
} |
|||
@ -0,0 +1,49 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 共建联盟 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2021-11-16 |
|||
*/ |
|||
@Mapper |
|||
public interface VolunteerUnionDao extends BaseDao<VolunteerUnionEntity> { |
|||
|
|||
List<VolunteerUnionDTO> getPageList(Map<String, Object> params); |
|||
|
|||
/** |
|||
* @describe: 小程序-共建联盟-列表 |
|||
* @author wangtong |
|||
* @date 2021/11/22 11:06 |
|||
* @params [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
*/ |
|||
List<VolunteerUnionEntity> getVolunteerPioneerList(VolunteerUnionFormDTO formDto); |
|||
} |
|||
@ -0,0 +1,63 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
|||
@ -0,0 +1,82 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
|||
@ -0,0 +1,58 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
|||
@ -0,0 +1,71 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,65 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,68 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,136 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
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<VolunteerTeamEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<VolunteerTeamDTO> |
|||
* @author generator |
|||
* @date 2021-11-16 |
|||
*/ |
|||
PageData<VolunteerTeamDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<VolunteerTeamDTO> |
|||
* @author generator |
|||
* @date 2021-11-16 |
|||
*/ |
|||
List<VolunteerTeamDTO> list(Map<String, Object> 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); |
|||
|
|||
PageData<VolunteerTeamDTO> getPageList(Map<String, Object> params); |
|||
|
|||
/** |
|||
* @describe: 通过团队类别获取团队列表 |
|||
* @author wangtong |
|||
* @date 2021/11/18 14:47 |
|||
* @params [params] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
*/ |
|||
Result getTeamListByType(Map<String, Object> 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); |
|||
|
|||
/** |
|||
* @describe: 获取团队名称 |
|||
* @author wangtong |
|||
* @date 2021/11/25 15:49 |
|||
* @params [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
*/ |
|||
Result selectTeamNameByIds(VolunteerUnionFormDTO dto); |
|||
} |
|||
@ -0,0 +1,116 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
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<VolunteerTeamTypeEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<VolunteerTeamTypeDTO> |
|||
* @author generator |
|||
* @date 2021-11-16 |
|||
*/ |
|||
PageData<VolunteerTeamTypeDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<VolunteerTeamTypeDTO> |
|||
* @author generator |
|||
* @date 2021-11-16 |
|||
*/ |
|||
List<VolunteerTeamTypeDTO> list(Map<String, Object> 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); |
|||
|
|||
/** |
|||
* @describe: 查询所有志愿团队类别 |
|||
* @author wangtong |
|||
* @date 2021/11/18 10:55 |
|||
* @params [] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
*/ |
|||
Result getTeamTypeList(VolunteerTeamFormDTO formDto); |
|||
|
|||
/** |
|||
* @describe: 查询所有志愿团队类别 |
|||
* @author wangtong |
|||
* @date 2021/11/24 9:23 |
|||
* @params [formDto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
*/ |
|||
Result getSysTeamTypeList(VolunteerTeamFormDTO formDto); |
|||
} |
|||
@ -0,0 +1,115 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
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<VolunteerUnionEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<VolunteerUnionDTO> |
|||
* @author generator |
|||
* @date 2021-11-16 |
|||
*/ |
|||
PageData<VolunteerUnionDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<VolunteerUnionDTO> |
|||
* @author generator |
|||
* @date 2021-11-16 |
|||
*/ |
|||
List<VolunteerUnionDTO> list(Map<String, Object> 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); |
|||
|
|||
/** |
|||
* @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); |
|||
} |
|||
@ -0,0 +1,186 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
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.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; |
|||
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; |
|||
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 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class VolunteerTeamServiceImpl extends BaseServiceImpl<VolunteerTeamDao, VolunteerTeamEntity> implements VolunteerTeamService { |
|||
|
|||
@Autowired |
|||
private VolunteerTeamRedis volunteerTeamRedis; |
|||
|
|||
@Autowired |
|||
private UserInfoFeignClient userInfoFeignClient; |
|||
|
|||
@Autowired |
|||
private ActInfoDao actInfoDao; |
|||
|
|||
@Override |
|||
public PageData<VolunteerTeamDTO> page(Map<String, Object> params) { |
|||
IPage<VolunteerTeamEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, VolunteerTeamDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public PageData<VolunteerTeamDTO> getPageList(Map<String, Object> params) { |
|||
IPage<VolunteerTeamDTO> page = getPage(params); |
|||
List<VolunteerTeamDTO> list = baseDao.getPageList(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public Result getTeamListByType(Map<String, Object> params) { |
|||
List<VolunteerTeamDTO> list = baseDao.getTeamListByType(params); |
|||
return new Result().ok(list); |
|||
} |
|||
|
|||
@Override |
|||
public Result getAppTeamListByType(VolunteerUnionFormDTO formDto) { |
|||
int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize(); |
|||
formDto.setPageIndex(pageIndex); |
|||
List<VolunteerTeamEntity> list = baseDao.getAppTeamListByType(formDto); |
|||
return new Result().ok(list); |
|||
} |
|||
|
|||
@Override |
|||
public Result getAppTeamDetail(VolunteerUnionFormDTO dto) { |
|||
log.info("getAppTeamDetail-dto:"+dto); |
|||
VolunteerDetailResultDTO result = baseDao.getAppTeamDetail(dto); |
|||
|
|||
Result<VolunteerDetailResultDTO> volunteerResult = userInfoFeignClient.getVolunteerWithTeamState(dto); |
|||
if (!volunteerResult.success() || volunteerResult.getData() == null) { |
|||
result.setJoinFlag(false); |
|||
}else{ |
|||
VolunteerDetailResultDTO volunteerDTO = volunteerResult.getData(); |
|||
result.setJoinFlag(volunteerDTO.getJoinFlag()); |
|||
result.setVolunteerId(volunteerDTO.getVolunteerId()); |
|||
} |
|||
return new Result().ok(result); |
|||
} |
|||
|
|||
@Override |
|||
public Result selectTeamNameByIds(VolunteerUnionFormDTO dto) { |
|||
log.info("selectTeamNameByIds-dto:"+dto); |
|||
List<String> teamNames = baseDao.selectTeamNameByIds(dto); |
|||
return new Result().ok(teamNames); |
|||
} |
|||
|
|||
@Override |
|||
public List<VolunteerTeamDTO> list(Map<String, Object> params) { |
|||
List<VolunteerTeamEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, VolunteerTeamDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<VolunteerTeamEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<VolunteerTeamEntity> 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) { |
|||
for(String id : ids){ |
|||
//检测是否关联活动
|
|||
List<ActInfoEntity> actList = actInfoDao.selectByTeamId(id); |
|||
if(!CollectionUtils.isEmpty(actList)){ |
|||
throw new RenException("该团队已关联活动,暂时不可删除"); |
|||
} |
|||
//检测是否有团队成员
|
|||
VolunteerUnionFormDTO dto = new VolunteerUnionFormDTO(); |
|||
dto.setId(id); |
|||
Result<List<VolunteerInfoDTO>> volunteerList = userInfoFeignClient.selectVolunteerByTeamId(dto); |
|||
if (!volunteerList.success() ) { |
|||
throw new RenException("获取团队成员信息有误,请稍后再试"); |
|||
} |
|||
List<VolunteerInfoDTO> vList = volunteerList.getData(); |
|||
if(!CollectionUtils.isEmpty(vList)){ |
|||
throw new RenException("该团队已关联团队成员,暂时不可删除"); |
|||
} |
|||
} |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,168 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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.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.VolunteerTeamFormDTO; |
|||
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<VolunteerTeamTypeDao, VolunteerTeamTypeEntity> implements VolunteerTeamTypeService { |
|||
|
|||
@Autowired |
|||
private VolunteerTeamTypeRedis volunteerTeamTypeRedis; |
|||
|
|||
@Override |
|||
public PageData<VolunteerTeamTypeDTO> page(Map<String, Object> params) { |
|||
IPage<VolunteerTeamTypeEntity> page = baseDao.selectPage( |
|||
getPage(params, "sort", true), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, VolunteerTeamTypeDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<VolunteerTeamTypeDTO> list(Map<String, Object> params) { |
|||
List<VolunteerTeamTypeEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, VolunteerTeamTypeDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<VolunteerTeamTypeEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<VolunteerTeamTypeEntity> 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) { |
|||
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); |
|||
insert(entity); |
|||
} |
|||
|
|||
public Integer getCodeCount(VolunteerTeamTypeDTO dto) { |
|||
QueryWrapper<VolunteerTeamTypeEntity> 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<VolunteerTeamTypeEntity> 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); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
@Override |
|||
public Result getTeamTypeList(VolunteerTeamFormDTO formDto) { |
|||
List<VolunteerTeamTypeEntity> result = baseDao.getTeamTypeList(formDto); |
|||
return new Result().ok(result); |
|||
} |
|||
|
|||
@Override |
|||
public Result getSysTeamTypeList(VolunteerTeamFormDTO formDto) { |
|||
List<VolunteerTeamTypeEntity> result = baseDao.getSysTeamTypeList(formDto); |
|||
return new Result().ok(result); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,124 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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.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; |
|||
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<VolunteerUnionDao, VolunteerUnionEntity> implements VolunteerUnionService { |
|||
|
|||
@Autowired |
|||
private VolunteerUnionRedis volunteerUnionRedis; |
|||
|
|||
@Override |
|||
public PageData<VolunteerUnionDTO> page(Map<String, Object> params) { |
|||
// IPage<VolunteerUnionEntity> page = baseDao.selectPage(
|
|||
// getPage(params, FieldConstant.CREATED_TIME, false),
|
|||
// getWrapper(params)
|
|||
// );
|
|||
// return getPageData(page, VolunteerUnionDTO.class);
|
|||
IPage<VolunteerUnionDTO> page = getPage(params); |
|||
List<VolunteerUnionDTO> list = baseDao.getPageList(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public List<VolunteerUnionDTO> list(Map<String, Object> params) { |
|||
List<VolunteerUnionEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, VolunteerUnionDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<VolunteerUnionEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<VolunteerUnionEntity> 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)); |
|||
} |
|||
|
|||
@Override |
|||
public Result getVolunteerUnionList(VolunteerUnionFormDTO formDto) { |
|||
int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize(); |
|||
formDto.setPageIndex(pageIndex); |
|||
List<VolunteerUnionEntity> 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); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,70 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.modules.volunteer.dao.VolunteerTeamDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity" id="volunteerTeamMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="teamName" column="TEAM_NAME"/> |
|||
<result property="teamType" column="TEAM_TYPE"/> |
|||
<result property="contacts" column="CONTACTS"/> |
|||
<result property="phone" column="PHONE"/> |
|||
<result property="content" column="CONTENT"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
</resultMap> |
|||
<select id="getPageList" resultType="com.elink.esua.epdc.volunteer.VolunteerTeamDTO"> |
|||
select tt.type_name,t.* |
|||
from epdc_volunteer_team t |
|||
left join epdc_volunteer_team_type tt on t.TEAM_TYPE=tt.type_code |
|||
where t.DEL_FLAG='0' |
|||
<if test="teamType != null and teamType != ''"> |
|||
and t.TEAM_TYPE like #{teamType} |
|||
</if> |
|||
<if test="teamName != null and teamName != ''"> |
|||
and t.TEAM_NAME like '%${teamName}%' |
|||
</if> |
|||
<if test="contacts != null and contacts != ''"> |
|||
and t.CONTACTS like '%${contacts}%' |
|||
</if> |
|||
order by CREATED_TIME desc |
|||
</select> |
|||
<select id="getTeamListByType" resultType="com.elink.esua.epdc.volunteer.VolunteerTeamDTO"> |
|||
select * |
|||
from epdc_volunteer_team |
|||
where DEL_FLAG='0' |
|||
and TEAM_TYPE=#{teamType} |
|||
order by CREATED_TIME desc |
|||
</select> |
|||
<select id="getAppTeamListByType" |
|||
resultType="com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity"> |
|||
select * |
|||
from epdc_volunteer_team |
|||
where DEL_FLAG='0' |
|||
and TEAM_TYPE=#{typeCode} |
|||
order by CREATED_TIME desc |
|||
LIMIT #{pageIndex},#{pageSize} |
|||
</select> |
|||
<select id="getAppTeamDetail" resultType="com.elink.esua.epdc.dto.VolunteerDetailResultDTO"> |
|||
SELECT id, |
|||
TEAM_NAME, |
|||
CONTENT |
|||
FROM `epdc_volunteer_team` |
|||
where DEL_FLAG='0' |
|||
and id=#{id} |
|||
</select> |
|||
<select id="selectTeamNameByIds" resultType="java.lang.String"> |
|||
select TEAM_NAME |
|||
from epdc_volunteer_team |
|||
where id in |
|||
<foreach collection="teamIds" index="index" item="teamId" open="(" separator="," close=")"> |
|||
#{teamId} |
|||
</foreach> |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,38 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.modules.volunteer.dao.VolunteerTeamTypeDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamTypeEntity" id="volunteerTeamTypeMap"> |
|||
<result property="id" column="id"/> |
|||
<result property="typeName" column="type_name"/> |
|||
<result property="typeCode" column="type_code"/> |
|||
<result property="sort" column="sort"/> |
|||
<result property="bannerFlag" column="banner_flag"/> |
|||
<result property="delFlag" column="del_flag"/> |
|||
<result property="creator" column="creator"/> |
|||
<result property="createDate" column="create_date"/> |
|||
<result property="updater" column="updater"/> |
|||
<result property="updateDate" column="update_date"/> |
|||
</resultMap> |
|||
<select id="getTeamTypeList" resultType="com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamTypeEntity"> |
|||
SELECT distinct tt.* |
|||
FROM `epdc_volunteer_team_type` tt |
|||
left join epdc_volunteer_team t on t.TEAM_TYPE=tt.type_code |
|||
where tt.del_flag='0' |
|||
and tt.banner_flag = '0' |
|||
<if test="teamId != null and teamId != ''"> |
|||
and t.id= #{teamId} |
|||
</if> |
|||
order by tt.sort asc |
|||
</select> |
|||
<select id="getSysTeamTypeList" resultType="com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamTypeEntity"> |
|||
SELECT * |
|||
FROM `epdc_volunteer_team_type` |
|||
where del_flag='0' |
|||
and banner_flag = '0' |
|||
order by sort asc |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,44 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.modules.volunteer.dao.VolunteerUnionDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.modules.volunteer.entity.VolunteerUnionEntity" id="volunteerUnionMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="unionName" column="UNION_NAME"/> |
|||
<result property="contacts" column="CONTACTS"/> |
|||
<result property="phone" column="PHONE"/> |
|||
<result property="content" column="CONTENT"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
</resultMap> |
|||
<select id="getPageList" resultType="com.elink.esua.epdc.volunteer.VolunteerUnionDTO"> |
|||
SELECT * |
|||
FROM `epdc_volunteer_union` |
|||
where DEL_FLAG='0' |
|||
<if test="unionName != null and unionName != ''"> |
|||
and UNION_NAME like '%${unionName}%' |
|||
</if> |
|||
<if test="contacts != null and contacts != ''"> |
|||
and CONTACTS like '%${contacts}%' |
|||
</if> |
|||
<if test="phone != null and phone != ''"> |
|||
and PHONE like '%${phone}%' |
|||
</if> |
|||
order by CREATED_TIME desc |
|||
</select> |
|||
<select id="getVolunteerPioneerList" resultType="com.elink.esua.epdc.modules.volunteer.entity.VolunteerUnionEntity"> |
|||
SELECT * |
|||
FROM `epdc_volunteer_union` |
|||
where DEL_FLAG='0' |
|||
order by CREATED_TIME desc |
|||
LIMIT #{pageIndex},#{pageSize} |
|||
|
|||
</select> |
|||
|
|||
|
|||
</mapper> |
|||
@ -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; |
|||
} |
|||
@ -0,0 +1,83 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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 Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
/** |
|||
* 删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
} |
|||
@ -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; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,102 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String realName; |
|||
|
|||
/** |
|||
* 志愿者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; |
|||
|
|||
} |
|||
@ -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; |
|||
} |
|||
@ -0,0 +1,45 @@ |
|||
package com.elink.esua.epdc.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @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; |
|||
|
|||
/** |
|||
* 志愿团队id |
|||
*/ |
|||
private List<String> teamIds; |
|||
|
|||
} |
|||
@ -0,0 +1,161 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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.DefaultGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
|||
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; |
|||
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<PageData<VlounteerTeamRealationDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<VlounteerTeamRealationDTO> page = vlounteerTeamRealationService.page(params); |
|||
return new Result<PageData<VlounteerTeamRealationDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<VlounteerTeamRealationDTO> get(@PathVariable("id") String id){ |
|||
VlounteerTeamRealationDTO data = vlounteerTeamRealationService.get(id); |
|||
return new Result<VlounteerTeamRealationDTO>().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<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<VlounteerTeamRealationDTO> list = vlounteerTeamRealationService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, VlounteerTeamRealationExcel.class); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* @describe: 通过志愿团队id获取志愿者信息 |
|||
* @author wangtong |
|||
* @date 2021/11/18 16:26 |
|||
* @params [params] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.VolunteerInfoDTO>> |
|||
*/ |
|||
@GetMapping("getVolunteerListByTeamId") |
|||
public Result<PageData<VolunteerInfoDTO>> getVolunteerListByTeamId(@RequestParam Map<String, Object> params) { |
|||
PageData<VolunteerInfoDTO> page = vlounteerTeamRealationService.getVolunteerListByTeamId(params); |
|||
return new Result<PageData<VolunteerInfoDTO>>().ok(page); |
|||
} |
|||
|
|||
/** |
|||
* @describe: 小程序-通过用户信息和志愿团队id获取志愿者信息 |
|||
* @author wangtong |
|||
* @date 2021/11/22 16:03 |
|||
* @params [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
*/ |
|||
@PostMapping("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<List<TeamVolunteerListDTO>> getTeamVolunteerList(@RequestBody VolunteerTeamFormDTO dto) { |
|||
List<TeamVolunteerListDTO> page = vlounteerTeamRealationService.getTeamVolunteerList(dto); |
|||
if( page == null){ |
|||
return new Result<>(); |
|||
} |
|||
return new Result<List<TeamVolunteerListDTO>>().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); |
|||
} |
|||
|
|||
/** |
|||
* @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); |
|||
} |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,132 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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.DefaultGroup; |
|||
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
|||
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; |
|||
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<PageData<VolunteerPioneerDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<VolunteerPioneerDTO> page = volunteerPioneerService.page(params); |
|||
return new Result<PageData<VolunteerPioneerDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<VolunteerPioneerDTO> get(@PathVariable("id") String id){ |
|||
VolunteerPioneerDTO data = volunteerPioneerService.get(id); |
|||
return new Result<VolunteerPioneerDTO>().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<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<VolunteerPioneerDTO> list = volunteerPioneerService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, VolunteerPioneerExcel.class); |
|||
} |
|||
|
|||
/** |
|||
* @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); |
|||
} |
|||
|
|||
/** |
|||
* @describe: 小程序-志愿先锋-列表 |
|||
* @author wangtong |
|||
* @date 2021/11/22 10:41 |
|||
* @params [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.VolunteerPioneerDTO>> |
|||
*/ |
|||
@GetMapping("getVolunteerPioneerList") |
|||
public Result<List<VolunteerPioneerDTO>> getVolunteerPioneerList(@RequestBody VolunteerTeamFormDTO dto){ |
|||
List<VolunteerPioneerDTO> page = volunteerPioneerService.getVolunteerPioneerList(dto); |
|||
return new Result<List<VolunteerPioneerDTO>>().ok(page); |
|||
} |
|||
|
|||
/** |
|||
* @describe: 小程序-志愿先锋-详情 |
|||
* @author wangtong |
|||
* @date 2021/11/22 10:54 |
|||
* @params [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.VolunteerPioneerDTO>> |
|||
*/ |
|||
@GetMapping("getVolunteerPioneerDetail") |
|||
public Result getVolunteerPioneerDetail(@RequestBody VolunteerTeamFormDTO dto){ |
|||
return volunteerPioneerService.getVolunteerPioneerDetail(dto); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,94 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.dao; |
|||
|
|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
|||
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; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 志愿者-志愿团队关联表 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2021-11-16 |
|||
*/ |
|||
@Mapper |
|||
public interface VlounteerTeamRealationDao extends BaseDao<VlounteerTeamRealationEntity> { |
|||
|
|||
List<VlounteerTeamRealationDTO> getPageList(Map<String, Object> params); |
|||
|
|||
/** |
|||
* @describe: 通过志愿团队id获取志愿者信息 |
|||
* @author wangtong |
|||
* @date 2021/11/18 16:26 |
|||
* @params [params] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.VolunteerInfoDTO>> |
|||
*/ |
|||
List<VolunteerInfoEntity> getVolunteerListByTeamId(Map<String, Object> 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<TeamVolunteerListDTO> 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); |
|||
|
|||
/** |
|||
* @describe: 删除志愿者关联信息 |
|||
* @author wangtong |
|||
* @date 2021/11/23 16:55 |
|||
* @params [volunteerId] |
|||
* @return void |
|||
*/ |
|||
void deleteByVolunteerId(@Param("volunteerId") String volunteerId); |
|||
|
|||
/** |
|||
* @describe: 通过teamId查询志愿者 |
|||
* @author wangtong |
|||
* @date 2021/11/24 15:37 |
|||
* @params [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
*/ |
|||
List<VolunteerInfoDTO> selectVolunteerByTeamId(VolunteerUnionFormDTO dto); |
|||
} |
|||
@ -0,0 +1,58 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 志愿先锋 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2021-11-16 |
|||
*/ |
|||
@Mapper |
|||
public interface VolunteerPioneerDao extends BaseDao<VolunteerPioneerEntity> { |
|||
|
|||
List<VolunteerPioneerDTO> getPageList(Map<String, Object> 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); |
|||
|
|||
/** |
|||
* @describe: 小程序-志愿先锋-列表 |
|||
* @author wangtong |
|||
* @date 2021/11/22 10:45 |
|||
* @params [formDto] |
|||
* @return java.util.List<com.elink.esua.epdc.dto.VolunteerPioneerDTO> |
|||
*/ |
|||
List<VolunteerPioneerDTO> getVolunteerPioneerList(VolunteerTeamFormDTO formDto); |
|||
} |
|||
@ -0,0 +1,49 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
/** |
|||
* 志愿者-志愿团队关联表 |
|||
* |
|||
* @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; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,66 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
} |
|||
@ -0,0 +1,68 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,71 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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; |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,143 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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.*; |
|||
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<VlounteerTeamRealationEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<VlounteerTeamRealationDTO> |
|||
* @author generator |
|||
* @date 2021-11-16 |
|||
*/ |
|||
PageData<VlounteerTeamRealationDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<VlounteerTeamRealationDTO> |
|||
* @author generator |
|||
* @date 2021-11-16 |
|||
*/ |
|||
List<VlounteerTeamRealationDTO> list(Map<String, Object> 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); |
|||
|
|||
PageData<VlounteerTeamRealationDTO> getPageList(Map<String, Object> params); |
|||
|
|||
/** |
|||
* @describe: 通过志愿团队id获取志愿者信息 |
|||
* @author wangtong |
|||
* @date 2021/11/18 16:26 |
|||
* @params [params] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.VolunteerInfoDTO>> |
|||
*/ |
|||
PageData<VolunteerInfoDTO> getVolunteerListByTeamId(Map<String, Object> 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<TeamVolunteerListDTO> 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); |
|||
|
|||
/** |
|||
* @describe: 通过teamId查询志愿者 |
|||
* @author wangtong |
|||
* @date 2021/11/24 15:37 |
|||
* @params [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
*/ |
|||
Result selectVolunteerByTeamId(VolunteerUnionFormDTO dto); |
|||
} |
|||
@ -0,0 +1,124 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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.dto.VolunteerTeamFormDTO; |
|||
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<VolunteerPioneerEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<VolunteerPioneerDTO> |
|||
* @author generator |
|||
* @date 2021-11-16 |
|||
*/ |
|||
PageData<VolunteerPioneerDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<VolunteerPioneerDTO> |
|||
* @author generator |
|||
* @date 2021-11-16 |
|||
*/ |
|||
List<VolunteerPioneerDTO> list(Map<String, Object> 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); |
|||
|
|||
/** |
|||
* @describe: 志愿先锋 上下架 |
|||
* @author wangtong |
|||
* @date 2021/11/16 17:36 |
|||
* @params [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result |
|||
*/ |
|||
Result handleIsUpDown(VolunteerPioneerDTO dto); |
|||
|
|||
/** |
|||
* @describe: 小程序-志愿先锋-列表 |
|||
* @author wangtong |
|||
* @date 2021/11/22 10:41 |
|||
* @params [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.VolunteerPioneerDTO>> |
|||
*/ |
|||
List<VolunteerPioneerDTO> getVolunteerPioneerList(VolunteerTeamFormDTO dto); |
|||
|
|||
/** |
|||
* @describe: 小程序-志愿先锋-详情 |
|||
* @author wangtong |
|||
* @date 2021/11/22 10:54 |
|||
* @params [dto] |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.VolunteerPioneerDTO>> |
|||
*/ |
|||
Result getVolunteerPioneerDetail(VolunteerTeamFormDTO dto); |
|||
} |
|||
@ -0,0 +1,161 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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.utils.Result; |
|||
import com.elink.esua.epdc.dao.VlounteerTeamRealationDao; |
|||
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; |
|||
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; |
|||
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 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class VlounteerTeamRealationServiceImpl extends BaseServiceImpl<VlounteerTeamRealationDao, VlounteerTeamRealationEntity> implements VlounteerTeamRealationService { |
|||
|
|||
@Autowired |
|||
private VlounteerTeamRealationRedis vlounteerTeamRealationRedis; |
|||
|
|||
@Override |
|||
public PageData<VlounteerTeamRealationDTO> page(Map<String, Object> params) { |
|||
IPage<VlounteerTeamRealationEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, VlounteerTeamRealationDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public PageData<VlounteerTeamRealationDTO> getPageList(Map<String, Object> params) { |
|||
IPage<VlounteerTeamRealationDTO> page = getPage(params); |
|||
List<VlounteerTeamRealationDTO> list = baseDao.getPageList(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public PageData<VolunteerInfoDTO> getVolunteerListByTeamId(Map<String, Object> params) { |
|||
IPage<VolunteerInfoEntity> page = getPage(params); |
|||
//查询
|
|||
List<VolunteerInfoEntity> list = baseDao.getVolunteerListByTeamId(params); |
|||
return getPageData(list, page.getTotal(), VolunteerInfoDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public Result getVolunteerWithTeamState(VolunteerUnionFormDTO dto) { |
|||
log.info("getVolunteerWithTeamState-dto:"+dto); |
|||
VolunteerDetailResultDTO result = baseDao.getVolunteerWithTeamState(dto); |
|||
return new Result().ok(result); |
|||
} |
|||
|
|||
@Override |
|||
public List<TeamVolunteerListDTO> getTeamVolunteerList(VolunteerTeamFormDTO formDto) { |
|||
int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize(); |
|||
formDto.setPageIndex(pageIndex); |
|||
return baseDao.getVolunteerPioneerList(formDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result joinTeam(VolunteerTeamFormDTO dto) { |
|||
log.info("joinTeam-dto:"+dto); |
|||
VlounteerTeamRealationEntity checkFlag = baseDao.selectByTeamIdAngVolunteerId(dto); |
|||
if(checkFlag != null){ |
|||
return new Result().error("此志愿者已加入该团队"); |
|||
} |
|||
// baseDao.deleteByVolunteerId(dto.getVolunteerId());
|
|||
VlounteerTeamRealationEntity entity = new VlounteerTeamRealationEntity(); |
|||
entity.setTeamId(dto.getTeamId()); |
|||
entity.setVolunteerId(dto.getVolunteerId()); |
|||
baseDao.insert(entity); |
|||
return new Result(); |
|||
} |
|||
|
|||
@Override |
|||
public Result selectVolunteerByTeamId(VolunteerUnionFormDTO dto) { |
|||
List<VolunteerInfoDTO> volunteerList = baseDao.selectVolunteerByTeamId(dto); |
|||
return new Result().ok(volunteerList); |
|||
} |
|||
|
|||
@Override |
|||
public List<VlounteerTeamRealationDTO> list(Map<String, Object> params) { |
|||
List<VlounteerTeamRealationEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, VlounteerTeamRealationDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<VlounteerTeamRealationEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<VlounteerTeamRealationEntity> 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)); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,138 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* 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. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
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.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; |
|||
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<VolunteerPioneerDao, VolunteerPioneerEntity> implements VolunteerPioneerService { |
|||
|
|||
@Autowired |
|||
private VolunteerPioneerRedis volunteerPioneerRedis; |
|||
|
|||
@Override |
|||
public PageData<VolunteerPioneerDTO> page(Map<String, Object> params) { |
|||
// IPage<VolunteerPioneerEntity> page = baseDao.selectPage(
|
|||
// getPage(params, FieldConstant.CREATED_TIME, false),
|
|||
// getWrapper(params)
|
|||
// );
|
|||
// return getPageData(page, VolunteerPioneerDTO.class);
|
|||
IPage<VolunteerPioneerDTO> page = getPage(params); |
|||
List<VolunteerPioneerDTO> list = baseDao.getPageList(params); |
|||
return new PageData<>(list, page.getTotal()); |
|||
} |
|||
|
|||
@Override |
|||
public List<VolunteerPioneerDTO> list(Map<String, Object> params) { |
|||
List<VolunteerPioneerEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, VolunteerPioneerDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<VolunteerPioneerEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<VolunteerPioneerEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public VolunteerPioneerDTO get(String id) { |
|||
return baseDao.selectDetailById(id); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(VolunteerPioneerDTO dto) { |
|||
VolunteerPioneerEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerPioneerEntity.class); |
|||
entity.setBannerFlag("0"); |
|||
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)); |
|||
} |
|||
|
|||
@Override |
|||
public Result handleIsUpDown(VolunteerPioneerDTO dto) { |
|||
VolunteerPioneerEntity entity = selectById(dto.getId()); |
|||
if (null == entity) { |
|||
return new Result().error("未查到相关数据"); |
|||
} |
|||
if ("0".equals(dto.getBannerFlag())) { |
|||
entity.setBannerFlag("1"); |
|||
} else { |
|||
entity.setBannerFlag("0"); |
|||
} |
|||
updateById(entity); |
|||
return new Result().ok(""); |
|||
} |
|||
|
|||
@Override |
|||
public List<VolunteerPioneerDTO> 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); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,83 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.dao.VlounteerTeamRealationDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.entity.VlounteerTeamRealationEntity" id="vlounteerTeamRealationMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="volunteerId" column="VOLUNTEER_ID"/> |
|||
<result property="teamId" column="TEAM_ID"/> |
|||
<result property="teamName" column="TEAM_NAME"/> |
|||
<result property="teamType" column="TEAM_TYPE"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
</resultMap> |
|||
<select id="getPageList" resultType="com.elink.esua.epdc.dto.VlounteerTeamRealationDTO"> |
|||
|
|||
</select> |
|||
<select id="getVolunteerListByTeamId" resultType="com.elink.esua.epdc.entity.VolunteerInfoEntity"> |
|||
SELECT r.id, |
|||
v.REAL_NAME, |
|||
v.MOBILE, |
|||
case v.SEX |
|||
when '0' then '女' |
|||
when '1' then '男' |
|||
else '' |
|||
end as sex |
|||
FROM `epdc_vlounteer_team_realation` r |
|||
inner join epdc_volunteer_info v on r.VOLUNTEER_ID=v.ID |
|||
where r.DEL_FLAG='0' |
|||
and v.DEL_FLAG='0' |
|||
and r.TEAM_ID=#{teamId} |
|||
<if test="mobile != null and mobile != ''"> |
|||
and v.MOBILE like '%${mobile}%' |
|||
</if> |
|||
<if test="realName != null and realName != ''"> |
|||
and v.REAL_NAME like '%${realName}%' |
|||
</if> |
|||
order by v.CREATED_TIME desc |
|||
</select> |
|||
<select id="getVolunteerWithTeamState" resultType="com.elink.esua.epdc.dto.VolunteerDetailResultDTO"> |
|||
SELECT v.id as volunteerId, |
|||
if(r.id is null,'false','true') as joinFlag |
|||
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} |
|||
</select> |
|||
<select id="getVolunteerPioneerList" resultType="com.elink.esua.epdc.dto.TeamVolunteerListDTO"> |
|||
select vi.id, |
|||
u.FACE_IMG, |
|||
u.PARTY_FLAG, |
|||
u.REAL_NAME, |
|||
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' |
|||
where re.TEAM_ID=#{id} |
|||
and re.DEL_FLAG='0' |
|||
</select> |
|||
<select id="selectByTeamIdAngVolunteerId" resultType="com.elink.esua.epdc.entity.VlounteerTeamRealationEntity"> |
|||
select * |
|||
from epdc_vlounteer_team_realation |
|||
where DEL_FLAG='0' |
|||
and TEAM_ID=#{teamId} |
|||
and VOLUNTEER_ID=#{volunteerId} |
|||
</select> |
|||
<update id="deleteByVolunteerId"> |
|||
update epdc_vlounteer_team_realation set DEL_FLAG='1',UPDATED_TIME = now() |
|||
where VOLUNTEER_ID=#{volunteerId} |
|||
</update> |
|||
<select id="selectVolunteerByTeamId" resultType="com.elink.esua.epdc.dto.VolunteerInfoDTO"> |
|||
select * from epdc_vlounteer_team_realation where TEAM_ID=#{id} |
|||
AND DEL_FLAG='0' |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
|||
@ -0,0 +1,48 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.elink.esua.epdc.dao.VolunteerPioneerDao"> |
|||
|
|||
<resultMap type="com.elink.esua.epdc.entity.VolunteerPioneerEntity" id="volunteerPioneerMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="volunteerId" column="VOLUNTEER_ID"/> |
|||
<result property="imgUrl" column="IMG_URL"/> |
|||
<result property="bannerFlag" column="BANNER_FLAG"/> |
|||
<result property="content" column="CONTENT"/> |
|||
<result property="sort" column="SORT"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
</resultMap> |
|||
<select id="getPageList" resultType="com.elink.esua.epdc.dto.VolunteerPioneerDTO"> |
|||
SELECT v.REAL_NAME,vp.* |
|||
FROM `epdc_volunteer_pioneer` vp |
|||
inner join epdc_volunteer_info v on v.id=vp.VOLUNTEER_ID and v.DEL_FLAG='0' |
|||
where vp.DEL_FLAG='0' |
|||
<if test="realName != null and realName != ''"> |
|||
and v.REAL_NAME like '%${realName}%' |
|||
</if> |
|||
order by vp.sort asc |
|||
</select> |
|||
<select id="selectDetailById" resultType="com.elink.esua.epdc.dto.VolunteerPioneerDTO"> |
|||
SELECT v.REAL_NAME,vp.* |
|||
FROM `epdc_volunteer_pioneer` vp |
|||
inner join epdc_volunteer_info v on v.id=vp.VOLUNTEER_ID and v.DEL_FLAG='0' |
|||
where vp.DEL_FLAG='0' |
|||
and vp.id=#{id} |
|||
</select> |
|||
<select id="getVolunteerPioneerList" resultType="com.elink.esua.epdc.dto.VolunteerPioneerDTO"> |
|||
SELECT v.REAL_NAME,vp.* |
|||
FROM `epdc_volunteer_pioneer` vp |
|||
inner join epdc_volunteer_info v on v.id=vp.VOLUNTEER_ID and v.DEL_FLAG='0' |
|||
where vp.DEL_FLAG='0' |
|||
and vp.BANNER_FLAG = '0' |
|||
order by vp.sort asc |
|||
LIMIT #{pageIndex},#{pageSize} |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
|||
Loading…
Reference in new issue