diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java index a380c7dd..65a23643 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcCompleteUserInfoDTO.java @@ -4,6 +4,7 @@ import lombok.Data; import javax.validation.constraints.NotBlank; import java.io.Serializable; +import java.util.List; /** * @author work@yujt.net.cn @@ -103,4 +104,14 @@ public class EpdcCompleteUserInfoDTO implements Serializable { * 志愿者所属部门 */ private String volunteerDeptId; + + /** + * 志愿团队id + */ + private List teamIds; + + /** + * 已加入的志愿团队名称 + */ + private List teamNames; } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppUserController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppUserController.java index b7a5688a..941b6f04 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppUserController.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppUserController.java @@ -273,6 +273,7 @@ public class ApiAppUserController { public Result prepareCompleteUserInfo(@LoginUser TokenDto tokenDto) { return appUserService.prepareCompleteUserInfo(tokenDto); } + /** * 获取邀请记录 * diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiVolunteerRankController.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiVolunteerRankController.java index 97874a24..0cbd320d 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiVolunteerRankController.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiVolunteerRankController.java @@ -1,16 +1,19 @@ package com.elink.esua.epdc.controller; +import com.elink.esua.epdc.common.token.dto.TokenDto; +import com.elink.esua.epdc.commons.tools.annotation.LoginUser; import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.dto.VolunteerPioneerDTO; +import com.elink.esua.epdc.dto.VolunteerTeamFormDTO; +import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.dto.form.EpdcAppVolunteerRankFormDTO; import com.elink.esua.epdc.dto.result.EpdcAppVolunteerRankDTO; import com.elink.esua.epdc.service.AppVolunteerRankService; import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -39,7 +42,116 @@ public class ApiVolunteerRankController { Result> data = appVolunteerRankService.leaderboard(formDto); List list2 = ConvertUtils.sourceToTarget(data.getData(), EpdcAppVolunteerRankDTO.class); return new Result().ok(list2); + } + + /** + * @describe: 小程序-志愿先锋-列表 + * @author wangtong + * @date 2021/11/22 10:41 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + @GetMapping("getVolunteerPioneerList") + public Result> getVolunteerPioneerList( VolunteerTeamFormDTO dto){ + return appVolunteerRankService.getVolunteerPioneerList(dto); + } + + /** + * @describe: 小程序-志愿先锋-详情 + * @author wangtong + * @date 2021/11/22 10:54 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + @GetMapping("getVolunteerPioneerDetail") + public Result getVolunteerPioneerDetail( VolunteerTeamFormDTO dto){ + return appVolunteerRankService.getVolunteerPioneerDetail(dto); + } + + /** + * @describe: 小程序-共建联盟-列表 + * @author wangtong + * @date 2021/11/22 11:06 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getVolunteerUnionList") + public Result getVolunteerUnionList( VolunteerUnionFormDTO dto){ + return appVolunteerRankService.getVolunteerUnionList(dto); + } + + /** + * @describe: 小程序-共建联盟-详情 + * @author wangtong + * @date 2021/11/22 11:12 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getVolunteerUnionDetail") + public Result getVolunteerUnionDetail(VolunteerUnionFormDTO dto){ + return appVolunteerRankService.getVolunteerUnionDetail(dto); + } + + /** + * @describe: 小程序-查询所有志愿团队类别 + * @author wangtong + * @date 2021/11/18 10:55 + * @params [] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getTeamTypeList") + public Result getTeamTypeList(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); + } + + } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java index 618dba24..feb8da73 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/ActInfoFeignClient.java @@ -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); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java index da2ad4f6..900c3bc4 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/UserFeignClient.java @@ -652,4 +652,44 @@ public interface UserFeignClient { **/ @PostMapping("app-user/user/combineVolunteerUser") Result combineVolunteerUser(CombineVolunteerUserFormDTO combineVolunteerUserFormDTO); + + /** + * @describe: 小程序-志愿先锋-列表 + * @author wangtong + * @date 2021/11/22 10:41 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + @GetMapping(value = "app-user/volunteerpioneer/getVolunteerPioneerList", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getVolunteerPioneerList(VolunteerTeamFormDTO formDto); + + /** + * @describe: 小程序-志愿先锋-详情 + * @author wangtong + * @date 2021/11/22 10:54 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + @GetMapping(value = "app-user/volunteerpioneer/getVolunteerPioneerDetail", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getVolunteerPioneerDetail(VolunteerTeamFormDTO formDto); + + /** + * @describe: 小程序-志愿团队-详情-成员列表 + * @author wangtong + * @date 2021/11/22 16:13 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping(value = "app-user/vlounteerteamrealation/getTeamVolunteerList", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getTeamVolunteerList(VolunteerTeamFormDTO formDto); + + /** + * @describe: 小程序-志愿团队-加入团队 + * @author wangtong + * @date 2021/11/22 16:22 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @PostMapping(value = "app-user/vlounteerteamrealation/joinTeam", consumes = MediaType.APPLICATION_JSON_VALUE) + Result joinTeam(VolunteerTeamFormDTO formDto); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java index c2a6283a..a3829479 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/ActInfoFeignClientFallback.java @@ -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); + } + } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java index 1966b7a6..489c6c57 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/UserFeignClientFallback.java @@ -317,4 +317,24 @@ public class UserFeignClientFallback implements UserFeignClient { public Result combineVolunteerUser(CombineVolunteerUserFormDTO combineVolunteerUserFormDTO) { return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "combineVolunteerUser", combineVolunteerUserFormDTO); } + + @Override + public Result getVolunteerPioneerList(VolunteerTeamFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getVolunteerPioneerList", formDto); + } + + @Override + public Result getVolunteerPioneerDetail(VolunteerTeamFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getVolunteerPioneerDetail", formDto); + } + + @Override + public Result getTeamVolunteerList(VolunteerTeamFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getTeamVolunteerList", formDto); + } + + @Override + public Result joinTeam(VolunteerTeamFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "joinTeam", formDto); + } } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java index cce726de..112eb53d 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/AppVolunteerRankService.java @@ -6,6 +6,8 @@ import com.elink.esua.epdc.activity.result.ActApplyDetailResultDTO; import com.elink.esua.epdc.activity.result.ActApplyRecordResultDTO; import com.elink.esua.epdc.common.token.dto.TokenDto; import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.VolunteerTeamFormDTO; +import com.elink.esua.epdc.dto.VolunteerUnionFormDTO; import com.elink.esua.epdc.dto.form.EpdcAppVolunteerRankFormDTO; import com.elink.esua.epdc.volunteer.EpdcVolunteerRankDTO; @@ -48,4 +50,85 @@ public interface AppVolunteerRankService { * @return com.elink.esua.epdc.commons.tools.utils.Result **/ Result applyActDetail(String id); + + /** + * @describe: 小程序-志愿先锋-列表 + * @author wangtong + * @date 2021/11/22 10:41 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + Result getVolunteerPioneerList(VolunteerTeamFormDTO dto); + + /** + * @describe: 小程序-志愿先锋-详情 + * @author wangtong + * @date 2021/11/22 10:54 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + Result getVolunteerPioneerDetail(VolunteerTeamFormDTO dto); + + /** + * @describe: 小程序-共建联盟-列表 + * @author wangtong + * @date 2021/11/22 11:06 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getVolunteerUnionList(VolunteerUnionFormDTO dto); + + /** + * @describe: 小程序-共建联盟-详情 + * @author wangtong + * @date 2021/11/22 11:12 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getVolunteerUnionDetail(VolunteerUnionFormDTO dto); + + /** + * @describe: 查询所有志愿团队类别 + * @author wangtong + * @date 2021/11/18 10:55 + * @params [] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getTeamTypeList(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); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java index 6dfac9af..907d549f 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppUserServiceImpl.java @@ -8,6 +8,7 @@ import cn.binarywang.wx.miniapp.util.crypt.WxMaCryptUtils; import cn.hutool.core.date.DateUtil; import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSONObject; +import com.alibaba.nacos.client.naming.utils.CollectionUtils; import com.elink.esua.epdc.async.GroupTask; import com.elink.esua.epdc.async.PartyGroupTask; import com.elink.esua.epdc.common.token.dto.TokenDto; @@ -119,6 +120,9 @@ public class AppUserServiceImpl implements AppUserService { @Autowired private PointsFeignClient pointsFeignClient; + @Autowired + private ActInfoFeignClient actInfoFeignClient; + //private static String USER_FACE = "https://epdc.elinkchina.com.cn/esua-epdc/static/default/default_user_face.png"; private static String USER_FACE = "https://epdc-shibei.elinkservice.cn/epdcFile/M00/00/00/CgUipV3wgl6Afm4cAAAa8QfEb00266_big.png"; @@ -949,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> 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("在水一方,志在四方"); diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java index 622dd8de..3c816210 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/AppVolunteerRankServiceImpl.java @@ -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); + } + } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java index 3a26152b..2502dfe8 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/ActInfoDTO.java @@ -50,6 +50,21 @@ public class ActInfoDTO implements Serializable { */ private String headPic; + /** + * 志愿团队类型 + */ + private String teamType; + + /** + * 志愿团队id + */ + private String teamId; + + /** + * 志愿团队名称 + */ + private String teamName; + /** * 报名开始时间 */ diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActInfoAppFormDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActInfoAppFormDTO.java index 164ed79a..8de6d711 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActInfoAppFormDTO.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/activity/form/ActInfoAppFormDTO.java @@ -70,4 +70,9 @@ public class ActInfoAppFormDTO implements Serializable { */ private String sponsor; + /** + * 志愿团队id + */ + private String teamId; + } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamDTO.java new file mode 100644 index 00000000..0133b9df --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamDTO.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.volunteer; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 志愿团队 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VolunteerTeamDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 团队名称 + */ + private String teamName; + + /** + * 团队类别 + */ + private String teamType; + + /** + * 类别名称 + */ + private String 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; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamTypeDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamTypeDTO.java new file mode 100644 index 00000000..e9bc84e4 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerTeamTypeDTO.java @@ -0,0 +1,86 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.volunteer; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 志愿团队类别 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VolunteerTeamTypeDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 标识号 + */ + private Long id; + + /** + * 类别名称 + */ + private String typeName; + + /** + * 类别编码 + */ + private String typeCode; + + /** + * 排序 + */ + private Integer sort; + + /** + * 启用标识 0-启用,1-未启用 + */ + private String bannerFlag; + + /** + * 删除标识 0:未删除 1:删除 + */ + private Integer delFlag; + + /** + * 创建者 + */ + private Long creator; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 更新者 + */ + private Long updater; + + /** + * 更新时间 + */ + private Date updateDate; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerUnionDTO.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerUnionDTO.java new file mode 100644 index 00000000..3d349a8a --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-client/src/main/java/com/elink/esua/epdc/volunteer/VolunteerUnionDTO.java @@ -0,0 +1,92 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.volunteer; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 共建联盟 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VolunteerUnionDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 联盟名称 + */ + private String unionName; + + /** + * 联系人 + */ + private String contacts; + + /** + * 联系电话 + */ + private String phone; + + /** + * 团队介绍 + */ + private String content; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 删除标识 + */ + private String delFlag; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActInfoDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActInfoDao.java index e14101a1..066fbc2b 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActInfoDao.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActInfoDao.java @@ -160,4 +160,13 @@ public interface ActInfoDao extends BaseDao { * @return void **/ void updateActTopFlagById(ActTopFormDTO formDto); + + /** + * @describe: 通过teamId获取活动信息 + * @author wangtong + * @date 2021/11/24 15:26 + * @params [teamId] + * @return java.util.List + */ + List selectByTeamId(@Param("teamId") String teamId); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java index f8b62ada..00a4b459 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/entity/ActInfoEntity.java @@ -83,6 +83,11 @@ public class ActInfoEntity extends BaseEpdcEntity { */ private String actAddress; + /** + * 志愿团队id + */ + private String teamId; + /** * 默认状态 */ diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java index 6df03a80..befdfa4d 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java @@ -52,7 +52,10 @@ import com.elink.esua.epdc.dto.ScheduleJobDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeUpdateFormDTO; import com.elink.esua.epdc.modules.activity.dao.*; -import com.elink.esua.epdc.modules.activity.entity.*; +import com.elink.esua.epdc.modules.activity.entity.ActBannerEntity; +import com.elink.esua.epdc.modules.activity.entity.ActInfoEntity; +import com.elink.esua.epdc.modules.activity.entity.ActUserClockLogEntity; +import com.elink.esua.epdc.modules.activity.entity.ActUserRelationEntity; import com.elink.esua.epdc.modules.activity.service.ActBannerService; import com.elink.esua.epdc.modules.activity.service.ActInfoService; import com.elink.esua.epdc.modules.activity.service.ActPeriodService; @@ -63,6 +66,8 @@ import com.elink.esua.epdc.modules.feign.ContentSecurityFeignClient; import com.elink.esua.epdc.modules.feign.JobFeignClient; import com.elink.esua.epdc.modules.feign.UserInfoFeignClient; import com.elink.esua.epdc.modules.rocketmq.dto.RejectRecordDTO; +import com.elink.esua.epdc.modules.volunteer.dao.VolunteerTeamDao; +import com.elink.esua.epdc.modules.volunteer.entity.VolunteerTeamEntity; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -102,6 +107,8 @@ public class ActInfoServiceImpl extends BaseServiceImpl periods = actPeriodService.listOfActPeriodsByActId(id); ActInfoDTO dto = ConvertUtils.sourceToTarget(entity, ActInfoDTO.class); dto.setPeriods(periods); + if(StringUtils.isNotBlank(dto.getTeamId())){ + VolunteerTeamEntity volunteerTeamEntity = volunteerTeamDao.selectById(dto.getTeamId()); + dto.setTeamType(volunteerTeamEntity.getTeamType()); + dto.setTeamName(volunteerTeamEntity.getTeamName()); + } return dto; } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java index 044c387f..1947a6e3 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/UserInfoFeignClient.java @@ -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 + */ + @PostMapping(value = "app-user/vlounteerteamrealation/getVolunteerWithTeamState", consumes = MediaType.APPLICATION_JSON_VALUE) + Result getVolunteerWithTeamState(VolunteerUnionFormDTO dto); + + /** + * @describe: 通过teamId查询志愿者 + * @author wangtong + * @date 2021/11/24 15:35 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @PostMapping(value = "app-user/vlounteerteamrealation/selectVolunteerByTeamId", consumes = MediaType.APPLICATION_JSON_VALUE) + Result selectVolunteerByTeamId(VolunteerUnionFormDTO dto); } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java index cfb9419a..cf5ae130 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/feign/fallback/UserInfoFeignClientFallback.java @@ -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 getVolunteerWithTeamState(VolunteerUnionFormDTO dto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "getVolunteerWithTeamState", dto); + } + + @Override + public Result selectVolunteerByTeamId(VolunteerUnionFormDTO dto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_USER_SERVER, "selectVolunteerByTeamId", dto); + } } diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java new file mode 100644 index 00000000..0d5ac069 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamController.java @@ -0,0 +1,143 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.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> page(@RequestParam Map params){ + PageData page = volunteerTeamService.getPageList(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + VolunteerTeamDTO data = volunteerTeamService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody VolunteerTeamDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + volunteerTeamService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody VolunteerTeamDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + volunteerTeamService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + volunteerTeamService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = volunteerTeamService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, VolunteerTeamExcel.class); + } + + /** + * @describe: 通过团队类别获取团队列表 + * @author wangtong + * @date 2021/11/18 14:47 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getTeamListByType") + public Result getTeamListByType(@RequestParam Map params){ + return volunteerTeamService.getTeamListByType(params); + } + + /** + * @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); + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java new file mode 100644 index 00000000..2fc17706 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerTeamTypeController.java @@ -0,0 +1,120 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.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> page(@RequestParam Map params){ + PageData page = volunteerTeamTypeService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + VolunteerTeamTypeDTO data = volunteerTeamTypeService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody VolunteerTeamTypeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + volunteerTeamTypeService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody VolunteerTeamTypeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + volunteerTeamTypeService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + volunteerTeamTypeService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = volunteerTeamTypeService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, VolunteerTeamTypeExcel.class); + } + + /** + * @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); + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerUnionController.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerUnionController.java new file mode 100644 index 00000000..4b54e4c3 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/controller/VolunteerUnionController.java @@ -0,0 +1,119 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.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> page(@RequestParam Map params){ + PageData page = volunteerUnionService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + VolunteerUnionDTO data = volunteerUnionService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody VolunteerUnionDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + volunteerUnionService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody VolunteerUnionDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + volunteerUnionService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + volunteerUnionService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = volunteerUnionService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, VolunteerUnionExcel.class); + } + + /** + * @describe: 小程序-共建联盟-列表 + * @author wangtong + * @date 2021/11/22 11:06 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getVolunteerUnionList") + public Result getVolunteerUnionList(@RequestBody VolunteerUnionFormDTO dto){ + return volunteerUnionService.getVolunteerUnionList(dto); + } + + /** + * @describe: 小程序-共建联盟-详情 + * @author wangtong + * @date 2021/11/22 11:12 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @GetMapping("getVolunteerUnionDetail") + public Result getVolunteerUnionDetail(@RequestBody VolunteerUnionFormDTO dto){ + return volunteerUnionService.getVolunteerUnionDetail(dto); + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java new file mode 100644 index 00000000..315e2f00 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamDao.java @@ -0,0 +1,76 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.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 { + + List getPageList(Map params); + + /** + * @describe: 通过团队类别获取团队列表 + * @author wangtong + * @date 2021/11/18 14:47 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + List getTeamListByType(Map params); + + /** + * @describe: 小程序-志愿团队-列表 + * @author wangtong + * @date 2021/11/22 14:45 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + List getAppTeamListByType(VolunteerUnionFormDTO formDto); + + /** + * @describe: 志愿团队-详情 + * @author wangtong + * @date 2021/11/22 15:19 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + VolunteerDetailResultDTO getAppTeamDetail(VolunteerUnionFormDTO dto); + + /** + * @describe: 获取团队名称 + * @author wangtong + * @date 2021/11/25 15:46 + * @params [dto] + * @return java.util.List + */ + List selectTeamNameByIds(VolunteerUnionFormDTO dto); +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java new file mode 100644 index 00000000..fc590439 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerTeamTypeDao.java @@ -0,0 +1,54 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.dao; + + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.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 { + + /** + * @describe: 小程序-查询所有志愿团队类别 + * @author wangtong + * @date 2021/11/18 10:55 + * @params [] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + List getTeamTypeList(VolunteerTeamFormDTO formDto); + + /** + * @describe: 查询所有志愿团队类别 + * @author wangtong + * @date 2021/11/18 10:55 + * @params [] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + List getSysTeamTypeList(VolunteerTeamFormDTO formDto); +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java new file mode 100644 index 00000000..2c84b304 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/dao/VolunteerUnionDao.java @@ -0,0 +1,49 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.dao; + + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.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 { + + List getPageList(Map params); + + /** + * @describe: 小程序-共建联盟-列表 + * @author wangtong + * @date 2021/11/22 11:06 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + List getVolunteerPioneerList(VolunteerUnionFormDTO formDto); +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamEntity.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamEntity.java new file mode 100644 index 00000000..0804be3c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamEntity.java @@ -0,0 +1,63 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 志愿团队 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_volunteer_team") +public class VolunteerTeamEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 团队名称 + */ + private String teamName; + + /** + * 团队类别 + */ + private String teamType; + + /** + * 联系人 + */ + private String contacts; + + /** + * 联系电话 + */ + private String phone; + + /** + * 团队介绍 + */ + private String content; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamTypeEntity.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamTypeEntity.java new file mode 100644 index 00000000..08e633b6 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerTeamTypeEntity.java @@ -0,0 +1,82 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.entity; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 志愿团队类别 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_volunteer_team_type") +public class VolunteerTeamTypeEntity extends BaseEntity { + + private static final long serialVersionUID = 1L; + + + /** + * 类别名称 + */ + private String typeName; + + /** + * 类别编码 + */ + private String typeCode; + + /** + * 排序 + */ + private Integer sort; + + /** + * 启用标识 0-启用,1-未启用 + */ + private String bannerFlag; + + /** + * 删除标识 0:未删除 1:删除 + */ + @TableField(fill = FieldFill.INSERT) + private Integer delFlag; + + + /** + * 更新者 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private Long updater; + + /** + * 更新时间 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private Date updateDate; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerUnionEntity.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerUnionEntity.java new file mode 100644 index 00000000..a212e02c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/entity/VolunteerUnionEntity.java @@ -0,0 +1,58 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 共建联盟 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_volunteer_union") +public class VolunteerUnionEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 联盟名称 + */ + private String unionName; + + /** + * 联系人 + */ + private String contacts; + + /** + * 联系电话 + */ + private String phone; + + /** + * 团队介绍 + */ + private String content; + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamExcel.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamExcel.java new file mode 100644 index 00000000..c7831c71 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamExcel.java @@ -0,0 +1,71 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 志愿团队 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VolunteerTeamExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "团队名称") + private String teamName; + + @Excel(name = "团队类别") + private String teamType; + + @Excel(name = "联系人") + private String contacts; + + @Excel(name = "联系电话") + private String phone; + + @Excel(name = "团队介绍") + private String content; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "删除标识") + private String delFlag; + + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamTypeExcel.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamTypeExcel.java new file mode 100644 index 00000000..29896f31 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerTeamTypeExcel.java @@ -0,0 +1,65 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 志愿团队类别 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VolunteerTeamTypeExcel { + + @Excel(name = "标识号") + private Long id; + + @Excel(name = "类别名称") + private String typeName; + + @Excel(name = "类别编码") + private String typeCode; + + @Excel(name = "排序") + private Integer sort; + + @Excel(name = "启用标识 0-启用,1-未启用") + private String bannerFlag; + + @Excel(name = "删除标识 0:未删除 1:删除") + private Integer delFlag; + + @Excel(name = "创建者") + private Long creator; + + @Excel(name = "创建时间") + private Date createDate; + + @Excel(name = "更新者") + private Long updater; + + @Excel(name = "更新时间") + private Date updateDate; + + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerUnionExcel.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerUnionExcel.java new file mode 100644 index 00000000..1e1a962d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/excel/VolunteerUnionExcel.java @@ -0,0 +1,68 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 共建联盟 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VolunteerUnionExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "联盟名称") + private String unionName; + + @Excel(name = "联系人") + private String contacts; + + @Excel(name = "联系电话") + private String phone; + + @Excel(name = "团队介绍") + private String content; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "删除标识") + private String delFlag; + + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamRedis.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamRedis.java new file mode 100644 index 00000000..1815e398 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 志愿团队 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Component +public class VolunteerTeamRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamTypeRedis.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamTypeRedis.java new file mode 100644 index 00000000..f4fc9d3d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerTeamTypeRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 志愿团队类别 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Component +public class VolunteerTeamTypeRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerUnionRedis.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerUnionRedis.java new file mode 100644 index 00000000..df10e76f --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/redis/VolunteerUnionRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 共建联盟 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Component +public class VolunteerUnionRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java new file mode 100644 index 00000000..fd9154ef --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamService.java @@ -0,0 +1,136 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.service; + + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.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 { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return VolunteerTeamDTO + * @author generator + * @date 2021-11-16 + */ + VolunteerTeamDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void save(VolunteerTeamDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void update(VolunteerTeamDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-16 + */ + void delete(String[] ids); + + PageData getPageList(Map params); + + /** + * @describe: 通过团队类别获取团队列表 + * @author wangtong + * @date 2021/11/18 14:47 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getTeamListByType(Map params); + + /** + * @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); +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java new file mode 100644 index 00000000..3bd0df46 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerTeamTypeService.java @@ -0,0 +1,116 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.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 { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return VolunteerTeamTypeDTO + * @author generator + * @date 2021-11-16 + */ + VolunteerTeamTypeDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void save(VolunteerTeamTypeDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void update(VolunteerTeamTypeDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-16 + */ + void delete(String[] ids); + + /** + * @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); +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerUnionService.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerUnionService.java new file mode 100644 index 00000000..37dde3da --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/VolunteerUnionService.java @@ -0,0 +1,115 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.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 { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return VolunteerUnionDTO + * @author generator + * @date 2021-11-16 + */ + VolunteerUnionDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void save(VolunteerUnionDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void update(VolunteerUnionDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-16 + */ + void delete(String[] ids); + + /** + * @describe: 小程序-共建联盟-列表 + * @author wangtong + * @date 2021/11/22 11:06 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getVolunteerUnionList(VolunteerUnionFormDTO dto); + + /** + * @describe: 小程序-共建联盟-详情 + * @author wangtong + * @date 2021/11/22 11:12 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getVolunteerUnionDetail(VolunteerUnionFormDTO dto); +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java new file mode 100644 index 00000000..51dcef95 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamServiceImpl.java @@ -0,0 +1,186 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.service.impl; + +import com.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 implements VolunteerTeamService { + + @Autowired + private VolunteerTeamRedis volunteerTeamRedis; + + @Autowired + private UserInfoFeignClient userInfoFeignClient; + + @Autowired + private ActInfoDao actInfoDao; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, VolunteerTeamDTO.class); + } + + @Override + public PageData getPageList(Map params) { + IPage page = getPage(params); + List list = baseDao.getPageList(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public Result getTeamListByType(Map params) { + List list = baseDao.getTeamListByType(params); + return new Result().ok(list); + } + + @Override + public Result getAppTeamListByType(VolunteerUnionFormDTO formDto) { + int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize(); + formDto.setPageIndex(pageIndex); + List 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 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 teamNames = baseDao.selectTeamNameByIds(dto); + return new Result().ok(teamNames); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, VolunteerTeamDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public VolunteerTeamDTO get(String id) { + VolunteerTeamEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, VolunteerTeamDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(VolunteerTeamDTO dto) { + VolunteerTeamEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerTeamEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(VolunteerTeamDTO dto) { + VolunteerTeamEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerTeamEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + for(String id : ids){ + //检测是否关联活动 + List actList = actInfoDao.selectByTeamId(id); + if(!CollectionUtils.isEmpty(actList)){ + throw new RenException("该团队已关联活动,暂时不可删除"); + } + //检测是否有团队成员 + VolunteerUnionFormDTO dto = new VolunteerUnionFormDTO(); + dto.setId(id); + Result> volunteerList = userInfoFeignClient.selectVolunteerByTeamId(dto); + if (!volunteerList.success() ) { + throw new RenException("获取团队成员信息有误,请稍后再试"); + } + List vList = volunteerList.getData(); + if(!CollectionUtils.isEmpty(vList)){ + throw new RenException("该团队已关联团队成员,暂时不可删除"); + } + } + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamTypeServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamTypeServiceImpl.java new file mode 100644 index 00000000..9c17f982 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerTeamTypeServiceImpl.java @@ -0,0 +1,168 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.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 implements VolunteerTeamTypeService { + + @Autowired + private VolunteerTeamTypeRedis volunteerTeamTypeRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, "sort", true), + getWrapper(params) + ); + return getPageData(page, VolunteerTeamTypeDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, VolunteerTeamTypeDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public VolunteerTeamTypeDTO get(String id) { + VolunteerTeamTypeEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, VolunteerTeamTypeDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(VolunteerTeamTypeDTO dto) { + 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 wrapper = new QueryWrapper<>(); + wrapper.eq("type_code", dto.getTypeCode()); + wrapper.eq("del_flag", "0"); + if(null != dto.getId()){ + wrapper.ne("id", dto.getId()); + } + return baseDao.selectCount(wrapper); + } + + public Integer getNameCount(VolunteerTeamTypeDTO dto) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq("type_name", dto.getTypeName()); + wrapper.eq("del_flag", "0"); + if(null != dto.getId()){ + wrapper.ne("id", dto.getId()); + } + return baseDao.selectCount(wrapper); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(VolunteerTeamTypeDTO dto) { + + String categoryCode = dto.getTypeCode(); + if (StringUtils.isNotBlank(categoryCode)) { + if (getCodeCount(dto) > 0) { + throw new RenException("您输入的编码已存在"); + } + } + + String categoryName = dto.getTypeName(); + if (StringUtils.isNotBlank(categoryName)) { + if (getNameCount(dto) > 0) { + throw new RenException("您输入的名称已存在"); + } + } + + VolunteerTeamTypeEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerTeamTypeEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public Result getTeamTypeList(VolunteerTeamFormDTO formDto) { + List result = baseDao.getTeamTypeList(formDto); + return new Result().ok(result); + } + + @Override + public Result getSysTeamTypeList(VolunteerTeamFormDTO formDto) { + List result = baseDao.getSysTeamTypeList(formDto); + return new Result().ok(result); + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java new file mode 100644 index 00000000..363266b0 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/volunteer/service/impl/VolunteerUnionServiceImpl.java @@ -0,0 +1,124 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.volunteer.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.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 implements VolunteerUnionService { + + @Autowired + private VolunteerUnionRedis volunteerUnionRedis; + + @Override + public PageData page(Map params) { +// IPage page = baseDao.selectPage( +// getPage(params, FieldConstant.CREATED_TIME, false), +// getWrapper(params) +// ); +// return getPageData(page, VolunteerUnionDTO.class); + IPage page = getPage(params); + List list = baseDao.getPageList(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, VolunteerUnionDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public VolunteerUnionDTO get(String id) { + VolunteerUnionEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, VolunteerUnionDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(VolunteerUnionDTO dto) { + VolunteerUnionEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerUnionEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(VolunteerUnionDTO dto) { + VolunteerUnionEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerUnionEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public Result getVolunteerUnionList(VolunteerUnionFormDTO formDto) { + int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize(); + formDto.setPageIndex(pageIndex); + List list = baseDao.getVolunteerPioneerList(formDto); + return new Result().ok(list); + } + + @Override + public Result getVolunteerUnionDetail(VolunteerUnionFormDTO dto) { + VolunteerUnionEntity entity = baseDao.selectById(dto.getId()); + return new Result().ok(entity); + } + +} diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActInfoDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActInfoDao.xml index 160a1a2e..7beea5a0 100644 --- a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActInfoDao.xml +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActInfoDao.xml @@ -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' #{timestamp} @@ -203,8 +204,11 @@ AND actInfo.ID = #{actId} + + AND actInfo.TEAM_ID = #{teamId} + - AND actInfo.SPONSOR like concat('%', #{sponsor}, '%') + AND vt.TEAM_NAME like concat('%', #{sponsor}, '%') #{timestamp} @@ -601,4 +605,8 @@ ORDER BY t.SIGNIN_START_TIME DESC LIMIT #{pageIndex}, #{pageSize} + diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml new file mode 100644 index 00000000..c2b3a543 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamDao.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml new file mode 100644 index 00000000..5e73bdfa --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerTeamTypeDao.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml new file mode 100644 index 00000000..b2c2f872 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/volunteer/VolunteerUnionDao.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/TeamVolunteerListDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/TeamVolunteerListDTO.java new file mode 100644 index 00000000..bcebd8b0 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/TeamVolunteerListDTO.java @@ -0,0 +1,25 @@ +package com.elink.esua.epdc.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @program: esua-epdc + * @description: + * @author: wangtong + * @create: 2021-11-22 16:15 + **/ +@Data +public class TeamVolunteerListDTO implements Serializable { + + private String id; + + private String faceImg; + + private String partyFLag; + + private String realName; + + private String introduce; +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java new file mode 100644 index 00000000..dee54b33 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VlounteerTeamRealationDTO.java @@ -0,0 +1,83 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 志愿者-志愿团队关联表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VlounteerTeamRealationDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 志愿者id + */ + private String volunteerId; + + /** + * 团队id + */ + private String teamId; + + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 删除标识 + */ + private String delFlag; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerDetailResultDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerDetailResultDTO.java new file mode 100644 index 00000000..082ea2af --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerDetailResultDTO.java @@ -0,0 +1,43 @@ +package com.elink.esua.epdc.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @program: esua-epdc + * @description: + * @author: wangtong + * @create: 2021-11-22 15:19 + **/ +@Data +public class VolunteerDetailResultDTO implements Serializable { + + + /** + * 主键 + */ + private String id; + + /** + * 团队名称 + */ + private String teamName; + + /** + * 团队介绍 + */ + private String content; + + /** + * 是否已加入 + */ + private Boolean joinFlag; + + /** + * 志愿者id + */ + private String volunteerId; + + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerInfoDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerInfoDTO.java index 69c1ce96..2a96262f 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerInfoDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerInfoDTO.java @@ -22,6 +22,7 @@ import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; +import java.util.List; /** @@ -232,4 +233,9 @@ public class VolunteerInfoDTO implements Serializable { * 志愿者部门名称 */ private String DeptName; + + /** + * 志愿团队id + */ + private List teamIds; } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerPioneerDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerPioneerDTO.java new file mode 100644 index 00000000..2eab79f5 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerPioneerDTO.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 志愿先锋 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VolunteerPioneerDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 姓名 + */ + 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; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerTeamFormDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerTeamFormDTO.java new file mode 100644 index 00000000..c28d49c4 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerTeamFormDTO.java @@ -0,0 +1,32 @@ +package com.elink.esua.epdc.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @program: esua-epdc + * @description: + * @author: wangtong + * @create: 2021-11-22 10:40 + **/ +@Data +public class VolunteerTeamFormDTO implements Serializable { + + /** + * 页码,从1开始 + */ + private Integer pageIndex; + + /** + * 页容量,默认10页 + */ + private Integer pageSize ; + + + private String id; + + private String volunteerId; + + private String teamId; +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerUnionFormDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerUnionFormDTO.java new file mode 100644 index 00000000..6275da58 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/VolunteerUnionFormDTO.java @@ -0,0 +1,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 teamIds; + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcCompleteVolunteerInfoFormDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcCompleteVolunteerInfoFormDTO.java index f6a0cf22..a09dade8 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcCompleteVolunteerInfoFormDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/EpdcCompleteVolunteerInfoFormDTO.java @@ -108,5 +108,10 @@ public class EpdcCompleteVolunteerInfoFormDTO implements Serializable { */ private String volunteerDept; + /** + * 团队id + */ + private String teamId; + } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/v2/EpdcCompleteVolunteerInfoV2FormDTO.java b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/v2/EpdcCompleteVolunteerInfoV2FormDTO.java index 51a92554..d85496c5 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/v2/EpdcCompleteVolunteerInfoV2FormDTO.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/form/v2/EpdcCompleteVolunteerInfoV2FormDTO.java @@ -129,5 +129,10 @@ public class EpdcCompleteVolunteerInfoV2FormDTO implements Serializable { */ private String volunteerDeptId; + /** + * 团队id + */ + private String teamId; + } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java new file mode 100644 index 00000000..98e39f9b --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VlounteerTeamRealationController.java @@ -0,0 +1,161 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.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> page(@RequestParam Map params){ + PageData page = vlounteerTeamRealationService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + VlounteerTeamRealationDTO data = vlounteerTeamRealationService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody VlounteerTeamRealationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + vlounteerTeamRealationService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody VlounteerTeamRealationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + vlounteerTeamRealationService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + vlounteerTeamRealationService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = vlounteerTeamRealationService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, VlounteerTeamRealationExcel.class); + } + + + /** + * @describe: 通过志愿团队id获取志愿者信息 + * @author wangtong + * @date 2021/11/18 16:26 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + @GetMapping("getVolunteerListByTeamId") + public Result> getVolunteerListByTeamId(@RequestParam Map params) { + PageData page = vlounteerTeamRealationService.getVolunteerListByTeamId(params); + return new Result>().ok(page); + } + + /** + * @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> getTeamVolunteerList(@RequestBody VolunteerTeamFormDTO dto) { + List page = vlounteerTeamRealationService.getTeamVolunteerList(dto); + if( page == null){ + return new Result<>(); + } + return new Result>().ok(page); + } + + /** + * @describe: 小程序-志愿团队-加入团队 + * @author wangtong + * @date 2021/11/22 16:22 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @PostMapping("joinTeam") + public Result joinTeam(@RequestBody VolunteerTeamFormDTO dto) { + return vlounteerTeamRealationService.joinTeam(dto); + } + + /** + * @describe: 通过teamId查询志愿者 + * @author wangtong + * @date 2021/11/24 15:37 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + @PostMapping("selectVolunteerByTeamId") + public Result selectVolunteerByTeamId(@RequestBody VolunteerUnionFormDTO dto) { + return vlounteerTeamRealationService.selectVolunteerByTeamId(dto); + } + + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java index 04654fab..d35ec90d 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java @@ -271,5 +271,18 @@ public class VolunteerInfoController { return volunteerInfoService.handleVolunteerPoints(formDTO); } + /** + * @describe: 志愿先锋模块获取志愿者列表 + * @author wangtong + * @date 2021/11/16 16:19 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + @GetMapping("getVolunteerListForPionner") + public Result> getVolunteerListForPionner(@RequestParam Map params) { + PageData page = volunteerInfoService.getVolunteerListForPionner(params); + return new Result>().ok(page); + } + } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java new file mode 100644 index 00000000..0f4ffcc8 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/VolunteerPioneerController.java @@ -0,0 +1,132 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.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> page(@RequestParam Map params){ + PageData page = volunteerPioneerService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + VolunteerPioneerDTO data = volunteerPioneerService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody VolunteerPioneerDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + volunteerPioneerService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody VolunteerPioneerDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + volunteerPioneerService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + volunteerPioneerService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = volunteerPioneerService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, VolunteerPioneerExcel.class); + } + + /** + * @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> + */ + @GetMapping("getVolunteerPioneerList") + public Result> getVolunteerPioneerList(@RequestBody VolunteerTeamFormDTO dto){ + List page = volunteerPioneerService.getVolunteerPioneerList(dto); + return new Result>().ok(page); + } + + /** + * @describe: 小程序-志愿先锋-详情 + * @author wangtong + * @date 2021/11/22 10:54 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + @GetMapping("getVolunteerPioneerDetail") + public Result getVolunteerPioneerDetail(@RequestBody VolunteerTeamFormDTO dto){ + return volunteerPioneerService.getVolunteerPioneerDetail(dto); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java new file mode 100644 index 00000000..10a55916 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VlounteerTeamRealationDao.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.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 { + + List getPageList(Map params); + + /** + * @describe: 通过志愿团队id获取志愿者信息 + * @author wangtong + * @date 2021/11/18 16:26 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + List getVolunteerListByTeamId(Map params); + + /** + * @describe: 通过用户信息和志愿团队id获取志愿者信息 + * @author wangtong + * @date 2021/11/22 16:03 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + VolunteerDetailResultDTO getVolunteerWithTeamState(VolunteerUnionFormDTO dto); + + /** + * @describe: 小程序-志愿团队-详情-成员列表 + * @author wangtong + * @date 2021/11/22 16:13 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + List getVolunteerPioneerList(VolunteerTeamFormDTO formDto); + + /** + * @describe: 通过团队id和志愿者id查询数据 + * @author wangtong + * @date 2021/11/22 16:23 + * @params [dto] + * @return com.elink.esua.epdc.entity.VlounteerTeamRealationEntity + */ + VlounteerTeamRealationEntity selectByTeamIdAngVolunteerId(VolunteerTeamFormDTO dto); + + /** + * @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 selectVolunteerByTeamId(VolunteerUnionFormDTO dto); +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java index 2888fcf5..464fdf61 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java @@ -177,4 +177,22 @@ public interface VolunteerInfoDao extends BaseDao { * @return java.util.List **/ List selectListOfOrganizationInfo(String deptId); + + /** + * @describe: 志愿先锋模块获取志愿者列表 + * @author wangtong + * @date 2021/11/16 16:19 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + List getUserListForVolunteerOrg(Map params); + + /** + * @describe: 通过志愿者id查询所在的志愿团队id + * @author wangtong + * @date 2021/11/25 15:32 + * @params [volunteerId] + * @return java.util.List + */ + List selectTeamIdsByVolunteerId(@Param("volunteerId") String volunteerId); } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.java new file mode 100644 index 00000000..2b490c1f --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/VolunteerPioneerDao.java @@ -0,0 +1,58 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.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 { + + List getPageList(Map params); + + /** + * @describe: 通过id查询详情 + * @author wangtong + * @date 2021/11/16 17:12 + * @params [id] + * @return com.elink.esua.epdc.dto.VolunteerPioneerDTO + */ + VolunteerPioneerDTO selectDetailById(@Param("id") String id); + + /** + * @describe: 小程序-志愿先锋-列表 + * @author wangtong + * @date 2021/11/22 10:45 + * @params [formDto] + * @return java.util.List + */ + List getVolunteerPioneerList(VolunteerTeamFormDTO formDto); +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VlounteerTeamRealationEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VlounteerTeamRealationEntity.java new file mode 100644 index 00000000..3eef851c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VlounteerTeamRealationEntity.java @@ -0,0 +1,49 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 志愿者-志愿团队关联表 + * + * @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; + + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerPioneerEntity.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerPioneerEntity.java new file mode 100644 index 00000000..24844a88 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/entity/VolunteerPioneerEntity.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 志愿先锋 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_volunteer_pioneer") +public class VolunteerPioneerEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 志愿者id + */ + private String volunteerId; + + /** + * 照片 + */ + private String imgUrl; + + /** + * 上下架标识 0-上架,1-下架 + */ + private String bannerFlag; + + /** + * 事迹描述 + */ + private String content; + + /** + * 排序 + */ + private Integer sort; + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VlounteerTeamRealationExcel.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VlounteerTeamRealationExcel.java new file mode 100644 index 00000000..c325c244 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VlounteerTeamRealationExcel.java @@ -0,0 +1,68 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 志愿者-志愿团队关联表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VlounteerTeamRealationExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "志愿者id") + private String volunteerId; + + @Excel(name = "团队id") + private String teamId; + + @Excel(name = "团队名称") + private String teamName; + + @Excel(name = "团队类别") + private String teamType; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "删除标识") + private String delFlag; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VolunteerPioneerExcel.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VolunteerPioneerExcel.java new file mode 100644 index 00000000..6a2b903c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/VolunteerPioneerExcel.java @@ -0,0 +1,71 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 志愿先锋 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Data +public class VolunteerPioneerExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "志愿者id") + private String volunteerId; + + @Excel(name = "照片") + private String imgUrl; + + @Excel(name = "上下架标识 0-上架,1-下架") + private String bannerFlag; + + @Excel(name = "事迹描述") + private String content; + + @Excel(name = "排序") + private Integer sort; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "删除标识") + private String delFlag; + + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VlounteerTeamRealationRedis.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VlounteerTeamRealationRedis.java new file mode 100644 index 00000000..7a6ad55d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VlounteerTeamRealationRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 志愿者-志愿团队关联表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Component +public class VlounteerTeamRealationRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VolunteerPioneerRedis.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VolunteerPioneerRedis.java new file mode 100644 index 00000000..09de5a0c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/redis/VolunteerPioneerRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 志愿先锋 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2021-11-16 + */ +@Component +public class VolunteerPioneerRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java new file mode 100644 index 00000000..d0f8a192 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VlounteerTeamRealationService.java @@ -0,0 +1,143 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.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 { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return VlounteerTeamRealationDTO + * @author generator + * @date 2021-11-16 + */ + VlounteerTeamRealationDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void save(VlounteerTeamRealationDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void update(VlounteerTeamRealationDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-16 + */ + void delete(String[] ids); + + PageData getPageList(Map params); + + /** + * @describe: 通过志愿团队id获取志愿者信息 + * @author wangtong + * @date 2021/11/18 16:26 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + PageData getVolunteerListByTeamId(Map params); + + /** + * @describe: 通过用户信息和志愿团队id获取志愿者信息 + * @author wangtong + * @date 2021/11/22 16:03 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result getVolunteerWithTeamState(VolunteerUnionFormDTO dto); + + /** + * @describe: 小程序-志愿团队-详情-成员列表 + * @author wangtong + * @date 2021/11/22 16:13 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + List getTeamVolunteerList(VolunteerTeamFormDTO dto); + + /** + * @describe: 小程序-志愿团队-加入团队 + * @author wangtong + * @date 2021/11/22 16:22 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + */ + Result joinTeam(VolunteerTeamFormDTO dto); + + /** + * @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); +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java index a781fb83..d3da3a84 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java @@ -270,4 +270,13 @@ public interface VolunteerInfoService extends BaseService { * @Date 2019/12/13 15:10 **/ Result handleVolunteerPoints(EpdcVolunteerPointsFormDTO formDTO); + + /** + * @describe: 志愿先锋模块获取志愿者列表 + * @author wangtong + * @date 2021/11/16 16:19 + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + PageData getVolunteerListForPionner(Map params); } diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java new file mode 100644 index 00000000..12cd3d1f --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/VolunteerPioneerService.java @@ -0,0 +1,124 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.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 { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2021-11-16 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2021-11-16 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return VolunteerPioneerDTO + * @author generator + * @date 2021-11-16 + */ + VolunteerPioneerDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void save(VolunteerPioneerDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2021-11-16 + */ + void update(VolunteerPioneerDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2021-11-16 + */ + void delete(String[] ids); + + /** + * @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> + */ + List getVolunteerPioneerList(VolunteerTeamFormDTO dto); + + /** + * @describe: 小程序-志愿先锋-详情 + * @author wangtong + * @date 2021/11/22 10:54 + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + */ + Result getVolunteerPioneerDetail(VolunteerTeamFormDTO dto); +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java new file mode 100644 index 00000000..c91b98fa --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VlounteerTeamRealationServiceImpl.java @@ -0,0 +1,161 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.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 implements VlounteerTeamRealationService { + + @Autowired + private VlounteerTeamRealationRedis vlounteerTeamRealationRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, VlounteerTeamRealationDTO.class); + } + + @Override + public PageData getPageList(Map params) { + IPage page = getPage(params); + List list = baseDao.getPageList(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public PageData getVolunteerListByTeamId(Map params) { + IPage page = getPage(params); + //查询 + List list = baseDao.getVolunteerListByTeamId(params); + return getPageData(list, page.getTotal(), VolunteerInfoDTO.class); + } + + @Override + public Result getVolunteerWithTeamState(VolunteerUnionFormDTO dto) { + log.info("getVolunteerWithTeamState-dto:"+dto); + VolunteerDetailResultDTO result = baseDao.getVolunteerWithTeamState(dto); + return new Result().ok(result); + } + + @Override + public List 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 volunteerList = baseDao.selectVolunteerByTeamId(dto); + return new Result().ok(volunteerList); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, VlounteerTeamRealationDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public VlounteerTeamRealationDTO get(String id) { + VlounteerTeamRealationEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, VlounteerTeamRealationDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(VlounteerTeamRealationDTO dto) { + VlounteerTeamRealationEntity entity = ConvertUtils.sourceToTarget(dto, VlounteerTeamRealationEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(VlounteerTeamRealationDTO dto) { + VlounteerTeamRealationEntity entity = ConvertUtils.sourceToTarget(dto, VlounteerTeamRealationEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java index b202df51..3ed3ca15 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java @@ -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 implements VolunteerInfoService { @@ -78,6 +81,9 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl getVolunteerInfoDTOByUserId(String userId) { - return new Result().ok(baseDao.selectOneVolunteerInfoDTO(userId)); + VolunteerInfoDTO resutlt = baseDao.selectOneVolunteerInfoDTO(userId); + resutlt.setTeamIds(baseDao.selectTeamIdsByVolunteerId(resutlt.getId())); + return new Result().ok(resutlt); } /** @@ -425,7 +433,7 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl insertV2VolunteerInfo(EpdcCompleteVolunteerInfoV2FormDTO formDTO) { - + log.info("insertV2VolunteerInfo=dto:"+formDTO); VolunteerInfoEntity volunteerEntity = ConvertUtils.sourceToTarget(formDTO, VolunteerInfoEntity.class); // 补全其他字段 @@ -456,6 +464,8 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl getVolunteerListForPionner(Map params) { + IPage page = getPage(params); + //查询 + List list = baseDao.getUserListForVolunteerOrg(params); + return getPageData(list, page.getTotal(), VolunteerInfoDTO.class); + } + /** * 组织机构信息处理 * diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java new file mode 100644 index 00000000..90607f42 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerPioneerServiceImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

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

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

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.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 implements VolunteerPioneerService { + + @Autowired + private VolunteerPioneerRedis volunteerPioneerRedis; + + @Override + public PageData page(Map params) { +// IPage page = baseDao.selectPage( +// getPage(params, FieldConstant.CREATED_TIME, false), +// getWrapper(params) +// ); +// return getPageData(page, VolunteerPioneerDTO.class); + IPage page = getPage(params); + List list = baseDao.getPageList(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, VolunteerPioneerDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public VolunteerPioneerDTO get(String id) { + 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 getVolunteerPioneerList(VolunteerTeamFormDTO formDto) { + int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize(); + formDto.setPageIndex(pageIndex); + return baseDao.getVolunteerPioneerList(formDto); + } + + @Override + public Result getVolunteerPioneerDetail(VolunteerTeamFormDTO dto) { + VolunteerPioneerEntity entity = baseDao.selectById(dto.getId()); + return new Result().ok(entity); + } + +} diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml new file mode 100644 index 00000000..5197c83c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VlounteerTeamRealationDao.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + update epdc_vlounteer_team_realation set DEL_FLAG='1',UPDATED_TIME = now() + where VOLUNTEER_ID=#{volunteerId} + + + + + diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml index 9ccf20a9..af09a617 100644 --- a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml @@ -215,12 +215,12 @@ @@ -338,4 +338,24 @@ WHERE FIND_IN_SET( #{deptId}, ALL_DEPT_IDS ) + + diff --git a/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml new file mode 100644 index 00000000..5570657d --- /dev/null +++ b/esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerPioneerDao.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + +