Browse Source

Merge remote-tracking branch 'origin/origin/volunteer'

ftature/screen
liuchuang 4 years ago
parent
commit
57a412408d
  1. 11
      esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java
  2. 1
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppUserController.java
  3. 118
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiVolunteerRankController.java
  4. 61
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java
  5. 40
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java
  6. 32
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java
  7. 20
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java
  8. 83
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java
  9. 16
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java
  10. 61
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java
  11. 15
      esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java
  12. 5
      esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActInfoAppFormDTO.java
  13. 102
      esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamDTO.java
  14. 86
      esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamTypeDTO.java
  15. 92
      esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerUnionDTO.java
  16. 9
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActInfoDao.java
  17. 5
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java
  18. 14
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java
  19. 21
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java
  20. 12
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java
  21. 143
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java
  22. 120
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java
  23. 119
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerUnionController.java
  24. 76
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java
  25. 54
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java
  26. 49
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java
  27. 63
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamEntity.java
  28. 82
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamTypeEntity.java
  29. 58
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerUnionEntity.java
  30. 71
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamExcel.java
  31. 65
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamTypeExcel.java
  32. 68
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerUnionExcel.java
  33. 47
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamRedis.java
  34. 47
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamTypeRedis.java
  35. 47
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerUnionRedis.java
  36. 136
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java
  37. 116
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java
  38. 115
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerUnionService.java
  39. 186
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java
  40. 168
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamTypeServiceImpl.java
  41. 124
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java
  42. 12
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActInfoDao.xml
  43. 70
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml
  44. 38
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml
  45. 44
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml
  46. 25
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/TeamVolunteerListDTO.java
  47. 83
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java
  48. 43
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerDetailResultDTO.java
  49. 6
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerInfoDTO.java
  50. 102
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerPioneerDTO.java
  51. 32
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerTeamFormDTO.java
  52. 45
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerUnionFormDTO.java
  53. 5
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcCompleteVolunteerInfoFormDTO.java
  54. 5
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/v2/EpdcCompleteVolunteerInfoV2FormDTO.java
  55. 161
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java
  56. 13
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java
  57. 132
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java
  58. 94
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java
  59. 18
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java
  60. 58
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.java
  61. 49
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VlounteerTeamRealationEntity.java
  62. 66
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerPioneerEntity.java
  63. 68
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VlounteerTeamRealationExcel.java
  64. 71
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VolunteerPioneerExcel.java
  65. 47
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VlounteerTeamRealationRedis.java
  66. 47
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VolunteerPioneerRedis.java
  67. 143
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java
  68. 9
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java
  69. 124
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java
  70. 161
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java
  71. 32
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java
  72. 138
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java
  73. 83
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml
  74. 30
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml
  75. 48
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml

11
esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java

@ -4,6 +4,7 @@ import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
* @author work@yujt.net.cn
@ -103,4 +104,14 @@ public class EpdcCompleteUserInfoDTO implements Serializable {
* 志愿者所属部门
*/
private String volunteerDeptId;
/**
* 志愿团队id
*/
private List<String> teamIds;
/**
* 已加入的志愿团队名称
*/
private List<String> teamNames;
}

1
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppUserController.java

