|
|
@ -1,8 +1,10 @@ |
|
|
|
package com.ccsens.carbasics.api; |
|
|
|
|
|
|
|
import com.ccsens.cloudutil.annotation.MustLogin; |
|
|
|
import com.ccsens.common.bean.dto.CPluginDto; |
|
|
|
import com.ccsens.common.bean.dto.CTaskDto; |
|
|
|
import com.ccsens.common.bean.vo.CTaskVo; |
|
|
|
import com.ccsens.common.service.IPluginService; |
|
|
|
import com.ccsens.common.service.ITaskService; |
|
|
|
import com.ccsens.util.JsonResponse; |
|
|
|
import com.ccsens.util.bean.dto.QueryDto; |
|
|
@ -29,6 +31,8 @@ import java.util.List; |
|
|
|
public class TaskController { |
|
|
|
@Resource |
|
|
|
private ITaskService taskService; |
|
|
|
@Resource |
|
|
|
private IPluginService pluginService; |
|
|
|
|
|
|
|
@MustLogin |
|
|
|
@ApiOperation(value = "查找永久日常任务", notes = "") |
|
|
@ -70,4 +74,20 @@ public class TaskController { |
|
|
|
return JsonResponse.newInstance().ok(); |
|
|
|
} |
|
|
|
|
|
|
|
@MustLogin |
|
|
|
@ApiOperation(value = "添加任务", notes = "") |
|
|
|
@RequestMapping(value = "/saveTask", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse<List<CTaskVo.QueryTask>> saveTask(@ApiParam @Validated @RequestBody QueryDto<CTaskDto.SaveTask> params) throws Exception { |
|
|
|
List<CTaskVo.QueryTask> queryTasks = taskService.saveTask(params.getParam(), params.getUserId()); |
|
|
|
return JsonResponse.newInstance().ok(queryTasks); |
|
|
|
} |
|
|
|
|
|
|
|
@MustLogin |
|
|
|
@ApiOperation(value = "给任务添加插件", notes = "") |
|
|
|
@RequestMapping(value = "/saveTaskPlugin", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse saveTaskPlugin(@ApiParam @Validated @RequestBody QueryDto<List<CPluginDto.UpdateTaskPlugin>> params) throws Exception { |
|
|
|
pluginService.updateTaskPlugin(params.getParam()); |
|
|
|
return JsonResponse.newInstance().ok(); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|