public InvokeResult removeTasks(Long[] ids) { Set<Task> tasks = new HashSet<Task>(); for (Long id : ids) { tasks.add(application.getTask(id)); } application.removeTasks(tasks); return InvokeResult.success(); }
/** * 删除数据源 * * @param ids * @return */ @ResponseBody @RequestMapping("/delete") public InvokeResult delete(String ids) { if (ids == null) { return InvokeResult.failure("数据源ID不能为空"); } String[] idArrs = ids.split(","); Long[] idsLong = new Long[idArrs.length]; for (int i = 0; i < idArrs.length; i++) { idsLong[i] = Long.parseLong(idArrs[i]); } return dataSourceFacade.removeDataSources(idsLong); }
public InvokeResult updateTask(TaskDTO taskDTO) { application.updateTask(TaskAssembler.toEntity(taskDTO)); return InvokeResult.success(); }
public InvokeResult removeTask(Long id) { application.removeTask(application.getTask(id)); return InvokeResult.success(); }
public InvokeResult getTask(Long id) { return InvokeResult.success(TaskAssembler.toDTO(application.getTask(id))); }