@ -273,6 +273,7 @@ public class ApiAppUserController {
public Result<EpdcCompleteUserInfoDTO> prepareCompleteUserInfo(@LoginUser TokenDto tokenDto) {
return appUserService.prepareCompleteUserInfo(tokenDto);
}
/**
* 获取邀请记录
*

118
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiVolunteerRankController.java

@ -1,16 +1,19 @@
package com.elink.esua.epdc.controller;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.annotation.LoginUser;
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.VolunteerPioneerDTO;
import com.elink.esua.epdc.dto.VolunteerTeamFormDTO;
import com.elink.esua.epdc.dto.VolunteerUnionFormDTO;
import com.elink.esua.epdc.dto.form.EpdcAppVolunteerRankFormDTO;
import com.elink.esua.epdc.dto.result.EpdcAppVolunteerRankDTO;
import com.elink.esua.epdc.service.AppVolunteerRankService;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -39,7 +42,116 @@ public class ApiVolunteerRankController {
Result<List<EpdcVolunteerRankDTO>> data = appVolunteerRankService.leaderboard(formDto);
List<EpdcAppVolunteerRankDTO> list2 = ConvertUtils.sourceToTarget(data.getData(), EpdcAppVolunteerRankDTO.class);
return new Result().ok(list2);
}
/**
* @describe: 小程序-志愿先锋-列表
* @author wangtong
* @date 2021/11/22 10:41
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.VolunteerPioneerDTO>>
*/
@GetMapping("getVolunteerPioneerList")
public Result<List<VolunteerPioneerDTO>> getVolunteerPioneerList( VolunteerTeamFormDTO dto){
return appVolunteerRankService.getVolunteerPioneerList(dto);
}
/**
* @describe: 小程序-志愿先锋-详情
* @author wangtong
* @date 2021/11/22 10:54
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.VolunteerPioneerDTO>>
*/
@GetMapping("getVolunteerPioneerDetail")
public Result getVolunteerPioneerDetail( VolunteerTeamFormDTO dto){
return appVolunteerRankService.getVolunteerPioneerDetail(dto);
}
/**
* @describe: 小程序-共建联盟-列表
* @author wangtong
* @date 2021/11/22 11:06
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@GetMapping("getVolunteerUnionList")
public Result getVolunteerUnionList( VolunteerUnionFormDTO dto){
return appVolunteerRankService.getVolunteerUnionList(dto);
}
/**
* @describe: 小程序-共建联盟-详情
* @author wangtong
* @date 2021/11/22 11:12
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@GetMapping("getVolunteerUnionDetail")
public Result getVolunteerUnionDetail(VolunteerUnionFormDTO dto){
return appVolunteerRankService.getVolunteerUnionDetail(dto);
}
/**
* @describe: 小程序-查询所有志愿团队类别
* @author wangtong
* @date 2021/11/18 10:55
* @params []
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@GetMapping("getTeamTypeList")
public Result getTeamTypeList(VolunteerTeamFormDTO formDto){
return appVolunteerRankService.getTeamTypeList(formDto);
}
/**
* @describe: 小程序-志愿团队-列表
* @author wangtong
* @date 2021/11/22 14:45
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@GetMapping("getAppTeamListByType")
public Result getAppTeamListByType( VolunteerUnionFormDTO dto){
return appVolunteerRankService.getAppTeamListByType(dto);
}
/**
* @describe: 志愿团队-详情
* @author wangtong
* @date 2021/11/22 15:19
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@GetMapping("getAppTeamDetail")
public Result getAppTeamDetail(@LoginUser TokenDto userDetail, VolunteerUnionFormDTO dto){
return appVolunteerRankService.getAppTeamDetail(userDetail,dto);
}
/**
* @describe: 小程序-志愿团队-详情-成员列表
* @author wangtong
* @date 2021/11/22 16:13
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@GetMapping("getTeamVolunteerList")
public Result getTeamVolunteerList(VolunteerTeamFormDTO dto) {
return appVolunteerRankService.getTeamVolunteerList(dto);
}
/**
* @describe: 小程序-志愿团队-加入团队
* @author wangtong
* @date 2021/11/22 16:22
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@PostMapping("joinTeam")
public Result joinTeam(@RequestBody VolunteerTeamFormDTO dto) {
return appVolunteerRankService.joinTeam(dto);
}
}

61
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java

@ -6,6 +6,8 @@ import com.elink.esua.epdc.activity.result.*;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.config.FeignRequestInterceptor;
import com.elink.esua.epdc.dto.VolunteerTeamFormDTO;
import com.elink.esua.epdc.dto.VolunteerUnionFormDTO;
import com.elink.esua.epdc.feign.fallback.ActInfoFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
@ -140,4 +142,63 @@ public interface ActInfoFeignClient {
@PostMapping(value ="heart/epdc-app/actsigninqrcode/signin", consumes = MediaType.APPLICATION_JSON_VALUE)
Result scanSignIn(ActSignInFormDTO formDto);
/**
* @describe: 小程序-共建联盟-列表
* @author wangtong
* @date 2021/11/22 11:06
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@GetMapping(value ="heart/volunteerunion/getVolunteerUnionList", consumes = MediaType.APPLICATION_JSON_VALUE)
Result getVolunteerUnionList(VolunteerUnionFormDTO formDto);
/**
* @describe: 小程序-共建联盟-详情
* @author wangtong
* @date 2021/11/22 11:12
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@GetMapping(value ="heart/volunteerunion/getVolunteerUnionDetail", consumes = MediaType.APPLICATION_JSON_VALUE)
Result getVolunteerUnionDetail(VolunteerUnionFormDTO formDto);
/**
* @describe: 查询所有志愿团队类别
* @author wangtong
* @date 2021/11/18 10:55
* @params []
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@GetMapping(value ="heart/volunteerteamtype/getTeamTypeList")
Result getTeamTypeList(VolunteerTeamFormDTO formDto);
/**
* @describe: 小程序-志愿团队-列表
* @author wangtong
* @date 2021/11/22 14:45
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@GetMapping(value ="heart/volunteerteam/getAppTeamListByType", consumes = MediaType.APPLICATION_JSON_VALUE)
Result getAppTeamListByType(VolunteerUnionFormDTO formDto);
/**
* @describe: 志愿团队-详情
* @author wangtong
* @date 2021/11/22 15:19
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@GetMapping(value ="heart/volunteerteam/getAppTeamDetail", consumes = MediaType.APPLICATION_JSON_VALUE)
Result getAppTeamDetail(VolunteerUnionFormDTO formDto);
/**
* @describe: 获取团队名称
* @author wangtong
* @date 2021/11/25 15:43
* @params [teamDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@GetMapping(value ="heart/volunteerteam/selectTeamNameByIds", consumes = MediaType.APPLICATION_JSON_VALUE)
Result selectTeamNameByIds(VolunteerUnionFormDTO teamDto);
}

40
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java

@ -652,4 +652,44 @@ public interface UserFeignClient {
**/
@PostMapping("app-user/user/combineVolunteerUser")
Result<UserDTO> combineVolunteerUser(CombineVolunteerUserFormDTO combineVolunteerUserFormDTO);
/**
* @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(value = "app-user/volunteerpioneer/getVolunteerPioneerList", consumes = MediaType.APPLICATION_JSON_VALUE)
Result getVolunteerPioneerList(VolunteerTeamFormDTO formDto);
/**
* @describe: 小程序-志愿先锋-详情
* @author wangtong
* @date 2021/11/22 10:54
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.VolunteerPioneerDTO>>
*/
@GetMapping(value = "app-user/volunteerpioneer/getVolunteerPioneerDetail", consumes = MediaType.APPLICATION_JSON_VALUE)
Result getVolunteerPioneerDetail(VolunteerTeamFormDTO formDto);
/**
* @describe: 小程序-志愿团队-详情-成员列表
* @author wangtong
* @date 2021/11/22 16:13
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@GetMapping(value = "app-user/vlounteerteamrealation/getTeamVolunteerList", consumes = MediaType.APPLICATION_JSON_VALUE)
Result getTeamVolunteerList(VolunteerTeamFormDTO formDto);
/**
* @describe: 小程序-志愿团队-加入团队
* @author wangtong
* @date 2021/11/22 16:22
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
@PostMapping(value = "app-user/vlounteerteamrealation/joinTeam", consumes = MediaType.APPLICATION_JSON_VALUE)
Result joinTeam(VolunteerTeamFormDTO formDto);
}

32
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java

@ -6,6 +6,8 @@ import com.elink.esua.epdc.activity.result.*;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.VolunteerTeamFormDTO;
import com.elink.esua.epdc.dto.VolunteerUnionFormDTO;
import com.elink.esua.epdc.feign.ActInfoFeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
@ -80,4 +82,34 @@ public class ActInfoFeignClientFallback implements ActInfoFeignClient {
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "scanSignIn", formDto);
}
@Override
public Result getVolunteerUnionList(VolunteerUnionFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getVolunteerUnionList", formDto);
}
@Override
public Result getVolunteerUnionDetail(VolunteerUnionFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getVolunteerUnionDetail", formDto);
}
@Override
public Result getTeamTypeList(VolunteerTeamFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getTeamTypeList",formDto);
}
@Override
public Result getAppTeamListByType(VolunteerUnionFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getAppTeamListByType", formDto);
}
@Override
public Result getAppTeamDetail(VolunteerUnionFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "getAppTeamDetail", formDto);
}
@Override
public Result selectTeamNameByIds(VolunteerUnionFormDTO teamDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_HEART_SERVER, "selectTeamNameByIds", teamDto);
}
}

20
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java

@ -317,4 +317,24 @@ public class UserFeignClientFallback implements UserFeignClient {
public Result<UserDTO> combineVolunteerUser(CombineVolunteerUserFormDTO combineVolunteerUserFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "combineVolunteerUser", combineVolunteerUserFormDTO);
}
@Override
public Result getVolunteerPioneerList(VolunteerTeamFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getVolunteerPioneerList", formDto);
}
@Override
public Result getVolunteerPioneerDetail(VolunteerTeamFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getVolunteerPioneerDetail", formDto);
}
@Override
public Result getTeamVolunteerList(VolunteerTeamFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getTeamVolunteerList", formDto);
}
@Override
public Result joinTeam(VolunteerTeamFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "joinTeam", formDto);
}
}

83
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java

@ -6,6 +6,8 @@ import com.elink.esua.epdc.activity.result.ActApplyDetailResultDTO;
import com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.VolunteerTeamFormDTO;
import com.elink.esua.epdc.dto.VolunteerUnionFormDTO;
import com.elink.esua.epdc.dto.form.EpdcAppVolunteerRankFormDTO;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
@ -48,4 +50,85 @@ public interface AppVolunteerRankService {
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.activity.result.ActApplyDetailResultDTO>
**/
Result<ActApplyDetailResultDTO> applyActDetail(String id);
/**
* @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>>
*/
Result 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);
/**
* @describe: 小程序-共建联盟-列表
* @author wangtong
* @date 2021/11/22 11:06
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result getVolunteerUnionList(VolunteerUnionFormDTO dto);
/**
* @describe: 小程序-共建联盟-详情
* @author wangtong
* @date 2021/11/22 11:12
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result getVolunteerUnionDetail(VolunteerUnionFormDTO dto);
/**
* @describe: 查询所有志愿团队类别
* @author wangtong
* @date 2021/11/18 10:55
* @params []
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result getTeamTypeList(VolunteerTeamFormDTO formDto);
/**
* @describe: 小程序-志愿团队-列表
* @author wangtong
* @date 2021/11/22 14:45
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result getAppTeamListByType(VolunteerUnionFormDTO dto);
/**
* @describe: 志愿团队-详情
* @author wangtong
* @date 2021/11/22 15:19
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result getAppTeamDetail(TokenDto userDetail, VolunteerUnionFormDTO dto);
/**
* @describe: 小程序-志愿团队-详情-成员列表
* @author wangtong
* @date 2021/11/22 16:13
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result getTeamVolunteerList(VolunteerTeamFormDTO dto);
/**
* @describe: 小程序-志愿团队-加入团队
* @author wangtong
* @date 2021/11/22 16:22
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result joinTeam(VolunteerTeamFormDTO dto);
}

16
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java

@ -8,6 +8,7 @@ import cn.binarywang.wx.miniapp.util.crypt.WxMaCryptUtils;
import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.nacos.client.naming.utils.CollectionUtils;
import com.elink.esua.epdc.async.GroupTask;
import com.elink.esua.epdc.async.PartyGroupTask;
import com.elink.esua.epdc.common.token.dto.TokenDto;
@ -119,6 +120,9 @@ public class AppUserServiceImpl implements AppUserService {
@Autowired
private PointsFeignClient pointsFeignClient;
@Autowired
private ActInfoFeignClient actInfoFeignClient;
//private static String USER_FACE = "https://epdc.elinkchina.com.cn/esua-epdc/static/default/default_user_face.png";
private static String USER_FACE = "https://epdc-shibei.elinkservice.cn/epdcFile/M00/00/00/CgUipV3wgl6Afm4cAAAa8QfEb00266_big.png";
@ -949,6 +953,17 @@ public class AppUserServiceImpl implements AppUserService {
dto.setIntroduce(volunteerInfoDTO.getData().getIntroduce());
dto.setVolunteerTagId(volunteerInfoDTO.getData().getTagId());
dto.setVolunteerDeptId(volunteerInfoDTO.getData().getVolunteerDeptId());
//获取团队名称
if(!CollectionUtils.isEmpty(volunteerInfoDTO.getData().getTeamIds())){
log.info("prepareCompleteUserInfo-volunteerInfoDTO:"+volunteerInfoDTO);
VolunteerUnionFormDTO teamDto = new VolunteerUnionFormDTO();
teamDto.setTeamIds(volunteerInfoDTO.getData().getTeamIds());
Result<List<String>> teamResult = actInfoFeignClient.selectTeamNameByIds(teamDto);
log.info("prepareCompleteUserInfo-teamResult:"+teamResult);
if (teamResult.success() && null != teamResult.getData()) {
dto.setTeamNames(teamResult.getData());
}
}
// 如果用户表的身份证号为空,则尝试使用志愿者表中的身份证
if (null == dto.getIdentityNo() || "".equals(dto.getIdentityNo())) {
dto.setIdentityNo(volunteerInfoDTO.getData().getIdentityNo());
@ -1550,6 +1565,7 @@ public class AppUserServiceImpl implements AppUserService {
@Override
public Result volunteerV2Authenticate(TokenDto tokenDto, EpdcCompleteVolunteerInfoV2FormDTO formDto) {
log.info("insertV2VolunteerInfo=dto:"+formDto);
logger.info("志愿者认证wxCode=" + formDto.getWxCode() + ";userId=" + tokenDto.getUserId());
if (StringUtils.isEmpty(formDto.getVolunteerSignature())) {
formDto.setVolunteerSignature("在水一方,志在四方");

61
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java

@ -6,10 +6,12 @@ import com.elink.esua.epdc.activity.result.ActApplyDetailResultDTO;
import com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO;
import com.elink.esua.epdc.dto.*;
import com.elink.esua.epdc.dto.form.EpdcAppVolunteerRankFormDTO;
import com.elink.esua.epdc.feign.ActInfoFeignClient;
import com.elink.esua.epdc.feign.AdminFeignClient;
import com.elink.esua.epdc.feign.AppVolunteerRankFeignClient;
import com.elink.esua.epdc.feign.UserFeignClient;
import com.elink.esua.epdc.service.AppVolunteerRankService;
import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO;
import lombok.extern.slf4j.Slf4j;
@ -31,6 +33,11 @@ public class AppVolunteerRankServiceImpl implements AppVolunteerRankService {
private AppVolunteerRankFeignClient appVolunteerRankFeignClient;
@Autowired
private AdminFeignClient adminFeignClient;
@Autowired
private ActInfoFeignClient actInfoFeignClient;
@Autowired
private UserFeignClient userFeignClient;
/**
* 获取排行榜
* @Author wanggongfeng
@ -81,4 +88,56 @@ public class AppVolunteerRankServiceImpl implements AppVolunteerRankService {
return appVolunteerRankFeignClient.applyActDetail(id);
}
@Override
public Result getVolunteerPioneerList(VolunteerTeamFormDTO dto) {
return userFeignClient.getVolunteerPioneerList(dto);
}
@Override
public Result getVolunteerPioneerDetail(VolunteerTeamFormDTO dto) {
return userFeignClient.getVolunteerPioneerDetail(dto);
}
@Override
public Result getVolunteerUnionList(VolunteerUnionFormDTO dto) {
return actInfoFeignClient.getVolunteerUnionList(dto);
}
@Override
public Result getVolunteerUnionDetail(VolunteerUnionFormDTO dto) {
return actInfoFeignClient.getVolunteerUnionDetail(dto);
}
@Override
public Result getTeamTypeList(VolunteerTeamFormDTO formDto) {
return actInfoFeignClient.getTeamTypeList(formDto);
}
@Override
public Result getAppTeamListByType(VolunteerUnionFormDTO dto) {
return actInfoFeignClient.getAppTeamListByType(dto);
}
@Override
public Result getAppTeamDetail(TokenDto userDetail, VolunteerUnionFormDTO dto) {
if (null == userDetail) {
return new Result().error("获取用户信息失败");
}
dto.setUserId(userDetail.getUserId());
log.info("getAppTeamDetail-userDetail"+userDetail);
log.info("getAppTeamDetail-dto"+dto);
return actInfoFeignClient.getAppTeamDetail(dto);
}
@Override
public Result getTeamVolunteerList(VolunteerTeamFormDTO dto) {
return userFeignClient.getTeamVolunteerList(dto);
}
@Override
public Result joinTeam(VolunteerTeamFormDTO dto) {
log.info("joinTeam-dto:"+dto);
return userFeignClient.joinTeam(dto);
}
}

15
esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java

@ -50,6 +50,21 @@ public class ActInfoDTO implements Serializable {
*/
private String headPic;
/**
* 志愿团队类型
*/
private String teamType;
/**
* 志愿团队id
*/
private String teamId;
/**
* 志愿团队名称
*/
private String teamName;
/**
* 报名开始时间
*/

