|
|
|
@ -5,13 +5,12 @@ import com.elink.esua.epdc.common.token.dto.TokenDto; |
|
|
|
import com.elink.esua.epdc.common.token.util.IdentityNoAnalysisUtil; |
|
|
|
import com.elink.esua.epdc.commons.tools.annotation.LoginUser; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
|
|
|
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
|
|
|
import com.elink.esua.epdc.dto.epdc.result.EpdcUserInfoResultDTO; |
|
|
|
import com.elink.esua.epdc.service.ActUserRelationService; |
|
|
|
import com.elink.esua.epdc.service.AppUserService; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
import org.springframework.web.bind.annotation.PathVariable; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
@ -24,7 +23,7 @@ import java.util.Date; |
|
|
|
* @date 2019/12/17 10:30 |
|
|
|
*/ |
|
|
|
@RestController |
|
|
|
@RequestMapping("heart") |
|
|
|
@RequestMapping("heart/act") |
|
|
|
public class ApiActUserRelationController { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
@ -42,10 +41,8 @@ public class ApiActUserRelationController { |
|
|
|
* @author wanggongfeng |
|
|
|
* @date 2019/12/13 14:41 |
|
|
|
*/ |
|
|
|
@PostMapping("act/signup") |
|
|
|
@GetMapping("signup") |
|
|
|
public Result activitySignUp(@LoginUser TokenDto tokenDto, @PathVariable("actId") String actId) { |
|
|
|
ValidatorUtils.validateEntity(actId); |
|
|
|
|
|
|
|
//验证是否为志愿者
|
|
|
|
Result isVolunteer = appUserService.getVolunteerCountById(tokenDto); |
|
|
|
int code = isVolunteer.getCode(); |
|
|
|
@ -70,6 +67,19 @@ public class ApiActUserRelationController { |
|
|
|
actUserRelationDTO.setIdentityNo(identityNo); |
|
|
|
actUserRelationDTO.setStatus("0"); |
|
|
|
actUserRelationDTO.setSignupTime(new Date()); |
|
|
|
/*ActUserRelationDTO actUserRelationDTO = new ActUserRelationDTO(); |
|
|
|
actUserRelationDTO.setActId("122"); |
|
|
|
actUserRelationDTO.setUserId("3f6448adbfbe736dde333f057a956012"); |
|
|
|
actUserRelationDTO.setNickname("南宁路-安女士"); |
|
|
|
actUserRelationDTO.setFaceImg("https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJpzm5C5QcVeGoUJoy6ic5VTsJCsgPhdhibmicV3WrlCVXSOumKhWhdibymIA7tkdJzzbWB72CkWibic30w/132"); |
|
|
|
actUserRelationDTO.setPartyFlag("0"); |
|
|
|
actUserRelationDTO.setRealName("安然"); |
|
|
|
actUserRelationDTO.setSex("0"); |
|
|
|
actUserRelationDTO.setAge(39); |
|
|
|
actUserRelationDTO.setMobile("17554179541"); |
|
|
|
actUserRelationDTO.setIdentityNo("61050219890208382X"); |
|
|
|
actUserRelationDTO.setStatus("0"); |
|
|
|
actUserRelationDTO.setSignupTime(new Date());*/ |
|
|
|
return actUserRelationService.activitySignUp(actUserRelationDTO); |
|
|
|
|
|
|
|
} |
|
|
|
@ -83,10 +93,8 @@ public class ApiActUserRelationController { |
|
|
|
* @author wanggongfeng |
|
|
|
* @date 2019/12/13 14:41 |
|
|
|
*/ |
|
|
|
@PostMapping("act/cancelsignup") |
|
|
|
public Result activityCancelSignUp(@LoginUser TokenDto tokenDto, @PathVariable("actId") String actId) { |
|
|
|
ValidatorUtils.validateEntity(actId); |
|
|
|
|
|
|
|
@GetMapping("cancelsignup") |
|
|
|
public Result activityCancelSignUp(@LoginUser TokenDto tokenDto,@PathVariable("actId") String actId) { |
|
|
|
return actUserRelationService.activityCancelSignUp(tokenDto.getUserId(),actId); |
|
|
|
|
|
|
|
} |
|
|
|
|