mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
!286 合并 多租户功能
* add 新增 ruoyi-common-tenant 多租户模块 全框架适配多租户改动 * update 优化 隐藏页面主键 * remove 移除 缓存列表功能(多租户缓存功能繁杂多样 没有办法在页面管理) * update 重构 全局缓存KEY 与 常用缓存KEY做区分 * update 重构 OssFactory 加载方式 改为每次比对配置做实例更新 * update 优化 SaTokenDao 改为 Bean 注入 便于扩展 * update 重构 项目初始化数据改为懒加载 不提供热加载 * update 重构 验证码开关使用配置文件(经调查少有动态开启需求) * update 优化 启用 sqlserver 高版本语法 简化sql脚本语法 * update 优化 DataPermissionHelper 增加 开启/关闭 忽略数据权限功能 * update 优化 连接池增加 keepaliveTime 探活参数 * update 优化 调整连接池最长生命周期 防止出现警告 * update 优化 代码生成页面模板 校验不必要的表单数据 * add 新增 StringUtils splitTo 与 splitList 方法 优化业务代码
This commit is contained in:
@ -45,7 +45,7 @@ import java.util.concurrent.TimeUnit;
|
||||
@RequestMapping("/demo/demo")
|
||||
public class TestDemoController extends BaseController {
|
||||
|
||||
private final ITestDemoService iTestDemoService;
|
||||
private final ITestDemoService testDemoService;
|
||||
|
||||
/**
|
||||
* 查询测试单表列表
|
||||
@ -53,7 +53,7 @@ public class TestDemoController extends BaseController {
|
||||
@SaCheckPermission("demo:demo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TestDemoVo> list(@Validated(QueryGroup.class) TestDemoBo bo, PageQuery pageQuery) {
|
||||
return iTestDemoService.queryPageList(bo, pageQuery);
|
||||
return testDemoService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -62,7 +62,7 @@ public class TestDemoController extends BaseController {
|
||||
@SaCheckPermission("demo:demo:list")
|
||||
@GetMapping("/page")
|
||||
public TableDataInfo<TestDemoVo> page(@Validated(QueryGroup.class) TestDemoBo bo, PageQuery pageQuery) {
|
||||
return iTestDemoService.customPageList(bo, pageQuery);
|
||||
return testDemoService.customPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -77,7 +77,7 @@ public class TestDemoController extends BaseController {
|
||||
ExcelResult<TestDemoImportVo> excelResult = ExcelUtil.importExcel(file.getInputStream(), TestDemoImportVo.class, true);
|
||||
List<TestDemoImportVo> volist = excelResult.getList();
|
||||
List<TestDemo> list = BeanUtil.copyToList(volist, TestDemo.class);
|
||||
iTestDemoService.saveBatch(list);
|
||||
testDemoService.saveBatch(list);
|
||||
return R.ok(excelResult.getAnalysis());
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ public class TestDemoController extends BaseController {
|
||||
@Log(title = "测试单表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(@Validated TestDemoBo bo, HttpServletResponse response) {
|
||||
List<TestDemoVo> list = iTestDemoService.queryList(bo);
|
||||
List<TestDemoVo> list = testDemoService.queryList(bo);
|
||||
// 测试雪花id导出
|
||||
// for (TestDemoVo vo : list) {
|
||||
// vo.setId(1234567891234567893L);
|
||||
@ -105,7 +105,7 @@ public class TestDemoController extends BaseController {
|
||||
@GetMapping("/{id}")
|
||||
public R<TestDemoVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(iTestDemoService.queryById(id));
|
||||
return R.ok(testDemoService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -119,7 +119,7 @@ public class TestDemoController extends BaseController {
|
||||
// 使用校验工具对标 @Validated(AddGroup.class) 注解
|
||||
// 用于在非 Controller 的地方校验对象
|
||||
ValidatorUtils.validate(bo, AddGroup.class);
|
||||
return toAjax(iTestDemoService.insertByBo(bo));
|
||||
return toAjax(testDemoService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -130,7 +130,7 @@ public class TestDemoController extends BaseController {
|
||||
@RepeatSubmit
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TestDemoBo bo) {
|
||||
return toAjax(iTestDemoService.updateByBo(bo));
|
||||
return toAjax(testDemoService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -143,6 +143,6 @@ public class TestDemoController extends BaseController {
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(iTestDemoService.deleteWithValidByIds(Arrays.asList(ids), true));
|
||||
return toAjax(testDemoService.deleteWithValidByIds(Arrays.asList(ids), true));
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ import java.util.List;
|
||||
@RequestMapping("/demo/tree")
|
||||
public class TestTreeController extends BaseController {
|
||||
|
||||
private final ITestTreeService iTestTreeService;
|
||||
private final ITestTreeService testTreeService;
|
||||
|
||||
/**
|
||||
* 查询测试树表列表
|
||||
@ -43,7 +43,7 @@ public class TestTreeController extends BaseController {
|
||||
@SaCheckPermission("demo:tree:list")
|
||||
@GetMapping("/list")
|
||||
public R<List<TestTreeVo>> list(@Validated(QueryGroup.class) TestTreeBo bo) {
|
||||
List<TestTreeVo> list = iTestTreeService.queryList(bo);
|
||||
List<TestTreeVo> list = testTreeService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ public class TestTreeController extends BaseController {
|
||||
@Log(title = "测试树表", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public void export(@Validated TestTreeBo bo, HttpServletResponse response) {
|
||||
List<TestTreeVo> list = iTestTreeService.queryList(bo);
|
||||
List<TestTreeVo> list = testTreeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "测试树表", TestTreeVo.class, response);
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ public class TestTreeController extends BaseController {
|
||||
@GetMapping("/{id}")
|
||||
public R<TestTreeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(iTestTreeService.queryById(id));
|
||||
return R.ok(testTreeService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -78,7 +78,7 @@ public class TestTreeController extends BaseController {
|
||||
@RepeatSubmit
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TestTreeBo bo) {
|
||||
return toAjax(iTestTreeService.insertByBo(bo));
|
||||
return toAjax(testTreeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -89,7 +89,7 @@ public class TestTreeController extends BaseController {
|
||||
@RepeatSubmit
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TestTreeBo bo) {
|
||||
return toAjax(iTestTreeService.updateByBo(bo));
|
||||
return toAjax(testTreeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -102,6 +102,6 @@ public class TestTreeController extends BaseController {
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(iTestTreeService.deleteWithValidByIds(Arrays.asList(ids), true));
|
||||
return toAjax(testTreeService.deleteWithValidByIds(Arrays.asList(ids), true));
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.ruoyi.common.mybatis.core.domain.TreeEntity;
|
||||
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@ -19,7 +19,7 @@ import java.io.Serial;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("test_tree")
|
||||
public class TestTree extends TreeEntity<TestTree> {
|
||||
public class TestTree extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -30,6 +30,11 @@ public class TestTree extends TreeEntity<TestTree> {
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父ID
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
|
@ -2,12 +2,11 @@ package com.ruoyi.demo.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.mybatis.core.domain.TreeEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 测试树表业务对象 test_tree
|
||||
@ -18,7 +17,7 @@ import jakarta.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TestTreeBo extends TreeEntity<TestTreeBo> {
|
||||
public class TestTreeBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
@ -26,6 +25,11 @@ public class TestTreeBo extends TreeEntity<TestTreeBo> {
|
||||
@NotNull(message = "主键不能为空", groups = {EditGroup.class})
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父ID
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
|
Reference in New Issue
Block a user