mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 01:25:28 +08:00
update 优化 流程分类代码
This commit is contained in:
parent
ef7832eff6
commit
4d1448b4b4
@ -5,10 +5,10 @@ import cn.hutool.core.convert.Convert;
|
|||||||
import cn.hutool.core.lang.tree.Tree;
|
import cn.hutool.core.lang.tree.Tree;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.utils.*;
|
import org.dromara.common.core.utils.*;
|
||||||
|
import org.dromara.common.mybatis.core.query.QueryBuilder;
|
||||||
import org.dromara.warm.flow.core.service.DefService;
|
import org.dromara.warm.flow.core.service.DefService;
|
||||||
import org.dromara.warm.flow.orm.entity.FlowDefinition;
|
import org.dromara.warm.flow.orm.entity.FlowDefinition;
|
||||||
import org.dromara.warm.flow.ui.service.CategoryService;
|
import org.dromara.warm.flow.ui.service.CategoryService;
|
||||||
@ -185,15 +185,12 @@ public class FlwCategoryServiceImpl implements IFlwCategoryService, CategoryServ
|
|||||||
* @return 查询条件包装器
|
* @return 查询条件包装器
|
||||||
*/
|
*/
|
||||||
private LambdaQueryWrapper<FlowCategory> buildQueryWrapper(FlowCategoryBo bo) {
|
private LambdaQueryWrapper<FlowCategory> buildQueryWrapper(FlowCategoryBo bo) {
|
||||||
LambdaQueryWrapper<FlowCategory> lqw = Wrappers.lambdaQuery();
|
return QueryBuilder.lambda(FlowCategory.class)
|
||||||
lqw.eq(ObjectUtil.isNotNull(bo.getCategoryId()), FlowCategory::getCategoryId, bo.getCategoryId());
|
.eqIfPresent(FlowCategory::getCategoryId, bo.getCategoryId())
|
||||||
lqw.eq(ObjectUtil.isNotNull(bo.getParentId()), FlowCategory::getParentId, bo.getParentId());
|
.eqIfPresent(FlowCategory::getParentId, bo.getParentId())
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getCategoryName()), FlowCategory::getCategoryName, bo.getCategoryName());
|
.likeIfText(FlowCategory::getCategoryName, bo.getCategoryName())
|
||||||
lqw.orderByAsc(FlowCategory::getAncestors);
|
.orderByAsc(FlowCategory::getAncestors, FlowCategory::getParentId, FlowCategory::getOrderNum, FlowCategory::getCategoryId)
|
||||||
lqw.orderByAsc(FlowCategory::getParentId);
|
.build();
|
||||||
lqw.orderByAsc(FlowCategory::getOrderNum);
|
|
||||||
lqw.orderByAsc(FlowCategory::getCategoryId);
|
|
||||||
return lqw;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user