diff --git a/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionDistributeDAO.java b/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionDistributeDAO.java new file mode 100644 index 000000000..031301515 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/permission/RtsPermissionDistributeDAO.java @@ -0,0 +1,34 @@ +package club.joylink.rtss.dao.permission; + +import club.joylink.rtss.entity.permission.PermissionDistribute; +import club.joylink.rtss.entity.permission.PermissionDistributeExample; +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 RtsPermissionDistributeDAO { + long countByExample(PermissionDistributeExample example); + + int deleteByExample(PermissionDistributeExample example); + + int deleteByPrimaryKey(Long id); + + int insert(PermissionDistribute record); + + int insertSelective(PermissionDistribute record); + + List selectByExample(PermissionDistributeExample example); + + PermissionDistribute selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") PermissionDistribute record, @Param("example") PermissionDistributeExample example); + + int updateByExample(@Param("record") PermissionDistribute record, @Param("example") PermissionDistributeExample example); + + int updateByPrimaryKeySelective(PermissionDistribute record); + + int updateByPrimaryKey(PermissionDistribute record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/permission/PermissionDistribute.java b/src/main/java/club/joylink/rtss/entity/permission/PermissionDistribute.java new file mode 100644 index 000000000..a2eeae9e2 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/permission/PermissionDistribute.java @@ -0,0 +1,71 @@ +package club.joylink.rtss.entity.permission; + +import java.io.Serializable; +import java.time.LocalDateTime; +import lombok.Data; + +/** + * @author + * + */ +@Data +public class PermissionDistribute implements Serializable { + private Long id; + + /** + * 关联权限id + */ + private Long permissionId; + + /** + * 分发来自subject id(rts_permission_subject) + */ + private Long sourceSubjectId; + + /** + * 总数量 + */ + private Integer amount; + + /** + * 剩余数量 + */ + private Integer remains; + + /** + * 是否永久:true/false + */ + private Boolean forever; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 修改时间 + */ + private LocalDateTime updateTime; + + /** + * 开始时间 + */ + private LocalDateTime startTime; + + /** + * 结束时间 + */ + private LocalDateTime endTime; + + /** + * 创建者id + */ + private Long creatorId; + + /** + * 备注描述 + */ + private String dsc; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/permission/PermissionDistributeExample.java b/src/main/java/club/joylink/rtss/entity/permission/PermissionDistributeExample.java new file mode 100644 index 000000000..a63c9e3fc --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/permission/PermissionDistributeExample.java @@ -0,0 +1,953 @@ +package club.joylink.rtss.entity.permission; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class PermissionDistributeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public PermissionDistributeExample() { + 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 andSourceSubjectIdIsNull() { + addCriterion("source_subject_id is null"); + return (Criteria) this; + } + + public Criteria andSourceSubjectIdIsNotNull() { + addCriterion("source_subject_id is not null"); + return (Criteria) this; + } + + public Criteria andSourceSubjectIdEqualTo(Long value) { + addCriterion("source_subject_id =", value, "sourceSubjectId"); + return (Criteria) this; + } + + public Criteria andSourceSubjectIdNotEqualTo(Long value) { + addCriterion("source_subject_id <>", value, "sourceSubjectId"); + return (Criteria) this; + } + + public Criteria andSourceSubjectIdGreaterThan(Long value) { + addCriterion("source_subject_id >", value, "sourceSubjectId"); + return (Criteria) this; + } + + public Criteria andSourceSubjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("source_subject_id >=", value, "sourceSubjectId"); + return (Criteria) this; + } + + public Criteria andSourceSubjectIdLessThan(Long value) { + addCriterion("source_subject_id <", value, "sourceSubjectId"); + return (Criteria) this; + } + + public Criteria andSourceSubjectIdLessThanOrEqualTo(Long value) { + addCriterion("source_subject_id <=", value, "sourceSubjectId"); + return (Criteria) this; + } + + public Criteria andSourceSubjectIdIn(List values) { + addCriterion("source_subject_id in", values, "sourceSubjectId"); + return (Criteria) this; + } + + public Criteria andSourceSubjectIdNotIn(List values) { + addCriterion("source_subject_id not in", values, "sourceSubjectId"); + return (Criteria) this; + } + + public Criteria andSourceSubjectIdBetween(Long value1, Long value2) { + addCriterion("source_subject_id between", value1, value2, "sourceSubjectId"); + return (Criteria) this; + } + + public Criteria andSourceSubjectIdNotBetween(Long value1, Long value2) { + addCriterion("source_subject_id not between", value1, value2, "sourceSubjectId"); + 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 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 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 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 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 andDscIsNull() { + addCriterion("dsc is null"); + return (Criteria) this; + } + + public Criteria andDscIsNotNull() { + addCriterion("dsc is not null"); + return (Criteria) this; + } + + public Criteria andDscEqualTo(String value) { + addCriterion("dsc =", value, "dsc"); + return (Criteria) this; + } + + public Criteria andDscNotEqualTo(String value) { + addCriterion("dsc <>", value, "dsc"); + return (Criteria) this; + } + + public Criteria andDscGreaterThan(String value) { + addCriterion("dsc >", value, "dsc"); + return (Criteria) this; + } + + public Criteria andDscGreaterThanOrEqualTo(String value) { + addCriterion("dsc >=", value, "dsc"); + return (Criteria) this; + } + + public Criteria andDscLessThan(String value) { + addCriterion("dsc <", value, "dsc"); + return (Criteria) this; + } + + public Criteria andDscLessThanOrEqualTo(String value) { + addCriterion("dsc <=", value, "dsc"); + return (Criteria) this; + } + + public Criteria andDscLike(String value) { + addCriterion("dsc like", value, "dsc"); + return (Criteria) this; + } + + public Criteria andDscNotLike(String value) { + addCriterion("dsc not like", value, "dsc"); + return (Criteria) this; + } + + public Criteria andDscIn(List values) { + addCriterion("dsc in", values, "dsc"); + return (Criteria) this; + } + + public Criteria andDscNotIn(List values) { + addCriterion("dsc not in", values, "dsc"); + return (Criteria) this; + } + + public Criteria andDscBetween(String value1, String value2) { + addCriterion("dsc between", value1, value2, "dsc"); + return (Criteria) this; + } + + public Criteria andDscNotBetween(String value1, String value2) { + addCriterion("dsc not between", value1, value2, "dsc"); + 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 index fc1496a6e..e4607f621 100644 --- a/src/main/java/club/joylink/rtss/entity/permission/PermissionSubject.java +++ b/src/main/java/club/joylink/rtss/entity/permission/PermissionSubject.java @@ -65,5 +65,10 @@ public class PermissionSubject implements Serializable { */ private LocalDateTime createTime; + /** + * 来自对应的分发id(rts_permission_distribute) + */ + private Long distributeId; + 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 index 97eaecddf..cf1bd4061 100644 --- a/src/main/java/club/joylink/rtss/entity/permission/PermissionSubjectExample.java +++ b/src/main/java/club/joylink/rtss/entity/permission/PermissionSubjectExample.java @@ -804,6 +804,66 @@ public class PermissionSubjectExample { addCriterion("create_time not between", value1, value2, "createTime"); return (Criteria) this; } + + public Criteria andDistributeIdIsNull() { + addCriterion("distribute_id is null"); + return (Criteria) this; + } + + public Criteria andDistributeIdIsNotNull() { + addCriterion("distribute_id is not null"); + return (Criteria) this; + } + + public Criteria andDistributeIdEqualTo(Long value) { + addCriterion("distribute_id =", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdNotEqualTo(Long value) { + addCriterion("distribute_id <>", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdGreaterThan(Long value) { + addCriterion("distribute_id >", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdGreaterThanOrEqualTo(Long value) { + addCriterion("distribute_id >=", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdLessThan(Long value) { + addCriterion("distribute_id <", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdLessThanOrEqualTo(Long value) { + addCriterion("distribute_id <=", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdIn(List values) { + addCriterion("distribute_id in", values, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdNotIn(List values) { + addCriterion("distribute_id not in", values, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdBetween(Long value1, Long value2) { + addCriterion("distribute_id between", value1, value2, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdNotBetween(Long value1, Long value2) { + addCriterion("distribute_id not between", value1, value2, "distributeId"); + return (Criteria) this; + } } /** diff --git a/src/main/resources/mybatis/mapper/permission/PermissionSubjectDAO.xml b/src/main/resources/mybatis/mapper/permission/PermissionSubjectDAO.xml index 49c61160f..8d9889b19 100644 --- a/src/main/resources/mybatis/mapper/permission/PermissionSubjectDAO.xml +++ b/src/main/resources/mybatis/mapper/permission/PermissionSubjectDAO.xml @@ -13,6 +13,7 @@ + @@ -74,7 +75,7 @@ id, permission_id, subject_type, subject_id, amount, remains, `status`, forever, - start_time, end_time, create_time + start_time, end_time, create_time, distribute_id @@ -239,6 +248,9 @@ create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + distribute_id = #{record.distributeId,jdbcType=BIGINT}, + @@ -256,7 +268,8 @@ forever = #{record.forever,jdbcType=BIT}, start_time = #{record.startTime,jdbcType=TIMESTAMP}, end_time = #{record.endTime,jdbcType=TIMESTAMP}, - create_time = #{record.createTime,jdbcType=TIMESTAMP} + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + distribute_id = #{record.distributeId,jdbcType=BIGINT} @@ -294,6 +307,9 @@ create_time = #{createTime,jdbcType=TIMESTAMP}, + + distribute_id = #{distributeId,jdbcType=BIGINT}, + where id = #{id,jdbcType=BIGINT} @@ -308,7 +324,8 @@ forever = #{forever,jdbcType=BIT}, start_time = #{startTime,jdbcType=TIMESTAMP}, end_time = #{endTime,jdbcType=TIMESTAMP}, - create_time = #{createTime,jdbcType=TIMESTAMP} + create_time = #{createTime,jdbcType=TIMESTAMP}, + distribute_id = #{distributeId,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/permission/RtsPermissionDistributeDAO.xml b/src/main/resources/mybatis/mapper/permission/RtsPermissionDistributeDAO.xml new file mode 100644 index 000000000..6baed1d85 --- /dev/null +++ b/src/main/resources/mybatis/mapper/permission/RtsPermissionDistributeDAO.xml @@ -0,0 +1,331 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 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, source_subject_id, amount, remains, forever, create_time, update_time, + start_time, end_time, creator_id, dsc + + + + + delete from rts_permission_distribute + where id = #{id,jdbcType=BIGINT} + + + delete from rts_permission_distribute + + + + + + insert into rts_permission_distribute (id, permission_id, source_subject_id, + amount, remains, forever, + create_time, update_time, start_time, + end_time, creator_id, dsc + ) + values (#{id,jdbcType=BIGINT}, #{permissionId,jdbcType=BIGINT}, #{sourceSubjectId,jdbcType=BIGINT}, + #{amount,jdbcType=INTEGER}, #{remains,jdbcType=INTEGER}, #{forever,jdbcType=BIT}, + #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{startTime,jdbcType=TIMESTAMP}, + #{endTime,jdbcType=TIMESTAMP}, #{creatorId,jdbcType=BIGINT}, #{dsc,jdbcType=VARCHAR} + ) + + + insert into rts_permission_distribute + + + id, + + + permission_id, + + + source_subject_id, + + + amount, + + + remains, + + + forever, + + + create_time, + + + update_time, + + + start_time, + + + end_time, + + + creator_id, + + + dsc, + + + + + #{id,jdbcType=BIGINT}, + + + #{permissionId,jdbcType=BIGINT}, + + + #{sourceSubjectId,jdbcType=BIGINT}, + + + #{amount,jdbcType=INTEGER}, + + + #{remains,jdbcType=INTEGER}, + + + #{forever,jdbcType=BIT}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{startTime,jdbcType=TIMESTAMP}, + + + #{endTime,jdbcType=TIMESTAMP}, + + + #{creatorId,jdbcType=BIGINT}, + + + #{dsc,jdbcType=VARCHAR}, + + + + + + update rts_permission_distribute + + + id = #{record.id,jdbcType=BIGINT}, + + + permission_id = #{record.permissionId,jdbcType=BIGINT}, + + + source_subject_id = #{record.sourceSubjectId,jdbcType=BIGINT}, + + + amount = #{record.amount,jdbcType=INTEGER}, + + + remains = #{record.remains,jdbcType=INTEGER}, + + + forever = #{record.forever,jdbcType=BIT}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + start_time = #{record.startTime,jdbcType=TIMESTAMP}, + + + end_time = #{record.endTime,jdbcType=TIMESTAMP}, + + + creator_id = #{record.creatorId,jdbcType=BIGINT}, + + + dsc = #{record.dsc,jdbcType=VARCHAR}, + + + + + + + + update rts_permission_distribute + set id = #{record.id,jdbcType=BIGINT}, + permission_id = #{record.permissionId,jdbcType=BIGINT}, + source_subject_id = #{record.sourceSubjectId,jdbcType=BIGINT}, + amount = #{record.amount,jdbcType=INTEGER}, + remains = #{record.remains,jdbcType=INTEGER}, + forever = #{record.forever,jdbcType=BIT}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + start_time = #{record.startTime,jdbcType=TIMESTAMP}, + end_time = #{record.endTime,jdbcType=TIMESTAMP}, + creator_id = #{record.creatorId,jdbcType=BIGINT}, + dsc = #{record.dsc,jdbcType=VARCHAR} + + + + + + update rts_permission_distribute + + + permission_id = #{permissionId,jdbcType=BIGINT}, + + + source_subject_id = #{sourceSubjectId,jdbcType=BIGINT}, + + + amount = #{amount,jdbcType=INTEGER}, + + + remains = #{remains,jdbcType=INTEGER}, + + + forever = #{forever,jdbcType=BIT}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + start_time = #{startTime,jdbcType=TIMESTAMP}, + + + end_time = #{endTime,jdbcType=TIMESTAMP}, + + + creator_id = #{creatorId,jdbcType=BIGINT}, + + + dsc = #{dsc,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + update rts_permission_distribute + set permission_id = #{permissionId,jdbcType=BIGINT}, + source_subject_id = #{sourceSubjectId,jdbcType=BIGINT}, + amount = #{amount,jdbcType=INTEGER}, + remains = #{remains,jdbcType=INTEGER}, + forever = #{forever,jdbcType=BIT}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + start_time = #{startTime,jdbcType=TIMESTAMP}, + end_time = #{endTime,jdbcType=TIMESTAMP}, + creator_id = #{creatorId,jdbcType=BIGINT}, + dsc = #{dsc,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file