mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-04-08 19:43:16 +08:00
update 重构 所有bo对象移除继承BaseEntity
This commit is contained in:
@@ -4,11 +4,11 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.core.domain.PageResult;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.core.domain.PageResult;
|
|
||||||
import org.dromara.demo.domain.TestDemo;
|
import org.dromara.demo.domain.TestDemo;
|
||||||
import org.dromara.demo.domain.bo.TestDemoBo;
|
import org.dromara.demo.domain.bo.TestDemoBo;
|
||||||
import org.dromara.demo.domain.vo.TestDemoVo;
|
import org.dromara.demo.domain.vo.TestDemoVo;
|
||||||
@@ -18,7 +18,6 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 测试单表Service业务层处理
|
* 测试单表Service业务层处理
|
||||||
@@ -89,14 +88,11 @@ public class TestDemoServiceImpl implements ITestDemoService {
|
|||||||
* @return 查询条件包装器
|
* @return 查询条件包装器
|
||||||
*/
|
*/
|
||||||
private LambdaQueryWrapper<TestDemo> buildQueryWrapper(TestDemoBo bo) {
|
private LambdaQueryWrapper<TestDemo> buildQueryWrapper(TestDemoBo bo) {
|
||||||
Map<String, Object> params = bo.getParams();
|
|
||||||
LambdaQueryWrapper<TestDemo> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<TestDemo> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.eq(bo.getDeptId() != null, TestDemo::getDeptId, bo.getDeptId());
|
lqw.eq(bo.getDeptId() != null, TestDemo::getDeptId, bo.getDeptId());
|
||||||
lqw.eq(bo.getUserId() != null, TestDemo::getUserId, bo.getUserId());
|
lqw.eq(bo.getUserId() != null, TestDemo::getUserId, bo.getUserId());
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getTestKey()), TestDemo::getTestKey, bo.getTestKey());
|
lqw.like(StringUtils.isNotBlank(bo.getTestKey()), TestDemo::getTestKey, bo.getTestKey());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getValue()), TestDemo::getValue, bo.getValue());
|
lqw.eq(StringUtils.isNotBlank(bo.getValue()), TestDemo::getValue, bo.getValue());
|
||||||
lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
|
|
||||||
TestDemo::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime"));
|
|
||||||
lqw.orderByAsc(TestDemo::getId);
|
lqw.orderByAsc(TestDemo::getId);
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 测试树表Service业务层处理
|
* 测试树表Service业务层处理
|
||||||
@@ -60,13 +59,10 @@ public class TestTreeServiceImpl implements ITestTreeService {
|
|||||||
* @return 查询条件包装器
|
* @return 查询条件包装器
|
||||||
*/
|
*/
|
||||||
private LambdaQueryWrapper<TestTree> buildQueryWrapper(TestTreeBo bo) {
|
private LambdaQueryWrapper<TestTree> buildQueryWrapper(TestTreeBo bo) {
|
||||||
Map<String, Object> params = bo.getParams();
|
|
||||||
LambdaQueryWrapper<TestTree> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<TestTree> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.eq(bo.getDeptId() != null, TestTree::getDeptId, bo.getDeptId());
|
lqw.eq(bo.getDeptId() != null, TestTree::getDeptId, bo.getDeptId());
|
||||||
lqw.eq(bo.getUserId() != null, TestTree::getUserId, bo.getUserId());
|
lqw.eq(bo.getUserId() != null, TestTree::getUserId, bo.getUserId());
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getTreeName()), TestTree::getTreeName, bo.getTreeName());
|
lqw.like(StringUtils.isNotBlank(bo.getTreeName()), TestTree::getTreeName, bo.getTreeName());
|
||||||
lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null,
|
|
||||||
TestTree::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime"));
|
|
||||||
lqw.orderByAsc(TestTree::getId);
|
lqw.orderByAsc(TestTree::getId);
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ import jakarta.validation.constraints.NotBlank;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 业务表 gen_table
|
* 业务表 gen_table
|
||||||
@@ -170,6 +172,12 @@ public class GenTable extends BaseEntity {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String parentMenuName;
|
private String parentMenuName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求参数
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Map<String, Object> params = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断当前业务表是否采用树表模板。
|
* 判断当前业务表是否采用树表模板。
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import org.dromara.system.domain.SysDept;
|
|||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门业务对象 sys_dept
|
* 部门业务对象 sys_dept
|
||||||
@@ -81,4 +83,9 @@ public class SysDeptBo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Long belongDeptId;
|
private Long belongDeptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求参数
|
||||||
|
*/
|
||||||
|
private Map<String, Object> params = new HashMap<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,11 @@ public class SysOssBo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String service;
|
private String service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
private Long createBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求参数
|
* 请求参数
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import org.dromara.system.domain.SysPost;
|
|||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位信息业务对象 sys_post
|
* 岗位信息业务对象 sys_post
|
||||||
@@ -75,4 +77,9 @@ public class SysPostBo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求参数
|
||||||
|
*/
|
||||||
|
private Map<String, Object> params = new HashMap<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,6 +118,21 @@ public class SysUserBo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String excludeUserIds;
|
private String excludeUserIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
private Long createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
private Long updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求参数
|
||||||
|
*/
|
||||||
|
private Map<String, Object> params = new HashMap<>();
|
||||||
|
|
||||||
public SysUserBo(Long userId) {
|
public SysUserBo(Long userId) {
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
}
|
}
|
||||||
@@ -126,9 +141,4 @@ public class SysUserBo implements Serializable {
|
|||||||
return SystemConstants.SUPER_ADMIN_ID.equals(this.userId);
|
return SystemConstants.SUPER_ADMIN_ID.equals(this.userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 请求参数
|
|
||||||
*/
|
|
||||||
private Map<String, Object> params = new HashMap<>();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,12 +81,9 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
|
|||||||
* @return 包含名称、类型与创建时间区间的查询包装器
|
* @return 包含名称、类型与创建时间区间的查询包装器
|
||||||
*/
|
*/
|
||||||
private LambdaQueryWrapper<SysDictType> buildQueryWrapper(SysDictTypeBo bo) {
|
private LambdaQueryWrapper<SysDictType> buildQueryWrapper(SysDictTypeBo bo) {
|
||||||
Map<String, Object> params = bo.getParams();
|
|
||||||
LambdaQueryWrapper<SysDictType> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<SysDictType> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getDictName()), SysDictType::getDictName, bo.getDictName());
|
lqw.like(StringUtils.isNotBlank(bo.getDictName()), SysDictType::getDictName, bo.getDictName());
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getDictType()), SysDictType::getDictType, bo.getDictType());
|
lqw.like(StringUtils.isNotBlank(bo.getDictType()), SysDictType::getDictType, bo.getDictType());
|
||||||
lqw.between(params.get("beginTime") != null && params.get("endTime") != null,
|
|
||||||
SysDictType::getCreateTime, params.get("beginTime"), params.get("endTime"));
|
|
||||||
lqw.orderByAsc(SysDictType::getDictId);
|
lqw.orderByAsc(SysDictType::getDictId);
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import org.dromara.workflow.domain.FlowSpel;
|
|||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程spel表达式定义业务对象 flow_spel
|
* 流程spel表达式定义业务对象 flow_spel
|
||||||
@@ -60,4 +62,9 @@ public class FlowSpelBo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求参数
|
||||||
|
*/
|
||||||
|
private Map<String, Object> params = new HashMap<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请假业务对象 test_leave
|
* 请假业务对象 test_leave
|
||||||
@@ -90,5 +92,9 @@ public class TestLeaveBo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求参数
|
||||||
|
*/
|
||||||
|
private Map<String, Object> params = new HashMap<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ public class FlwSpelServiceImpl implements IFlwSpelService {
|
|||||||
* @return 包含排序和筛选条件的查询包装器
|
* @return 包含排序和筛选条件的查询包装器
|
||||||
*/
|
*/
|
||||||
private LambdaQueryWrapper<FlowSpel> buildQueryWrapper(FlowSpelBo bo) {
|
private LambdaQueryWrapper<FlowSpel> buildQueryWrapper(FlowSpelBo bo) {
|
||||||
Map<String, Object> params = bo.getParams();
|
|
||||||
LambdaQueryWrapper<FlowSpel> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<FlowSpel> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.orderByAsc(FlowSpel::getId);
|
lqw.orderByAsc(FlowSpel::getId);
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getComponentName()), FlowSpel::getComponentName, bo.getComponentName());
|
lqw.like(StringUtils.isNotBlank(bo.getComponentName()), FlowSpel::getComponentName, bo.getComponentName());
|
||||||
|
|||||||
Reference in New Issue
Block a user