5
esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActInfoAppFormDTO.java

@ -70,4 +70,9 @@ public class ActInfoAppFormDTO implements Serializable {
*/
private String sponsor;
/**
* 志愿团队id
*/
private String teamId;
}

102
esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamDTO.java

@ -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;
}

86
esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamTypeDTO.java

@ -0,0 +1,86 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <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;
}

92
esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerUnionDTO.java

@ -0,0 +1,92 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <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;
}

9
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActInfoDao.java

@ -160,4 +160,13 @@ public interface ActInfoDao extends BaseDao<ActInfoEntity> {
* @return void
**/
void updateActTopFlagById(ActTopFormDTO formDto);
/**
* @describe: 通过teamId获取活动信息
* @author wangtong
* @date 2021/11/24 15:26
* @params [teamId]
* @return java.util.List<com.elink.esua.epdc.modules.activity.entity.ActInfoEntity>
*/
List<ActInfoEntity> selectByTeamId(@Param("teamId") String teamId);
}

5
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java

@ -83,6 +83,11 @@ public class ActInfoEntity extends BaseEpdcEntity {
*/
private String actAddress;
/**
* 志愿团队id
*/
private String teamId;
/**
* 默认状态
*/

14
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java

@ -52,7 +52,10 @@ import com.elink.esua.epdc.dto.ScheduleJobDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO;
import com.elink.esua.epdc.modules.activity.dao.*;
import com.elink.esua.epdc.modules.activity.entity.*;
import com.elink.esua.epdc.modules.activity.entity.ActBannerEntity;
import com.elink.esua.epdc.modules.activity.entity.ActInfoEntity;
import com.elink.esua.epdc.modules.activity.entity.ActUserClockLogEntity;
import com.elink.esua.epdc.modules.activity.entity.ActUserRelationEntity;
import com.elink.esua.epdc.modules.activity.service.ActBannerService;
import com.elink.esua.epdc.modules.activity.service.ActInfoService;
import com.elink.esua.epdc.modules.activity.service.ActPeriodService;
@ -63,6 +66,8 @@ import com.elink.esua.epdc.modules.feign.ContentSecurityFeignClient;
import com.elink.esua.epdc.modules.feign.JobFeignClient;
import com.elink.esua.epdc.modules.feign.UserInfoFeignClient;
import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO;
import com.elink.esua.epdc.modules.volunteer.dao.VolunteerTeamDao;
import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -102,6 +107,8 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
private ActBannerDao actBannerDao;
@Autowired
private ActClockPicDao actClockPicDao;
@Autowired
private VolunteerTeamDao volunteerTeamDao;
@Autowired
private ActUserReadService actUserReadService;
@ -147,6 +154,11 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
List<ActPeriodDTO> periods = actPeriodService.listOfActPeriodsByActId(id);
ActInfoDTO dto = ConvertUtils.sourceToTarget(entity, ActInfoDTO.class);
dto.setPeriods(periods);
if(StringUtils.isNotBlank(dto.getTeamId())){
VolunteerTeamEntity volunteerTeamEntity = volunteerTeamDao.selectById(dto.getTeamId());
dto.setTeamType(volunteerTeamEntity.getTeamType());
dto.setTeamName(volunteerTeamEntity.getTeamName());
}
return dto;
}

