|
|
@ -50,7 +50,11 @@ public class TaskController { |
|
|
|
}) |
|
|
|
@RequestMapping(value = "start", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse startNode(HttpServletRequest request, @Validated @RequestBody com.ccsens.cloudutil.bean.tall.dto.TaskDto.StartTask param) throws Exception { |
|
|
|
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|
|
|
Long currentUserId = null; |
|
|
|
Claims attribute = (Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS); |
|
|
|
if (attribute != null) { |
|
|
|
currentUserId = Long.valueOf(attribute.getSubject()); |
|
|
|
} |
|
|
|
TaskDto.StartTask dto = new TaskDto.StartTask(); |
|
|
|
BeanUtils.copyProperties(param, dto); |
|
|
|
subTimeService.startTask(currentUserId,dto); |
|
|
|