From 3127ceaea103ecfe2750dcabd0afee93d53ec02b Mon Sep 17 00:00:00 2001 From: xzb <223@qq.com> Date: Thu, 13 Oct 2022 09:32:24 +0800 Subject: [PATCH 1/4] new permission --- .../rtss/dao/permission/RtsPermissionDAO.java | 34 + .../permission/RtsPermissionSubjectDAO.java | 34 + .../RtsPermissionSystemAbilityDAO.java | 34 + .../dao/permission/RtsSystemAbilityDAO.java | 34 + .../rtss/entity/permission/Permission.java | 44 + .../entity/permission/PermissionExample.java | 603 ++++++++++++ .../entity/permission/PermissionSubject.java | 69 ++ .../permission/PermissionSubjectExample.java | 903 ++++++++++++++++++ .../permission/PermissionSystemAbility.java | 28 + .../PermissionSystemAbilityExample.java | 402 ++++++++ .../rtss/entity/permission/SystemAbility.java | 59 ++ .../permission/SystemAbilityExample.java | 803 ++++++++++++++++ .../mybatis/mapper/RtsPermissionDAO.xml | 236 +++++ .../mapper/RtsPermissionSubjectDAO.xml | 314 ++++++ .../mapper/RtsPermissionSystemAbilityDAO.xml | 189 ++++ .../mybatis/mapper/RtsSystemAbilityDAO.xml | 283 ++++++ 16 files changed, 4069 insertions(+) create mode 100644 src/main/java/club/joylink/rtss/dao/permission/RtsPermissionDAO.java create mode 100644 src/main/java/club/joylink/rtss/dao/permission/RtsPermissionSubjectDAO.java create mode 100644 src/main/java/club/joylink/rtss/dao/permission/RtsPermissionSystemAbilityDAO.java create mode 100644 src/main/java/club/joylink/rtss/dao/permission/RtsSystemAbilityDAO.java create mode 100644 src/main/java/club/joylink/rtss/entity/permission/Permission.java create mode 100644 src/main/java/club/joylink/rtss/entity/permission/PermissionExample.java create mode 100644 src/main/java/club/joylink/rtss/entity/permission/PermissionSubject.java create mode 100644 src/main/java/club/joylink/rtss/entity/permission/PermissionSubjectExample.java create mode 100644 src/main/java/club/joylink/rtss/entity/permission/PermissionSystemAbility.java create mode 100644 src/main/java/club/joylink/rtss/entity/permission/PermissionSystemAbilityExample.java create mode 100644 src/main/java/club/joylink/rtss/entity/permission/SystemAbility.java create mode 100644 src/main/java/club/joylink/rtss/entity/permission/SystemAbilityExample.java create mode 100644 src/main/resources/mybatis/mapper/RtsPermissionDAO.xml create mode 100644 src/main/resources/mybatis/mapper/RtsPermissionSubjectDAO.xml create mode 100644 src/main/resources/mybatis/mapper/RtsPermissionSystemAbilityDAO.xml create mode 100644 src/main/resources/mybatis/mapper/RtsSystemAbilityDAO.xml diff --git a/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionDAO.java b/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionDAO.java new file mode 100644 index 000000000..dc7715603 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionDAO.java @@ -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 RtsPermissionDAO { + long countByExample(PermissionExample example); + + int deleteByExample(PermissionExample example); + + int deleteByPrimaryKey(Long id); + + int insert(Permission record); + + int insertSelective(Permission record); + + List 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); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionSubjectDAO.java b/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionSubjectDAO.java new file mode 100644 index 000000000..5af207f72 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionSubjectDAO.java @@ -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 RtsPermissionSubjectDAO { + long countByExample(PermissionSubjectExample example); + + int deleteByExample(PermissionSubjectExample example); + + int deleteByPrimaryKey(Long id); + + int insert(PermissionSubject record); + + int insertSelective(PermissionSubject record); + + List 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); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionSystemAbilityDAO.java b/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionSystemAbilityDAO.java new file mode 100644 index 000000000..ed8316d15 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionSystemAbilityDAO.java @@ -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 RtsPermissionSystemAbilityDAO { + long countByExample(PermissionSystemAbilityExample example); + + int deleteByExample(PermissionSystemAbilityExample example); + + int deleteByPrimaryKey(Long id); + + int insert(PermissionSystemAbility record); + + int insertSelective(PermissionSystemAbility record); + + List 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); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/permission/RtsSystemAbilityDAO.java b/src/main/java/club/joylink/rtss/dao/permission/RtsSystemAbilityDAO.java new file mode 100644 index 000000000..ce53b3aec --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/permission/RtsSystemAbilityDAO.java @@ -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 RtsSystemAbilityDAO { + long countByExample(SystemAbilityExample example); + + int deleteByExample(SystemAbilityExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SystemAbility record); + + int insertSelective(SystemAbility record); + + List 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); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/permission/Permission.java b/src/main/java/club/joylink/rtss/entity/permission/Permission.java new file mode 100644 index 000000000..804f85b5d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/permission/Permission.java @@ -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; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/permission/PermissionExample.java b/src/main/java/club/joylink/rtss/entity/permission/PermissionExample.java new file mode 100644 index 000000000..d4a719b27 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/permission/PermissionExample.java @@ -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 oredCriteria; + + private Integer limit; + + private Long offset; + + public PermissionExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List 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 values) { + addCriterion("des in", values, "des"); + return (Criteria) this; + } + + public Criteria andDesNotIn(List 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 values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List 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 values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List 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 values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/permission/PermissionSubject.java b/src/main/java/club/joylink/rtss/entity/permission/PermissionSubject.java new file mode 100644 index 000000000..fc1496a6e --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/permission/PermissionSubject.java @@ -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; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/permission/PermissionSubjectExample.java b/src/main/java/club/joylink/rtss/entity/permission/PermissionSubjectExample.java new file mode 100644 index 000000000..97eaecddf --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/permission/PermissionSubjectExample.java @@ -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 oredCriteria; + + private Integer limit; + + private Long offset; + + public PermissionSubjectExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 values) { + addCriterion("permission_id in", values, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdNotIn(List 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 values) { + addCriterion("subject_type in", values, "subjectType"); + return (Criteria) this; + } + + public Criteria andSubjectTypeNotIn(List 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 values) { + addCriterion("subject_id in", values, "subjectId"); + return (Criteria) this; + } + + public Criteria andSubjectIdNotIn(List 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 values) { + addCriterion("amount in", values, "amount"); + return (Criteria) this; + } + + public Criteria andAmountNotIn(List 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 values) { + addCriterion("remains in", values, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsNotIn(List 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 values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List 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 values) { + addCriterion("forever in", values, "forever"); + return (Criteria) this; + } + + public Criteria andForeverNotIn(List 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 values) { + addCriterion("start_time in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotIn(List 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 values) { + addCriterion("end_time in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotIn(List 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 values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/permission/PermissionSystemAbility.java b/src/main/java/club/joylink/rtss/entity/permission/PermissionSystemAbility.java new file mode 100644 index 000000000..c1a805035 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/permission/PermissionSystemAbility.java @@ -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; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/permission/PermissionSystemAbilityExample.java b/src/main/java/club/joylink/rtss/entity/permission/PermissionSystemAbilityExample.java new file mode 100644 index 000000000..8ab747d60 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/permission/PermissionSystemAbilityExample.java @@ -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 oredCriteria; + + private Integer limit; + + private Long offset; + + public PermissionSystemAbilityExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 values) { + addCriterion("permission_id in", values, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdNotIn(List 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 values) { + addCriterion("system_ability_id in", values, "systemAbilityId"); + return (Criteria) this; + } + + public Criteria andSystemAbilityIdNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/permission/SystemAbility.java b/src/main/java/club/joylink/rtss/entity/permission/SystemAbility.java new file mode 100644 index 000000000..4421d0217 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/permission/SystemAbility.java @@ -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; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/permission/SystemAbilityExample.java b/src/main/java/club/joylink/rtss/entity/permission/SystemAbilityExample.java new file mode 100644 index 000000000..794e5290e --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/permission/SystemAbilityExample.java @@ -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 oredCriteria; + + private Integer limit; + + private Long offset; + + public SystemAbilityExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List 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 values) { + addCriterion("ability_id in", values, "abilityId"); + return (Criteria) this; + } + + public Criteria andAbilityIdNotIn(List 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 values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List 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 values) { + addCriterion("des in", values, "des"); + return (Criteria) this; + } + + public Criteria andDesNotIn(List 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 values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List 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 values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List 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 values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List 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 values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/RtsPermissionDAO.xml b/src/main/resources/mybatis/mapper/RtsPermissionDAO.xml new file mode 100644 index 000000000..fa9924542 --- /dev/null +++ b/src/main/resources/mybatis/mapper/RtsPermissionDAO.xml @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, des, creator_id, create_time, update_time + + + + + delete from rts_permission + where id = #{id,jdbcType=BIGINT} + + + delete from rts_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 into rts_permission + + + id, + + + `name`, + + + des, + + + creator_id, + + + create_time, + + + update_time, + + + + + #{id,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{des,jdbcType=VARCHAR}, + + + #{creatorId,jdbcType=BIGINT}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + + + + update rts_permission + + + 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}, + + + + + + + + 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} + + + + + + update rts_permission + + + `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 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} + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/RtsPermissionSubjectDAO.xml b/src/main/resources/mybatis/mapper/RtsPermissionSubjectDAO.xml new file mode 100644 index 000000000..7de8d6007 --- /dev/null +++ b/src/main/resources/mybatis/mapper/RtsPermissionSubjectDAO.xml @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, permission_id, subject_type, subject_id, amount, remains, `status`, forever, + start_time, end_time, create_time + + + + + delete from rts_permission_subject + where id = #{id,jdbcType=BIGINT} + + + delete from rts_permission_subject + + + + + + 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 into rts_permission_subject + + + id, + + + permission_id, + + + subject_type, + + + subject_id, + + + amount, + + + remains, + + + `status`, + + + forever, + + + start_time, + + + end_time, + + + create_time, + + + + + #{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}, + + + + + + update rts_permission_subject + + + 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}, + + + + + + + + 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} + + + + + + update rts_permission_subject + + + 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 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} + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/RtsPermissionSystemAbilityDAO.xml b/src/main/resources/mybatis/mapper/RtsPermissionSystemAbilityDAO.xml new file mode 100644 index 000000000..24e6bee98 --- /dev/null +++ b/src/main/resources/mybatis/mapper/RtsPermissionSystemAbilityDAO.xml @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, permission_id, system_ability_id + + + + + delete from rts_permission_system_ability + where id = #{id,jdbcType=BIGINT} + + + delete from rts_permission_system_ability + + + + + + insert into rts_permission_system_ability (id, permission_id, system_ability_id + ) + values (#{id,jdbcType=BIGINT}, #{permissionId,jdbcType=BIGINT}, #{systemAbilityId,jdbcType=BIGINT} + ) + + + insert into rts_permission_system_ability + + + id, + + + permission_id, + + + system_ability_id, + + + + + #{id,jdbcType=BIGINT}, + + + #{permissionId,jdbcType=BIGINT}, + + + #{systemAbilityId,jdbcType=BIGINT}, + + + + + + update rts_permission_system_ability + + + id = #{record.id,jdbcType=BIGINT}, + + + permission_id = #{record.permissionId,jdbcType=BIGINT}, + + + system_ability_id = #{record.systemAbilityId,jdbcType=BIGINT}, + + + + + + + + update rts_permission_system_ability + set id = #{record.id,jdbcType=BIGINT}, + permission_id = #{record.permissionId,jdbcType=BIGINT}, + system_ability_id = #{record.systemAbilityId,jdbcType=BIGINT} + + + + + + update rts_permission_system_ability + + + permission_id = #{permissionId,jdbcType=BIGINT}, + + + system_ability_id = #{systemAbilityId,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update rts_permission_system_ability + set permission_id = #{permissionId,jdbcType=BIGINT}, + system_ability_id = #{systemAbilityId,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/RtsSystemAbilityDAO.xml b/src/main/resources/mybatis/mapper/RtsSystemAbilityDAO.xml new file mode 100644 index 000000000..5d07cca21 --- /dev/null +++ b/src/main/resources/mybatis/mapper/RtsSystemAbilityDAO.xml @@ -0,0 +1,283 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `type`, ability_id, `name`, des, `status`, creator_id, create_time, update_time + + + + + delete from rts_system_ability + where id = #{id,jdbcType=BIGINT} + + + delete from rts_system_ability + + + + + + 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 into rts_system_ability + + + id, + + + `type`, + + + ability_id, + + + `name`, + + + des, + + + `status`, + + + creator_id, + + + create_time, + + + update_time, + + + + + #{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}, + + + + + + update rts_system_ability + + + 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}, + + + + + + + + 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} + + + + + + update rts_system_ability + + + `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 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} + + \ No newline at end of file From dde2fb93c1602501ecb6a2ee21ee99cbb704b6e7 Mon Sep 17 00:00:00 2001 From: xzb <223@qq.com> Date: Thu, 13 Oct 2022 10:05:36 +0800 Subject: [PATCH 2/4] new permission --- .../permission/{RtsPermissionDAO.java => AcPermissionDAO.java} | 2 +- .../{RtsPermissionSubjectDAO.java => PermissionSubjectDAO.java} | 2 +- ...ionSystemAbilityDAO.java => PermissionSystemAbilityDAO.java} | 2 +- .../{RtsSystemAbilityDAO.java => SystemAbilityDAO.java} | 2 +- src/main/resources/application.yml | 2 +- .../mybatis/mapper/{ => paper}/PaperCompositionDAO.xml | 0 .../resources/mybatis/mapper/{ => paper}/PaperQuestionDAO.xml | 0 src/main/resources/mybatis/mapper/{ => paper}/PaperRuleDAO.xml | 0 src/main/resources/mybatis/mapper/{ => paper}/PaperUserDAO.xml | 0 .../mybatis/mapper/{ => paper}/PaperUserQuestionDAO.xml | 0 .../{RtsPermissionDAO.xml => permission/AcPermissionDAO.xml} | 2 +- .../PermissionSubjectDAO.xml} | 2 +- .../PermissionSystemAbilityDAO.xml} | 2 +- .../SystemAbilityDAO.xml} | 2 +- 14 files changed, 9 insertions(+), 9 deletions(-) rename src/main/java/club/joylink/rtss/dao/permission/{RtsPermissionDAO.java => AcPermissionDAO.java} (96%) rename src/main/java/club/joylink/rtss/dao/permission/{RtsPermissionSubjectDAO.java => PermissionSubjectDAO.java} (96%) rename src/main/java/club/joylink/rtss/dao/permission/{RtsPermissionSystemAbilityDAO.java => PermissionSystemAbilityDAO.java} (96%) rename src/main/java/club/joylink/rtss/dao/permission/{RtsSystemAbilityDAO.java => SystemAbilityDAO.java} (96%) rename src/main/resources/mybatis/mapper/{ => paper}/PaperCompositionDAO.xml (100%) rename src/main/resources/mybatis/mapper/{ => paper}/PaperQuestionDAO.xml (100%) rename src/main/resources/mybatis/mapper/{ => paper}/PaperRuleDAO.xml (100%) rename src/main/resources/mybatis/mapper/{ => paper}/PaperUserDAO.xml (100%) rename src/main/resources/mybatis/mapper/{ => paper}/PaperUserQuestionDAO.xml (100%) rename src/main/resources/mybatis/mapper/{RtsPermissionDAO.xml => permission/AcPermissionDAO.xml} (99%) rename src/main/resources/mybatis/mapper/{RtsPermissionSubjectDAO.xml => permission/PermissionSubjectDAO.xml} (99%) rename src/main/resources/mybatis/mapper/{RtsPermissionSystemAbilityDAO.xml => permission/PermissionSystemAbilityDAO.xml} (98%) rename src/main/resources/mybatis/mapper/{RtsSystemAbilityDAO.xml => permission/SystemAbilityDAO.xml} (99%) diff --git a/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionDAO.java b/src/main/java/club/joylink/rtss/dao/permission/AcPermissionDAO.java similarity index 96% rename from src/main/java/club/joylink/rtss/dao/permission/RtsPermissionDAO.java rename to src/main/java/club/joylink/rtss/dao/permission/AcPermissionDAO.java index dc7715603..30e023dab 100644 --- a/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionDAO.java +++ b/src/main/java/club/joylink/rtss/dao/permission/AcPermissionDAO.java @@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository; @Mapper @Repository -public interface RtsPermissionDAO { +public interface AcPermissionDAO { long countByExample(PermissionExample example); int deleteByExample(PermissionExample example); diff --git a/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionSubjectDAO.java b/src/main/java/club/joylink/rtss/dao/permission/PermissionSubjectDAO.java similarity index 96% rename from src/main/java/club/joylink/rtss/dao/permission/RtsPermissionSubjectDAO.java rename to src/main/java/club/joylink/rtss/dao/permission/PermissionSubjectDAO.java index 5af207f72..a937a76bb 100644 --- a/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionSubjectDAO.java +++ b/src/main/java/club/joylink/rtss/dao/permission/PermissionSubjectDAO.java @@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository; @Mapper @Repository -public interface RtsPermissionSubjectDAO { +public interface PermissionSubjectDAO { long countByExample(PermissionSubjectExample example); int deleteByExample(PermissionSubjectExample example); diff --git a/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionSystemAbilityDAO.java b/src/main/java/club/joylink/rtss/dao/permission/PermissionSystemAbilityDAO.java similarity index 96% rename from src/main/java/club/joylink/rtss/dao/permission/RtsPermissionSystemAbilityDAO.java rename to src/main/java/club/joylink/rtss/dao/permission/PermissionSystemAbilityDAO.java index ed8316d15..d6be054d7 100644 --- a/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionSystemAbilityDAO.java +++ b/src/main/java/club/joylink/rtss/dao/permission/PermissionSystemAbilityDAO.java @@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository; @Mapper @Repository -public interface RtsPermissionSystemAbilityDAO { +public interface PermissionSystemAbilityDAO { long countByExample(PermissionSystemAbilityExample example); int deleteByExample(PermissionSystemAbilityExample example); diff --git a/src/main/java/club/joylink/rtss/dao/permission/RtsSystemAbilityDAO.java b/src/main/java/club/joylink/rtss/dao/permission/SystemAbilityDAO.java similarity index 96% rename from src/main/java/club/joylink/rtss/dao/permission/RtsSystemAbilityDAO.java rename to src/main/java/club/joylink/rtss/dao/permission/SystemAbilityDAO.java index ce53b3aec..09916c663 100644 --- a/src/main/java/club/joylink/rtss/dao/permission/RtsSystemAbilityDAO.java +++ b/src/main/java/club/joylink/rtss/dao/permission/SystemAbilityDAO.java @@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository; @Mapper @Repository -public interface RtsSystemAbilityDAO { +public interface SystemAbilityDAO { long countByExample(SystemAbilityExample example); int deleteByExample(SystemAbilityExample example); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 3cba27f8c..29aeb0365 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -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: diff --git a/src/main/resources/mybatis/mapper/PaperCompositionDAO.xml b/src/main/resources/mybatis/mapper/paper/PaperCompositionDAO.xml similarity index 100% rename from src/main/resources/mybatis/mapper/PaperCompositionDAO.xml rename to src/main/resources/mybatis/mapper/paper/PaperCompositionDAO.xml diff --git a/src/main/resources/mybatis/mapper/PaperQuestionDAO.xml b/src/main/resources/mybatis/mapper/paper/PaperQuestionDAO.xml similarity index 100% rename from src/main/resources/mybatis/mapper/PaperQuestionDAO.xml rename to src/main/resources/mybatis/mapper/paper/PaperQuestionDAO.xml diff --git a/src/main/resources/mybatis/mapper/PaperRuleDAO.xml b/src/main/resources/mybatis/mapper/paper/PaperRuleDAO.xml similarity index 100% rename from src/main/resources/mybatis/mapper/PaperRuleDAO.xml rename to src/main/resources/mybatis/mapper/paper/PaperRuleDAO.xml diff --git a/src/main/resources/mybatis/mapper/PaperUserDAO.xml b/src/main/resources/mybatis/mapper/paper/PaperUserDAO.xml similarity index 100% rename from src/main/resources/mybatis/mapper/PaperUserDAO.xml rename to src/main/resources/mybatis/mapper/paper/PaperUserDAO.xml diff --git a/src/main/resources/mybatis/mapper/PaperUserQuestionDAO.xml b/src/main/resources/mybatis/mapper/paper/PaperUserQuestionDAO.xml similarity index 100% rename from src/main/resources/mybatis/mapper/PaperUserQuestionDAO.xml rename to src/main/resources/mybatis/mapper/paper/PaperUserQuestionDAO.xml diff --git a/src/main/resources/mybatis/mapper/RtsPermissionDAO.xml b/src/main/resources/mybatis/mapper/permission/AcPermissionDAO.xml similarity index 99% rename from src/main/resources/mybatis/mapper/RtsPermissionDAO.xml rename to src/main/resources/mybatis/mapper/permission/AcPermissionDAO.xml index fa9924542..565ce5999 100644 --- a/src/main/resources/mybatis/mapper/RtsPermissionDAO.xml +++ b/src/main/resources/mybatis/mapper/permission/AcPermissionDAO.xml @@ -1,6 +1,6 @@ - + diff --git a/src/main/resources/mybatis/mapper/RtsPermissionSubjectDAO.xml b/src/main/resources/mybatis/mapper/permission/PermissionSubjectDAO.xml similarity index 99% rename from src/main/resources/mybatis/mapper/RtsPermissionSubjectDAO.xml rename to src/main/resources/mybatis/mapper/permission/PermissionSubjectDAO.xml index 7de8d6007..49c61160f 100644 --- a/src/main/resources/mybatis/mapper/RtsPermissionSubjectDAO.xml +++ b/src/main/resources/mybatis/mapper/permission/PermissionSubjectDAO.xml @@ -1,6 +1,6 @@ - + diff --git a/src/main/resources/mybatis/mapper/RtsPermissionSystemAbilityDAO.xml b/src/main/resources/mybatis/mapper/permission/PermissionSystemAbilityDAO.xml similarity index 98% rename from src/main/resources/mybatis/mapper/RtsPermissionSystemAbilityDAO.xml rename to src/main/resources/mybatis/mapper/permission/PermissionSystemAbilityDAO.xml index 24e6bee98..cde611228 100644 --- a/src/main/resources/mybatis/mapper/RtsPermissionSystemAbilityDAO.xml +++ b/src/main/resources/mybatis/mapper/permission/PermissionSystemAbilityDAO.xml @@ -1,6 +1,6 @@ - + diff --git a/src/main/resources/mybatis/mapper/RtsSystemAbilityDAO.xml b/src/main/resources/mybatis/mapper/permission/SystemAbilityDAO.xml similarity index 99% rename from src/main/resources/mybatis/mapper/RtsSystemAbilityDAO.xml rename to src/main/resources/mybatis/mapper/permission/SystemAbilityDAO.xml index 5d07cca21..49ccec65e 100644 --- a/src/main/resources/mybatis/mapper/RtsSystemAbilityDAO.xml +++ b/src/main/resources/mybatis/mapper/permission/SystemAbilityDAO.xml @@ -1,6 +1,6 @@ - + From b94f1c5a034797a57c9954f73af9d9dfc915c8f7 Mon Sep 17 00:00:00 2001 From: xzb <223@qq.com> Date: Thu, 13 Oct 2022 11:15:04 +0800 Subject: [PATCH 3/4] new permission --- .../permission2/AcPermissionController.java | 12 +++++++++++ .../permission2/SystemAbilityController.java | 21 +++++++++++++++++++ .../rtss/vo/permission/AddAbilityReqVo.java | 20 ++++++++++++++++++ .../rtss/vo/permission/SystemAbilityType.java | 7 +++++++ .../paper/PaperApiTestController.java | 6 +++--- .../services}/paper/PaperApiTestService.java | 4 ++-- 6 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 src/main/java/club/joylink/rtss/controller/permission2/AcPermissionController.java create mode 100644 src/main/java/club/joylink/rtss/controller/permission2/SystemAbilityController.java create mode 100644 src/main/java/club/joylink/rtss/vo/permission/AddAbilityReqVo.java create mode 100644 src/main/java/club/joylink/rtss/vo/permission/SystemAbilityType.java rename src/{main/java/club/joylink/rtss/controller => test/java/club/joylink/rtss/services}/paper/PaperApiTestController.java (98%) rename src/{main/java/club/joylink/rtss/controller => test/java/club/joylink/rtss/services}/paper/PaperApiTestService.java (98%) diff --git a/src/main/java/club/joylink/rtss/controller/permission2/AcPermissionController.java b/src/main/java/club/joylink/rtss/controller/permission2/AcPermissionController.java new file mode 100644 index 000000000..0b1bccfc0 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/permission2/AcPermissionController.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.controller.permission2; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *功能权限管理接口V2 + */ +@RestController +@RequestMapping("/api/v2/permission") +public class AcPermissionController { +} diff --git a/src/main/java/club/joylink/rtss/controller/permission2/SystemAbilityController.java b/src/main/java/club/joylink/rtss/controller/permission2/SystemAbilityController.java new file mode 100644 index 000000000..348c9a08c --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/permission2/SystemAbilityController.java @@ -0,0 +1,21 @@ +package club.joylink.rtss.controller.permission2; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 面向权限的系统功能管理接口V2 + */ +@Slf4j +@RestController +@RequestMapping("/api/v2/system/ability") +public class SystemAbilityController { + + /** + * 添加功能 + */ + public void addAbility(){ + + } +} diff --git a/src/main/java/club/joylink/rtss/vo/permission/AddAbilityReqVo.java b/src/main/java/club/joylink/rtss/vo/permission/AddAbilityReqVo.java new file mode 100644 index 000000000..38d7de391 --- /dev/null +++ b/src/main/java/club/joylink/rtss/vo/permission/AddAbilityReqVo.java @@ -0,0 +1,20 @@ +package club.joylink.rtss.vo.permission; + +import lombok.Data; + +@Data +public class AddAbilityReqVo { + /** + * 功能名称 + */ + private String name; + /** + * 功能描述 + */ + private String des; + /** + * 功能类型 + */ + private SystemAbilityType type; + +} diff --git a/src/main/java/club/joylink/rtss/vo/permission/SystemAbilityType.java b/src/main/java/club/joylink/rtss/vo/permission/SystemAbilityType.java new file mode 100644 index 000000000..547f6eb1a --- /dev/null +++ b/src/main/java/club/joylink/rtss/vo/permission/SystemAbilityType.java @@ -0,0 +1,7 @@ +package club.joylink.rtss.vo.permission; + +/** + * 功能类型枚举 + */ +public enum SystemAbilityType { +} diff --git a/src/main/java/club/joylink/rtss/controller/paper/PaperApiTestController.java b/src/test/java/club/joylink/rtss/services/paper/PaperApiTestController.java similarity index 98% rename from src/main/java/club/joylink/rtss/controller/paper/PaperApiTestController.java rename to src/test/java/club/joylink/rtss/services/paper/PaperApiTestController.java index 4a8dd5fcf..a197792ae 100644 --- a/src/main/java/club/joylink/rtss/controller/paper/PaperApiTestController.java +++ b/src/test/java/club/joylink/rtss/services/paper/PaperApiTestController.java @@ -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; diff --git a/src/main/java/club/joylink/rtss/controller/paper/PaperApiTestService.java b/src/test/java/club/joylink/rtss/services/paper/PaperApiTestService.java similarity index 98% rename from src/main/java/club/joylink/rtss/controller/paper/PaperApiTestService.java rename to src/test/java/club/joylink/rtss/services/paper/PaperApiTestService.java index 682046106..563ead1ab 100644 --- a/src/main/java/club/joylink/rtss/controller/paper/PaperApiTestService.java +++ b/src/test/java/club/joylink/rtss/services/paper/PaperApiTestService.java @@ -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; From 1611282abbbcbed3703082d7d6a3fe3a47e0aee9 Mon Sep 17 00:00:00 2001 From: xzb <223@qq.com> Date: Thu, 13 Oct 2022 11:26:32 +0800 Subject: [PATCH 4/4] paper --- .../rtss/controller/paper/PaperCompositionController.java | 8 ++++++++ .../rtss/controller/paper/PaperUserController.java | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/main/java/club/joylink/rtss/controller/paper/PaperCompositionController.java b/src/main/java/club/joylink/rtss/controller/paper/PaperCompositionController.java index ad44aaa2a..f863f58d4 100644 --- a/src/main/java/club/joylink/rtss/controller/paper/PaperCompositionController.java +++ b/src/main/java/club/joylink/rtss/controller/paper/PaperCompositionController.java @@ -83,6 +83,14 @@ public class PaperCompositionController { return this.compositionService.findPaperCompositionByPage(req); } + /** + * 根据试卷蓝图名称简介分页查找某个组织的试卷蓝图 + */ + @PostMapping("/find/page/for/{orgId}") + public PageVO findPaperCompositionForOrgByPage(@PathVariable("orgId") Long orgId, @RequestBody FindPaperCompositionPageReqVo req) { + req.setOrgId(orgId); + return this.compositionService.findPaperCompositionByPage(req); + } /** * 根据账户分页查找试卷蓝图 */ diff --git a/src/main/java/club/joylink/rtss/controller/paper/PaperUserController.java b/src/main/java/club/joylink/rtss/controller/paper/PaperUserController.java index 6bc55700d..4e8ecc7eb 100644 --- a/src/main/java/club/joylink/rtss/controller/paper/PaperUserController.java +++ b/src/main/java/club/joylink/rtss/controller/paper/PaperUserController.java @@ -118,4 +118,12 @@ public class PaperUserController { public List findPaperUserForAccount(@RequestBody FindPaperUserForAccountReqVo req, @RequestAttribute AccountVO user){ return this.paperUserFindPageService.findPaperUserForAccount(req); } + /** + * 查看组织的某个账户的某个试卷蓝图的用户试卷 + */ + @PostMapping("/{orgId}/user/list/account") + public List findOrgPaperUserForAccount(@PathVariable("orgId") Long orgId,@RequestBody FindPaperUserForAccountReqVo req, @RequestAttribute AccountVO user){ + req.setOrgId(orgId); + return this.paperUserFindPageService.findPaperUserForAccount(req); + } }