21
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java

@ -3,7 +3,9 @@ package com.elink.esua.epdc.modules.feign;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.UserDTO;
import com.elink.esua.epdc.dto.VolunteerDetailResultDTO;
import com.elink.esua.epdc.dto.VolunteerInfoDTO;
import com.elink.esua.epdc.dto.VolunteerUnionFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO;
@ -110,4 +112,23 @@ public interface UserInfoFeignClient {
@PostMapping(value = "app-user/volunteerinfo/handleVolunteerPoints", consumes = MediaType.APPLICATION_JSON_VALUE)
Result handleVolunteerPoints(EpdcVolunteerPointsFormDTO formDTO);
/**
* @describe: 通过用户信息和志愿团队id获取志愿者信息
* @author wangtong
* @date 2021/11/22 15:34
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.volunteer.VolunteerDetailResultDTO>
*/
@PostMapping(value = "app-user/vlounteerteamrealation/getVolunteerWithTeamState", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<VolunteerDetailResultDTO> getVolunteerWithTeamState(VolunteerUnionFormDTO dto);
/**
* @describe: 通过teamId查询志愿者
* @author wangtong
* @date 2021/11/24 15:35
* @params [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.VolunteerInfoDTO>
*/
@PostMapping(value = "app-user/vlounteerteamrealation/selectVolunteerByTeamId", consumes = MediaType.APPLICATION_JSON_VALUE)
Result selectVolunteerByTeamId(VolunteerUnionFormDTO dto);
}

12
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java

@ -4,7 +4,9 @@ import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.UserDTO;
import com.elink.esua.epdc.dto.VolunteerDetailResultDTO;
import com.elink.esua.epdc.dto.VolunteerInfoDTO;
import com.elink.esua.epdc.dto.VolunteerUnionFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO;
@ -61,4 +63,14 @@ public class UserInfoFeignClientFallback implements UserInfoFeignClient {
public Result handleVolunteerPoints(EpdcVolunteerPointsFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "handleVolunteerPoints", formDTO);
}
@Override
public Result<VolunteerDetailResultDTO> getVolunteerWithTeamState(VolunteerUnionFormDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getVolunteerWithTeamState", dto);
}
@Override
public Result selectVolunteerByTeamId(VolunteerUnionFormDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "selectVolunteerByTeamId", dto);
}
}

143
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java

@ -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);
}
}

120
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java

@ -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);
}
}

119
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerUnionController.java

@ -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);
}
}

76
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java

@ -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);
}

54
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java

@ -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);
}

49
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java

@ -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);
}

63
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamEntity.java

@ -0,0 +1,63 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <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;
}

82
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamTypeEntity.java

@ -0,0 +1,82 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <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;
}

58
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerUnionEntity.java

@ -0,0 +1,58 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <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;
}

71
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamExcel.java

@ -0,0 +1,71 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <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;
}

65
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamTypeExcel.java

@ -0,0 +1,65 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <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;
}

68
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerUnionExcel.java

@ -0,0 +1,68 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <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;
}

47
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamRedis.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <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;
}
}

47
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamTypeRedis.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <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;
}
}

47
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerUnionRedis.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <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;
}
}

136
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java

@ -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);
}

116
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java

@ -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);
}

115
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerUnionService.java

@ -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);
}

186
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java

@ -0,0 +1,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));
}
}

168
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamTypeServiceImpl.java

@ -0,0 +1,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);
}
}

124
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java

@ -0,0 +1,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);
}
}

12
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActInfoDao.xml

@ -186,7 +186,7 @@
(
SELECT i.ID, i.TITLE, i.HEAD_PIC, i.ACT_START_TIME, i.ACT_END_TIME, i.PUBLISH_TIME, i.ACT_ADDRESS,
i.ACT_QUOTA, i.CLOCK_NUM, i.SIGNUP_END_TIME, i.CREATED_TIME, i.ACT_QUOTA_CATEGORY,
i.TOP_FLAG, i.DEL_FLAG, i.ACT_STATUS, i.SPONSOR, IFNULL(SUM(p.ACT_PERIOD_SIGNUP_NUM), 0) ACT_PERIOD_SIGNUP_NUM, i.SIGNUP_NUM
i.TOP_FLAG, i.DEL_FLAG, i.ACT_STATUS, i.SPONSOR, IFNULL(SUM(p.ACT_PERIOD_SIGNUP_NUM), 0) ACT_PERIOD_SIGNUP_NUM, i.SIGNUP_NUM,i.TEAM_ID
FROM
epdc_act_info i
LEFT JOIN epdc_act_period p ON i.ID = p.ACT_ID AND p.DEL_FLAG = '0'
@ -196,6 +196,7 @@
and relation.USER_ID = #{userId}
and relation.STATUS not in ('3','4')
and actInfo.ID = relation.ACT_ID
left join epdc_volunteer_team vt on actInfo.TEAM_ID=vt.id
WHERE actInfo.DEL_FLAG = '0' and actInfo.ACT_STATUS = '1'
<if test="timestamp != null">
<![CDATA[ AND DATE_FORMAT(actInfo.CREATED_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp}
@ -203,8 +204,11 @@
<if test='actId != null and actId != "" '>
AND actInfo.ID = #{actId}
</if>
<if test='teamId != null and teamId != "" '>
AND actInfo.TEAM_ID = #{teamId}
</if>
<if test='sponsor != null and sponsor != "" '>
AND actInfo.SPONSOR like concat('%', #{sponsor}, '%')
AND vt.TEAM_NAME like concat('%', #{sponsor}, '%')
</if>
<if test='actType != null and actType != "" and actType == "1"'>
<![CDATA[ AND DATE_FORMAT(actInfo.SIGNUP_END_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp}
@ -601,4 +605,8 @@
ORDER BY t.SIGNIN_START_TIME DESC
LIMIT #{pageIndex}, #{pageSize}
</select>
<select id="selectByTeamId" resultType="com.elink.esua.epdc.modules.activity.entity.ActInfoEntity">
select * from epdc_act_info where TEAM_ID=#{teamId}
AND DEL_FLAG='0'
</select>
</mapper>

70
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml

@ -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>

38
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml

@ -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>

44
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml

@ -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>

25
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/TeamVolunteerListDTO.java

@ -0,0 +1,25 @@
package com.elink.esua.epdc.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @program: esua-epdc
* @description:
* @author: wangtong
* @create: 2021-11-22 16:15
**/
@Data
public class TeamVolunteerListDTO implements Serializable {
private String id;
private String faceImg;
private String partyFLag;
private String realName;
private String introduce;
}

83
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java

@ -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;
}

43
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerDetailResultDTO.java

@ -0,0 +1,43 @@
package com.elink.esua.epdc.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @program: esua-epdc
* @description:
* @author: wangtong
* @create: 2021-11-22 15:19
**/
@Data
public class VolunteerDetailResultDTO implements Serializable {
/**
* 主键
*/
private String id;
/**
* 团队名称
*/
private String teamName;
/**
* 团队介绍
*/
private String content;
/**
* 是否已加入
*/
private Boolean joinFlag;
/**
* 志愿者id
*/
private String volunteerId;
}

6
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerInfoDTO.java

@ -22,6 +22,7 @@ import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
@ -232,4 +233,9 @@ public class VolunteerInfoDTO implements Serializable {
* 志愿者部门名称
*/
private String DeptName;
/**
* 志愿团队id
*/
private List<String> teamIds;
}

102
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerPioneerDTO.java

@ -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;
}

32
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerTeamFormDTO.java

@ -0,0 +1,32 @@
package com.elink.esua.epdc.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @program: esua-epdc
* @description:
* @author: wangtong
* @create: 2021-11-22 10:40
**/
@Data
public class VolunteerTeamFormDTO implements Serializable {
/**
* 页码从1开始
*/
private Integer pageIndex;
/**
* 页容量默认10页
*/
private Integer pageSize ;
private String id;
private String volunteerId;
private String teamId;
}

45
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerUnionFormDTO.java

@ -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;
}

5
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcCompleteVolunteerInfoFormDTO.java

@ -108,5 +108,10 @@ public class EpdcCompleteVolunteerInfoFormDTO implements Serializable {
*/
private String volunteerDept;
/**
* 团队id
*/
private String teamId;
}

5
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/v2/EpdcCompleteVolunteerInfoV2FormDTO.java

@ -129,5 +129,10 @@ public class EpdcCompleteVolunteerInfoV2FormDTO implements Serializable {
*/
private String volunteerDeptId;
/**
* 团队id
*/
private String teamId;
}

161
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java

@ -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);
}
}

13
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java

@ -271,5 +271,18 @@ public class VolunteerInfoController {
return volunteerInfoService.handleVolunteerPoints(formDTO);
}
/**
* @describe: 志愿先锋模块获取志愿者列表
* @author wangtong
* @date 2021/11/16 16:19
* @params [params]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.VolunteerInfoDTO>>
*/
@GetMapping("getVolunteerListForPionner")
public Result<PageData<VolunteerInfoDTO>> getVolunteerListForPionner(@RequestParam Map<String, Object> params) {
PageData<VolunteerInfoDTO> page = volunteerInfoService.getVolunteerListForPionner(params);
return new Result<PageData<VolunteerInfoDTO>>().ok(page);
}
}

