|
|
@ -7,10 +7,12 @@ import com.elink.esua.epdc.commons.tools.page.PageData; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
|
import com.elink.esua.epdc.dto.DeptOption; |
|
|
|
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; |
|
|
|
import com.elink.esua.epdc.dto.VolunteerInfoDTO; |
|
|
|
import com.elink.esua.epdc.dto.form.*; |
|
|
|
import com.elink.esua.epdc.dto.result.*; |
|
|
|
import com.elink.esua.epdc.feign.AdminFeignClient; |
|
|
|
import com.elink.esua.epdc.feign.CustomFeignClient; |
|
|
|
import com.elink.esua.epdc.feign.UserFeignClient; |
|
|
|
import com.elink.esua.epdc.redis.AppUserRedis; |
|
|
|
import com.elink.esua.epdc.service.CustomService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
@ -32,6 +34,8 @@ public class CustomServiceImpl implements CustomService { |
|
|
|
@Autowired |
|
|
|
private CustomFeignClient customFeignClient; |
|
|
|
@Autowired |
|
|
|
private UserFeignClient userFeignClient; |
|
|
|
@Autowired |
|
|
|
private AppUserRedis appUserRedis; |
|
|
|
|
|
|
|
/** |
|
|
@ -197,6 +201,11 @@ public class CustomServiceImpl implements CustomService { |
|
|
|
if(StringUtils.isBlank(tokenDto.getUserId())){ |
|
|
|
return new Result<List<EpdcSelectGroupBuyInfoListResultDTO>>().error("无效的token"); |
|
|
|
} |
|
|
|
//验证是否是志愿者
|
|
|
|
Result<VolunteerInfoDTO> volunteerInfoDTOResult = userFeignClient.selectUserVolunteerInfo(tokenDto.getUserId()); |
|
|
|
if(volunteerInfoDTOResult==null || volunteerInfoDTOResult.getData()==null || StringUtils.isBlank(volunteerInfoDTOResult.getData().getId())){ |
|
|
|
return new Result().error("未查到该用户志愿者信息!"); |
|
|
|
} |
|
|
|
formDTO.setUserId(tokenDto.getUserId()); |
|
|
|
formDTO.setFaceImg(tokenDto.getFaceImg()); |
|
|
|
formDTO.setRealName(tokenDto.getRealName()); |
|
|
@ -247,6 +256,11 @@ public class CustomServiceImpl implements CustomService { |
|
|
|
if(StringUtils.isBlank(tokenDto.getUserId())){ |
|
|
|
return new Result<List<EpdcSelectGroupBuyInfoListResultDTO>>().error("无效的token"); |
|
|
|
} |
|
|
|
//验证是否是志愿者
|
|
|
|
Result<VolunteerInfoDTO> volunteerInfoDTOResult = userFeignClient.selectUserVolunteerInfo(tokenDto.getUserId()); |
|
|
|
if(volunteerInfoDTOResult==null || volunteerInfoDTOResult.getData()==null || StringUtils.isBlank(volunteerInfoDTOResult.getData().getId())){ |
|
|
|
return new Result().error("未查到该用户志愿者信息!"); |
|
|
|
} |
|
|
|
formDTO.setUserId(tokenDto.getUserId()); |
|
|
|
formDTO.setFaceImg(tokenDto.getFaceImg()); |
|
|
|
formDTO.setRealName(tokenDto.getRealName()); |
|
|
|