| | |
| | | package com.panzhihua.service_dangjian.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemClaimDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_dangjian.service.NeedProblemClaimService; |
| | | import com.panzhihua.service_dangjian.service.NeedProblemInventoryService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | { |
| | | @Resource |
| | | private NeedProblemClaimService claimService; |
| | | |
| | | |
| | | //任务 问题接口 |
| | | @Resource |
| | | private NeedProblemInventoryService inventoryService; |
| | | |
| | | @GetMapping("/getNeedClaimList") |
| | | public R getNeedClaimList( |
| | |
| | | @RequestParam("userId") String userId, |
| | | @RequestParam("type") String type) |
| | | { |
| | | NeedProblemInventoryDTO inventoryDTO=inventoryService.getDetails(taskId,userId); |
| | | long times=System.currentTimeMillis(); |
| | | if(times<inventoryDTO.getNeedStartTime().getTime()) |
| | | { |
| | | return R.fail("任务未开始"); |
| | | } |
| | | |
| | | return R.ok(claimService.needClaimSignIn(taskId,userId,type)); |
| | | } |
| | | |