132
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java

@ -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);
}
}

94
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java

@ -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);
}

18
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java

@ -177,4 +177,22 @@ public interface VolunteerInfoDao extends BaseDao<VolunteerInfoEntity> {
* @return java.util.List<com.elink.esua.epdc.dto.VolunteerInfoDTO>
**/
List<VolunteerInfoDTO> selectListOfOrganizationInfo(String deptId);
/**
* @describe: 志愿先锋模块获取志愿者列表
* @author wangtong
* @date 2021/11/16 16:19
* @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> getUserListForVolunteerOrg(Map<String, Object> params);
/**
* @describe: 通过志愿者id查询所在的志愿团队id
* @author wangtong
* @date 2021/11/25 15:32
* @params [volunteerId]
* @return java.util.List<java.lang.String>
*/
List<String> selectTeamIdsByVolunteerId(@Param("volunteerId") String volunteerId);
}

58
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.java

@ -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);
}

49
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VlounteerTeamRealationEntity.java

@ -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;
}

66
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerPioneerEntity.java

@ -0,0 +1,66 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <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;
}

68
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VlounteerTeamRealationExcel.java

@ -0,0 +1,68 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <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;
}

71
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VolunteerPioneerExcel.java

@ -0,0 +1,71 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <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;
}

47
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VlounteerTeamRealationRedis.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <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;
}
}

