代码生成器的buildQueryWrapper条件格式修改

This commit is contained in:
LukewarmMe 2026-03-27 11:14:13 +08:00
parent 2196ef63a8
commit 4c49cbe4f1
3 changed files with 38 additions and 40 deletions

View File

@ -4,7 +4,6 @@ import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction; import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.github.yulichang.wrapper.MPJLambdaWrapper; import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.github.yulichang.wrapper.interfaces.IExt; import com.github.yulichang.wrapper.interfaces.IExt;
import org.apache.commons.lang3.ArrayUtils;
import org.dromara.common.mybatis.helper.DataBaseHelper; import org.dromara.common.mybatis.helper.DataBaseHelper;
import java.util.Collection; import java.util.Collection;
@ -88,7 +87,6 @@ public interface Ext<Children extends MPJLambdaWrapper<?>> extends IExt<Children
return getChildren(); return getChildren();
} }
/** /**
* 根据给定的列名和祖先值查找集合中是否存在匹配的记录 * 根据给定的列名和祖先值查找集合中是否存在匹配的记录
* *

View File

@ -97,7 +97,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
*/ */
private MPJLambdaWrapper<SysDept> buildQueryWrapper(SysDeptBo bo) { private MPJLambdaWrapper<SysDept> buildQueryWrapper(SysDeptBo bo) {
Map<String, Object> params = bo.getParams(); Map<String, Object> params = bo.getParams();
MPJLambdaWrapper<SysDept> wrapper = new MPJLambdaWrapper<SysDept>(); MPJLambdaWrapper<SysDept> wrapper = new MPJLambdaWrapper<>();
wrapper.eqIfExists(SysDept::getDeptId, bo.getDeptId()); wrapper.eqIfExists(SysDept::getDeptId, bo.getDeptId());
wrapper.eqIfExists(SysDept::getParentId, bo.getParentId()); wrapper.eqIfExists(SysDept::getParentId, bo.getParentId());
wrapper.likeIfExists(SysDept::getDeptName, bo.getDeptName()); wrapper.likeIfExists(SysDept::getDeptName, bo.getDeptName());