|
@@ -1,6 +1,7 @@
|
|
|
package com.aizuda.boot.modules.flw.service.impl;
|
|
|
|
|
|
import com.aizuda.boot.modules.flw.entity.FlwProcessCategory;
|
|
|
+import com.aizuda.boot.modules.flw.entity.dto.FlwCategorySortDTO;
|
|
|
import com.aizuda.boot.modules.flw.mapper.FlwProcessCategoryMapper;
|
|
|
import com.aizuda.boot.modules.flw.service.IFlwProcessCategoryService;
|
|
|
import com.aizuda.boot.modules.flw.service.IFlwProcessConfigureService;
|
|
@@ -10,6 +11,7 @@ import lombok.AllArgsConstructor;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* 流程分类 服务实现类
|
|
@@ -33,4 +35,14 @@ public class FlwProcessCategoryServiceImpl extends BaseServiceImpl<FlwProcessCat
|
|
|
ApiAssert.fail(flwProcessConfigureService.existByCategoryIds(ids), "存在流程定义关联不允许删除");
|
|
|
return super.removeByIds(ids);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean sort(List<FlwCategorySortDTO> dtoList) {
|
|
|
+ return super.updateBatchById(dtoList.stream().map(t -> {
|
|
|
+ FlwProcessCategory fpc = new FlwProcessCategory();
|
|
|
+ fpc.setId(t.getId());
|
|
|
+ fpc.setSort(t.getSort());
|
|
|
+ return fpc;
|
|
|
+ }).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
}
|