47
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VolunteerPioneerRedis.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <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;
}
}

143
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java

@ -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);
}

9
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java

@ -270,4 +270,13 @@ public interface VolunteerInfoService extends BaseService<VolunteerInfoEntity> {
* @Date 2019/12/13 15:10
**/
Result handleVolunteerPoints(EpdcVolunteerPointsFormDTO formDTO);
/**
* @describe: 志愿先锋模块获取志愿者列表
* @author wangtong
* @date 2021/11/16 16:19
* @params [params]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.VolunteerInfoDTO>>
*/
PageData<VolunteerInfoDTO> getVolunteerListForPionner(Map<String, Object> params);
}

124
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java

@ -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);
}

161
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java

@ -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));
}
}

32
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java

@ -33,6 +33,7 @@ import com.elink.esua.epdc.commons.tools.utils.ConvertUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.constant.UserFieldConsant;
import com.elink.esua.epdc.constant.VolunteerInfoNoticeConstant;
import com.elink.esua.epdc.dao.VlounteerTeamRealationDao;
import com.elink.esua.epdc.dao.VolunteerInfoDao;
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO;
import com.elink.esua.epdc.dto.UserTagDTO;
@ -50,6 +51,7 @@ import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO;
import com.elink.esua.epdc.service.UserTagRelationService;
import com.elink.esua.epdc.service.VolunteerInfoService;
import com.elink.esua.epdc.service.VolunteerTagRelationService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -63,6 +65,7 @@ import java.util.*;
* @author qu qu@elink-cn.com
* @since v1.0.0 2019-12-11
*/
@Slf4j
@Service
public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao, VolunteerInfoEntity> implements VolunteerInfoService {
@ -78,6 +81,9 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
@Autowired
private VolunteerTagRelationService volunteerTagRelationService;
@Autowired
private VlounteerTeamRealationDao vlounteerTeamRealationDao;
/**
* 根据查询条件返回首页 志愿者信息列表
*
@ -334,7 +340,9 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
**/
@Override
public Result<VolunteerInfoDTO> getVolunteerInfoDTOByUserId(String userId) {
return new Result<VolunteerInfoDTO>().ok(baseDao.selectOneVolunteerInfoDTO(userId));
VolunteerInfoDTO resutlt = baseDao.selectOneVolunteerInfoDTO(userId);
resutlt.setTeamIds(baseDao.selectTeamIdsByVolunteerId(resutlt.getId()));
return new Result<VolunteerInfoDTO>().ok(resutlt);
}
/**
@ -425,7 +433,7 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
@Override
@Transactional(rollbackFor = Exception.class)
public Result<Integer> insertV2VolunteerInfo(EpdcCompleteVolunteerInfoV2FormDTO formDTO) {
log.info("insertV2VolunteerInfo=dto:"+formDTO);
VolunteerInfoEntity volunteerEntity = ConvertUtils.sourceToTarget(formDTO, VolunteerInfoEntity.class);
// 补全其他字段
@ -456,6 +464,8 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
this.sendNotice(volunteerEntity);
userTagRelationService.addUserTagRelation(volunteerEntity.getUserId(), UserTagEnum.VOLUNTEER.value());
}
//更新志愿者的志愿团队信息
// updateVolunteerTeam(volunteerEntity,formDTO);
// 更新志愿者标签
VolunteerTagRelationDTO tagDto = new VolunteerTagRelationDTO();
tagDto.setVolunteerId(volunteerEntity.getId());
@ -465,6 +475,16 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
return new Result().ok(NumConstant.ONE);
}
// private void updateVolunteerTeam(VolunteerInfoEntity volunteerEntity, EpdcCompleteVolunteerInfoV2FormDTO dto) {
// vlounteerTeamRealationDao.deleteByVolunteerId(volunteerEntity.getId());
// if(StringUtils.isNotBlank(dto.getTeamId())){
// VlounteerTeamRealationEntity entity = new VlounteerTeamRealationEntity();
// entity.setVolunteerId(volunteerEntity.getId());
// entity.setTeamId(dto.getTeamId());
// vlounteerTeamRealationDao.insert(entity);
// }
// }
@Override
public Result updateKindnessTime(EpdcVolunteerKindnessTimeUpdateFormDTO formDto) {
baseDao.updateKindnessTime(formDto);
@ -517,6 +537,14 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
return new Result();
}
@Override
public PageData<VolunteerInfoDTO> getVolunteerListForPionner(Map<String, Object> params) {
IPage<VolunteerInfoEntity> page = getPage(params);
//查询
List<VolunteerInfoEntity> list = baseDao.getUserListForVolunteerOrg(params);
return getPageData(list, page.getTotal(), VolunteerInfoDTO.class);
}
/**
* 组织机构信息处理
*

138
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java

@ -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);
}
}

83
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml

@ -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>

30
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml

@ -215,12 +215,12 @@
<!-- 根据用户id查询志愿者信息 -->
<select id="selectOneVolunteerInfoDTO" parameterType="java.lang.String"
resultType="com.elink.esua.epdc.dto.VolunteerInfoDTO">
select m.*,
select m.*,
vt.tag_id
from epdc_volunteer_info m
left join epdc_volunteer_tag_relation vt on vt.VOLUNTEER_ID = m.id and vt.del_flag = '0'
where m.DEL_FLAG='0'
and m.USER_ID=#{userId}
from epdc_volunteer_info m
left join epdc_volunteer_tag_relation vt on vt.VOLUNTEER_ID = m.id and vt.del_flag = '0'
where m.DEL_FLAG='0'
and m.USER_ID=#{userId}
</select>
<update id="updateVolunteerKindnessTime">
@ -338,4 +338,24 @@
WHERE
FIND_IN_SET( #{deptId}, ALL_DEPT_IDS )
</select>
<select id="getUserListForVolunteerOrg" resultType="com.elink.esua.epdc.entity.VolunteerInfoEntity">
select vi.*
from epdc_volunteer_info vi
where vi.DEL_FLAG='0'
and (vi.AUDIT_STATUS ='0' or vi.AUDIT_STATUS='1')
and vi.id not in (select VOLUNTEER_ID from epdc_volunteer_pioneer where DEL_FLAG='0')
<if test="realName != null and realName != ''">
and vi.REAL_NAME like '%${realName}%'
</if>
<if test="mobile != null and mobile != ''">
and vi.MOBILE like '%${mobile}%'
</if>
order by vi.CREATED_TIME desc
</select>
<select id="selectTeamIdsByVolunteerId" resultType="java.lang.String">
select team_id
from epdc_vlounteer_team_realation
where VOLUNTEER_ID = #{volunteerId}
and DEL_FLAG='0'
</select>
</mapper>

48
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml

@ -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…
Cancel
Save