Merge remote-tracking branch 'origin/test-training2' into test-training2
# Conflicts: # src/main/java/club/joylink/rtss/simulation/cbtc/Simulation.java
This commit is contained in:
commit
f847b2e4d6
@ -1,6 +1,6 @@
|
||||
-- 新题库
|
||||
DROP TABLE IF EXISTS `paper_question`;
|
||||
CREATE TABLE `paper_question` (
|
||||
DROP TABLE IF EXISTS `rts_paper_question`;
|
||||
CREATE TABLE `rts_paper_question` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '类型 选择题=select,判断题=judge,多选题=multi',
|
||||
`question` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '问题内容',
|
||||
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : room
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80029
|
||||
Source Host : 192.168.3.233:3306
|
||||
Source Schema : joylink
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80029
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 09/10/2022 14:50:58
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for paper_composition
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `paper_composition`;
|
||||
CREATE TABLE `paper_composition` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '试卷蓝图id',
|
||||
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '试卷蓝图名称',
|
||||
`profile` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '试卷蓝图简介',
|
||||
`org_id` bigint NULL DEFAULT NULL COMMENT '组织id',
|
||||
`start_time` datetime NULL DEFAULT NULL COMMENT '启用起始时间',
|
||||
`end_time` datetime NULL DEFAULT NULL COMMENT '启用截止时间',
|
||||
`valid_duration` int NULL DEFAULT NULL COMMENT '完成考试有效最长时长,单位min',
|
||||
`pass_score` int NULL DEFAULT NULL COMMENT '及格分',
|
||||
`creator_id` bigint NULL DEFAULT NULL COMMENT '创建者id',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
`state` int NULL DEFAULT NULL COMMENT '试卷蓝图状态:1-正在编辑,2-封存(不能修改),3-已经被使用(不能修改删除);定于见PaperCompositionState',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : room
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80029
|
||||
Source Host : 192.168.3.233:3306
|
||||
Source Schema : joylink
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80029
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 09/10/2022 14:51:19
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for paper_rule
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `paper_rule`;
|
||||
CREATE TABLE `paper_rule` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '试卷规则定义id',
|
||||
`pc_id` bigint NULL DEFAULT NULL COMMENT 'paper_compostion的id',
|
||||
`type` int NULL DEFAULT NULL COMMENT '试题类型:1-理论题,2-实训题',
|
||||
`subType` int NULL DEFAULT NULL COMMENT '规则类型:理论题(1-单选题,2-多选题,3-判断题);实训题(4-单操实训,5-场景实训)',
|
||||
`tags` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '筛选题目的标签,即根据标签来筛选题目;List<String>的json',
|
||||
`amount` int NULL DEFAULT NULL COMMENT '该类型题目数量',
|
||||
`score` int NULL DEFAULT NULL COMMENT '每题分值',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : room
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80029
|
||||
Source Host : 192.168.3.233:3306
|
||||
Source Schema : joylink
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80029
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 09/10/2022 14:51:35
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for paper_user
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `paper_user`;
|
||||
CREATE TABLE `paper_user` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户试卷id',
|
||||
`user_id` bigint NOT NULL COMMENT '用户id',
|
||||
`pc_id` bigint NOT NULL COMMENT '生成用户试卷的paper_compostion的id',
|
||||
`org_id` bigint NULL DEFAULT NULL COMMENT '组织id',
|
||||
`score` int NULL DEFAULT NULL COMMENT '用户最终得分',
|
||||
`start_time` datetime NULL DEFAULT NULL COMMENT '用户开始做题时间',
|
||||
`end_time` datetime NULL DEFAULT NULL COMMENT '用户结束做题时间',
|
||||
`cause` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '原因',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '用户试卷生成时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : room
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80029
|
||||
Source Host : 192.168.3.233:3306
|
||||
Source Schema : joylink
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80029
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 09/10/2022 14:51:52
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for paper_user_question
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `paper_user_question`;
|
||||
CREATE TABLE `paper_user_question` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户试卷试题结果id',
|
||||
`pu_id` bigint NOT NULL COMMENT '用户试卷paper_user的id',
|
||||
`org_id` bigint NULL DEFAULT NULL COMMENT '组织id',
|
||||
`type` int NULL DEFAULT NULL COMMENT '试题类型:1-理论题,2-实训题',
|
||||
`question_id` bigint NOT NULL COMMENT '试题id',
|
||||
`state` int NULL DEFAULT NULL COMMENT '试题状态:1-未做(初始),2-答对,3-答错,4-时间到结束',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 151 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
@ -1,3 +1,3 @@
|
||||
-- 新实训标添加组织id
|
||||
alter table published_training2 add column org_id bigint;
|
||||
alter table rts_published_training2 add column org_id bigint;
|
||||
|
||||
|
86
sql/20221012-xia-paper.sql
Normal file
86
sql/20221012-xia-paper.sql
Normal file
@ -0,0 +1,86 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : room
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80029
|
||||
Source Host : 192.168.3.233:3306
|
||||
Source Schema : joylink
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80029
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 12/10/2022 17:49:36
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for rts_paper_composition
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `rts_paper_composition`;
|
||||
CREATE TABLE `rts_paper_composition` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '试卷蓝图id',
|
||||
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '试卷蓝图名称',
|
||||
`profile` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '试卷蓝图简介',
|
||||
`org_id` bigint NULL DEFAULT NULL COMMENT '组织id',
|
||||
`start_time` datetime NULL DEFAULT NULL COMMENT '启用起始时间',
|
||||
`end_time` datetime NULL DEFAULT NULL COMMENT '启用截止时间',
|
||||
`valid_duration` int NULL DEFAULT NULL COMMENT '完成考试有效最长时长,单位min',
|
||||
`pass_score` int NULL DEFAULT NULL COMMENT '及格分',
|
||||
`creator_id` bigint NULL DEFAULT NULL COMMENT '创建者id',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
|
||||
`state` int NULL DEFAULT NULL COMMENT '试卷蓝图状态:1-正在编辑,2-封存(不能修改),3-已经被使用(不能修改删除);定于见PaperCompositionState',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for rts_paper_rule
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `rts_paper_rule`;
|
||||
CREATE TABLE `rts_paper_rule` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '试卷规则定义id',
|
||||
`pc_id` bigint NULL DEFAULT NULL COMMENT 'paper_compostion的id',
|
||||
`type` int NULL DEFAULT NULL COMMENT '试题类型:1-理论题,2-实训题',
|
||||
`subType` int NULL DEFAULT NULL COMMENT '规则类型:理论题(1-单选题,2-多选题,3-判断题);实训题(4-单操实训,5-场景实训)',
|
||||
`tags` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '筛选题目的标签,即根据标签来筛选题目;List<String>的json',
|
||||
`amount` int NULL DEFAULT NULL COMMENT '该类型题目数量',
|
||||
`score` int NULL DEFAULT NULL COMMENT '每题分值',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for rts_paper_user
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `rts_paper_user`;
|
||||
CREATE TABLE `rts_paper_user` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户试卷id',
|
||||
`user_id` bigint NOT NULL COMMENT '用户id',
|
||||
`pc_id` bigint NOT NULL COMMENT '生成用户试卷的paper_compostion的id',
|
||||
`org_id` bigint NULL DEFAULT NULL COMMENT '组织id',
|
||||
`score` int NULL DEFAULT NULL COMMENT '用户最终得分',
|
||||
`start_time` datetime NULL DEFAULT NULL COMMENT '用户开始做题时间',
|
||||
`end_time` datetime NULL DEFAULT NULL COMMENT '用户结束做题时间',
|
||||
`cause` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '原因',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '用户试卷生成时间',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for rts_paper_user_question
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `rts_paper_user_question`;
|
||||
CREATE TABLE `rts_paper_user_question` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户试卷试题结果id',
|
||||
`pu_id` bigint NOT NULL COMMENT '用户试卷paper_user的id',
|
||||
`org_id` bigint NULL DEFAULT NULL COMMENT '组织id',
|
||||
`type` int NULL DEFAULT NULL COMMENT '试题类型:1-理论题,2-实训题',
|
||||
`question_id` bigint NOT NULL COMMENT '试题id',
|
||||
`state` int NULL DEFAULT NULL COMMENT '试题状态:1-未做(初始),2-答对,3-答错,4-时间到结束',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 151 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
2
sql/20221015-wei-projectDefaultOrg.sql
Normal file
2
sql/20221015-wei-projectDefaultOrg.sql
Normal file
@ -0,0 +1,2 @@
|
||||
alter table `joylink`.`project`
|
||||
ADD COLUMN `default_org` bigint NULL comment '默认组织ID' AFTER `server_setting`;
|
@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*组织成员管理接口
|
||||
* 组织成员管理接口
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/company")
|
||||
@ -39,7 +39,7 @@ public class OrgController {
|
||||
private IOrgExamService iOrgExamService;
|
||||
|
||||
/**
|
||||
*创建顶级组织
|
||||
* 创建顶级组织
|
||||
*/
|
||||
@PostMapping
|
||||
public CompanyVO create(@RequestBody @Validated CompanyVO company, @RequestAttribute(AuthenticateInterceptor.LOGIN_USER_KEY) AccountVO user) {
|
||||
@ -47,7 +47,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*获取公司列表
|
||||
* 获取公司列表
|
||||
*/
|
||||
@GetMapping
|
||||
public List<CompanyVO> queryAll() {
|
||||
@ -55,7 +55,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*分页获取公司列表
|
||||
* 分页获取公司列表
|
||||
*/
|
||||
@GetMapping("paging")
|
||||
public PageVO<CompanyVO> pagingQueryAll(OrgQueryVO queryVO) {
|
||||
@ -63,7 +63,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*查询公司信息
|
||||
* 查询公司信息
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public CompanyVO get(@PathVariable Long id) {
|
||||
@ -71,7 +71,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*更新公司信息
|
||||
* 更新公司信息
|
||||
*/
|
||||
@PutMapping("{id}")
|
||||
public CompanyVO updateCompany(@PathVariable Long id, @RequestBody @Validated CompanyVO company, @RequestAttribute AccountVO user) {
|
||||
@ -79,7 +79,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*微信小程用户绑定为单位管理员
|
||||
* 微信小程用户绑定为单位管理员
|
||||
*/
|
||||
@PutMapping(path = "/bind/company")
|
||||
public CompanyVO userScanCodeBindCompany(Long userId, Long companyId) {
|
||||
@ -87,7 +87,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*添加部门信息
|
||||
* 添加部门信息
|
||||
*/
|
||||
@PostMapping(path = "/dept")
|
||||
public DepartmentVO createDepart(@RequestBody @Validated DepartmentVO departmentVO) {
|
||||
@ -95,7 +95,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*获取单位所有部门
|
||||
* 获取单位所有部门
|
||||
*/
|
||||
@GetMapping(path = "{companyId}/dept")
|
||||
public List<DepartmentVO> queryCompanyDepart(@PathVariable Long companyId) {
|
||||
@ -103,7 +103,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*获取部门及其子树
|
||||
* 获取部门及其子树
|
||||
*/
|
||||
@GetMapping(path = "{companyId}/dept/{deptId}/tree")
|
||||
public DepartmentVO queryDepartTree(@PathVariable Long deptId, @PathVariable Long companyId) {
|
||||
@ -111,7 +111,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*获取部门及其子部门
|
||||
* 获取部门及其子部门
|
||||
*/
|
||||
@GetMapping(path = "{companyId}/dept/{deptId}")
|
||||
public List<DepartmentVO> queryDepart(@PathVariable Long deptId, @PathVariable Long companyId) {
|
||||
@ -119,7 +119,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*删除部门信息
|
||||
* 删除部门信息
|
||||
*/
|
||||
@DeleteMapping("/dept/{deptId}")
|
||||
public void deleteDepart(@PathVariable Long deptId) {
|
||||
@ -127,7 +127,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*查询部门信息
|
||||
* 查询部门信息
|
||||
*/
|
||||
@GetMapping("/dept/{deptId}")
|
||||
public DepartmentVO getDepart(@PathVariable Long deptId) {
|
||||
@ -135,7 +135,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*更新部门信息
|
||||
* 更新部门信息
|
||||
*/
|
||||
@PutMapping("/dept/{id}")
|
||||
public void updateDepartInfo(@PathVariable Long id, @RequestBody @Validated DepartmentVO departmentVO) {
|
||||
@ -143,7 +143,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*添加单位成员关系信息
|
||||
* 添加单位成员关系信息
|
||||
*/
|
||||
@PostMapping("refUserInfo")
|
||||
public void addCompanyUserInfo(@RequestAttribute AccountVO user, @RequestBody UserDepartRelVO userDepartRelVO) {
|
||||
@ -151,7 +151,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*更新单位成员关系信息
|
||||
* 更新单位成员关系信息
|
||||
*/
|
||||
@PutMapping("refUserInfo")
|
||||
public void updateCompanyUserInfo(@RequestAttribute AccountVO user, @RequestBody UserDepartRelVO userDepartRelVO) {
|
||||
@ -159,7 +159,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*取消单位的部门成员关系
|
||||
* 取消单位的部门成员关系
|
||||
*/
|
||||
@DeleteMapping("departUserInfo")
|
||||
public void deleteCompanyUserInfo(@RequestAttribute AccountVO user, @RequestBody @Validated UserDepartRelVO userDepartRelVO) {
|
||||
@ -167,7 +167,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*分页获取班级学生信息
|
||||
* 分页获取班级学生信息
|
||||
*/
|
||||
@GetMapping("/dept/{clsId}/departUserInfo")
|
||||
public PageVO<OrgUserVO> getCompanyUserInfo(@RequestAttribute AccountVO user, @PathVariable Integer clsId, CompanyUserQueryVO companyUserQueryVO) {
|
||||
@ -175,7 +175,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*导入单位成员信息
|
||||
* 导入单位成员信息
|
||||
*/
|
||||
@PostMapping("{clsId}/departUserInfo/import")
|
||||
public void importCompanyUserInfo(@RequestAttribute AccountVO user, @PathVariable Long clsId, @RequestBody List<ImportOrgUserVO> importOrgUsers) {
|
||||
@ -183,7 +183,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*获取单位用户的部门信息
|
||||
* 获取单位用户的部门信息
|
||||
*/
|
||||
@GetMapping("{companyId}/userDeparts")
|
||||
public List<OrgUserVO> getUserCompanyDeparts(@RequestAttribute AccountVO user, @PathVariable Integer companyId) {
|
||||
@ -191,7 +191,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*查询自己给该组织(班级)排的课
|
||||
* 查询自己给该组织(班级)排的课
|
||||
*/
|
||||
@GetMapping("/orgLesson/{orgId}/list")
|
||||
public List<LessonVO> queryOrgLessonICreated(@PathVariable Long orgId, @RequestAttribute AccountVO user) {
|
||||
@ -199,7 +199,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*修改班级-课程关系
|
||||
* 修改班级-课程关系
|
||||
*/
|
||||
@PutMapping("/orgLesson/{clsId}/update")
|
||||
public void updateOrgLesson(@PathVariable Long clsId, @RequestBody List<Long> lessonIds, @RequestAttribute LoginUserInfoVO loginInfo) {
|
||||
@ -207,7 +207,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*给班级添加学生
|
||||
* 给班级添加学生
|
||||
*/
|
||||
@PostMapping("/orgUser/{clsId}/addStudent")
|
||||
public void addStudent(@PathVariable Long clsId, @RequestBody ImportOrgUserVO importVO, @RequestAttribute AccountVO user) {
|
||||
@ -215,7 +215,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*创建班级
|
||||
* 创建班级
|
||||
*/
|
||||
@PostMapping("/org/cls/create")
|
||||
public void createCls(@RequestBody NonTopOrgCreateVO createVO, @RequestAttribute LoginUserInfoVO loginInfo) {
|
||||
@ -231,7 +231,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*查询当前登录项目所属组织下的班级
|
||||
* 查询当前登录项目所属组织下的班级
|
||||
*/
|
||||
@GetMapping("/list/cls")
|
||||
public List<DepartmentVO> queryCls(OrgQueryVO queryVO, @RequestAttribute LoginUserInfoVO loginInfo) {
|
||||
@ -239,7 +239,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*创建评价规则
|
||||
* 创建评价规则
|
||||
*/
|
||||
@PostMapping("/orgScoringRule")
|
||||
public void createScoringRule(@RequestBody OrgScoringRuleVO orgScoringRuleVO, @RequestAttribute LoginUserInfoVO loginInfo) {
|
||||
@ -247,7 +247,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*更新评价规则
|
||||
* 更新评价规则
|
||||
*/
|
||||
@PutMapping("/orgScoringRule")
|
||||
public void UpdateScoringRule(@RequestBody OrgScoringRuleVO orgScoringRuleVO, @RequestAttribute AccountVO user) {
|
||||
@ -255,7 +255,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*查询自己创建的评价规则基础信息
|
||||
* 查询自己创建的评价规则基础信息
|
||||
*/
|
||||
@GetMapping("/orgScoringRule/basicInfo/self/paged")
|
||||
public PageVO<OrgScoringRuleVO> queryOrgScoringRuleBasicInfo(OrgScoringRuleQueryVO queryVO, @RequestAttribute AccountVO user) {
|
||||
@ -263,7 +263,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*查询自己创建的指定评价规则详细信息
|
||||
* 查询自己创建的指定评价规则详细信息
|
||||
*/
|
||||
@GetMapping("/orgScoringRule/details/self/{orgId}/{schoolYear}/{term}")
|
||||
public OrgScoringRuleVO queryOrgScoringRuleDetails(@PathVariable Long orgId, @PathVariable String schoolYear,
|
||||
@ -272,7 +272,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*查询指定评价规则详细信息
|
||||
* 查询指定评价规则详细信息
|
||||
*/
|
||||
@GetMapping("/orgScoringRule/details/self/{ruleId}")
|
||||
public OrgScoringRuleVO queryOrgScoringRuleDetails(@PathVariable Long ruleId) {
|
||||
@ -280,7 +280,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*获取评价规则的评分结果
|
||||
* 获取评价规则的评分结果
|
||||
*/
|
||||
@GetMapping("/orgScoringRule/score/{orgId}/{schoolYear}/{term}")
|
||||
public List<OrgScoringResultVO> score(@PathVariable Long orgId, @PathVariable String schoolYear,
|
||||
@ -289,7 +289,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*删除评分规则
|
||||
* 删除评分规则
|
||||
*/
|
||||
@DeleteMapping("/orgScoringRule/details/self/{ruleId}")
|
||||
public void deleteScoringRule(@PathVariable Long ruleId, @RequestAttribute AccountVO user) {
|
||||
@ -297,7 +297,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*查询规则能够应用到的组织
|
||||
* 查询规则能够应用到的组织
|
||||
*/
|
||||
@GetMapping("/orgScoringRule/{ruleId}/canApplyTo")
|
||||
public List<DepartmentVO> queryRuleCanApplyTo(@PathVariable Long ruleId, @RequestAttribute AccountVO user) {
|
||||
@ -305,7 +305,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*将评价规则应用到
|
||||
* 将评价规则应用到
|
||||
*/
|
||||
@PostMapping("/orgScoringRule/{ruleId}/apply")
|
||||
public void applyOrgScoringRule(@PathVariable Long ruleId, @RequestBody List<Long> orgIds) {
|
||||
@ -313,7 +313,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*给班级安排考试
|
||||
* 给班级安排考试
|
||||
*/
|
||||
@PostMapping("/orgExam/{clsId}")
|
||||
public void createOrgExam(@PathVariable Long clsId, @RequestBody List<Long> examIds, @RequestAttribute AccountVO user) {
|
||||
@ -321,7 +321,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*查询班级安排的考试id
|
||||
* 查询班级安排的考试id
|
||||
*/
|
||||
@GetMapping("/orgExam/{clsId}/list")
|
||||
public List<String> queryOrgExam(@PathVariable Long clsId, @RequestAttribute AccountVO user) {
|
||||
@ -329,7 +329,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*管理员查看组织树
|
||||
* 管理员查看组织树
|
||||
*/
|
||||
@Role(RoleEnum.Admin)
|
||||
@GetMapping("/orgTree/{orgId}")
|
||||
@ -338,7 +338,7 @@ public class OrgController {
|
||||
}
|
||||
|
||||
/**
|
||||
*获取学生实训使用时长
|
||||
* 获取学生实训使用时长
|
||||
*/
|
||||
@GetMapping("/usage/students")
|
||||
public List<StudentsUsageStatisticsVO> statisticUsage(@Validated UsageQueryVO queryVO) {
|
||||
@ -353,4 +353,19 @@ public class OrgController {
|
||||
return iOrgService.getBindQrCode(orgId, loginInfo.getProject());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询班级教师接口
|
||||
*/
|
||||
@GetMapping("/dept/{clsId}/teachers")
|
||||
public PageVO<OrgUserVO> clsTeacherList(@PathVariable Integer clsId, CompanyUserQueryVO companyUserQueryVO) {
|
||||
return iOrgUserService.clsTeacherList(clsId, companyUserQueryVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加教师接口
|
||||
*/
|
||||
@PostMapping("/dept/{clsId}/addTeacher")
|
||||
public void addTeacher(@PathVariable Long clsId, @RequestBody ImportOrgUserVO importVO, @RequestAttribute AccountVO user) {
|
||||
iOrgUserService.addTeacher(clsId, importVO, user);
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ public class OrgProjectController {
|
||||
*/
|
||||
@GetMapping("list")
|
||||
public List<OrgProjectVO> queryOrgList(@RequestAttribute LoginUserInfoVO loginInfo) {
|
||||
return orgProjectService.queryOrgProjectListByProjectAndUid(loginInfo.getProject(), loginInfo.getAccountVO().getId());
|
||||
return orgProjectService.queryOrgProjectListByProjectAndUid(loginInfo.getProjectInfo(), loginInfo.getAccountVO().getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,8 @@
|
||||
package club.joylink.rtss.controller.paper;
|
||||
|
||||
|
||||
import club.joylink.rtss.constants.RoleEnum;
|
||||
import club.joylink.rtss.controller.advice.Role;
|
||||
import club.joylink.rtss.services.paper.PagerQuestionService;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
@ -18,19 +20,28 @@ import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 题库教师管理接口
|
||||
* 题库管理接口
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(path = "/api/question/org")
|
||||
@RequestMapping(path = "/api/question")
|
||||
public class PagerQuestionBankController {
|
||||
|
||||
@Autowired
|
||||
private PagerQuestionService questionBankService;
|
||||
/**
|
||||
* 管理查询题库
|
||||
*/
|
||||
@Role(value = RoleEnum.SuperAdmin)
|
||||
@GetMapping(path = "/paging")
|
||||
public PageVO<PaperQuestionVO> pagingQueryQuestions(QuestionQueryVO queryVO) {
|
||||
queryVO.setOrgId(queryVO.getOrgId());
|
||||
return questionBankService.pagingQueryQuestions(queryVO,true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询题目
|
||||
*/
|
||||
@GetMapping(path = "/paging")
|
||||
@GetMapping(path = "/org/paging")
|
||||
public PageVO<PaperQuestionVO> pagingQueryQuestions(@RequestAttribute LoginUserInfoVO loginInfo, QuestionQueryVO queryVO) {
|
||||
queryVO.setOrgId(loginInfo.getTopOrgId());
|
||||
return questionBankService.pagingQueryQuestions(queryVO,false);
|
||||
@ -39,24 +50,29 @@ public class PagerQuestionBankController {
|
||||
/**
|
||||
* 查询题目列表
|
||||
*/
|
||||
@GetMapping(path = "")
|
||||
@GetMapping(path = "/org")
|
||||
public List<PaperQuestionVO> queryQuestions(@RequestAttribute LoginUserInfoVO loginInfo, QuestionQueryVO queryVO) {
|
||||
queryVO.setOrgId(loginInfo.getTopOrgId());
|
||||
return questionBankService.queryQuestions(queryVO,false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取题目信息
|
||||
* 获取题目信息或预览
|
||||
*/
|
||||
@GetMapping(path = "/{questionId}")
|
||||
public PaperQuestionVO getQuestion(@PathVariable Long questionId) {
|
||||
return questionBankService.getQuestion(questionId, false);
|
||||
@GetMapping(path = "/org/{questionId}")
|
||||
public PaperQuestionVO getQuestion(@PathVariable Long questionId,@RequestParam(name = "random",defaultValue = "false") boolean random) {
|
||||
return questionBankService.getQuestion(questionId, false,random);
|
||||
}
|
||||
|
||||
@PostMapping(path = "/org/test/answer/{questionId}")
|
||||
public boolean testAnswer(@PathVariable Long questionId,@RequestBody List<Integer> answers){
|
||||
return this.questionBankService.answer(questionId,answers);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加题目
|
||||
*/
|
||||
@PostMapping(path = "")
|
||||
@PostMapping(path = "/org")
|
||||
public void addQuestion(@Validated @RequestBody PaperQuestionVO questionVO, @RequestAttribute LoginUserInfoVO loginInfo) {
|
||||
questionVO.setOrgId(loginInfo.getTopOrgId());
|
||||
questionBankService.saveOrUpdate(questionVO, loginInfo.getAccountVO());
|
||||
@ -65,7 +81,7 @@ public class PagerQuestionBankController {
|
||||
/**
|
||||
* 导入项目或单位试题库
|
||||
*/
|
||||
@PostMapping(path = "/import")
|
||||
@PostMapping(path = "/org/import")
|
||||
public void importProjectQuestion(@Validated @RequestBody List<PaperQuestionVO> questions, @RequestAttribute LoginUserInfoVO loginInfo) {
|
||||
|
||||
questionBankService.importProjectQuestion(questions, loginInfo.getTopOrgId(), loginInfo.getAccountVO());
|
||||
@ -74,9 +90,8 @@ public class PagerQuestionBankController {
|
||||
/**
|
||||
* 根据companyId 查询所有的标签
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(path = "/lable")
|
||||
@GetMapping(path = "/org/lable")
|
||||
public Collection<String> findAllLable(@RequestAttribute LoginUserInfoVO loginInfo) {
|
||||
return this.questionBankService.findAllLable(loginInfo.getTopOrgId());
|
||||
}
|
||||
@ -84,10 +99,8 @@ public class PagerQuestionBankController {
|
||||
/**
|
||||
* 根据标签查询所有的题型
|
||||
*
|
||||
* @param queryVO
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(path = "/lable/question")
|
||||
@PostMapping(path = "/org/lable/question")
|
||||
public List<PaperQuestionVO> findByLable(@RequestAttribute LoginUserInfoVO loginInfo, @RequestBody PagerLableQueryVO queryVO) {
|
||||
|
||||
return this.questionBankService.queryQuestionsForRaceLable(loginInfo.getTopOrgId(),queryVO);
|
||||
@ -97,12 +110,8 @@ public class PagerQuestionBankController {
|
||||
/**
|
||||
* 更新题目
|
||||
*
|
||||
* @param questionId
|
||||
* @param loginInfo
|
||||
* @param questionVO
|
||||
* @param user
|
||||
*/
|
||||
@PutMapping(path = "/{questionId}")
|
||||
@PutMapping(path = "/org/{questionId}")
|
||||
public void updateQuestion(@PathVariable Long questionId, @RequestAttribute LoginUserInfoVO loginInfo, @RequestBody PaperQuestionVO questionVO, @RequestAttribute AccountVO user) {
|
||||
questionVO.setId(questionId);
|
||||
questionVO.setOrgId(loginInfo.getTopOrgId());
|
||||
@ -112,9 +121,11 @@ public class PagerQuestionBankController {
|
||||
/**
|
||||
* 删除题目
|
||||
*/
|
||||
@DeleteMapping(path = "")
|
||||
@DeleteMapping(path = "/org")
|
||||
public void deleteQuestion(@RequestBody List<Long> questionId) {
|
||||
questionBankService.deleteQuestion(questionId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,40 +0,0 @@
|
||||
package club.joylink.rtss.controller.paper;
|
||||
|
||||
|
||||
import club.joylink.rtss.services.paper.PagerQuestionService;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.client.pager.question.PagerLableQueryVO;
|
||||
import club.joylink.rtss.vo.client.pager.question.PaperQuestionVO;
|
||||
import club.joylink.rtss.vo.client.pager.question.QuestionQueryVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 题库管理接口
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(path = "/api/question/manage")
|
||||
public class PagerQuestionBankManageController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private PagerQuestionService questionBankService;
|
||||
|
||||
/**
|
||||
* 分页查询题目
|
||||
*/
|
||||
@GetMapping(path = "/paging")
|
||||
public PageVO<PaperQuestionVO> pagingQueryQuestions(QuestionQueryVO queryVO) {
|
||||
queryVO.setOrgId(queryVO.getOrgId());
|
||||
return questionBankService.pagingQueryQuestions(queryVO,true);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -34,7 +34,7 @@ public class PaperCompositionController {
|
||||
return compositionService.createPaperComposition(req, user);
|
||||
}
|
||||
/**
|
||||
* 修改试卷蓝图基础信息(名称、项目、简介)
|
||||
* 修改试卷蓝图基础信息
|
||||
*/
|
||||
@PutMapping("/basic")
|
||||
public void updatePaperCompositionProfile(@RequestBody PaperCompositionBasicVo req, @RequestAttribute AccountVO user) {
|
||||
@ -44,7 +44,7 @@ public class PaperCompositionController {
|
||||
/**
|
||||
* 修改试卷蓝图详细信息
|
||||
*/
|
||||
@PutMapping("/detail")
|
||||
//@PutMapping("/detail")
|
||||
public void updatePaperCompositionDetail(@RequestBody PaperCompositionDetailVo req, @RequestAttribute AccountVO user) {
|
||||
compositionService.updatePaperCompositionDetail(req, user);
|
||||
}
|
||||
@ -83,6 +83,14 @@ public class PaperCompositionController {
|
||||
|
||||
return this.compositionService.findPaperCompositionByPage(req);
|
||||
}
|
||||
/**
|
||||
* 根据试卷蓝图名称简介分页查找某个组织的试卷蓝图
|
||||
*/
|
||||
@PostMapping("/find/page/for/{orgId}")
|
||||
public PageVO<PaperCompositionVo> findPaperCompositionForOrgByPage(@PathVariable("orgId") Long orgId, @RequestBody FindPaperCompositionPageReqVo req) {
|
||||
req.setOrgId(orgId);
|
||||
return this.compositionService.findPaperCompositionByPage(req);
|
||||
}
|
||||
/**
|
||||
* 根据账户分页查找试卷蓝图
|
||||
*/
|
||||
|
@ -118,4 +118,12 @@ public class PaperUserController {
|
||||
public List<PaperUserInfoVo> findPaperUserForAccount(@RequestBody FindPaperUserForAccountReqVo req, @RequestAttribute AccountVO user){
|
||||
return this.paperUserFindPageService.findPaperUserForAccount(req);
|
||||
}
|
||||
/**
|
||||
* 查看组织的某个账户的某个试卷蓝图的用户试卷
|
||||
*/
|
||||
@PostMapping("/{orgId}/user/list/account")
|
||||
public List<PaperUserInfoVo> findOrgPaperUserForAccount(@PathVariable("orgId") Long orgId,@RequestBody FindPaperUserForAccountReqVo req, @RequestAttribute AccountVO user){
|
||||
req.setOrgId(orgId);
|
||||
return this.paperUserFindPageService.findPaperUserForAccount(req);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,83 @@
|
||||
package club.joylink.rtss.controller.permission2;
|
||||
|
||||
import club.joylink.rtss.services.permission.AcPermissionService;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.permission.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 权限管理接口V2
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/v2/permission")
|
||||
public class AcPermissionController {
|
||||
@Autowired
|
||||
private AcPermissionService permissionService;
|
||||
|
||||
/**
|
||||
* 创建权限
|
||||
*
|
||||
* @return 如果创建成功,则返回权限id
|
||||
*/
|
||||
@PostMapping("/create")
|
||||
public String createPermission(@RequestBody CreatePermissionReqVo req, @RequestAttribute AccountVO user) {
|
||||
return this.permissionService.createPermission(req, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改权限基础信息(名称和描述)
|
||||
*/
|
||||
@PutMapping("/basic")
|
||||
public void updatePermissionBasic(@RequestBody UpdatePermissionBasicReqVo req) {
|
||||
this.permissionService.updatePermissionBasic(req);
|
||||
}
|
||||
|
||||
/**
|
||||
* 给权限添加功能
|
||||
*
|
||||
* @param permissionId 权限id
|
||||
* @param abilityId 权限功能id,即system_ability.id
|
||||
*/
|
||||
@PostMapping("/{permissionId}/accept/{abilityId}")
|
||||
public void addAbilityToPermission(@PathVariable("permissionId") Long permissionId, @PathVariable("abilityId") Long abilityId) {
|
||||
this.permissionService.addAbilityToPermission(permissionId, abilityId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取权限的所有功能
|
||||
*
|
||||
* @param permissionId 权限id
|
||||
*/
|
||||
@GetMapping("/{permissionId}/abilities")
|
||||
public List<PermissionAbilityRspVo> findPermissionAbilities(@PathVariable("permissionId") Long permissionId) {
|
||||
return this.permissionService.findPermissionAbilities(permissionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除权限的功能
|
||||
*/
|
||||
@DeleteMapping("/{permissionId}/abilities")
|
||||
public void deleteAbilities(@RequestBody PermissionAbilityDeletedReqVo req) {
|
||||
this.permissionService.deleteAbilities(req);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一个权限的完整信息
|
||||
*/
|
||||
@GetMapping("/{permissionId}/whole")
|
||||
public WholePermissionRspVo findWholePermission(@PathVariable("permissionId") Long permissionId) {
|
||||
return this.permissionService.findWholePermission(permissionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页获取权限
|
||||
*/
|
||||
@PostMapping("/find/page")
|
||||
public PageVO<PermissionBasicRspVo> findByPage(@RequestBody FindPermissionBasicByPageReqVo req) {
|
||||
return this.permissionService.findByPage(req);
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package club.joylink.rtss.controller.permission2;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
/**
|
||||
* 主体(用户或组织)的权限管理接口<br>
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/v2/permission/subject")
|
||||
public class PermissionSubjectController {
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package club.joylink.rtss.controller.permission2;
|
||||
|
||||
import club.joylink.rtss.services.permission.SystemAbilityService;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.permission.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
* 面向权限的系统功能管理接口V2
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/v2/permission/system/ability")
|
||||
public class SystemAbilityController {
|
||||
@Autowired
|
||||
private SystemAbilityService abilityService;
|
||||
/**
|
||||
* 添加权限功能
|
||||
*/
|
||||
@PostMapping("/basic")
|
||||
public void addAbility(@RequestBody BasicSystemAbilityVo req, @RequestAttribute LoginUserInfoVO userInfoVO){
|
||||
this.abilityService.saveOrUpdateBasicAbility(req,userInfoVO);
|
||||
}
|
||||
/**
|
||||
* 修改权限功能的名称和描述
|
||||
*/
|
||||
@PutMapping("/basic")
|
||||
public void updateAbilityBasic(@RequestBody BasicSystemAbilityVo req,@RequestAttribute LoginUserInfoVO userInfoVO){
|
||||
this.abilityService.saveOrUpdateBasicAbility(req,userInfoVO);
|
||||
}
|
||||
/**
|
||||
* 修改权限功能的类型和关联的具体功能
|
||||
*/
|
||||
@PutMapping("/function")
|
||||
public void updateAbilityTypeAndFunc(@RequestBody UpdateAbilityFunctionReqVo req){
|
||||
this.abilityService.updateTypeAndFunc(req);
|
||||
}
|
||||
/**
|
||||
* 设置权限功能的状态
|
||||
*/
|
||||
/* @PutMapping("/status")
|
||||
public void updateAbilityStatus(@RequestBody UpdateAbilityStatusReqVo req){
|
||||
|
||||
}*/
|
||||
/**
|
||||
* 删除权限功能,注意对于已经启用的不能删除
|
||||
* @return 返回成功删除的权限功能的id列表
|
||||
*/
|
||||
@DeleteMapping
|
||||
public void deleteAbilities(@RequestBody DeleteAbilitiesReqVo req){
|
||||
this.abilityService.remove(req);
|
||||
}
|
||||
/**
|
||||
* 根据权限功能的id查询完整信息
|
||||
*/
|
||||
@GetMapping("/{abilityId}")
|
||||
public SystemAbilityRspVo findById(@PathVariable("abilityId") Long abilityId){
|
||||
return this.abilityService.findVO(abilityId);
|
||||
}
|
||||
/**
|
||||
* 分页查询权限功能的基本信息
|
||||
*/
|
||||
@PostMapping("/find/basic/page")
|
||||
public PageVO<SystemAbilityRspVo>findByPage(FindAbilityBasicByPageReqVo req){
|
||||
return this.abilityService.findByPage(req);
|
||||
}
|
||||
|
||||
}
|
@ -1,13 +1,13 @@
|
||||
package club.joylink.rtss.controller.project;
|
||||
|
||||
import club.joylink.rtss.controller.advice.AuthenticateInterceptor;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.entity.project.ProjectView;
|
||||
import club.joylink.rtss.services.project.ProjectService;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.project.ProjectQueryVO;
|
||||
import club.joylink.rtss.vo.project.ProjectVO;
|
||||
import club.joylink.rtss.vo.project.ProjectViewQueryVO;
|
||||
import club.joylink.rtss.vo.project.ProjectViewVO;
|
||||
import club.joylink.rtss.vo.client.org.CompanyVO;
|
||||
import club.joylink.rtss.vo.project.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -24,12 +24,12 @@ public class ProjectInfoController {
|
||||
private ProjectService projectService;
|
||||
|
||||
@GetMapping("/page")
|
||||
public PageVO<Project> pagingQuery(ProjectQueryVO queryVO) {
|
||||
public PageVO<ProjectInfoVO> pagingQuery(ProjectQueryVO queryVO) {
|
||||
return projectService.pagingQuery(queryVO);
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public List<Project> getAllProject() {
|
||||
public List<ProjectInfoVO> getAllProject() {
|
||||
return projectService.getAllProject();
|
||||
}
|
||||
|
||||
@ -58,6 +58,22 @@ public class ProjectInfoController {
|
||||
return projectService.checkProjectCode(code);
|
||||
}
|
||||
|
||||
@PutMapping("/setDefaultOrg")
|
||||
public void setProjectDefaultOrg(@RequestBody Project project) {
|
||||
projectService.setProjectDefaultOrg(project.getId(), project.getDefaultOrg());
|
||||
}
|
||||
|
||||
@GetMapping("/{id}/orgList")
|
||||
public List<CompanyVO> orgList(@PathVariable Long id) {
|
||||
return projectService.projectOrgList(id);
|
||||
}
|
||||
|
||||
@PostMapping("/{id}/createDefaultOrg")
|
||||
public ProjectInfoVO quickCreateDefaultOrg(@PathVariable Long id, @RequestBody CompanyVO companyVO
|
||||
, @RequestAttribute(AuthenticateInterceptor.LOGIN_USER_KEY) AccountVO user) {
|
||||
return projectService.quickCreateDefaultOrg(id, companyVO, user);
|
||||
}
|
||||
|
||||
@GetMapping("/viewSetting/page")
|
||||
public PageVO<ProjectView> projectViewPagingQuery(ProjectViewQueryVO queryVO) {
|
||||
return projectService.projectViewPagingQuery(queryVO);
|
||||
|
@ -15,7 +15,7 @@ import java.util.List;
|
||||
@Repository
|
||||
public interface PaperQuestionDAO {
|
||||
@Select("<script>" +
|
||||
"select * from paper_question where 1 = 1 " +
|
||||
"select * from rts_paper_question where 1 = 1 " +
|
||||
// "<choose>" +
|
||||
// "<when test=\"projectCode == '"+ Project.DEFAULT_PROJECT_CODE +"'\">"+
|
||||
// " and project_code is null" +
|
||||
|
@ -0,0 +1,34 @@
|
||||
package club.joylink.rtss.dao.permission;
|
||||
|
||||
import club.joylink.rtss.entity.permission.Permission;
|
||||
import club.joylink.rtss.entity.permission.PermissionExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface AcPermissionDAO {
|
||||
long countByExample(PermissionExample example);
|
||||
|
||||
int deleteByExample(PermissionExample example);
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(Permission record);
|
||||
|
||||
int insertSelective(Permission record);
|
||||
|
||||
List<Permission> selectByExample(PermissionExample example);
|
||||
|
||||
Permission selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") Permission record, @Param("example") PermissionExample example);
|
||||
|
||||
int updateByExample(@Param("record") Permission record, @Param("example") PermissionExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(Permission record);
|
||||
|
||||
int updateByPrimaryKey(Permission record);
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package club.joylink.rtss.dao.permission;
|
||||
|
||||
import club.joylink.rtss.entity.permission.PermissionSubject;
|
||||
import club.joylink.rtss.entity.permission.PermissionSubjectExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface PermissionSubjectDAO {
|
||||
long countByExample(PermissionSubjectExample example);
|
||||
|
||||
int deleteByExample(PermissionSubjectExample example);
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(PermissionSubject record);
|
||||
|
||||
int insertSelective(PermissionSubject record);
|
||||
|
||||
List<PermissionSubject> selectByExample(PermissionSubjectExample example);
|
||||
|
||||
PermissionSubject selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") PermissionSubject record, @Param("example") PermissionSubjectExample example);
|
||||
|
||||
int updateByExample(@Param("record") PermissionSubject record, @Param("example") PermissionSubjectExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(PermissionSubject record);
|
||||
|
||||
int updateByPrimaryKey(PermissionSubject record);
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package club.joylink.rtss.dao.permission;
|
||||
|
||||
import club.joylink.rtss.entity.permission.PermissionSystemAbility;
|
||||
import club.joylink.rtss.entity.permission.PermissionSystemAbilityExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface PermissionSystemAbilityDAO {
|
||||
long countByExample(PermissionSystemAbilityExample example);
|
||||
|
||||
int deleteByExample(PermissionSystemAbilityExample example);
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(PermissionSystemAbility record);
|
||||
|
||||
int insertSelective(PermissionSystemAbility record);
|
||||
|
||||
List<PermissionSystemAbility> selectByExample(PermissionSystemAbilityExample example);
|
||||
|
||||
PermissionSystemAbility selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") PermissionSystemAbility record, @Param("example") PermissionSystemAbilityExample example);
|
||||
|
||||
int updateByExample(@Param("record") PermissionSystemAbility record, @Param("example") PermissionSystemAbilityExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(PermissionSystemAbility record);
|
||||
|
||||
int updateByPrimaryKey(PermissionSystemAbility record);
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package club.joylink.rtss.dao.permission;
|
||||
|
||||
import club.joylink.rtss.entity.permission.SystemAbility;
|
||||
import club.joylink.rtss.entity.permission.SystemAbilityExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface SystemAbilityDAO {
|
||||
long countByExample(SystemAbilityExample example);
|
||||
|
||||
int deleteByExample(SystemAbilityExample example);
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(SystemAbility record);
|
||||
|
||||
int insertSelective(SystemAbility record);
|
||||
|
||||
List<SystemAbility> selectByExample(SystemAbilityExample example);
|
||||
|
||||
SystemAbility selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") SystemAbility record, @Param("example") SystemAbilityExample example);
|
||||
|
||||
int updateByExample(@Param("record") SystemAbility record, @Param("example") SystemAbilityExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(SystemAbility record);
|
||||
|
||||
int updateByPrimaryKey(SystemAbility record);
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package club.joylink.rtss.entity.permission;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class Permission implements Serializable {
|
||||
/**
|
||||
* 权限id,对功能(system_ability)的管理
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 权限名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 权限描述
|
||||
*/
|
||||
private String des;
|
||||
|
||||
/**
|
||||
* 创建者id
|
||||
*/
|
||||
private Long creatorId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,603 @@
|
||||
package club.joylink.rtss.entity.permission;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PermissionExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private Long offset;
|
||||
|
||||
public PermissionExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setOffset(Long offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
public Long getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Long value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Long value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Long value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Long value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Long> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Long> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNull() {
|
||||
addCriterion("`name` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNotNull() {
|
||||
addCriterion("`name` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameEqualTo(String value) {
|
||||
addCriterion("`name` =", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotEqualTo(String value) {
|
||||
addCriterion("`name` <>", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThan(String value) {
|
||||
addCriterion("`name` >", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`name` >=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThan(String value) {
|
||||
addCriterion("`name` <", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("`name` <=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLike(String value) {
|
||||
addCriterion("`name` like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotLike(String value) {
|
||||
addCriterion("`name` not like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIn(List<String> values) {
|
||||
addCriterion("`name` in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotIn(List<String> values) {
|
||||
addCriterion("`name` not in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameBetween(String value1, String value2) {
|
||||
addCriterion("`name` between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotBetween(String value1, String value2) {
|
||||
addCriterion("`name` not between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesIsNull() {
|
||||
addCriterion("des is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesIsNotNull() {
|
||||
addCriterion("des is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesEqualTo(String value) {
|
||||
addCriterion("des =", value, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesNotEqualTo(String value) {
|
||||
addCriterion("des <>", value, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesGreaterThan(String value) {
|
||||
addCriterion("des >", value, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("des >=", value, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesLessThan(String value) {
|
||||
addCriterion("des <", value, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesLessThanOrEqualTo(String value) {
|
||||
addCriterion("des <=", value, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesLike(String value) {
|
||||
addCriterion("des like", value, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesNotLike(String value) {
|
||||
addCriterion("des not like", value, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesIn(List<String> values) {
|
||||
addCriterion("des in", values, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesNotIn(List<String> values) {
|
||||
addCriterion("des not in", values, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesBetween(String value1, String value2) {
|
||||
addCriterion("des between", value1, value2, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesNotBetween(String value1, String value2) {
|
||||
addCriterion("des not between", value1, value2, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdIsNull() {
|
||||
addCriterion("creator_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdIsNotNull() {
|
||||
addCriterion("creator_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdEqualTo(Long value) {
|
||||
addCriterion("creator_id =", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdNotEqualTo(Long value) {
|
||||
addCriterion("creator_id <>", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdGreaterThan(Long value) {
|
||||
addCriterion("creator_id >", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("creator_id >=", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdLessThan(Long value) {
|
||||
addCriterion("creator_id <", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("creator_id <=", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdIn(List<Long> values) {
|
||||
addCriterion("creator_id in", values, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdNotIn(List<Long> values) {
|
||||
addCriterion("creator_id not in", values, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdBetween(Long value1, Long value2) {
|
||||
addCriterion("creator_id between", value1, value2, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("creator_id not between", value1, value2, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(LocalDateTime value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(LocalDateTime value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(LocalDateTime value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(LocalDateTime value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<LocalDateTime> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<LocalDateTime> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNull() {
|
||||
addCriterion("update_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNotNull() {
|
||||
addCriterion("update_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeEqualTo(LocalDateTime value) {
|
||||
addCriterion("update_time =", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) {
|
||||
addCriterion("update_time <>", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThan(LocalDateTime value) {
|
||||
addCriterion("update_time >", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) {
|
||||
addCriterion("update_time >=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThan(LocalDateTime value) {
|
||||
addCriterion("update_time <", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) {
|
||||
addCriterion("update_time <=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIn(List<LocalDateTime> values) {
|
||||
addCriterion("update_time in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotIn(List<LocalDateTime> values) {
|
||||
addCriterion("update_time not in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
addCriterion("update_time between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package club.joylink.rtss.entity.permission;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class PermissionSubject implements Serializable {
|
||||
/**
|
||||
* 权限主体id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 访问权限id
|
||||
*/
|
||||
private Long permissionId;
|
||||
|
||||
/**
|
||||
* 主体类型(User,Org)
|
||||
*/
|
||||
private String subjectType;
|
||||
|
||||
/**
|
||||
* 主体id
|
||||
*/
|
||||
private Long subjectId;
|
||||
|
||||
/**
|
||||
* 主体对该权限的总数量
|
||||
*/
|
||||
private Integer amount;
|
||||
|
||||
/**
|
||||
* 主体对该权限的剩余数量
|
||||
*/
|
||||
private Integer remains;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 是否永久:1-true/0-false
|
||||
*/
|
||||
private Boolean forever;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,903 @@
|
||||
package club.joylink.rtss.entity.permission;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PermissionSubjectExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private Long offset;
|
||||
|
||||
public PermissionSubjectExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setOffset(Long offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
public Long getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Long value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Long value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Long value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Long value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Long> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Long> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdIsNull() {
|
||||
addCriterion("permission_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdIsNotNull() {
|
||||
addCriterion("permission_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdEqualTo(Long value) {
|
||||
addCriterion("permission_id =", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdNotEqualTo(Long value) {
|
||||
addCriterion("permission_id <>", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdGreaterThan(Long value) {
|
||||
addCriterion("permission_id >", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("permission_id >=", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdLessThan(Long value) {
|
||||
addCriterion("permission_id <", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("permission_id <=", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdIn(List<Long> values) {
|
||||
addCriterion("permission_id in", values, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdNotIn(List<Long> values) {
|
||||
addCriterion("permission_id not in", values, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdBetween(Long value1, Long value2) {
|
||||
addCriterion("permission_id between", value1, value2, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("permission_id not between", value1, value2, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectTypeIsNull() {
|
||||
addCriterion("subject_type is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectTypeIsNotNull() {
|
||||
addCriterion("subject_type is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectTypeEqualTo(String value) {
|
||||
addCriterion("subject_type =", value, "subjectType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectTypeNotEqualTo(String value) {
|
||||
addCriterion("subject_type <>", value, "subjectType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectTypeGreaterThan(String value) {
|
||||
addCriterion("subject_type >", value, "subjectType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectTypeGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("subject_type >=", value, "subjectType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectTypeLessThan(String value) {
|
||||
addCriterion("subject_type <", value, "subjectType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectTypeLessThanOrEqualTo(String value) {
|
||||
addCriterion("subject_type <=", value, "subjectType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectTypeLike(String value) {
|
||||
addCriterion("subject_type like", value, "subjectType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectTypeNotLike(String value) {
|
||||
addCriterion("subject_type not like", value, "subjectType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectTypeIn(List<String> values) {
|
||||
addCriterion("subject_type in", values, "subjectType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectTypeNotIn(List<String> values) {
|
||||
addCriterion("subject_type not in", values, "subjectType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectTypeBetween(String value1, String value2) {
|
||||
addCriterion("subject_type between", value1, value2, "subjectType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectTypeNotBetween(String value1, String value2) {
|
||||
addCriterion("subject_type not between", value1, value2, "subjectType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectIdIsNull() {
|
||||
addCriterion("subject_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectIdIsNotNull() {
|
||||
addCriterion("subject_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectIdEqualTo(Long value) {
|
||||
addCriterion("subject_id =", value, "subjectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectIdNotEqualTo(Long value) {
|
||||
addCriterion("subject_id <>", value, "subjectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectIdGreaterThan(Long value) {
|
||||
addCriterion("subject_id >", value, "subjectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("subject_id >=", value, "subjectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectIdLessThan(Long value) {
|
||||
addCriterion("subject_id <", value, "subjectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("subject_id <=", value, "subjectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectIdIn(List<Long> values) {
|
||||
addCriterion("subject_id in", values, "subjectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectIdNotIn(List<Long> values) {
|
||||
addCriterion("subject_id not in", values, "subjectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectIdBetween(Long value1, Long value2) {
|
||||
addCriterion("subject_id between", value1, value2, "subjectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSubjectIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("subject_id not between", value1, value2, "subjectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountIsNull() {
|
||||
addCriterion("amount is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountIsNotNull() {
|
||||
addCriterion("amount is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountEqualTo(Integer value) {
|
||||
addCriterion("amount =", value, "amount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountNotEqualTo(Integer value) {
|
||||
addCriterion("amount <>", value, "amount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountGreaterThan(Integer value) {
|
||||
addCriterion("amount >", value, "amount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("amount >=", value, "amount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountLessThan(Integer value) {
|
||||
addCriterion("amount <", value, "amount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("amount <=", value, "amount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountIn(List<Integer> values) {
|
||||
addCriterion("amount in", values, "amount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountNotIn(List<Integer> values) {
|
||||
addCriterion("amount not in", values, "amount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountBetween(Integer value1, Integer value2) {
|
||||
addCriterion("amount between", value1, value2, "amount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAmountNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("amount not between", value1, value2, "amount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemainsIsNull() {
|
||||
addCriterion("remains is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemainsIsNotNull() {
|
||||
addCriterion("remains is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemainsEqualTo(Integer value) {
|
||||
addCriterion("remains =", value, "remains");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemainsNotEqualTo(Integer value) {
|
||||
addCriterion("remains <>", value, "remains");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemainsGreaterThan(Integer value) {
|
||||
addCriterion("remains >", value, "remains");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemainsGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("remains >=", value, "remains");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemainsLessThan(Integer value) {
|
||||
addCriterion("remains <", value, "remains");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemainsLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("remains <=", value, "remains");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemainsIn(List<Integer> values) {
|
||||
addCriterion("remains in", values, "remains");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemainsNotIn(List<Integer> values) {
|
||||
addCriterion("remains not in", values, "remains");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemainsBetween(Integer value1, Integer value2) {
|
||||
addCriterion("remains between", value1, value2, "remains");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemainsNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("remains not between", value1, value2, "remains");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNull() {
|
||||
addCriterion("`status` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNotNull() {
|
||||
addCriterion("`status` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusEqualTo(String value) {
|
||||
addCriterion("`status` =", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotEqualTo(String value) {
|
||||
addCriterion("`status` <>", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThan(String value) {
|
||||
addCriterion("`status` >", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`status` >=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThan(String value) {
|
||||
addCriterion("`status` <", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(String value) {
|
||||
addCriterion("`status` <=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLike(String value) {
|
||||
addCriterion("`status` like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotLike(String value) {
|
||||
addCriterion("`status` not like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIn(List<String> values) {
|
||||
addCriterion("`status` in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotIn(List<String> values) {
|
||||
addCriterion("`status` not in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusBetween(String value1, String value2) {
|
||||
addCriterion("`status` between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotBetween(String value1, String value2) {
|
||||
addCriterion("`status` not between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andForeverIsNull() {
|
||||
addCriterion("forever is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andForeverIsNotNull() {
|
||||
addCriterion("forever is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andForeverEqualTo(Boolean value) {
|
||||
addCriterion("forever =", value, "forever");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andForeverNotEqualTo(Boolean value) {
|
||||
addCriterion("forever <>", value, "forever");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andForeverGreaterThan(Boolean value) {
|
||||
addCriterion("forever >", value, "forever");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andForeverGreaterThanOrEqualTo(Boolean value) {
|
||||
addCriterion("forever >=", value, "forever");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andForeverLessThan(Boolean value) {
|
||||
addCriterion("forever <", value, "forever");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andForeverLessThanOrEqualTo(Boolean value) {
|
||||
addCriterion("forever <=", value, "forever");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andForeverIn(List<Boolean> values) {
|
||||
addCriterion("forever in", values, "forever");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andForeverNotIn(List<Boolean> values) {
|
||||
addCriterion("forever not in", values, "forever");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andForeverBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("forever between", value1, value2, "forever");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andForeverNotBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("forever not between", value1, value2, "forever");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeIsNull() {
|
||||
addCriterion("start_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeIsNotNull() {
|
||||
addCriterion("start_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeEqualTo(LocalDateTime value) {
|
||||
addCriterion("start_time =", value, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeNotEqualTo(LocalDateTime value) {
|
||||
addCriterion("start_time <>", value, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeGreaterThan(LocalDateTime value) {
|
||||
addCriterion("start_time >", value, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeGreaterThanOrEqualTo(LocalDateTime value) {
|
||||
addCriterion("start_time >=", value, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeLessThan(LocalDateTime value) {
|
||||
addCriterion("start_time <", value, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeLessThanOrEqualTo(LocalDateTime value) {
|
||||
addCriterion("start_time <=", value, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeIn(List<LocalDateTime> values) {
|
||||
addCriterion("start_time in", values, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeNotIn(List<LocalDateTime> values) {
|
||||
addCriterion("start_time not in", values, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
addCriterion("start_time between", value1, value2, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
addCriterion("start_time not between", value1, value2, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEndTimeIsNull() {
|
||||
addCriterion("end_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEndTimeIsNotNull() {
|
||||
addCriterion("end_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEndTimeEqualTo(LocalDateTime value) {
|
||||
addCriterion("end_time =", value, "endTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEndTimeNotEqualTo(LocalDateTime value) {
|
||||
addCriterion("end_time <>", value, "endTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEndTimeGreaterThan(LocalDateTime value) {
|
||||
addCriterion("end_time >", value, "endTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEndTimeGreaterThanOrEqualTo(LocalDateTime value) {
|
||||
addCriterion("end_time >=", value, "endTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEndTimeLessThan(LocalDateTime value) {
|
||||
addCriterion("end_time <", value, "endTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEndTimeLessThanOrEqualTo(LocalDateTime value) {
|
||||
addCriterion("end_time <=", value, "endTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEndTimeIn(List<LocalDateTime> values) {
|
||||
addCriterion("end_time in", values, "endTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEndTimeNotIn(List<LocalDateTime> values) {
|
||||
addCriterion("end_time not in", values, "endTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEndTimeBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
addCriterion("end_time between", value1, value2, "endTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEndTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
addCriterion("end_time not between", value1, value2, "endTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(LocalDateTime value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(LocalDateTime value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(LocalDateTime value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(LocalDateTime value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<LocalDateTime> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<LocalDateTime> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package club.joylink.rtss.entity.permission;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class PermissionSystemAbility implements Serializable {
|
||||
/**
|
||||
* 权限功能关联记录id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 权限id
|
||||
*/
|
||||
private Long permissionId;
|
||||
|
||||
/**
|
||||
* 功能(system_ability)的id
|
||||
*/
|
||||
private Long systemAbilityId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,402 @@
|
||||
package club.joylink.rtss.entity.permission;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PermissionSystemAbilityExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private Long offset;
|
||||
|
||||
public PermissionSystemAbilityExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setOffset(Long offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
public Long getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Long value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Long value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Long value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Long value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Long> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Long> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdIsNull() {
|
||||
addCriterion("permission_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdIsNotNull() {
|
||||
addCriterion("permission_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdEqualTo(Long value) {
|
||||
addCriterion("permission_id =", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdNotEqualTo(Long value) {
|
||||
addCriterion("permission_id <>", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdGreaterThan(Long value) {
|
||||
addCriterion("permission_id >", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("permission_id >=", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdLessThan(Long value) {
|
||||
addCriterion("permission_id <", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("permission_id <=", value, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdIn(List<Long> values) {
|
||||
addCriterion("permission_id in", values, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdNotIn(List<Long> values) {
|
||||
addCriterion("permission_id not in", values, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdBetween(Long value1, Long value2) {
|
||||
addCriterion("permission_id between", value1, value2, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPermissionIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("permission_id not between", value1, value2, "permissionId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemAbilityIdIsNull() {
|
||||
addCriterion("system_ability_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemAbilityIdIsNotNull() {
|
||||
addCriterion("system_ability_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemAbilityIdEqualTo(Long value) {
|
||||
addCriterion("system_ability_id =", value, "systemAbilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemAbilityIdNotEqualTo(Long value) {
|
||||
addCriterion("system_ability_id <>", value, "systemAbilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemAbilityIdGreaterThan(Long value) {
|
||||
addCriterion("system_ability_id >", value, "systemAbilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemAbilityIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("system_ability_id >=", value, "systemAbilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemAbilityIdLessThan(Long value) {
|
||||
addCriterion("system_ability_id <", value, "systemAbilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemAbilityIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("system_ability_id <=", value, "systemAbilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemAbilityIdIn(List<Long> values) {
|
||||
addCriterion("system_ability_id in", values, "systemAbilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemAbilityIdNotIn(List<Long> values) {
|
||||
addCriterion("system_ability_id not in", values, "systemAbilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemAbilityIdBetween(Long value1, Long value2) {
|
||||
addCriterion("system_ability_id between", value1, value2, "systemAbilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemAbilityIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("system_ability_id not between", value1, value2, "systemAbilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package club.joylink.rtss.entity.permission;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class SystemAbility implements Serializable {
|
||||
/**
|
||||
* 系统功能id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 功能的类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 关联的功能的id,由type决定关联表
|
||||
*/
|
||||
private Long abilityId;
|
||||
|
||||
/**
|
||||
* 功能的名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 功能的描述
|
||||
*/
|
||||
private String des;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 创建者id
|
||||
*/
|
||||
private Long creatorId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 跟新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,803 @@
|
||||
package club.joylink.rtss.entity.permission;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SystemAbilityExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private Long offset;
|
||||
|
||||
public SystemAbilityExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setOffset(Long offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
public Long getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(Long value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Long value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Long value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Long value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Long> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Long> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIsNull() {
|
||||
addCriterion("`type` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIsNotNull() {
|
||||
addCriterion("`type` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeEqualTo(String value) {
|
||||
addCriterion("`type` =", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotEqualTo(String value) {
|
||||
addCriterion("`type` <>", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeGreaterThan(String value) {
|
||||
addCriterion("`type` >", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`type` >=", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLessThan(String value) {
|
||||
addCriterion("`type` <", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLessThanOrEqualTo(String value) {
|
||||
addCriterion("`type` <=", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLike(String value) {
|
||||
addCriterion("`type` like", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotLike(String value) {
|
||||
addCriterion("`type` not like", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIn(List<String> values) {
|
||||
addCriterion("`type` in", values, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotIn(List<String> values) {
|
||||
addCriterion("`type` not in", values, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeBetween(String value1, String value2) {
|
||||
addCriterion("`type` between", value1, value2, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotBetween(String value1, String value2) {
|
||||
addCriterion("`type` not between", value1, value2, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAbilityIdIsNull() {
|
||||
addCriterion("ability_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAbilityIdIsNotNull() {
|
||||
addCriterion("ability_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAbilityIdEqualTo(Long value) {
|
||||
addCriterion("ability_id =", value, "abilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAbilityIdNotEqualTo(Long value) {
|
||||
addCriterion("ability_id <>", value, "abilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAbilityIdGreaterThan(Long value) {
|
||||
addCriterion("ability_id >", value, "abilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAbilityIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("ability_id >=", value, "abilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAbilityIdLessThan(Long value) {
|
||||
addCriterion("ability_id <", value, "abilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAbilityIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("ability_id <=", value, "abilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAbilityIdIn(List<Long> values) {
|
||||
addCriterion("ability_id in", values, "abilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAbilityIdNotIn(List<Long> values) {
|
||||
addCriterion("ability_id not in", values, "abilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAbilityIdBetween(Long value1, Long value2) {
|
||||
addCriterion("ability_id between", value1, value2, "abilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAbilityIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("ability_id not between", value1, value2, "abilityId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNull() {
|
||||
addCriterion("`name` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNotNull() {
|
||||
addCriterion("`name` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameEqualTo(String value) {
|
||||
addCriterion("`name` =", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotEqualTo(String value) {
|
||||
addCriterion("`name` <>", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThan(String value) {
|
||||
addCriterion("`name` >", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`name` >=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThan(String value) {
|
||||
addCriterion("`name` <", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("`name` <=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLike(String value) {
|
||||
addCriterion("`name` like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotLike(String value) {
|
||||
addCriterion("`name` not like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIn(List<String> values) {
|
||||
addCriterion("`name` in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotIn(List<String> values) {
|
||||
addCriterion("`name` not in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameBetween(String value1, String value2) {
|
||||
addCriterion("`name` between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotBetween(String value1, String value2) {
|
||||
addCriterion("`name` not between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesIsNull() {
|
||||
addCriterion("des is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesIsNotNull() {
|
||||
addCriterion("des is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesEqualTo(String value) {
|
||||
addCriterion("des =", value, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesNotEqualTo(String value) {
|
||||
addCriterion("des <>", value, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesGreaterThan(String value) {
|
||||
addCriterion("des >", value, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("des >=", value, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesLessThan(String value) {
|
||||
addCriterion("des <", value, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesLessThanOrEqualTo(String value) {
|
||||
addCriterion("des <=", value, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesLike(String value) {
|
||||
addCriterion("des like", value, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesNotLike(String value) {
|
||||
addCriterion("des not like", value, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesIn(List<String> values) {
|
||||
addCriterion("des in", values, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesNotIn(List<String> values) {
|
||||
addCriterion("des not in", values, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesBetween(String value1, String value2) {
|
||||
addCriterion("des between", value1, value2, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDesNotBetween(String value1, String value2) {
|
||||
addCriterion("des not between", value1, value2, "des");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNull() {
|
||||
addCriterion("`status` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNotNull() {
|
||||
addCriterion("`status` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusEqualTo(String value) {
|
||||
addCriterion("`status` =", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotEqualTo(String value) {
|
||||
addCriterion("`status` <>", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThan(String value) {
|
||||
addCriterion("`status` >", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`status` >=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThan(String value) {
|
||||
addCriterion("`status` <", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(String value) {
|
||||
addCriterion("`status` <=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLike(String value) {
|
||||
addCriterion("`status` like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotLike(String value) {
|
||||
addCriterion("`status` not like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIn(List<String> values) {
|
||||
addCriterion("`status` in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotIn(List<String> values) {
|
||||
addCriterion("`status` not in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusBetween(String value1, String value2) {
|
||||
addCriterion("`status` between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotBetween(String value1, String value2) {
|
||||
addCriterion("`status` not between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdIsNull() {
|
||||
addCriterion("creator_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdIsNotNull() {
|
||||
addCriterion("creator_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdEqualTo(Long value) {
|
||||
addCriterion("creator_id =", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdNotEqualTo(Long value) {
|
||||
addCriterion("creator_id <>", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdGreaterThan(Long value) {
|
||||
addCriterion("creator_id >", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("creator_id >=", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdLessThan(Long value) {
|
||||
addCriterion("creator_id <", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("creator_id <=", value, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdIn(List<Long> values) {
|
||||
addCriterion("creator_id in", values, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdNotIn(List<Long> values) {
|
||||
addCriterion("creator_id not in", values, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdBetween(Long value1, Long value2) {
|
||||
addCriterion("creator_id between", value1, value2, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreatorIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("creator_id not between", value1, value2, "creatorId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(LocalDateTime value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(LocalDateTime value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(LocalDateTime value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(LocalDateTime value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<LocalDateTime> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<LocalDateTime> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNull() {
|
||||
addCriterion("update_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIsNotNull() {
|
||||
addCriterion("update_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeEqualTo(LocalDateTime value) {
|
||||
addCriterion("update_time =", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) {
|
||||
addCriterion("update_time <>", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThan(LocalDateTime value) {
|
||||
addCriterion("update_time >", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) {
|
||||
addCriterion("update_time >=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThan(LocalDateTime value) {
|
||||
addCriterion("update_time <", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) {
|
||||
addCriterion("update_time <=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIn(List<LocalDateTime> values) {
|
||||
addCriterion("update_time in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotIn(List<LocalDateTime> values) {
|
||||
addCriterion("update_time not in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
addCriterion("update_time between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -60,16 +60,16 @@ public class Project {
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 是否供前端选择
|
||||
*/
|
||||
private Integer viewShow;
|
||||
|
||||
/**
|
||||
* 后端服务设置
|
||||
*/
|
||||
private String serverSetting;
|
||||
|
||||
/**
|
||||
* 默认组织ID
|
||||
*/
|
||||
private Long defaultOrg;
|
||||
|
||||
@JsonIgnore
|
||||
public static boolean isDefault(String code) {
|
||||
return StringUtils.isEmpty(code) || DEFAULT_PROJECT_LABEL.contains(code);
|
||||
|
@ -61,7 +61,7 @@ public class MinioServiceImpl implements MinioService {
|
||||
criteria.andDirectoryEqualTo(queryVO.getDirectory());
|
||||
}
|
||||
if (!StringUtils.isEmpty(queryVO.getTitle())) {
|
||||
criteria.andTitleLike(queryVO.getTitle());
|
||||
criteria.andTitleLike(String.format("%%%s%%", queryVO.getTitle()));
|
||||
}
|
||||
PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize());
|
||||
Page<MinioFileInfo> minioFileInfoPage = (Page<MinioFileInfo>) this.minioFileInfoDao.selectByExample(example);
|
||||
|
@ -31,7 +31,6 @@ import club.joylink.rtss.util.VoiceFileUtils;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.client.voice.VoiceRecognitionResult;
|
||||
import club.joylink.rtss.vo.client.competition.*;
|
||||
import club.joylink.rtss.vo.client.order.OrderCreateVO;
|
||||
import club.joylink.rtss.vo.client.order.OrderDetailCreateVO;
|
||||
@ -41,6 +40,7 @@ import club.joylink.rtss.vo.client.permission.PermissionVO;
|
||||
import club.joylink.rtss.vo.client.script.ScriptActionVO;
|
||||
import club.joylink.rtss.vo.client.script.ScriptVO;
|
||||
import club.joylink.rtss.vo.client.userPermission.UserPermissionVO;
|
||||
import club.joylink.rtss.vo.client.voice.VoiceRecognitionResult;
|
||||
import club.joylink.rtss.vo.map.MapVO;
|
||||
import club.joylink.rtss.vo.project.ProjectVO;
|
||||
import com.github.pagehelper.Page;
|
||||
|
@ -4,6 +4,7 @@ import club.joylink.rtss.entity.org.OrgProject;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
import club.joylink.rtss.vo.client.org.OrgProjectVO;
|
||||
import club.joylink.rtss.vo.project.ProjectVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -20,7 +21,7 @@ public interface IOrgProjectService {
|
||||
/**
|
||||
* 根据项目获取组织列表
|
||||
*/
|
||||
List<OrgProjectVO> queryOrgProjectListByProjectAndUid(String project, Long uid);
|
||||
List<OrgProjectVO> queryOrgProjectListByProjectAndUid(ProjectVO projectInfo, Long uid);
|
||||
|
||||
/**
|
||||
* 选择登入项目
|
||||
|
@ -79,4 +79,8 @@ public interface IOrgUserService {
|
||||
List<StudentsUsageStatisticsVO> statisticUsage(UsageQueryVO queryVO);
|
||||
|
||||
List<OrgUser> findEntitiesByOrgId(Long orgId);
|
||||
|
||||
PageVO<OrgUserVO> clsTeacherList(Integer clsId, CompanyUserQueryVO companyUserQueryVO);
|
||||
|
||||
void addTeacher(Long clsId, ImportOrgUserVO importVO, AccountVO user);
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
import club.joylink.rtss.vo.client.org.OrgProjectVO;
|
||||
import club.joylink.rtss.vo.project.ProjectVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -46,71 +47,53 @@ public class OrgProjectService implements IOrgProjectService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrgProjectVO> queryOrgProjectListByProjectAndUid(String project, Long uid) {
|
||||
public List<OrgProjectVO> queryOrgProjectListByProjectAndUid(ProjectVO projectInfo, Long uid) {
|
||||
// 查询项目关联顶级组织
|
||||
OrgProjectExample orgProjectExample = new OrgProjectExample();
|
||||
orgProjectExample.createCriteria().andProjectCodeEqualTo(project);
|
||||
List<OrgProject> orgProjectList = orgProjectDao.selectByExample(orgProjectExample);
|
||||
List<OrgProject> orgProjectList = queryOrgProjectList(projectInfo.getValue());
|
||||
if (CollectionUtils.isEmpty(orgProjectList)) {
|
||||
return List.of();
|
||||
throw new SimulationException(SimulationExceptionType.System_Fault, "项目无关联组织");
|
||||
}
|
||||
// 获取人员关联组织
|
||||
OrgUserExample example = new OrgUserExample();
|
||||
example.createCriteria().andUserIdEqualTo(uid);
|
||||
List<OrgUser> orgUserList = orgUserDAO.selectByExample(example);
|
||||
if (CollectionUtils.isEmpty(orgUserList)) {
|
||||
return List.of();
|
||||
List<OrgUser> orgUserList = queryOrgUser(uid);
|
||||
List<Long> orgIdList = null;
|
||||
if (!CollectionUtils.isEmpty(orgUserList)) {
|
||||
// 用户关联组织ID列表
|
||||
List<Long> userOrgIdList = orgUserList.stream().map(OrgUser::getOrgId).distinct().collect(Collectors.toList());
|
||||
List<Org> orgList = queryOrgInfoList(userOrgIdList); // 用户组织信息
|
||||
List<Long> userOrgTopIdList = orgList.stream().map(Org::getRootId).distinct().collect(Collectors.toList());
|
||||
// 有权限的组织ID
|
||||
orgIdList = orgProjectList.stream().filter(orgProject -> userOrgTopIdList.contains(orgProject.getOrgId()))
|
||||
.map(OrgProject::getOrgId).collect(Collectors.toList());
|
||||
}
|
||||
// 用户关联组织ID列表
|
||||
List<Long> orgIdList = orgUserList.stream().map(OrgUser::getOrgId).distinct().collect(Collectors.toList());
|
||||
// 用户关联组织信息
|
||||
OrgExample orgExample = new OrgExample();
|
||||
orgExample.createCriteria().andStatusEqualTo(BusinessConsts.Org.Status.VALID).andIdIn(orgIdList);
|
||||
List<Org> orgList = orgDAO.selectByExample(orgExample);
|
||||
if (CollectionUtils.isEmpty(orgUserList)) {
|
||||
return List.of();
|
||||
if (CollectionUtils.isEmpty(orgIdList)) { // 用户没有分配组织
|
||||
if (projectInfo.getDefaultOrg() != null) { // 存在默认组织
|
||||
orgIdList = List.of(projectInfo.getDefaultOrg());
|
||||
} else { // 没有默认,则获取第一个
|
||||
throw new SimulationException(SimulationExceptionType.System_Fault, "请设置默认组织");
|
||||
}
|
||||
}
|
||||
List<Long> userOrgTopIdList = orgList.stream().map(Org::getRootId).distinct().collect(Collectors.toList());
|
||||
// 有权限的组织ID
|
||||
List<Long> authOrgIdList = orgProjectList.stream().filter(orgProject -> userOrgTopIdList.contains(orgProject.getOrgId()))
|
||||
.map(OrgProject::getOrgId).collect(Collectors.toList());
|
||||
orgExample = new OrgExample();
|
||||
orgExample.createCriteria().andStatusEqualTo(BusinessConsts.Org.Status.VALID).andIdIn(authOrgIdList);
|
||||
orgList = orgDAO.selectByExample(orgExample);
|
||||
List<Org> orgList = queryOrgInfoList(orgIdList);
|
||||
return orgList.stream().map(OrgProjectVO::new).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void signInOrg(Long orgId, LoginUserInfoVO loginInfo) {
|
||||
// 查询项目关联顶级组织
|
||||
OrgProjectExample orgProjectExample = new OrgProjectExample();
|
||||
orgProjectExample.createCriteria().andProjectCodeEqualTo(loginInfo.getProject()).andOrgIdEqualTo(orgId);
|
||||
List<OrgProject> orgProjectList = orgProjectDao.selectByExample(orgProjectExample);
|
||||
if (CollectionUtils.isEmpty(orgProjectList)) {
|
||||
throw new SimulationException(SimulationExceptionType.Illegal_Argument);
|
||||
}
|
||||
OrgExample orgExample = new OrgExample();
|
||||
orgExample.createCriteria().andStatusEqualTo(BusinessConsts.Org.Status.VALID).andRootIdEqualTo(orgId);
|
||||
List<Org> orgList = orgDAO.selectByExample(orgExample);
|
||||
// 没有顶级项目
|
||||
Org topOrg = orgList.stream().filter(o -> o.getId().equals(o.getRootId())).findFirst().orElse(null);
|
||||
// TODO 验证权限
|
||||
|
||||
Org topOrg = orgDAO.selectByPrimaryKey(orgId);
|
||||
if (topOrg == null) {
|
||||
throw new SimulationException(SimulationExceptionType.Illegal_Argument);
|
||||
}
|
||||
List<Long> orgIdList = orgList.stream().map(Org::getId).distinct().collect(Collectors.toList());
|
||||
// 检验用户是否有组织信息
|
||||
OrgUserExample example = new OrgUserExample();
|
||||
example.createCriteria().andUserIdEqualTo(loginInfo.getAccountVO().getId()).andOrgIdIn(orgIdList);
|
||||
List<OrgUser> orgUserList = orgUserDAO.selectByExample(example);
|
||||
if (CollectionUtils.isEmpty(orgUserList)) {
|
||||
throw new SimulationException(SimulationExceptionType.Illegal_Argument);
|
||||
}
|
||||
// 是否是顶级组织的管理员
|
||||
OrgUser orgUser = orgUserList.stream().filter(o -> loginInfo.getAccountVO().getId().longValue() == o.getUserId().longValue()
|
||||
&& o.getOrgId().longValue() == orgId.longValue()).findFirst().orElse(null);
|
||||
OrgUserExample example = new OrgUserExample();
|
||||
example.createCriteria().andUserIdEqualTo(loginInfo.getAccountVO().getId()).andOrgIdEqualTo(orgId);
|
||||
List<OrgUser> orgUserList = orgUserDAO.selectByExample(example);
|
||||
OrgProjectVO orgProjectVO = new OrgProjectVO(topOrg);
|
||||
if (orgUser != null) {
|
||||
orgProjectVO.setRole(orgUser.getRole());
|
||||
if (!CollectionUtils.isEmpty(orgUserList)) {
|
||||
List<String> roleList = orgUserList.stream().map(OrgUser::getRole).collect(Collectors.toList());
|
||||
orgProjectVO.setRole(roleList);
|
||||
} else {
|
||||
orgProjectVO.setRole(List.of());
|
||||
}
|
||||
loginInfo.setOrgProjectVO(orgProjectVO);
|
||||
}
|
||||
@ -171,4 +154,31 @@ public class OrgProjectService implements IOrgProjectService {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据项目编码获取组织与项目的关联信息
|
||||
*/
|
||||
private List<OrgProject> queryOrgProjectList(String projectCode) {
|
||||
OrgProjectExample orgProjectExample = new OrgProjectExample();
|
||||
orgProjectExample.createCriteria().andProjectCodeEqualTo(projectCode);
|
||||
return orgProjectDao.selectByExample(orgProjectExample);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID获取组织与用户的信息
|
||||
*/
|
||||
private List<OrgUser> queryOrgUser(Long uid) {
|
||||
OrgUserExample example = new OrgUserExample();
|
||||
example.createCriteria().andUserIdEqualTo(uid);
|
||||
return orgUserDAO.selectByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据组织ID获取组织信息
|
||||
*/
|
||||
private List<Org> queryOrgInfoList(List<Long> orgIdList) {
|
||||
OrgExample orgExample = new OrgExample();
|
||||
orgExample.createCriteria().andStatusEqualTo(BusinessConsts.Org.Status.VALID).andIdIn(orgIdList);
|
||||
return orgDAO.selectByExample(orgExample);
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,8 @@ import club.joylink.rtss.services.ISysUserService;
|
||||
import club.joylink.rtss.services.IUserUsageStatsService;
|
||||
import club.joylink.rtss.services.completition.IRaceQuestionsRuleService;
|
||||
import club.joylink.rtss.services.user.IUserSimulationStatService;
|
||||
import club.joylink.rtss.simulation.cbtc.exception.SimulationException;
|
||||
import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.client.LessonVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
@ -431,6 +433,29 @@ public class OrgUserService implements IOrgUserService {
|
||||
return orgUsers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageVO<OrgUserVO> clsTeacherList(Integer clsId, CompanyUserQueryVO companyUserQueryVO) {
|
||||
//根据部门id查询部门成员
|
||||
companyUserQueryVO.setDepartmentId(clsId);
|
||||
companyUserQueryVO.setOrgRole(BusinessConsts.OrgRole.Teacher);
|
||||
PageHelper.startPage(companyUserQueryVO.getPageNum(), companyUserQueryVO.getPageSize());
|
||||
Page<OrgUserVO> page = (Page<OrgUserVO>) orgUserDAO.getCompanyDepartUsers(companyUserQueryVO);
|
||||
return PageVO.convert(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTeacher(Long clsId, ImportOrgUserVO importVO, AccountVO user) {
|
||||
Org cls = iOrgService.getEntity(clsId);
|
||||
Org topOrg = iOrgService.getEntity(cls.getRootId());
|
||||
if (topOrg == null) {
|
||||
throw new SimulationException(SimulationExceptionType.System_Fault, "无顶级组织");
|
||||
}
|
||||
confirmIsTheRoleInThisOrg(user.getId(), cls.getRootId(), BusinessConsts.OrgRole.Admin);
|
||||
Set<Long> teacherIdSet = findEntitiesByOrgId(clsId, BusinessConsts.OrgRole.Teacher)
|
||||
.stream().map(OrgUser::getUserId).collect(Collectors.toSet());
|
||||
this.importOrgTeacher(cls.getId(), teacherIdSet, importVO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导入组织用户
|
||||
@ -453,4 +478,20 @@ public class OrgUserService implements IOrgUserService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入老师信息
|
||||
*/
|
||||
private void importOrgTeacher(Long orgId, Set<Long> orgUserIdSet, ImportOrgUserVO importOrgUser) {
|
||||
AccountVO user = iSysUserService.queryUserByAccount(importOrgUser.getAccount());
|
||||
Long userId = null;
|
||||
if (user == null) {
|
||||
SysAccount account = importOrgUser.convert2DB();
|
||||
iSysUserService.createUser(account);
|
||||
userId = account.getId();
|
||||
}
|
||||
if (!orgUserIdSet.contains(userId)) {
|
||||
create(orgId, userId, BusinessConsts.OrgRole.Teacher);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.lang.reflect.Method;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@ -38,8 +39,8 @@ public class PagerQuestionService {
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
* @param queryVO
|
||||
* @param isPaging
|
||||
* @param queryVO
|
||||
* @param isPaging 是否分页
|
||||
* @param companyIdCanNull 是否允许公司组织id可以为空,true=管理使用,false = 组织使用
|
||||
* @return
|
||||
*/
|
||||
@ -61,6 +62,36 @@ public class PagerQuestionService {
|
||||
|
||||
if(Objects.nonNull(queryVO.getOrgId())){
|
||||
criteria.andOrgIdEqualTo(queryVO.getOrgId());
|
||||
|
||||
}
|
||||
|
||||
if(Objects.nonNull(queryVO.getLabels())){
|
||||
|
||||
// PaperQuestionExample.Criteria criteria2 = example.createCriteria();
|
||||
// example.getOredCriteria().add(criteria2);
|
||||
List<String> tmpLableList = Splitter.on(",").omitEmptyStrings().splitToList(queryVO.getLabels());
|
||||
if(Objects.equals(false,CollectionUtils.isEmpty(tmpLableList))){
|
||||
StringBuilder sqlBuilder = new StringBuilder("(");
|
||||
for(var i = 0 ; i < tmpLableList.size();i++){
|
||||
String data = tmpLableList.get(i);
|
||||
if(i != 0){
|
||||
sqlBuilder.append(" or ");
|
||||
}
|
||||
sqlBuilder.append(String.format(" find_in_set('%s',tags) > 0 ",data));
|
||||
}
|
||||
sqlBuilder.append(")");
|
||||
Class<?> criteriaCls = PaperQuestionExample.Criteria.class;
|
||||
Class<?> generatedCriteriaCls = criteriaCls.getSuperclass();
|
||||
try{
|
||||
Method addCriterion = generatedCriteriaCls.getDeclaredMethod("addCriterion", String.class);
|
||||
addCriterion.setAccessible(true);
|
||||
addCriterion.invoke(criteria, sqlBuilder.toString());
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
criteria.andIsDelEqualTo(BusinessConsts.DBLogicDelete.NORMAL.ordinal());
|
||||
return questionDAO.selectByExampleWithBLOBs(example);
|
||||
@ -68,7 +99,8 @@ public class PagerQuestionService {
|
||||
|
||||
/**
|
||||
* 获取题库分页列表
|
||||
* @param queryVO
|
||||
* @param queryVO
|
||||
* @param companyIdCanNull
|
||||
* @return
|
||||
*/
|
||||
public PageVO<PaperQuestionVO> pagingQueryQuestions(QuestionQueryVO queryVO,boolean companyIdCanNull) {
|
||||
@ -80,7 +112,8 @@ public class PagerQuestionService {
|
||||
|
||||
/**
|
||||
* 获取题型列表
|
||||
* @param queryVO
|
||||
* @param queryVO
|
||||
* @param companyIdCanNull
|
||||
* @return
|
||||
*/
|
||||
public List<PaperQuestionVO> queryQuestions(QuestionQueryVO queryVO,boolean companyIdCanNull) {
|
||||
@ -92,11 +125,11 @@ public class PagerQuestionService {
|
||||
|
||||
/**
|
||||
* 获取题型所有数据
|
||||
* @param questionId
|
||||
* @param questionId
|
||||
* @param doNotCheckDel 是否检测数据状态是否删除 true = 不检测,false=检测
|
||||
* @return
|
||||
*/
|
||||
public PaperQuestionVO getQuestion(Long questionId,boolean doNotCheckDel) {
|
||||
public PaperQuestionVO getQuestion(Long questionId,boolean doNotCheckDel,boolean random) {
|
||||
PaperQuestionWithBLOBs question = questionDAO.selectByPrimaryKey(questionId);
|
||||
boolean isDel = Objects.nonNull(question) || question.getIsDel() == BusinessConsts.DBLogicDelete.NORMAL.ordinal();
|
||||
if(doNotCheckDel){
|
||||
@ -104,6 +137,9 @@ public class PagerQuestionService {
|
||||
}
|
||||
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(isDel);
|
||||
PaperQuestionVO questionVO = new PaperQuestionVO(question);
|
||||
if(random){
|
||||
Collections.shuffle(questionVO.getOptionList());
|
||||
}
|
||||
return questionVO;
|
||||
}
|
||||
|
||||
@ -115,27 +151,20 @@ public class PagerQuestionService {
|
||||
*/
|
||||
public boolean answer(Long questionId,List<Integer> answerIds){
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(!CollectionUtils.isEmpty(answerIds),"题目答案不能为空");
|
||||
PaperQuestionVO vo = this.getQuestion(questionId,true);
|
||||
PaperQuestionVO vo = this.getQuestion(questionId,true,false);
|
||||
List<Integer> newAnswerList = answerIds.stream().filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
||||
if(Objects.equals(BusinessConsts.TheoryType.select.name(),vo.getType())
|
||||
/* if(Objects.equals(BusinessConsts.TheoryType.select.name(),vo.getType())
|
||||
|| Objects.equals(BusinessConsts.TheoryType.judge.name(),vo.getType())){
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(newAnswerList.size() == 1 ,"单选,判断题答案只能有一个!");
|
||||
}else if(Objects.equals(BusinessConsts.TheoryType.multi.name(),vo.getType())){
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(newAnswerList.size() > 2 ,"多选题答案最少需要2个");
|
||||
}
|
||||
// List<Integer> sourceOptionList = Lists.newArrayList();
|
||||
// sourceOptionList.addAll(optionList);
|
||||
// optionList.removeAll(newAnswerList);
|
||||
// if(CollectionUtils.isEmpty(optionList)){
|
||||
// return true;
|
||||
// }
|
||||
Collections.sort(answerIds);
|
||||
String answerStr = Joiner.on(",").skipNulls().join(answerIds);
|
||||
if(Objects.equals(answerStr,vo.getQuestionAnswer())){
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(newAnswerList.size() >= 2 ,"多选题答案最少需要2个");
|
||||
}*/
|
||||
Collections.sort(newAnswerList);
|
||||
String answerStr = Joiner.on(",").skipNulls().join(newAnswerList);
|
||||
if(Objects.equals(answerStr,vo.getAnswer())){
|
||||
return true;
|
||||
}
|
||||
log.info("检查题目[{}]答案,获取原答案[{}],正确答案[{}] ",questionId, answerStr,vo.getQuestionAnswer());
|
||||
// log.info("检查题目[{}]答案,获取原答案[{}],正确答案[{}] 有[{}]没有答对",questionId, Joiner.on(",").join(answerIds),Joiner.on(",").join(sourceOptionList),Joiner.on(",").join(optionList));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -145,7 +174,7 @@ public class PagerQuestionService {
|
||||
*
|
||||
*/
|
||||
public Collection<String> findAllLable(Long companyId){
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.isNull(companyId),"组织id不能为空");
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(companyId),"组织id不能为空");
|
||||
PaperQuestionExample example = new PaperQuestionExample();
|
||||
PaperQuestionExample.Criteria criteria = example.createCriteria();
|
||||
/*boolean isDefault = Project.isDefault(projectCode);
|
||||
@ -166,8 +195,8 @@ public class PagerQuestionService {
|
||||
|
||||
/**
|
||||
* 根据公司id和标签或类型查询
|
||||
* @param companyId
|
||||
* @param queryVO
|
||||
* @param companyId
|
||||
* @param queryVO
|
||||
* @return
|
||||
*/
|
||||
public List<PaperQuestionVO> queryQuestionsForRaceLable(Long companyId, PagerLableQueryVO queryVO) {
|
||||
@ -176,7 +205,7 @@ public class PagerQuestionService {
|
||||
if(Objects.equals(false,isDefault)){
|
||||
idList = this.queryFromProjectCode(projectCode);
|
||||
}*/
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.isNull(companyId),"组织id不能为空");
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(companyId),"组织id不能为空");
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(queryVO.allNotNullOrEmpty(),"查询内容不能为空");
|
||||
int isDel = BusinessConsts.DBLogicDelete.NORMAL.ordinal();
|
||||
List<PaperQuestionWithBLOBs> list = this.questionDAO.findFromAndRaceLable(companyId,isDel,queryVO.getLables(),queryVO.getTypes());
|
||||
@ -185,11 +214,11 @@ public class PagerQuestionService {
|
||||
}
|
||||
/**
|
||||
* 添加修改
|
||||
* @param questionVO
|
||||
* @param accountVO
|
||||
* @param questionVO
|
||||
* @param accountVO
|
||||
*/
|
||||
public void saveOrUpdate(PaperQuestionVO questionVO, AccountVO accountVO) {
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.isNull(questionVO.getOrgId()),"组织id不能为空");
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(questionVO.getOrgId()),"组织id不能为空");
|
||||
this.checkQuestionType(questionVO,"题库目前只支持单选,多选和判断");
|
||||
if (questionVO.isSelect() || questionVO.isJudge()) {
|
||||
this.checkQuestionTypeForSelectAndJudge(questionVO,"单选或判断题正确答案有且只有一个!");
|
||||
@ -209,7 +238,7 @@ public class PagerQuestionService {
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertNotTrue(true,
|
||||
"未找到要修改的数据!");
|
||||
}
|
||||
questionDAO.updateByPrimaryKey(question);
|
||||
questionDAO.updateByPrimaryKeyWithBLOBs(question);
|
||||
}else{
|
||||
questionDAO.insert(question);
|
||||
}
|
||||
@ -229,12 +258,12 @@ public class PagerQuestionService {
|
||||
|
||||
private void checkQuestionTypeForMulti(PaperQuestionVO vo,String errStr){
|
||||
long answerCount = vo.getOptionList().stream().filter(PaperQuestionOptionVO2::getCorrect).count();
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(answerCount > 2,errStr);
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(answerCount >= 2,errStr);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void importProjectQuestion(List<PaperQuestionVO> questions, Long companyId, AccountVO accountVO) {
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.isNull(companyId),"组织id不能为空");
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(companyId),"组织id不能为空");
|
||||
questions.forEach(questionVO -> {
|
||||
String topic = questionVO.getTopic();
|
||||
this.checkQuestionType(questionVO,String.format("题库目前只支持单选,多选和判断,题序[%s]",questionVO.getId()));
|
||||
|
@ -14,6 +14,7 @@ import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.paper.*;
|
||||
import club.joylink.rtss.vo.paper.convertor.PaperCompositionConvertor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -27,6 +28,7 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* 试卷蓝图业务
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class PaperCompositionService {
|
||||
@Autowired
|
||||
@ -49,6 +51,10 @@ public class PaperCompositionService {
|
||||
newPc.setName(req.getName());
|
||||
newPc.setOrgId(req.getOrgId());
|
||||
newPc.setProfile(req.getProfile());
|
||||
newPc.setStartTime(req.getStartTime());
|
||||
newPc.setEndTime(req.getEndTime());
|
||||
newPc.setValidDuration(req.getValidDuration());
|
||||
newPc.setPassScore(req.getPassScore());
|
||||
newPc.setCreateTime(LocalDateTime.now());
|
||||
newPc.setUpdateTime(LocalDateTime.now());
|
||||
newPc.setCreatorId(user.getId());
|
||||
@ -87,6 +93,10 @@ public class PaperCompositionService {
|
||||
curPc.setProfile(req.getProfile());
|
||||
curPc.setOrgId(req.getOrgId());
|
||||
curPc.setUpdateTime(LocalDateTime.now());
|
||||
curPc.setStartTime(req.getStartTime());
|
||||
curPc.setEndTime(req.getEndTime());
|
||||
curPc.setValidDuration(req.getValidDuration());
|
||||
curPc.setPassScore(req.getPassScore());
|
||||
compositionDAO.updateByPrimaryKeySelective(curPc);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,239 @@
|
||||
package club.joylink.rtss.services.permission;
|
||||
|
||||
import club.joylink.rtss.dao.permission.AcPermissionDAO;
|
||||
import club.joylink.rtss.dao.permission.PermissionSystemAbilityDAO;
|
||||
import club.joylink.rtss.dao.permission.SystemAbilityDAO;
|
||||
import club.joylink.rtss.entity.permission.*;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.permission.*;
|
||||
import club.joylink.rtss.vo.permission.convertor.PermissionConvertor;
|
||||
import club.joylink.rtss.vo.permission.convertor.SystemAbilityConvertor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class AcPermissionService {
|
||||
@Autowired
|
||||
private AcPermissionDAO permissionDAO;
|
||||
@Autowired
|
||||
private SystemAbilityDAO abilityDAO;
|
||||
@Autowired
|
||||
private PermissionSystemAbilityDAO permissionSystemAbilityDAO;
|
||||
|
||||
/**
|
||||
* 创建权限
|
||||
*
|
||||
* @return 如果创建成功,则返回权限id
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String createPermission(CreatePermissionReqVo req, AccountVO user) {
|
||||
final String name = req.getName();
|
||||
final String des = req.getDes();
|
||||
//参数校验
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(null != name && name.trim().length() > 0, "权限名称不能为空");
|
||||
//不存在同名
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(null == findByName(name), String.format("权限[name = %s]已经存在", name));
|
||||
//
|
||||
Permission permission = new Permission();
|
||||
permission.setName(name);
|
||||
permission.setName(des);
|
||||
permission.setCreatorId(user.getId());
|
||||
permission.setCreateTime(LocalDateTime.now());
|
||||
permission.setUpdateTime(LocalDateTime.now());
|
||||
permissionDAO.insertSelective(permission);
|
||||
//
|
||||
Permission find = findByName(name);
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(null != find, String.format("创建权限[name = %s]失败", name));
|
||||
return String.valueOf(find.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改权限基础信息(名称和描述)
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updatePermissionBasic(UpdatePermissionBasicReqVo req) {
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(null != req.getName() || null != req.getDes(), "权限名称和描述不能同时为空");
|
||||
//
|
||||
final Permission idFind = permissionDAO.selectByPrimaryKey(req.getId());
|
||||
//
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(null != idFind, String.format("权限[id = %s]不存在", req.getId()));
|
||||
//
|
||||
Permission update = new Permission();
|
||||
update.setId(idFind.getId());
|
||||
if (null != req.getName()) {
|
||||
final Permission nameFind = findByName(req.getName());
|
||||
if (null != nameFind) {
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(nameFind.getId().compareTo(idFind.getId()) == 0, String.format("权限[name = %s]已经存在", req.getName()));
|
||||
}
|
||||
update.setName(req.getName());
|
||||
}
|
||||
if (null != req.getDes()) {
|
||||
update.setDes(req.getDes());
|
||||
}
|
||||
update.setUpdateTime(LocalDateTime.now());
|
||||
//
|
||||
permissionDAO.updateByPrimaryKeySelective(update);
|
||||
}
|
||||
|
||||
/**
|
||||
* 给权限添加功能
|
||||
*
|
||||
* @param permissionId 权限id
|
||||
* @param abilityId 权限功能id,即system_ability.id
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void addAbilityToPermission(Long permissionId, Long abilityId) {
|
||||
final Permission idFindPermission = permissionDAO.selectByPrimaryKey(permissionId);
|
||||
final SystemAbility idFindAbility = abilityDAO.selectByPrimaryKey(abilityId);
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(null != idFindPermission, String.format("权限[id = %s]不存在", permissionId));
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(null != idFindAbility, String.format("权限系统功能[id = %s]不存在", abilityId));
|
||||
//
|
||||
PermissionSystemAbilityExample psaExample = new PermissionSystemAbilityExample();
|
||||
psaExample.createCriteria().andPermissionIdEqualTo(permissionId).andSystemAbilityIdEqualTo(abilityId);
|
||||
List<PermissionSystemAbility> psaFind = permissionSystemAbilityDAO.selectByExample(psaExample);
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(CollectionUtils.isEmpty(psaFind), String.format("权限[id = %s]已经包含功能[id = %s]", permissionId, abilityId));
|
||||
//
|
||||
PermissionSystemAbility permissionAddAbility = new PermissionSystemAbility();
|
||||
permissionAddAbility.setPermissionId(permissionId);
|
||||
permissionAddAbility.setSystemAbilityId(abilityId);
|
||||
//
|
||||
permissionSystemAbilityDAO.insertSelective(permissionAddAbility);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取权限的所有功能
|
||||
*
|
||||
* @param permissionId 权限id
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
public List<PermissionAbilityRspVo> findPermissionAbilities(Long permissionId) {
|
||||
return this.findAbilitiesByPermissionId(permissionId).stream().map(SystemAbilityConvertor::convertPermissionAbilityRspVoFrom).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除权限的功能,删除桥接表记录
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteAbilities(PermissionAbilityDeletedReqVo req) {
|
||||
PermissionSystemAbilityExample example = new PermissionSystemAbilityExample();
|
||||
example.createCriteria().andPermissionIdEqualTo(req.getPermissionId()).andSystemAbilityIdIn(req.getDeleteAbilityIds());
|
||||
this.permissionSystemAbilityDAO.deleteByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一个权限的完整信息
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
public WholePermissionRspVo findWholePermission(Long permissionId) {
|
||||
Permission permission = this.permissionDAO.selectByPrimaryKey(permissionId);
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(null != permission, String.format("权限[id = %s]不存在", permissionId));
|
||||
List<SystemAbility> abilityList = findAbilitiesByPermissionId(permissionId);
|
||||
return PermissionConvertor.convertWholePermissionRspVoFrom(permission, abilityList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页获取权限
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
public PageVO<PermissionBasicRspVo> findByPage(FindPermissionBasicByPageReqVo req) {
|
||||
//查询条件
|
||||
final boolean hasCondition = null != req.getName() || null != req.getDes();
|
||||
final boolean multiConditions = null != req.getName() && null != req.getDes();
|
||||
//多个条件与、一个条件默认按与处理
|
||||
final boolean makeAnd = hasCondition && (multiConditions && req.getLogicAnd() || !multiConditions);
|
||||
//多个条件或
|
||||
final boolean makeOr = multiConditions && !req.getLogicAnd();
|
||||
//
|
||||
PermissionExample permissionExample = new PermissionExample();
|
||||
if (makeAnd) {
|
||||
PermissionExample.Criteria pc = permissionExample.createCriteria();
|
||||
if (null != req.getName()) {
|
||||
if (req.getNameLike()) {
|
||||
pc.andNameLike(String.format("%%%s%%", req.getName()));
|
||||
} else {
|
||||
pc.andNameEqualTo(req.getName());
|
||||
}
|
||||
}
|
||||
if (null != req.getDes()) {
|
||||
if (req.getDesLike()) {
|
||||
pc.andDesLike(String.format("%%%s%%", req.getDes()));
|
||||
} else {
|
||||
pc.andDesEqualTo(req.getDes());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (makeOr) {
|
||||
PermissionExample.Criteria nc = permissionExample.or();
|
||||
if (req.getNameLike()) {
|
||||
nc.andNameLike(String.format("%%%s%%", req.getName()));
|
||||
} else {
|
||||
nc.andNameEqualTo(req.getName());
|
||||
}
|
||||
PermissionExample.Criteria dc = permissionExample.or();
|
||||
if (req.getDesLike()) {
|
||||
dc.andDesLike(String.format("%%%s%%", req.getDes()));
|
||||
} else {
|
||||
dc.andDesEqualTo(req.getDes());
|
||||
}
|
||||
}
|
||||
//
|
||||
PageVO<PermissionBasicRspVo> page = new PageVO<>();
|
||||
long sum = this.permissionDAO.countByExample(permissionExample);
|
||||
page.setTotal(sum);
|
||||
page.setPageNum(req.getPageNum());
|
||||
page.setPageSize(req.getPageSize());
|
||||
page.setList(new ArrayList<>());
|
||||
if (sum > 0) {
|
||||
//
|
||||
String orderBy = req.getOrderByType().with();
|
||||
long startIndex = (req.getPageNum() - 1) * req.getPageSize();
|
||||
//
|
||||
if (req.getDesc()) {
|
||||
permissionExample.setOrderByClause(String.format("%s desc limit %s,%s", orderBy, startIndex, req.getPageSize()));
|
||||
} else {
|
||||
permissionExample.setOrderByClause(String.format("%s limit %s,%s", orderBy, startIndex, req.getPageSize()));
|
||||
}
|
||||
List<Permission> pContent = this.permissionDAO.selectByExample(permissionExample);
|
||||
if (!CollectionUtils.isEmpty(pContent)) {
|
||||
page.setList(pContent.stream().map(PermissionConvertor::convertPermissionBasicRspVoFrom).collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
return page;
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
private List<SystemAbility> findAbilitiesByPermissionId(Long permissionId) {
|
||||
PermissionSystemAbilityExample psaExample = new PermissionSystemAbilityExample();
|
||||
psaExample.createCriteria().andPermissionIdEqualTo(permissionId);
|
||||
List<PermissionSystemAbility> psaFind = permissionSystemAbilityDAO.selectByExample(psaExample);
|
||||
if (!CollectionUtils.isEmpty(psaFind)) {
|
||||
List<Long> abilityIds = psaFind.stream().map(PermissionSystemAbility::getSystemAbilityId).collect(Collectors.toList());
|
||||
SystemAbilityExample abilityExample = new SystemAbilityExample();
|
||||
abilityExample.createCriteria().andAbilityIdIn(abilityIds);
|
||||
List<SystemAbility> abilityList = abilityDAO.selectByExample(abilityExample);
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(abilityList.size() == abilityIds.size(), String.format("权限[id = %s]包含的功能的实体有些已经不存在", permissionId));
|
||||
return abilityList;
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
private Permission findByName(String name) {
|
||||
PermissionExample example = new PermissionExample();
|
||||
example.createCriteria().andNameEqualTo(name);
|
||||
List<Permission> ps = permissionDAO.selectByExample(example);
|
||||
if (!CollectionUtils.isEmpty(ps)) {
|
||||
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(ps.size() == 1, String.format("权限[name = %s]不唯一", name));
|
||||
return ps.get(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,146 @@
|
||||
package club.joylink.rtss.services.permission;
|
||||
|
||||
import club.joylink.rtss.dao.permission.PermissionSystemAbilityDAO;
|
||||
import club.joylink.rtss.dao.permission.SystemAbilityDAO;
|
||||
import club.joylink.rtss.entity.permission.PermissionSystemAbility;
|
||||
import club.joylink.rtss.entity.permission.PermissionSystemAbilityExample;
|
||||
import club.joylink.rtss.entity.permission.SystemAbility;
|
||||
import club.joylink.rtss.entity.permission.SystemAbilityExample;
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.permission.*;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static club.joylink.rtss.vo.permission.SystemAbilityStatus.Editing;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SystemAbilityService {
|
||||
@Resource
|
||||
private SystemAbilityDAO systemAbilityDAO;
|
||||
@Resource
|
||||
private PermissionSystemAbilityDAO permissionSystemAbilityDAO;
|
||||
|
||||
|
||||
public SystemAbility findById(Long id){
|
||||
SystemAbility dbSa = this.systemAbilityDAO.selectByPrimaryKey(id);
|
||||
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(dbSa),"没有找到对应的权限数据");
|
||||
return dbSa;
|
||||
}
|
||||
|
||||
private void checkSameName(String name){
|
||||
SystemAbilityExample example = new SystemAbilityExample();
|
||||
SystemAbilityExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andNameEqualTo(name);
|
||||
Long counts = this.systemAbilityDAO.countByExample(example);
|
||||
BusinessExceptionAssertEnum.NAME_REPEAT.assertTrue(counts <= 0L,"重复的权限名称");
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加修改功能的基础数据
|
||||
* @param vo
|
||||
* @param userInfoVO
|
||||
*/
|
||||
public void saveOrUpdateBasicAbility(BasicSystemAbilityVo vo, LoginUserInfoVO userInfoVO){
|
||||
SystemAbility tmpSa = vo.toSystemAbility();
|
||||
tmpSa.setCreatorId(userInfoVO.getAccountVO().getId());
|
||||
tmpSa.setCreateTime(LocalDateTime.now());
|
||||
tmpSa.setUpdateTime(LocalDateTime.now());
|
||||
if(Objects.nonNull(vo.getId())){
|
||||
SystemAbility dbSa = this.findById(vo.getId());
|
||||
if(Objects.equals(false,Objects.equals(vo.getName(),dbSa.getName()))){
|
||||
this.checkSameName(vo.getName());
|
||||
}
|
||||
tmpSa.setCreateTime(dbSa.getCreateTime());
|
||||
tmpSa.setUpdateTime(LocalDateTime.now());
|
||||
this.systemAbilityDAO.updateByPrimaryKeySelective(tmpSa);
|
||||
}else{
|
||||
this.checkSameName(vo.getName());
|
||||
tmpSa.setStatus(Editing.name());
|
||||
this.systemAbilityDAO.insert(tmpSa);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新类型及对应的类型id
|
||||
* @param vo
|
||||
*/
|
||||
public void updateTypeAndFunc(UpdateAbilityFunctionReqVo vo){
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(vo.getId()),"数据id不能为空");
|
||||
SystemAbility dbSA = this.findById(vo.getId());
|
||||
dbSA.setType(vo.getType().name());
|
||||
dbSA.setAbilityId(vo.getFunctionId());
|
||||
dbSA.setUpdateTime(LocalDateTime.now());
|
||||
this.systemAbilityDAO.updateByPrimaryKeySelective(dbSA);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param reqVo
|
||||
*/
|
||||
public void remove(DeleteAbilitiesReqVo reqVo){
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(CollectionUtils.isEmpty(reqVo.getIds()),"删除数据的id不能为空");
|
||||
List<Long> newIds = reqVo.getIds().stream().distinct().collect(Collectors.toList());
|
||||
|
||||
PermissionSystemAbilityExample pe = new PermissionSystemAbilityExample();
|
||||
pe.createCriteria().andSystemAbilityIdIn(newIds);
|
||||
List<PermissionSystemAbility> psaList = this.permissionSystemAbilityDAO.selectByExample(pe);
|
||||
Map<Long,List<PermissionSystemAbility>> psaMapList = psaList.stream()
|
||||
.collect(Collectors.groupingBy(PermissionSystemAbility::getSystemAbilityId));
|
||||
newIds.stream().forEach(psaMapList::remove);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
psaMapList.forEach((k,v)->{
|
||||
sb.append(String.format("id=%s有绑定的权限数量=%s,不能删除",k,v.size()));
|
||||
});
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(psaMapList.isEmpty(),sb.toString());
|
||||
|
||||
|
||||
|
||||
SystemAbilityExample example = new SystemAbilityExample();
|
||||
SystemAbilityExample.Criteria criteria = example.createCriteria();
|
||||
criteria.andIdIn(newIds);
|
||||
this.systemAbilityDAO.deleteByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找对应的数据
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public SystemAbilityRspVo findVO(Long id){
|
||||
SystemAbility sa = this.findById(id);
|
||||
return SystemAbilityRspVo.toVO(sa);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param filterVO
|
||||
* @return
|
||||
*/
|
||||
public PageVO<SystemAbilityRspVo> findByPage(FindAbilityBasicByPageReqVo filterVO){
|
||||
PageHelper.startPage(filterVO.getPageNum(),filterVO.getPageSize());
|
||||
SystemAbilityExample example = new SystemAbilityExample();
|
||||
SystemAbilityExample.Criteria criteria = example.createCriteria();
|
||||
example.setOrderByClause(" id desc ");
|
||||
if(Objects.equals(false,filterVO.getDesc())){
|
||||
example.setOrderByClause(" id asc ");
|
||||
}
|
||||
Page<SystemAbility> page = (Page<SystemAbility>) this.systemAbilityDAO.selectByExample(example);
|
||||
List<SystemAbilityRspVo> questionVOS = SystemAbilityRspVo.convert2VOList(page.getResult());
|
||||
return PageVO.convert(page, questionVOS);
|
||||
}
|
||||
|
||||
}
|
@ -278,7 +278,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
private ProjectDevice getEntityById(long id) {
|
||||
return projectDeviceDAO.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
|
||||
private void check(ProjectDevice entity, ProjectDeviceVO projectDeviceVO) {
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertEquals(entity.getProjectCode(), projectDeviceVO.getProject());
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertEquals(entity.getCode(), projectDeviceVO.getCode());
|
||||
|
@ -2,11 +2,10 @@ package club.joylink.rtss.services.project;
|
||||
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.entity.project.ProjectView;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.project.ProjectQueryVO;
|
||||
import club.joylink.rtss.vo.project.ProjectVO;
|
||||
import club.joylink.rtss.vo.project.ProjectViewQueryVO;
|
||||
import club.joylink.rtss.vo.project.ProjectViewVO;
|
||||
import club.joylink.rtss.vo.client.org.CompanyVO;
|
||||
import club.joylink.rtss.vo.project.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -18,12 +17,12 @@ public interface ProjectService {
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
PageVO<Project> pagingQuery(ProjectQueryVO queryVO);
|
||||
PageVO<ProjectInfoVO> pagingQuery(ProjectQueryVO queryVO);
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
List<Project> getAllProject();
|
||||
List<ProjectInfoVO> getAllProject();
|
||||
|
||||
/**
|
||||
* 项目Id请求项目信息
|
||||
@ -50,6 +49,21 @@ public interface ProjectService {
|
||||
*/
|
||||
boolean checkProjectCode(String code);
|
||||
|
||||
/**
|
||||
* 设置项目默认组织
|
||||
*/
|
||||
void setProjectDefaultOrg(Long id, Long orgId);
|
||||
|
||||
/**
|
||||
* 根据项目ID获取与项目关联的所有组织信息
|
||||
*/
|
||||
List<CompanyVO> projectOrgList(Long id);
|
||||
|
||||
/**
|
||||
* 快速创建默认组织
|
||||
*/
|
||||
ProjectInfoVO quickCreateDefaultOrg(Long id, CompanyVO companyVO, AccountVO user);
|
||||
|
||||
/**
|
||||
* 前端设置信息分页
|
||||
*/
|
||||
|
@ -1,18 +1,24 @@
|
||||
package club.joylink.rtss.services.project;
|
||||
|
||||
import club.joylink.rtss.dao.OrgDAO;
|
||||
import club.joylink.rtss.dao.org.OrgProjectDao;
|
||||
import club.joylink.rtss.dao.project.ProjectDAO;
|
||||
import club.joylink.rtss.dao.project.ProjectViewDAO;
|
||||
import club.joylink.rtss.entity.Org;
|
||||
import club.joylink.rtss.entity.OrgExample;
|
||||
import club.joylink.rtss.entity.org.OrgProject;
|
||||
import club.joylink.rtss.entity.org.OrgProjectExample;
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import club.joylink.rtss.entity.project.ProjectExample;
|
||||
import club.joylink.rtss.entity.project.ProjectView;
|
||||
import club.joylink.rtss.entity.project.ProjectViewExample;
|
||||
import club.joylink.rtss.services.org.OrgService;
|
||||
import club.joylink.rtss.simulation.cbtc.exception.SimulationException;
|
||||
import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
import club.joylink.rtss.vo.client.PageVO;
|
||||
import club.joylink.rtss.vo.project.ProjectQueryVO;
|
||||
import club.joylink.rtss.vo.project.ProjectVO;
|
||||
import club.joylink.rtss.vo.project.ProjectViewQueryVO;
|
||||
import club.joylink.rtss.vo.project.ProjectViewVO;
|
||||
import club.joylink.rtss.vo.client.org.CompanyVO;
|
||||
import club.joylink.rtss.vo.project.*;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -24,7 +30,9 @@ import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@ -40,26 +48,37 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
@Autowired
|
||||
private ProjectViewDAO projectViewDAO;
|
||||
|
||||
@Autowired
|
||||
private OrgProjectDao orgProjectDao;
|
||||
|
||||
@Autowired
|
||||
private OrgDAO orgDAO;
|
||||
|
||||
@Autowired
|
||||
private OrgService orgService;
|
||||
|
||||
@Override
|
||||
public PageVO<Project> pagingQuery(ProjectQueryVO queryVO) {
|
||||
public PageVO<ProjectInfoVO> pagingQuery(ProjectQueryVO queryVO) {
|
||||
PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize());
|
||||
ProjectExample projectExample = new ProjectExample();
|
||||
ProjectExample.Criteria criteria = projectExample.createCriteria().andStatusEqualTo(EFFECT_PROJECT_STATUS);
|
||||
if (!StringUtils.isEmpty(queryVO.getCode())) {
|
||||
criteria.andCodeEqualTo(queryVO.getCode());
|
||||
criteria.andCodeLike(String.format("%%%s%%", queryVO.getCode()));
|
||||
}
|
||||
if (!StringUtils.isEmpty(queryVO.getName())) {
|
||||
criteria.andNameLike(queryVO.getName());
|
||||
criteria.andNameLike(String.format("%%%s%%", queryVO.getName()));
|
||||
}
|
||||
Page<Project> page = (Page<Project>) projectDAO.selectWithBLOBsByExample(projectExample);
|
||||
return PageVO.convert(page, page.getResult());
|
||||
List<ProjectInfoVO> projectVOList = handleProjectOrgInfo(page.getResult());
|
||||
return PageVO.convert(page, projectVOList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Project> getAllProject() {
|
||||
public List<ProjectInfoVO> getAllProject() {
|
||||
ProjectExample projectExample = new ProjectExample();
|
||||
projectExample.createCriteria().andStatusEqualTo(EFFECT_PROJECT_STATUS);
|
||||
return projectDAO.selectByExample(projectExample);
|
||||
List<Project> projectList = projectDAO.selectWithBLOBsByExample(projectExample);
|
||||
return handleProjectOrgInfo(projectList);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -119,6 +138,53 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
return num > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@CacheEvict(cacheNames = "project", allEntries = true)
|
||||
public void setProjectDefaultOrg(Long id, Long orgId) {
|
||||
Project project = new Project();
|
||||
project.setId(id);
|
||||
project.setDefaultOrg(orgId);
|
||||
projectDAO.updateByPrimaryKeySelective(project);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CompanyVO> projectOrgList(Long id) {
|
||||
Project project = projectDAO.selectByPrimaryKey(id);
|
||||
if (project == null) {
|
||||
throw new SimulationException(SimulationExceptionType.Illegal_Argument, "项目不存在");
|
||||
}
|
||||
List<OrgProject> orgProjectList = getOrgProjectList(List.of(project.getCode()));
|
||||
if (!CollectionUtils.isEmpty(orgProjectList)) {
|
||||
List<Long> orgIdList = orgProjectList.stream().map(OrgProject::getOrgId).distinct().collect(Collectors.toList());
|
||||
List<Org> orgList = getOrgList(orgIdList);
|
||||
return orgList.stream().map(CompanyVO::simpleInfoVO).collect(Collectors.toList());
|
||||
}
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@CacheEvict(cacheNames = "project", allEntries = true)
|
||||
public ProjectInfoVO quickCreateDefaultOrg(Long id, CompanyVO companyVO, AccountVO user) {
|
||||
Project project = projectDAO.selectByPrimaryKey(id);
|
||||
if (project == null) {
|
||||
throw new SimulationException(SimulationExceptionType.Illegal_Argument, "项目不存在");
|
||||
}
|
||||
List<OrgProject> orgProjectList = getOrgProjectList(List.of(project.getCode()));
|
||||
if (!CollectionUtils.isEmpty(orgProjectList)) {
|
||||
throw new SimulationException(SimulationExceptionType.Illegal_Argument, "存在关联组织,请设置");
|
||||
}
|
||||
// 保存默认组织
|
||||
companyVO.setProjectCodes(List.of(project.getCode()));
|
||||
CompanyVO resultCompany = orgService.createTopOrg(companyVO, user);
|
||||
// 修改项目信息
|
||||
setProjectDefaultOrg(id, resultCompany.getId());
|
||||
ProjectInfoVO projectVO = new ProjectInfoVO(project);
|
||||
projectVO.setOrgList(List.of(resultCompany.getName()));
|
||||
projectVO.setDefaultOrgName(resultCompany.getName());
|
||||
return projectVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageVO<ProjectView> projectViewPagingQuery(ProjectViewQueryVO queryVO) {
|
||||
PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize());
|
||||
@ -208,7 +274,7 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
@Override
|
||||
public List<ProjectVO> getSimpleProjectList() {
|
||||
ProjectExample projectExample = new ProjectExample();
|
||||
projectExample.createCriteria().andStatusEqualTo(EFFECT_PROJECT_STATUS).andViewShowEqualTo(1);
|
||||
projectExample.createCriteria().andStatusEqualTo(EFFECT_PROJECT_STATUS);
|
||||
List<Project> projectList = projectDAO.selectWithBLOBsByExample(projectExample);
|
||||
return projectList.stream().map(project -> new ProjectVO(project)).collect(Collectors.toList());
|
||||
}
|
||||
@ -242,4 +308,51 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
List<ProjectView> projectList = projectViewDAO.selectWithBLOBsByExample(new ProjectViewExample());
|
||||
return projectList.stream().map(projectView -> new ProjectViewVO(projectView)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private List<OrgProject> getOrgProjectList(List<String> projectCodeList) {
|
||||
OrgProjectExample orgProjectExample = new OrgProjectExample();
|
||||
orgProjectExample.createCriteria().andProjectCodeIn(projectCodeList);
|
||||
return orgProjectDao.selectByExample(orgProjectExample);
|
||||
}
|
||||
|
||||
private List<Org> getOrgList(List<Long> orgIdList) {
|
||||
OrgExample orgExample = new OrgExample();
|
||||
orgExample.createCriteria().andIdIn(orgIdList);
|
||||
return orgDAO.selectByExample(orgExample);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目列表时,关联组织信息
|
||||
*/
|
||||
private List<ProjectInfoVO> handleProjectOrgInfo(List<Project> projectList) {
|
||||
List<String> projectCodeList = projectList.stream().map(Project::getCode).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(projectCodeList)) {
|
||||
return List.of();
|
||||
}
|
||||
List<OrgProject> orgProjectList = getOrgProjectList(projectCodeList);
|
||||
Map<Long, Org> orgMap = new HashMap<>();
|
||||
Map<String, List<Long>> orgProjectMap = new HashMap<>(orgProjectList.size());
|
||||
if (!CollectionUtils.isEmpty(orgProjectList)) {
|
||||
List<Long> orgIdList = orgProjectList.stream().map(OrgProject::getOrgId).distinct().collect(Collectors.toList());
|
||||
List<Org> orgList = getOrgList(orgIdList);
|
||||
orgMap.putAll(orgList.stream().collect(Collectors.toMap(Org::getId, o -> o)));
|
||||
orgProjectMap.putAll(orgProjectList.stream().collect(Collectors.groupingBy(OrgProject::getProjectCode, Collectors.mapping(OrgProject::getOrgId, Collectors.toList()))));
|
||||
}
|
||||
// 包装projectVO
|
||||
List<ProjectInfoVO> projectVOList = projectList.stream().map(p -> {
|
||||
ProjectInfoVO projectVO = new ProjectInfoVO(p);
|
||||
if (orgProjectMap.containsKey(p.getCode())) {
|
||||
List<String> orgNameList = orgProjectMap.get(p.getCode()).stream().filter(id -> orgMap.containsKey(id))
|
||||
.map(id -> orgMap.get(id).getName()).sorted().collect(Collectors.toList());
|
||||
projectVO.setOrgList(orgNameList);
|
||||
} else {
|
||||
projectVO.setOrgList(List.of());
|
||||
}
|
||||
if (p.getDefaultOrg() != null && orgMap.containsKey(p.getDefaultOrg())) {
|
||||
projectVO.setDefaultOrgName(orgMap.get(p.getDefaultOrg()).getName());
|
||||
}
|
||||
return projectVO;
|
||||
}).collect(Collectors.toList());
|
||||
return projectVOList;
|
||||
}
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
package club.joylink.rtss.simulation.cbtc.CTC.rail.dcmd.data;
|
||||
|
||||
import club.joylink.rtss.simulation.cbtc.data.map.MapElement;
|
||||
import club.joylink.rtss.simulation.cbtc.member.SimulationMember;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -20,47 +20,56 @@ import java.util.List;
|
||||
@NoArgsConstructor
|
||||
public class CompanyVO {
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
private String code;
|
||||
/**公司名称*/
|
||||
@NotBlank(message = "公司名称不能为空")
|
||||
private String name;
|
||||
private String code;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@NotBlank(message = "公司名称不能为空")
|
||||
private String name;
|
||||
|
||||
private List<String> projectCodes;
|
||||
private List<String> projectCodes;
|
||||
|
||||
public CompanyVO(Org entity) {
|
||||
this.id = entity.getId();
|
||||
this.code = entity.getCode();
|
||||
this.name = entity.getName();
|
||||
if (StringUtils.hasText(entity.getProjectCode())) {
|
||||
this.projectCodes = Arrays.asList(entity.getProjectCode().split(","));
|
||||
}
|
||||
}
|
||||
public CompanyVO(Org entity) {
|
||||
this.id = entity.getId();
|
||||
this.code = entity.getCode();
|
||||
this.name = entity.getName();
|
||||
if (StringUtils.hasText(entity.getProjectCode())) {
|
||||
this.projectCodes = Arrays.asList(entity.getProjectCode().split(","));
|
||||
}
|
||||
}
|
||||
|
||||
public static List<CompanyVO> convert2VOList(List<Org> dataList) {
|
||||
List<CompanyVO> voList = new ArrayList<>();
|
||||
for (Org entity : dataList) {
|
||||
voList.add(new CompanyVO(entity));
|
||||
}
|
||||
return voList;
|
||||
}
|
||||
public static CompanyVO simpleInfoVO(Org entity) {
|
||||
CompanyVO companyVO = new CompanyVO();
|
||||
companyVO.setId(entity.getId());
|
||||
companyVO.setName(entity.getName());
|
||||
return companyVO;
|
||||
}
|
||||
|
||||
public static List<CompanyVO> convert2VOList(List<Org> dataList) {
|
||||
List<CompanyVO> voList = new ArrayList<>();
|
||||
for (Org entity : dataList) {
|
||||
voList.add(new CompanyVO(entity));
|
||||
}
|
||||
return voList;
|
||||
}
|
||||
|
||||
public Org toDB() {
|
||||
Org entity = new Org();
|
||||
entity.setId(this.id);
|
||||
entity.setName(this.name);
|
||||
entity.setProjectCode(getDBProjectCode());
|
||||
return entity;
|
||||
}
|
||||
Org entity = new Org();
|
||||
entity.setId(this.id);
|
||||
entity.setName(this.name);
|
||||
entity.setProjectCode(getDBProjectCode());
|
||||
return entity;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public String getDBProjectCode() {
|
||||
if (!CollectionUtils.isEmpty(projectCodes)) {
|
||||
return String.join(",", projectCodes);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@JsonIgnore
|
||||
public String getDBProjectCode() {
|
||||
if (!CollectionUtils.isEmpty(projectCodes)) {
|
||||
return String.join(",", projectCodes);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,8 @@ import club.joylink.rtss.entity.Org;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class OrgProjectVO {
|
||||
@ -13,7 +15,7 @@ public class OrgProjectVO {
|
||||
|
||||
private Long topOrgId;
|
||||
|
||||
private String role;
|
||||
private List<String> role;
|
||||
|
||||
public OrgProjectVO(Org org) {
|
||||
this.orgId = org.getId();
|
||||
|
@ -4,6 +4,8 @@ import club.joylink.rtss.vo.client.PageQueryVO;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class QuestionQueryVO extends PageQueryVO {
|
||||
@ -14,5 +16,5 @@ public class QuestionQueryVO extends PageQueryVO {
|
||||
|
||||
// private String projectCode;
|
||||
private Long orgId;
|
||||
|
||||
private String labels;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package club.joylink.rtss.vo.paper;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class CreatePaperCompositionReqVo {
|
||||
@ -22,4 +23,23 @@ public class CreatePaperCompositionReqVo {
|
||||
*/
|
||||
@NotNull
|
||||
private Long orgId;
|
||||
/**
|
||||
* 启用起始时间
|
||||
*/
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 启用截止时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 完成考试有效最长时长,单位min
|
||||
*/
|
||||
private Integer validDuration;
|
||||
|
||||
/**
|
||||
* 及格分
|
||||
*/
|
||||
private Integer passScore;
|
||||
}
|
||||
|
@ -16,13 +16,13 @@ public class CreatePaperRuleReqVo {
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long pcId;
|
||||
/**
|
||||
* 试题类型:1-理论题,2-实训题
|
||||
* 试题类型:1-理论题,2-实训题,序列化后为数值
|
||||
*/
|
||||
@NotNull
|
||||
private PaperQType.GroupType type;
|
||||
|
||||
/**
|
||||
* 规则类型:理论题(1-单选题,2-多选题,3-判断题);实训题(4-单操实训,5-场景实训)
|
||||
* 规则类型:理论题(1-单选题,2-多选题,3-判断题);实训题(4-单操实训,5-场景实训),,序列化后为数值
|
||||
*/
|
||||
@NotNull
|
||||
private PaperQType.SubType subtype;
|
||||
|
@ -34,11 +34,19 @@ public class FindPaperUserForClassReqVo extends PageQueryVO {
|
||||
@NotNull
|
||||
private Long classId;
|
||||
/**
|
||||
* 查询类型,默认所有
|
||||
* 查询类型,默认所有,序列化后为数值<br>
|
||||
* All(1),//所有<br>
|
||||
* Pass(2),//所有及格的<br>
|
||||
* NotPass(3),//所有不及格的<br>
|
||||
* NotComplete(4),//未完成考试<br>
|
||||
* Complete(5),//完成考试,即及格和不及格的<br>
|
||||
*/
|
||||
private FindPuType findType = FindPuType.All;
|
||||
/**
|
||||
* 以什么来排序,默认以用户试卷创建时间
|
||||
* 以什么来排序,默认以用户试卷创建时间,序列化后为数值<br>
|
||||
* CreateTime(1, "create_time"),//用户试卷创建时间<br>
|
||||
* StartTime(2, "start_time"),//用户开始答题时间<br>
|
||||
* Score(3, "score"),//用户最终得分<br>
|
||||
*/
|
||||
private FindPuOrderByType orderBy = FindPuOrderByType.CreateTime;
|
||||
/**
|
||||
|
@ -29,11 +29,19 @@ public class FindPaperUserForCompositionReqVo extends PageQueryVO {
|
||||
@NotNull
|
||||
private Long pcId;
|
||||
/**
|
||||
* 查询类型,默认所有
|
||||
* 查询类型,默认所有,序列化后为数值<br>
|
||||
* All(1),//所有<br>
|
||||
* Pass(2),//所有及格的<br>
|
||||
* NotPass(3),//所有不及格的<br>
|
||||
* NotComplete(4),//未完成考试<br>
|
||||
* Complete(5),//完成考试,即及格和不及格的<br>
|
||||
*/
|
||||
private FindPuType findType = FindPuType.All;
|
||||
/**
|
||||
* 以什么来排序,默认以用户试卷创建时间
|
||||
* 以什么来排序,默认以用户试卷创建时间,序列化后为数值<br>
|
||||
* CreateTime(1, "create_time"),//用户试卷创建时间<br>
|
||||
* StartTime(2, "start_time"),//用户开始答题时间<br>
|
||||
* Score(3, "score"),//用户最终得分<br>
|
||||
*/
|
||||
private FindPuOrderByType orderBy = FindPuOrderByType.CreateTime;
|
||||
/**
|
||||
|
@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class PaperCompositionBasicVo {
|
||||
@ -29,4 +30,23 @@ public class PaperCompositionBasicVo {
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
/**
|
||||
* 启用起始时间
|
||||
*/
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 启用截止时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 完成考试有效最长时长,单位min
|
||||
*/
|
||||
private Integer validDuration;
|
||||
|
||||
/**
|
||||
* 及格分
|
||||
*/
|
||||
private Integer passScore;
|
||||
}
|
||||
|
@ -22,12 +22,17 @@ public class PaperSubmitAnswerReqVo {
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long pqId;
|
||||
/**
|
||||
* 试题类型:1-理论题,2-实训题
|
||||
* 试题类型:1-理论题,2-实训题,序列化后为数值
|
||||
*/
|
||||
@NotNull
|
||||
private PaperQType.GroupType type;
|
||||
/**
|
||||
* 试题子类型
|
||||
* 试题子类型,序列化后为数值<br>
|
||||
* Select(1),<br>
|
||||
* Multi(2),<br>
|
||||
* Judge(3), <br>
|
||||
* Single(4),<br>
|
||||
* Scene(5),<br>
|
||||
*/
|
||||
@NotNull
|
||||
private PaperQType.SubType subType;
|
||||
|
@ -0,0 +1,25 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 添加权限功能响应
|
||||
*/
|
||||
@Data
|
||||
public class AddAbilityRspVo {
|
||||
/**
|
||||
* 权限功能id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
/**
|
||||
* 权限功能名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 权限功能描述
|
||||
*/
|
||||
private String des;
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
import club.joylink.rtss.entity.permission.SystemAbility;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 添加权限功能请求
|
||||
*/
|
||||
@Data
|
||||
public class BasicSystemAbilityVo {
|
||||
private Long id;
|
||||
/**
|
||||
* 权限功能名称
|
||||
*/
|
||||
@NotNull
|
||||
private String name;
|
||||
/**
|
||||
* 权限功能描述
|
||||
*/
|
||||
private String des;
|
||||
|
||||
public SystemAbility toSystemAbility(){
|
||||
SystemAbility sa = new SystemAbility();
|
||||
sa.setId(this.id);
|
||||
sa.setName(this.name);
|
||||
sa.setDes(this.des);
|
||||
return sa;
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 创建权限请求
|
||||
*/
|
||||
@Data
|
||||
public class CreatePermissionReqVo {
|
||||
/**
|
||||
* 权限名称
|
||||
*/
|
||||
@NotNull
|
||||
private String name;
|
||||
/**
|
||||
* 权限描述
|
||||
*/
|
||||
private String des;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DeleteAbilitiesReqVo {
|
||||
/**
|
||||
* 要删除的权限功能的id列表
|
||||
*/
|
||||
private List<Long> ids = new ArrayList<>();
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
import club.joylink.rtss.vo.client.PageQueryVO;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FindAbilityBasicByPageReqVo extends PageQueryVO {
|
||||
/**
|
||||
* 是否降序,true-降序,false-升序,默认值为true;
|
||||
*/
|
||||
private Boolean desc = true;
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 更新权限功能的请求
|
||||
*/
|
||||
@Data
|
||||
public class FindAbilityBasicRspVo {
|
||||
/**
|
||||
* 权限功能id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@NotNull
|
||||
private Long id;
|
||||
/**
|
||||
* 权限功能名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 权限功能描述
|
||||
*/
|
||||
private String des;
|
||||
/**
|
||||
* 权限功能类型
|
||||
*/
|
||||
private SystemAbilityType type;
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
import club.joylink.rtss.vo.client.PageQueryVO;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 分页查询权限基础信息请求
|
||||
*/
|
||||
@Data
|
||||
public class FindPermissionBasicByPageReqVo extends PageQueryVO {
|
||||
/**
|
||||
* 按权限名称查询
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 按权限名称查询时,默认true,true-模糊查询,false-精确查询
|
||||
*/
|
||||
private Boolean nameLike = true;
|
||||
/**
|
||||
* 按权限描述查询
|
||||
*/
|
||||
private String des;
|
||||
/**
|
||||
* 按权限描述查询时,默认true,true-模糊查询,false-精确查询
|
||||
*/
|
||||
private Boolean desLike = true;
|
||||
/**
|
||||
* 当查询条件有多个时,条件间关系:true-且,false-或;默认值为true
|
||||
*/
|
||||
private Boolean logicAnd = true;
|
||||
/**
|
||||
* 是否降序,true-降序,false-升序,默认值为true;
|
||||
*/
|
||||
private Boolean desc = true;
|
||||
/**
|
||||
* 排序类型,默认按权限创建时间排序,序列化为数值:1-权限名称,2-权限描述,3-权限创建时间,4-权限更新时间
|
||||
*/
|
||||
private OrderByType orderByType = OrderByType.OrderByCreateTime;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
public static enum OrderByType {
|
||||
OrderByName(1, "name"),
|
||||
OrderByDes(2, "des"),
|
||||
OrderByCreateTime(3, "create_time"),
|
||||
OrderByUpdateTime(4, "update_time"),
|
||||
;
|
||||
private Integer value;
|
||||
private String orderBy;
|
||||
|
||||
private OrderByType(Integer value, String orderBy) {
|
||||
this.value = value;
|
||||
this.orderBy = orderBy;
|
||||
}
|
||||
|
||||
public String with() {
|
||||
return this.orderBy;
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static OrderByType getItem(Integer value) {
|
||||
return map.get(value);
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public Integer getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
private static Map<Integer, OrderByType> map = new HashMap<>();
|
||||
|
||||
static {
|
||||
for (OrderByType t : values()) {
|
||||
map.put(t.value, t);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 请求要删除的权限的功能
|
||||
*/
|
||||
@Data
|
||||
public class PermissionAbilityDeletedReqVo {
|
||||
/**
|
||||
* 权限id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long permissionId;
|
||||
/**
|
||||
* 要删除的功能的id,system_ability.id
|
||||
*/
|
||||
@NotNull
|
||||
private List<Long> deleteAbilityIds;
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 权限的功能
|
||||
*/
|
||||
@Data
|
||||
public class PermissionAbilityRspVo {
|
||||
/**
|
||||
* 功能id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@NotNull
|
||||
private Long id;
|
||||
/**
|
||||
* 权限功能名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 功能描述
|
||||
*/
|
||||
private String des;
|
||||
/**
|
||||
* 功能类型
|
||||
*/
|
||||
private SystemAbilityType type;
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PermissionBasicRspVo {
|
||||
/**
|
||||
* 权限id,对功能(system_ability)的管理
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 权限名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 权限描述
|
||||
*/
|
||||
private String des;
|
||||
|
||||
/**
|
||||
* 创建者id
|
||||
*/
|
||||
private Long creatorId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
import club.joylink.rtss.entity.permission.SystemAbility;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SystemAbilityRspVo {
|
||||
/**
|
||||
* 系统功能id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 功能的类型
|
||||
*/
|
||||
private SystemAbilityType type;
|
||||
|
||||
/**
|
||||
* 关联的功能的id,由type决定关联表
|
||||
*/
|
||||
private Long abilityId;
|
||||
|
||||
/**
|
||||
* 功能的名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 功能的描述
|
||||
*/
|
||||
private String des;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private SystemAbilityStatus status;
|
||||
|
||||
/**
|
||||
* 创建者id
|
||||
*/
|
||||
private Long creatorId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 跟新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
public static SystemAbilityRspVo toVO(SystemAbility sa){
|
||||
SystemAbilityRspVo vo = new SystemAbilityRspVo();
|
||||
vo.setId(sa.getId());
|
||||
vo.setType(SystemAbilityType.valueOf(sa.getType()));
|
||||
vo.setAbilityId(sa.getAbilityId());
|
||||
vo.setName(sa.getName());
|
||||
vo.setDes(sa.getDes());
|
||||
vo.setStatus(SystemAbilityStatus.valueOf(sa.getStatus()));
|
||||
vo.setCreatorId(sa.getCreatorId());
|
||||
vo.setCreateTime(sa.getCreateTime());
|
||||
vo.setUpdateTime(sa.getUpdateTime());
|
||||
return vo;
|
||||
}
|
||||
|
||||
public static List<SystemAbilityRspVo> convert2VOList(List<SystemAbility> list){
|
||||
List<SystemAbilityRspVo> voList = Lists.newArrayList();
|
||||
for (SystemAbility sa : list) {
|
||||
voList.add(toVO(sa));
|
||||
}
|
||||
return voList;
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
/**
|
||||
* 功能状态枚举
|
||||
*/
|
||||
public enum SystemAbilityStatus {
|
||||
Editing,//编辑中
|
||||
Finished,//完成
|
||||
UnEnable,//停用
|
||||
Enable,//启用
|
||||
;
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
/**
|
||||
* 功能类型枚举
|
||||
*/
|
||||
public enum SystemAbilityType {
|
||||
/**
|
||||
* map_system_new 地图仿真系统
|
||||
*/
|
||||
MapSystem,
|
||||
;
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 更新权限功能的请求
|
||||
*/
|
||||
@Data
|
||||
public class UpdateAbilityBasicReqVo {
|
||||
/**
|
||||
* 权限功能id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@NotNull
|
||||
private Long id;
|
||||
/**
|
||||
* 权限功能名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 权限功能描述
|
||||
*/
|
||||
private String des;
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class UpdateAbilityFunctionReqVo {
|
||||
/**
|
||||
* 权限功能id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@NotNull
|
||||
private Long id;
|
||||
/**
|
||||
* 权限功能类型
|
||||
*/
|
||||
@NotNull
|
||||
private SystemAbilityType type;
|
||||
|
||||
/**
|
||||
* 与权限功能关联的具体功能id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@NotNull
|
||||
private Long functionId;
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class UpdateAbilityStatusReqVo {
|
||||
/**
|
||||
* 权限功能id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@NotNull
|
||||
private Long id;
|
||||
/**
|
||||
* 权限功能状态
|
||||
*/
|
||||
@NotNull
|
||||
private SystemAbilityStatus status;
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class UpdatePermissionBasicReqVo {
|
||||
/**
|
||||
* 权限id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@NotNull
|
||||
private Long id;
|
||||
/**
|
||||
* 权限名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 权限描述
|
||||
*/
|
||||
private String des;
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package club.joylink.rtss.vo.permission;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class WholePermissionRspVo {
|
||||
/**
|
||||
* 权限id,对功能(system_ability)的管理
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 权限名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 权限描述
|
||||
*/
|
||||
private String des;
|
||||
|
||||
/**
|
||||
* 创建者id
|
||||
*/
|
||||
private Long creatorId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 权限能力列表
|
||||
*/
|
||||
private List<PermissionAbilityRspVo> abilityList;
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package club.joylink.rtss.vo.permission.convertor;
|
||||
|
||||
import club.joylink.rtss.entity.permission.Permission;
|
||||
import club.joylink.rtss.entity.permission.SystemAbility;
|
||||
import club.joylink.rtss.vo.permission.PermissionBasicRspVo;
|
||||
import club.joylink.rtss.vo.permission.WholePermissionRspVo;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class PermissionConvertor {
|
||||
public static WholePermissionRspVo convertWholePermissionRspVoFrom(Permission fromP, List<SystemAbility> fromA) {
|
||||
WholePermissionRspVo rt = new WholePermissionRspVo();
|
||||
rt.setId(fromP.getId());
|
||||
rt.setCreateTime(fromP.getCreateTime());
|
||||
rt.setCreatorId(fromP.getCreatorId());
|
||||
rt.setDes(fromP.getDes());
|
||||
rt.setName(fromP.getName());
|
||||
rt.setUpdateTime(fromP.getUpdateTime());
|
||||
if (CollectionUtils.isEmpty(fromA)) {
|
||||
rt.setAbilityList(new ArrayList<>());
|
||||
} else {
|
||||
rt.setAbilityList(fromA.stream().map(SystemAbilityConvertor::convertPermissionAbilityRspVoFrom).collect(Collectors.toList()));
|
||||
}
|
||||
return rt;
|
||||
}
|
||||
public static PermissionBasicRspVo convertPermissionBasicRspVoFrom(Permission from){
|
||||
PermissionBasicRspVo rt = new PermissionBasicRspVo();
|
||||
rt.setId(from.getId());
|
||||
rt.setDes(from.getDes());
|
||||
rt.setName(from.getName());
|
||||
rt.setCreateTime(from.getCreateTime());
|
||||
rt.setUpdateTime(from.getUpdateTime());
|
||||
rt.setCreatorId(from.getCreatorId());
|
||||
return rt;
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package club.joylink.rtss.vo.permission.convertor;
|
||||
|
||||
import club.joylink.rtss.entity.permission.SystemAbility;
|
||||
import club.joylink.rtss.vo.permission.PermissionAbilityRspVo;
|
||||
import club.joylink.rtss.vo.permission.SystemAbilityType;
|
||||
|
||||
public class SystemAbilityConvertor {
|
||||
|
||||
public static PermissionAbilityRspVo convertPermissionAbilityRspVoFrom(SystemAbility from){
|
||||
PermissionAbilityRspVo rt = new PermissionAbilityRspVo();
|
||||
rt.setId(from.getId());
|
||||
rt.setName(from.getName());
|
||||
rt.setDes(from.getDes());
|
||||
if(null!=from.getType()){
|
||||
rt.setType(SystemAbilityType.valueOf(from.getType()));
|
||||
}
|
||||
return rt;
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package club.joylink.rtss.vo.project;
|
||||
|
||||
import club.joylink.rtss.entity.project.Project;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目信息管理展示实体
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class ProjectInfoVO {
|
||||
/**
|
||||
* 数据库唯一ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目编码,后端使用
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 后端服务设置
|
||||
*/
|
||||
private String serverSetting;
|
||||
|
||||
/**
|
||||
* 关联组织名称
|
||||
*/
|
||||
private List<String> orgList;
|
||||
|
||||
/**
|
||||
* 默认组织ID
|
||||
*/
|
||||
private Long defaultOrg;
|
||||
|
||||
/**
|
||||
* 默认组织名称
|
||||
*/
|
||||
private String defaultOrgName;
|
||||
|
||||
/**
|
||||
* 是否可以创建默认组织
|
||||
*/
|
||||
private boolean createDefaultOrg;
|
||||
|
||||
public ProjectInfoVO(Project project) {
|
||||
this.id = project.getId();
|
||||
this.code = project.getCode();
|
||||
this.name = project.getName();
|
||||
this.description = project.getDescription();
|
||||
this.serverSetting = project.getServerSetting();
|
||||
this.defaultOrg = project.getDefaultOrg();
|
||||
}
|
||||
|
||||
public void setOrgList(List<String> orgList) {
|
||||
this.orgList = orgList;
|
||||
this.createDefaultOrg = CollectionUtils.isEmpty(orgList);
|
||||
}
|
||||
}
|
@ -24,9 +24,13 @@ public class ProjectVO {
|
||||
@JsonIgnore
|
||||
private ProjectServerConfig projectServerConfig;
|
||||
|
||||
@JsonIgnore
|
||||
private Long defaultOrg;
|
||||
|
||||
public ProjectVO(Project project) {
|
||||
this.label = project.getName();
|
||||
this.value = project.getCode();
|
||||
this.defaultOrg = project.getDefaultOrg();
|
||||
if (StringUtils.isEmpty(project.getServerSetting())) {
|
||||
this.projectServerConfig = null;
|
||||
} else {
|
||||
|
@ -52,7 +52,7 @@ spring:
|
||||
|
||||
# mybatis 设置
|
||||
mybatis:
|
||||
mapper-locations: classpath:mybatis/mapper/*.xml
|
||||
mapper-locations: classpath:mybatis/mapper/**/*.xml
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
pagehelper:
|
||||
|
@ -8,7 +8,7 @@
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="status" property="status" jdbcType="INTEGER"/>
|
||||
<result column="view_show" property="viewShow" jdbcType="INTEGER"/>
|
||||
<result column="default_org" property="defaultOrg" jdbcType="BIGINT"/>
|
||||
</resultMap>
|
||||
<resultMap id="ResultMapWithBLOBs" type="club.joylink.rtss.entity.project.Project" extends="BaseResultMap">
|
||||
<result column="description" property="description" jdbcType="LONGVARCHAR"/>
|
||||
@ -75,7 +75,7 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, code, name, create_time, update_time, status, view_show
|
||||
id, code, name, create_time, update_time, status, default_org
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
description,server_setting
|
||||
@ -146,10 +146,10 @@
|
||||
</delete>
|
||||
|
||||
<insert id="insert" parameterType="club.joylink.rtss.entity.project.Project">
|
||||
insert into project ( code, name, description, create_time, update_time, status, server_setting,view_show)
|
||||
insert into project ( code, name, description, create_time, update_time, status, server_setting,default_org)
|
||||
values (#{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER},
|
||||
#{serverSetting,jdbcType=LONGVARCHAR},#{viewShow,jdbcType=INTEGER})
|
||||
#{serverSetting,jdbcType=LONGVARCHAR}, #{defaultOrg, jdbcType=BIGINT})
|
||||
</insert>
|
||||
|
||||
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.project.Project">
|
||||
@ -179,8 +179,8 @@
|
||||
<if test="serverSetting != null">
|
||||
server_setting,
|
||||
</if>
|
||||
<if test="viewShow != null">
|
||||
view_show,
|
||||
<if test="defaultOrg != null">
|
||||
default_org,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
@ -208,8 +208,8 @@
|
||||
<if test="serverSetting != null">
|
||||
#{serverSetting,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="viewShow != null">
|
||||
#{viewShow,jdbcType=INTEGER},
|
||||
<if test="defaultOrg != null">
|
||||
#{defaultOrg, jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
@ -238,8 +238,8 @@
|
||||
<if test="serverSetting != null">
|
||||
server_setting = #{serverSetting,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="viewShow != null">
|
||||
view_show = #{viewShow,jdbcType=INTEGER},
|
||||
<if test="defaultOrg != null">
|
||||
default_org = #{defaultOrg, jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
@ -254,7 +254,7 @@
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
server_setting = #{serverSetting,jdbcType=LONGVARCHAR},
|
||||
view_show = #{viewShow,jdbcType=INTEGER}
|
||||
default_org = #{defaultOrg, jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
@ -266,7 +266,7 @@
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
server_setting = #{serverSetting,jdbcType=LONGVARCHAR}
|
||||
default_org = #{defaultOrg, jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
|
@ -83,7 +83,7 @@
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from paper_composition
|
||||
from rts_paper_composition
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@ -102,21 +102,21 @@
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from paper_composition
|
||||
from rts_paper_composition
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from paper_composition
|
||||
delete from rts_paper_composition
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.paper.PaperCompositionExample">
|
||||
delete from paper_composition
|
||||
delete from rts_paper_composition
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="club.joylink.rtss.entity.paper.PaperComposition">
|
||||
insert into paper_composition (id, `name`, profile,
|
||||
insert into rts_paper_composition (id, `name`, profile,
|
||||
org_id, start_time, end_time,
|
||||
valid_duration, pass_score, creator_id,
|
||||
create_time, update_time, `state`
|
||||
@ -128,7 +128,7 @@
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.paper.PaperComposition">
|
||||
insert into paper_composition
|
||||
insert into rts_paper_composition
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
@ -207,13 +207,13 @@
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="club.joylink.rtss.entity.paper.PaperCompositionExample" resultType="java.lang.Long">
|
||||
select count(*) from paper_composition
|
||||
select count(*) from rts_paper_composition
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update paper_composition
|
||||
update rts_paper_composition
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
@ -257,7 +257,7 @@
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update paper_composition
|
||||
update rts_paper_composition
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
profile = #{record.profile,jdbcType=VARCHAR},
|
||||
@ -275,7 +275,7 @@
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.paper.PaperComposition">
|
||||
update paper_composition
|
||||
update rts_paper_composition
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
@ -314,7 +314,7 @@
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.paper.PaperComposition">
|
||||
update paper_composition
|
||||
update rts_paper_composition
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
profile = #{profile,jdbcType=VARCHAR},
|
||||
org_id = #{orgId,jdbcType=BIGINT},
|
@ -87,7 +87,7 @@
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from paper_question
|
||||
from rts_paper_question
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@ -109,7 +109,7 @@
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from paper_question
|
||||
from rts_paper_question
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@ -130,21 +130,21 @@
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from paper_question
|
||||
from rts_paper_question
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from paper_question
|
||||
delete from rts_paper_question
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.paper.question.PaperQuestionExample">
|
||||
delete from paper_question
|
||||
delete from rts_paper_question
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="club.joylink.rtss.entity.paper.question.PaperQuestionWithBLOBs">
|
||||
insert into paper_question (id, `type`, create_user_id,
|
||||
insert into rts_paper_question (id, `type`, create_user_id,
|
||||
create_time, org_id, tags,
|
||||
question_answer, is_del, question,
|
||||
question_option)
|
||||
@ -154,7 +154,7 @@
|
||||
#{questionOption,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.paper.question.PaperQuestionWithBLOBs">
|
||||
insert into paper_question
|
||||
insert into rts_paper_question
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
@ -221,13 +221,13 @@
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="club.joylink.rtss.entity.paper.question.PaperQuestionExample" resultType="java.lang.Long">
|
||||
select count(*) from paper_question
|
||||
select count(*) from rts_paper_question
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update paper_question
|
||||
update rts_paper_question
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
@ -265,7 +265,7 @@
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update paper_question
|
||||
update rts_paper_question
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
create_user_id = #{record.createUserId,jdbcType=BIGINT},
|
||||
@ -281,7 +281,7 @@
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update paper_question
|
||||
update rts_paper_question
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
create_user_id = #{record.createUserId,jdbcType=BIGINT},
|
||||
@ -295,7 +295,7 @@
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.paper.question.PaperQuestionWithBLOBs">
|
||||
update paper_question
|
||||
update rts_paper_question
|
||||
<set>
|
||||
<if test="type != null">
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
@ -328,7 +328,7 @@
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="club.joylink.rtss.entity.paper.question.PaperQuestionWithBLOBs">
|
||||
update paper_question
|
||||
update rts_paper_question
|
||||
set `type` = #{type,jdbcType=VARCHAR},
|
||||
create_user_id = #{createUserId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
@ -341,7 +341,7 @@
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.paper.question.PaperQuestion">
|
||||
update paper_question
|
||||
update rts_paper_question
|
||||
set `type` = #{type,jdbcType=VARCHAR},
|
||||
create_user_id = #{createUserId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
@ -77,7 +77,7 @@
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from paper_rule
|
||||
from rts_paper_rule
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@ -96,21 +96,21 @@
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from paper_rule
|
||||
from rts_paper_rule
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from paper_rule
|
||||
delete from rts_paper_rule
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.paper.PaperRuleExample">
|
||||
delete from paper_rule
|
||||
delete from rts_paper_rule
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="club.joylink.rtss.entity.paper.PaperRule">
|
||||
insert into paper_rule (id, pc_id, `type`,
|
||||
insert into rts_paper_rule (id, pc_id, `type`,
|
||||
subType, tags, amount,
|
||||
score)
|
||||
values (#{id,jdbcType=BIGINT}, #{pcId,jdbcType=BIGINT}, #{type,jdbcType=INTEGER},
|
||||
@ -118,7 +118,7 @@
|
||||
#{score,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.paper.PaperRule">
|
||||
insert into paper_rule
|
||||
insert into rts_paper_rule
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
@ -167,13 +167,13 @@
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="club.joylink.rtss.entity.paper.PaperRuleExample" resultType="java.lang.Long">
|
||||
select count(*) from paper_rule
|
||||
select count(*) from rts_paper_rule
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update paper_rule
|
||||
update rts_paper_rule
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
@ -202,7 +202,7 @@
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update paper_rule
|
||||
update rts_paper_rule
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
pc_id = #{record.pcId,jdbcType=BIGINT},
|
||||
`type` = #{record.type,jdbcType=INTEGER},
|
||||
@ -215,7 +215,7 @@
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.paper.PaperRule">
|
||||
update paper_rule
|
||||
update rts_paper_rule
|
||||
<set>
|
||||
<if test="pcId != null">
|
||||
pc_id = #{pcId,jdbcType=BIGINT},
|
||||
@ -239,7 +239,7 @@
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.paper.PaperRule">
|
||||
update paper_rule
|
||||
update rts_paper_rule
|
||||
set pc_id = #{pcId,jdbcType=BIGINT},
|
||||
`type` = #{type,jdbcType=INTEGER},
|
||||
subType = #{subtype,jdbcType=INTEGER},
|
@ -79,7 +79,7 @@
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from paper_user
|
||||
from rts_paper_user
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@ -98,21 +98,21 @@
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from paper_user
|
||||
from rts_paper_user
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from paper_user
|
||||
delete from rts_paper_user
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.paper.PaperUserExample">
|
||||
delete from paper_user
|
||||
delete from rts_paper_user
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="club.joylink.rtss.entity.paper.PaperUser">
|
||||
insert into paper_user (id, user_id, pc_id,
|
||||
insert into rts_paper_user (id, user_id, pc_id,
|
||||
org_id, score, start_time,
|
||||
end_time, cause, create_time
|
||||
)
|
||||
@ -122,7 +122,7 @@
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.paper.PaperUser">
|
||||
insert into paper_user
|
||||
insert into rts_paper_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
@ -183,13 +183,13 @@
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="club.joylink.rtss.entity.paper.PaperUserExample" resultType="java.lang.Long">
|
||||
select count(*) from paper_user
|
||||
select count(*) from rts_paper_user
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update paper_user
|
||||
update rts_paper_user
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
@ -224,7 +224,7 @@
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update paper_user
|
||||
update rts_paper_user
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
pc_id = #{record.pcId,jdbcType=BIGINT},
|
||||
@ -239,7 +239,7 @@
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.paper.PaperUser">
|
||||
update paper_user
|
||||
update rts_paper_user
|
||||
<set>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
@ -269,7 +269,7 @@
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.paper.PaperUser">
|
||||
update paper_user
|
||||
update rts_paper_user
|
||||
set user_id = #{userId,jdbcType=BIGINT},
|
||||
pc_id = #{pcId,jdbcType=BIGINT},
|
||||
org_id = #{orgId,jdbcType=BIGINT},
|
@ -76,7 +76,7 @@
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from paper_user_question
|
||||
from rts_paper_user_question
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@ -95,21 +95,21 @@
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from paper_user_question
|
||||
from rts_paper_user_question
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from paper_user_question
|
||||
delete from rts_paper_user_question
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.paper.PaperUserQuestionExample">
|
||||
delete from paper_user_question
|
||||
delete from rts_paper_user_question
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="club.joylink.rtss.entity.paper.PaperUserQuestion">
|
||||
insert into paper_user_question (id, pu_id, org_id,
|
||||
insert into rts_paper_user_question (id, pu_id, org_id,
|
||||
`type`, question_id, `state`
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{puId,jdbcType=BIGINT}, #{orgId,jdbcType=BIGINT},
|
||||
@ -117,7 +117,7 @@
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.paper.PaperUserQuestion">
|
||||
insert into paper_user_question
|
||||
insert into rts_paper_user_question
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
@ -160,13 +160,13 @@
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="club.joylink.rtss.entity.paper.PaperUserQuestionExample" resultType="java.lang.Long">
|
||||
select count(*) from paper_user_question
|
||||
select count(*) from rts_paper_user_question
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update paper_user_question
|
||||
update rts_paper_user_question
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
@ -192,7 +192,7 @@
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update paper_user_question
|
||||
update rts_paper_user_question
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
pu_id = #{record.puId,jdbcType=BIGINT},
|
||||
org_id = #{record.orgId,jdbcType=BIGINT},
|
||||
@ -204,7 +204,7 @@
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.paper.PaperUserQuestion">
|
||||
update paper_user_question
|
||||
update rts_paper_user_question
|
||||
<set>
|
||||
<if test="puId != null">
|
||||
pu_id = #{puId,jdbcType=BIGINT},
|
||||
@ -225,7 +225,7 @@
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.paper.PaperUserQuestion">
|
||||
update paper_user_question
|
||||
update rts_paper_user_question
|
||||
set pu_id = #{puId,jdbcType=BIGINT},
|
||||
org_id = #{orgId,jdbcType=BIGINT},
|
||||
`type` = #{type,jdbcType=INTEGER},
|
236
src/main/resources/mybatis/mapper/permission/AcPermissionDAO.xml
Normal file
236
src/main/resources/mybatis/mapper/permission/AcPermissionDAO.xml
Normal file
@ -0,0 +1,236 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="club.joylink.rtss.dao.permission.AcPermissionDAO">
|
||||
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.permission.Permission">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="des" jdbcType="VARCHAR" property="des" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, des, creator_id, create_time, update_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="club.joylink.rtss.entity.permission.PermissionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from rts_permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limit != null">
|
||||
<if test="offset != null">
|
||||
limit ${offset}, ${limit}
|
||||
</if>
|
||||
<if test="offset == null">
|
||||
limit ${limit}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from rts_permission
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from rts_permission
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.permission.PermissionExample">
|
||||
delete from rts_permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="club.joylink.rtss.entity.permission.Permission">
|
||||
insert into rts_permission (id, `name`, des,
|
||||
creator_id, create_time, update_time
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{des,jdbcType=VARCHAR},
|
||||
#{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.permission.Permission">
|
||||
insert into rts_permission
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="des != null">
|
||||
des,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="des != null">
|
||||
#{des,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="club.joylink.rtss.entity.permission.PermissionExample" resultType="java.lang.Long">
|
||||
select count(*) from rts_permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update rts_permission
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.des != null">
|
||||
des = #{record.des,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update rts_permission
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
des = #{record.des,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.permission.Permission">
|
||||
update rts_permission
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="des != null">
|
||||
des = #{des,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.permission.Permission">
|
||||
update rts_permission
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
des = #{des,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,314 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="club.joylink.rtss.dao.permission.PermissionSubjectDAO">
|
||||
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.permission.PermissionSubject">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="permission_id" jdbcType="BIGINT" property="permissionId" />
|
||||
<result column="subject_type" jdbcType="VARCHAR" property="subjectType" />
|
||||
<result column="subject_id" jdbcType="BIGINT" property="subjectId" />
|
||||
<result column="amount" jdbcType="INTEGER" property="amount" />
|
||||
<result column="remains" jdbcType="INTEGER" property="remains" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="forever" jdbcType="BIT" property="forever" />
|
||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, permission_id, subject_type, subject_id, amount, remains, `status`, forever,
|
||||
start_time, end_time, create_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="club.joylink.rtss.entity.permission.PermissionSubjectExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from rts_permission_subject
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limit != null">
|
||||
<if test="offset != null">
|
||||
limit ${offset}, ${limit}
|
||||
</if>
|
||||
<if test="offset == null">
|
||||
limit ${limit}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from rts_permission_subject
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from rts_permission_subject
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.permission.PermissionSubjectExample">
|
||||
delete from rts_permission_subject
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="club.joylink.rtss.entity.permission.PermissionSubject">
|
||||
insert into rts_permission_subject (id, permission_id, subject_type,
|
||||
subject_id, amount, remains,
|
||||
`status`, forever, start_time,
|
||||
end_time, create_time)
|
||||
values (#{id,jdbcType=BIGINT}, #{permissionId,jdbcType=BIGINT}, #{subjectType,jdbcType=VARCHAR},
|
||||
#{subjectId,jdbcType=BIGINT}, #{amount,jdbcType=INTEGER}, #{remains,jdbcType=INTEGER},
|
||||
#{status,jdbcType=VARCHAR}, #{forever,jdbcType=BIT}, #{startTime,jdbcType=TIMESTAMP},
|
||||
#{endTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.permission.PermissionSubject">
|
||||
insert into rts_permission_subject
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="permissionId != null">
|
||||
permission_id,
|
||||
</if>
|
||||
<if test="subjectType != null">
|
||||
subject_type,
|
||||
</if>
|
||||
<if test="subjectId != null">
|
||||
subject_id,
|
||||
</if>
|
||||
<if test="amount != null">
|
||||
amount,
|
||||
</if>
|
||||
<if test="remains != null">
|
||||
remains,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="forever != null">
|
||||
forever,
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time,
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="permissionId != null">
|
||||
#{permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="subjectType != null">
|
||||
#{subjectType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="subjectId != null">
|
||||
#{subjectId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="amount != null">
|
||||
#{amount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="remains != null">
|
||||
#{remains,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="forever != null">
|
||||
#{forever,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
#{startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
#{endTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="club.joylink.rtss.entity.permission.PermissionSubjectExample" resultType="java.lang.Long">
|
||||
select count(*) from rts_permission_subject
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update rts_permission_subject
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.permissionId != null">
|
||||
permission_id = #{record.permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.subjectType != null">
|
||||
subject_type = #{record.subjectType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.subjectId != null">
|
||||
subject_id = #{record.subjectId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.amount != null">
|
||||
amount = #{record.amount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.remains != null">
|
||||
remains = #{record.remains,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.forever != null">
|
||||
forever = #{record.forever,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.startTime != null">
|
||||
start_time = #{record.startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.endTime != null">
|
||||
end_time = #{record.endTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update rts_permission_subject
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
permission_id = #{record.permissionId,jdbcType=BIGINT},
|
||||
subject_type = #{record.subjectType,jdbcType=VARCHAR},
|
||||
subject_id = #{record.subjectId,jdbcType=BIGINT},
|
||||
amount = #{record.amount,jdbcType=INTEGER},
|
||||
remains = #{record.remains,jdbcType=INTEGER},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
forever = #{record.forever,jdbcType=BIT},
|
||||
start_time = #{record.startTime,jdbcType=TIMESTAMP},
|
||||
end_time = #{record.endTime,jdbcType=TIMESTAMP},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.permission.PermissionSubject">
|
||||
update rts_permission_subject
|
||||
<set>
|
||||
<if test="permissionId != null">
|
||||
permission_id = #{permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="subjectType != null">
|
||||
subject_type = #{subjectType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="subjectId != null">
|
||||
subject_id = #{subjectId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="amount != null">
|
||||
amount = #{amount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="remains != null">
|
||||
remains = #{remains,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="forever != null">
|
||||
forever = #{forever,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.permission.PermissionSubject">
|
||||
update rts_permission_subject
|
||||
set permission_id = #{permissionId,jdbcType=BIGINT},
|
||||
subject_type = #{subjectType,jdbcType=VARCHAR},
|
||||
subject_id = #{subjectId,jdbcType=BIGINT},
|
||||
amount = #{amount,jdbcType=INTEGER},
|
||||
remains = #{remains,jdbcType=INTEGER},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
forever = #{forever,jdbcType=BIT},
|
||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,189 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="club.joylink.rtss.dao.permission.PermissionSystemAbilityDAO">
|
||||
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.permission.PermissionSystemAbility">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="permission_id" jdbcType="BIGINT" property="permissionId" />
|
||||
<result column="system_ability_id" jdbcType="BIGINT" property="systemAbilityId" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, permission_id, system_ability_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="club.joylink.rtss.entity.permission.PermissionSystemAbilityExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from rts_permission_system_ability
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limit != null">
|
||||
<if test="offset != null">
|
||||
limit ${offset}, ${limit}
|
||||
</if>
|
||||
<if test="offset == null">
|
||||
limit ${limit}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from rts_permission_system_ability
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from rts_permission_system_ability
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.permission.PermissionSystemAbilityExample">
|
||||
delete from rts_permission_system_ability
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="club.joylink.rtss.entity.permission.PermissionSystemAbility">
|
||||
insert into rts_permission_system_ability (id, permission_id, system_ability_id
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{permissionId,jdbcType=BIGINT}, #{systemAbilityId,jdbcType=BIGINT}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.permission.PermissionSystemAbility">
|
||||
insert into rts_permission_system_ability
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="permissionId != null">
|
||||
permission_id,
|
||||
</if>
|
||||
<if test="systemAbilityId != null">
|
||||
system_ability_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="permissionId != null">
|
||||
#{permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="systemAbilityId != null">
|
||||
#{systemAbilityId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="club.joylink.rtss.entity.permission.PermissionSystemAbilityExample" resultType="java.lang.Long">
|
||||
select count(*) from rts_permission_system_ability
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update rts_permission_system_ability
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.permissionId != null">
|
||||
permission_id = #{record.permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.systemAbilityId != null">
|
||||
system_ability_id = #{record.systemAbilityId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update rts_permission_system_ability
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
permission_id = #{record.permissionId,jdbcType=BIGINT},
|
||||
system_ability_id = #{record.systemAbilityId,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.permission.PermissionSystemAbility">
|
||||
update rts_permission_system_ability
|
||||
<set>
|
||||
<if test="permissionId != null">
|
||||
permission_id = #{permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="systemAbilityId != null">
|
||||
system_ability_id = #{systemAbilityId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.permission.PermissionSystemAbility">
|
||||
update rts_permission_system_ability
|
||||
set permission_id = #{permissionId,jdbcType=BIGINT},
|
||||
system_ability_id = #{systemAbilityId,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,283 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="club.joylink.rtss.dao.permission.SystemAbilityDAO">
|
||||
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.permission.SystemAbility">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="ability_id" jdbcType="BIGINT" property="abilityId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="des" jdbcType="VARCHAR" property="des" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `type`, ability_id, `name`, des, `status`, creator_id, create_time, update_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="club.joylink.rtss.entity.permission.SystemAbilityExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from rts_system_ability
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limit != null">
|
||||
<if test="offset != null">
|
||||
limit ${offset}, ${limit}
|
||||
</if>
|
||||
<if test="offset == null">
|
||||
limit ${limit}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from rts_system_ability
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from rts_system_ability
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.permission.SystemAbilityExample">
|
||||
delete from rts_system_ability
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="club.joylink.rtss.entity.permission.SystemAbility">
|
||||
insert into rts_system_ability (id, `type`, ability_id,
|
||||
`name`, des, `status`,
|
||||
creator_id, create_time, update_time
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{abilityId,jdbcType=BIGINT},
|
||||
#{name,jdbcType=VARCHAR}, #{des,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
||||
#{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.permission.SystemAbility">
|
||||
insert into rts_system_ability
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type`,
|
||||
</if>
|
||||
<if test="abilityId != null">
|
||||
ability_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="des != null">
|
||||
des,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="abilityId != null">
|
||||
#{abilityId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="des != null">
|
||||
#{des,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="club.joylink.rtss.entity.permission.SystemAbilityExample" resultType="java.lang.Long">
|
||||
select count(*) from rts_system_ability
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update rts_system_ability
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.abilityId != null">
|
||||
ability_id = #{record.abilityId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.des != null">
|
||||
des = #{record.des,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update rts_system_ability
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
ability_id = #{record.abilityId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
des = #{record.des,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.permission.SystemAbility">
|
||||
update rts_system_ability
|
||||
<set>
|
||||
<if test="type != null">
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="abilityId != null">
|
||||
ability_id = #{abilityId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="des != null">
|
||||
des = #{des,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.permission.SystemAbility">
|
||||
update rts_system_ability
|
||||
set `type` = #{type,jdbcType=VARCHAR},
|
||||
ability_id = #{abilityId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
des = #{des,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
@ -1,4 +1,4 @@
|
||||
package club.joylink.rtss.controller.paper;
|
||||
package club.joylink.rtss.services.paper;
|
||||
|
||||
import club.joylink.rtss.util.JsonUtils;
|
||||
import club.joylink.rtss.vo.AccountVO;
|
||||
@ -15,8 +15,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/v2/test/paper")
|
||||
//@RestController
|
||||
//@RequestMapping("/api/v2/test/paper")
|
||||
public class PaperApiTestController {
|
||||
@Autowired
|
||||
private PaperApiTestService paperApiTestService;
|
@ -1,4 +1,4 @@
|
||||
package club.joylink.rtss.controller.paper;
|
||||
package club.joylink.rtss.services.paper;
|
||||
|
||||
import club.joylink.rtss.dao.paper.PaperQuestionDAO;
|
||||
import club.joylink.rtss.entity.paper.question.PaperQuestionWithBLOBs;
|
||||
@ -14,7 +14,7 @@ import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
//@Service
|
||||
public class PaperApiTestService {
|
||||
@Autowired
|
||||
private PaperQuestionDAO paperQuestionDAO;
|
Loading…
Reference in New Issue
Block a user