|
|
|
@ -43,8 +43,8 @@ public class ApiActUserRelationController { |
|
|
|
* @author wanggongfeng |
|
|
|
* @date 2019/12/13 14:41 |
|
|
|
*/ |
|
|
|
@GetMapping("signup") |
|
|
|
public Result activitySignUp(@LoginUser TokenDto tokenDto, @PathVariable("actId") String actId) { |
|
|
|
@PostMapping("signup") |
|
|
|
public Result activitySignUp(@LoginUser TokenDto tokenDto,String actId) { |
|
|
|
//验证是否为志愿者
|
|
|
|
Result isVolunteer = appUserService.getVolunteerCountById(tokenDto); |
|
|
|
int code = isVolunteer.getCode(); |
|
|
|
@ -52,7 +52,6 @@ public class ApiActUserRelationController { |
|
|
|
//不是志愿者
|
|
|
|
return isVolunteer; |
|
|
|
} |
|
|
|
|
|
|
|
Result<EpdcUserInfoResultDTO> userInfo = appUserService.getInfoById(tokenDto); |
|
|
|
EpdcUserInfoResultDTO epdcUserInfoResultDTO = userInfo.getData(); |
|
|
|
String identityNo = epdcUserInfoResultDTO.getIdentityNo(); |
|
|
|
@ -70,16 +69,16 @@ public class ApiActUserRelationController { |
|
|
|
actUserRelationDTO.setStatus("0"); |
|
|
|
actUserRelationDTO.setSignupTime(new Date()); |
|
|
|
/*ActUserRelationDTO actUserRelationDTO = new ActUserRelationDTO(); |
|
|
|
actUserRelationDTO.setActId("122"); |
|
|
|
actUserRelationDTO.setUserId("3f6448adbfbe736dde333f057a956012"); |
|
|
|
actUserRelationDTO.setNickname("南宁路-安女士"); |
|
|
|
actUserRelationDTO.setActId(actId); |
|
|
|
actUserRelationDTO.setUserId("0598a2e20eb2466ef0ebb42e930f3801"); |
|
|
|
actUserRelationDTO.setNickname("茅台-看先生"); |
|
|
|
actUserRelationDTO.setFaceImg("https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJpzm5C5QcVeGoUJoy6ic5VTsJCsgPhdhibmicV3WrlCVXSOumKhWhdibymIA7tkdJzzbWB72CkWibic30w/132"); |
|
|
|
actUserRelationDTO.setPartyFlag("0"); |
|
|
|
actUserRelationDTO.setRealName("安然"); |
|
|
|
actUserRelationDTO.setSex("0"); |
|
|
|
actUserRelationDTO.setRealName("看先生"); |
|
|
|
actUserRelationDTO.setSex("1"); |
|
|
|
actUserRelationDTO.setAge(39); |
|
|
|
actUserRelationDTO.setMobile("17554179541"); |
|
|
|
actUserRelationDTO.setIdentityNo("61050219890208382X"); |
|
|
|
actUserRelationDTO.setIdentityNo("61050219890208383X"); |
|
|
|
actUserRelationDTO.setStatus("0"); |
|
|
|
actUserRelationDTO.setSignupTime(new Date());*/ |
|
|
|
return actUserRelationService.activitySignUp(actUserRelationDTO); |
|
|
|
@ -95,9 +94,10 @@ public class ApiActUserRelationController { |
|
|
|
* @author wanggongfeng |
|
|
|
* @date 2019/12/13 14:41 |
|
|
|
*/ |
|
|
|
@GetMapping("cancelsignup") |
|
|
|
public Result activityCancelSignUp(@LoginUser TokenDto tokenDto,@PathVariable("actId") String actId) { |
|
|
|
@PostMapping("cancelsignup") |
|
|
|
public Result activityCancelSignUp(@LoginUser TokenDto tokenDto,String actId) { |
|
|
|
return actUserRelationService.activityCancelSignUp(tokenDto.getUserId(),actId); |
|
|
|
//return actUserRelationService.activityCancelSignUp("0598a2e20eb2466ef0ebb42e930f3801",actId);
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@ -110,16 +110,31 @@ public class ApiActUserRelationController { |
|
|
|
* @author wanggongfeng |
|
|
|
* @date 2019/12/13 14:41 |
|
|
|
*/ |
|
|
|
@GetMapping("clock") |
|
|
|
@PostMapping("clock") |
|
|
|
public Result activityClock(@LoginUser TokenDto tokenDto, @RequestBody EpdcAppActUserClockLogDTO epdcAppActUserClockLogDTO) { |
|
|
|
|
|
|
|
AppActUserClockLogDTO appActUserClockLogDTO = ConvertUtils.sourceToTarget(epdcAppActUserClockLogDTO, AppActUserClockLogDTO.class); |
|
|
|
appActUserClockLogDTO.setUserId(tokenDto.getUserId()); |
|
|
|
return actUserRelationService.activityClock(appActUserClockLogDTO); |
|
|
|
|
|
|
|
/* ArrayList<String> imgList = new ArrayList<String>(); |
|
|
|
imgList.add("http://123232323223"); |
|
|
|
imgList.add("http://12323232342423423"); |
|
|
|
EpdcAppActUserClockLogDTO epdcAppActUserClockLogDTO = new EpdcAppActUserClockLogDTO(); |
|
|
|
epdcAppActUserClockLogDTO.setActId("122"); |
|
|
|
epdcAppActUserClockLogDTO.setClockAddress("打卡描述"); |
|
|
|
epdcAppActUserClockLogDTO.setClockLatitude(new BigDecimal(123.122)); |
|
|
|
epdcAppActUserClockLogDTO.setClockLongitude(new BigDecimal(123.122)); |
|
|
|
epdcAppActUserClockLogDTO.setClockType("0"); |
|
|
|
epdcAppActUserClockLogDTO.setImages(imgList); |
|
|
|
epdcAppActUserClockLogDTO.setClockAddress("山东省青岛市市北区台东路"); |
|
|
|
AppActUserClockLogDTO appActUserClockLogDTO = ConvertUtils.sourceToTarget(epdcAppActUserClockLogDTO, AppActUserClockLogDTO.class); |
|
|
|
appActUserClockLogDTO.setUserId("3f6448adbfbe736dde333f057a956012"); |
|
|
|
return actUserRelationService.activityClock(appActUserClockLogDTO);*/ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 打卡列表 |
|
|
|
* 获取打卡列表 |
|
|
|
* |
|
|
|
* @param tokenDto |
|
|
|
* @param actId |
|
|
|
@ -127,7 +142,7 @@ public class ApiActUserRelationController { |
|
|
|
* @author wanggongfeng |
|
|
|
* @date 2019/12/13 14:41 |
|
|
|
*/ |
|
|
|
@GetMapping("clockList") |
|
|
|
@GetMapping("clockList/{actId}") |
|
|
|
public Result<EpdcAppClockListDTO> getClockList(@LoginUser TokenDto tokenDto, @PathVariable("actId") String actId) { |
|
|
|
Result<AppClockListDTO> result = actUserRelationService.getClockList(actId); |
|
|
|
EpdcAppClockListDTO epdcAppClockListDTO = ConvertUtils.sourceToTarget(result.getData(), EpdcAppClockListDTO.class); |
|
|
|
@ -136,5 +151,4 @@ public class ApiActUserRelationController { |
|
|
|
return result1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|