|
|
@ -92,7 +92,7 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
@ApiOperation(value = "任务管理-添加", notes = "任务管理-添加") |
|
|
|
@ApiOperation(value = "任务管理-添加", notes = "任务管理-添加") |
|
|
|
@PostMapping(value = "/add") |
|
|
|
@PostMapping(value = "/add") |
|
|
|
public Result<?> add(@RequestBody Task task) { |
|
|
|
public Result<?> add(@RequestBody Task task) { |
|
|
|
int count = taskService.count(new LambdaQueryWrapper<Task>().like(Task::getFunctionTemplateName, task.getFunctionTemplateName())); |
|
|
|
int count = taskService.count(new LambdaQueryWrapper<Task>().eq(Task::getFunctionTemplateName, task.getFunctionTemplateName())); |
|
|
|
if (count > 0) { |
|
|
|
if (count > 0) { |
|
|
|
return Result.error("名字不能重复"); |
|
|
|
return Result.error("名字不能重复"); |
|
|
|
} |
|
|
|
} |
|
|
|