|
@@ -2,6 +2,7 @@ package com.etotem.cfc.controller.growth;
|
|
|
|
|
|
|
|
import com.etotem.cfc.common.Result;
|
|
import com.etotem.cfc.common.Result;
|
|
|
import com.etotem.cfc.entity.GrowthPlan;
|
|
import com.etotem.cfc.entity.GrowthPlan;
|
|
|
|
|
+import com.etotem.cfc.entity.Task;
|
|
|
import com.etotem.cfc.service.GrowthPlanService;
|
|
import com.etotem.cfc.service.GrowthPlanService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
@@ -84,6 +85,16 @@ public class GrowthPlanController {
|
|
|
return Result.success(plan);
|
|
return Result.success(plan);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Operation(summary = "查询成长方案任务清单(SC-P-47 查看方案下任务列表,能力键 plan.task.list)")
|
|
|
|
|
+ @PostMapping("/tasks")
|
|
|
|
|
+ public Result<List<Task>> planTasks(@RequestBody Map<String, Object> params) {
|
|
|
|
|
+ Long planId = ParamUtils.getLong(params.get("planId"));
|
|
|
|
|
+ if (planId == null) return Result.error("planId不能为空");
|
|
|
|
|
+ GrowthPlan plan = growthPlanService.getById(planId);
|
|
|
|
|
+ if (plan == null) return Result.error("方案不存在");
|
|
|
|
|
+ return Result.success(growthPlanService.planTaskList(planId));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Operation(summary = "更新成长方案")
|
|
@Operation(summary = "更新成长方案")
|
|
|
@PostMapping("/update")
|
|
@PostMapping("/update")
|
|
|
public Result<Boolean> updatePlan(@RequestBody Map<String, Object> body) {
|
|
public Result<Boolean> updatePlan(@RequestBody Map<String, Object> body) {
|