permission

This commit is contained in:
xzb 2022-10-18 09:38:54 +08:00
parent 0e34851966
commit a912a25c51
7 changed files with 1476 additions and 5 deletions

View File

@ -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<PermissionDistribute> 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);
}

View File

@ -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;
}

View File

@ -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<Criteria> oredCriteria;
private Integer limit;
private Long offset;
public PermissionDistributeExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimit(Integer limit) {
this.limit = limit;
}
public Integer getLimit() {
return limit;
}
public void setOffset(Long offset) {
this.offset = offset;
}
public Long getOffset() {
return offset;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andPermissionIdIsNull() {
addCriterion("permission_id is null");
return (Criteria) this;
}
public Criteria andPermissionIdIsNotNull() {
addCriterion("permission_id is not null");
return (Criteria) this;
}
public Criteria andPermissionIdEqualTo(Long value) {
addCriterion("permission_id =", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdNotEqualTo(Long value) {
addCriterion("permission_id <>", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdGreaterThan(Long value) {
addCriterion("permission_id >", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdGreaterThanOrEqualTo(Long value) {
addCriterion("permission_id >=", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdLessThan(Long value) {
addCriterion("permission_id <", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdLessThanOrEqualTo(Long value) {
addCriterion("permission_id <=", value, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdIn(List<Long> values) {
addCriterion("permission_id in", values, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdNotIn(List<Long> values) {
addCriterion("permission_id not in", values, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdBetween(Long value1, Long value2) {
addCriterion("permission_id between", value1, value2, "permissionId");
return (Criteria) this;
}
public Criteria andPermissionIdNotBetween(Long value1, Long value2) {
addCriterion("permission_id not between", value1, value2, "permissionId");
return (Criteria) this;
}
public Criteria 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<Long> values) {
addCriterion("source_subject_id in", values, "sourceSubjectId");
return (Criteria) this;
}
public Criteria andSourceSubjectIdNotIn(List<Long> 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<Integer> values) {
addCriterion("amount in", values, "amount");
return (Criteria) this;
}
public Criteria andAmountNotIn(List<Integer> values) {
addCriterion("amount not in", values, "amount");
return (Criteria) this;
}
public Criteria andAmountBetween(Integer value1, Integer value2) {
addCriterion("amount between", value1, value2, "amount");
return (Criteria) this;
}
public Criteria andAmountNotBetween(Integer value1, Integer value2) {
addCriterion("amount not between", value1, value2, "amount");
return (Criteria) this;
}
public Criteria andRemainsIsNull() {
addCriterion("remains is null");
return (Criteria) this;
}
public Criteria andRemainsIsNotNull() {
addCriterion("remains is not null");
return (Criteria) this;
}
public Criteria andRemainsEqualTo(Integer value) {
addCriterion("remains =", value, "remains");
return (Criteria) this;
}
public Criteria andRemainsNotEqualTo(Integer value) {
addCriterion("remains <>", value, "remains");
return (Criteria) this;
}
public Criteria andRemainsGreaterThan(Integer value) {
addCriterion("remains >", value, "remains");
return (Criteria) this;
}
public Criteria andRemainsGreaterThanOrEqualTo(Integer value) {
addCriterion("remains >=", value, "remains");
return (Criteria) this;
}
public Criteria andRemainsLessThan(Integer value) {
addCriterion("remains <", value, "remains");
return (Criteria) this;
}
public Criteria andRemainsLessThanOrEqualTo(Integer value) {
addCriterion("remains <=", value, "remains");
return (Criteria) this;
}
public Criteria andRemainsIn(List<Integer> values) {
addCriterion("remains in", values, "remains");
return (Criteria) this;
}
public Criteria andRemainsNotIn(List<Integer> values) {
addCriterion("remains not in", values, "remains");
return (Criteria) this;
}
public Criteria andRemainsBetween(Integer value1, Integer value2) {
addCriterion("remains between", value1, value2, "remains");
return (Criteria) this;
}
public Criteria andRemainsNotBetween(Integer value1, Integer value2) {
addCriterion("remains not between", value1, value2, "remains");
return (Criteria) this;
}
public Criteria andForeverIsNull() {
addCriterion("forever is null");
return (Criteria) this;
}
public Criteria andForeverIsNotNull() {
addCriterion("forever is not null");
return (Criteria) this;
}
public Criteria andForeverEqualTo(Boolean value) {
addCriterion("forever =", value, "forever");
return (Criteria) this;
}
public Criteria andForeverNotEqualTo(Boolean value) {
addCriterion("forever <>", value, "forever");
return (Criteria) this;
}
public Criteria andForeverGreaterThan(Boolean value) {
addCriterion("forever >", value, "forever");
return (Criteria) this;
}
public Criteria andForeverGreaterThanOrEqualTo(Boolean value) {
addCriterion("forever >=", value, "forever");
return (Criteria) this;
}
public Criteria andForeverLessThan(Boolean value) {
addCriterion("forever <", value, "forever");
return (Criteria) this;
}
public Criteria andForeverLessThanOrEqualTo(Boolean value) {
addCriterion("forever <=", value, "forever");
return (Criteria) this;
}
public Criteria andForeverIn(List<Boolean> values) {
addCriterion("forever in", values, "forever");
return (Criteria) this;
}
public Criteria andForeverNotIn(List<Boolean> values) {
addCriterion("forever not in", values, "forever");
return (Criteria) this;
}
public Criteria andForeverBetween(Boolean value1, Boolean value2) {
addCriterion("forever between", value1, value2, "forever");
return (Criteria) this;
}
public Criteria andForeverNotBetween(Boolean value1, Boolean value2) {
addCriterion("forever not between", value1, value2, "forever");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(LocalDateTime value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(LocalDateTime value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(LocalDateTime value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(LocalDateTime value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<LocalDateTime> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<LocalDateTime> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(LocalDateTime value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(LocalDateTime value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(LocalDateTime value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<LocalDateTime> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<LocalDateTime> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andStartTimeIsNull() {
addCriterion("start_time is null");
return (Criteria) this;
}
public Criteria andStartTimeIsNotNull() {
addCriterion("start_time is not null");
return (Criteria) this;
}
public Criteria andStartTimeEqualTo(LocalDateTime value) {
addCriterion("start_time =", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotEqualTo(LocalDateTime value) {
addCriterion("start_time <>", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeGreaterThan(LocalDateTime value) {
addCriterion("start_time >", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeGreaterThanOrEqualTo(LocalDateTime value) {
addCriterion("start_time >=", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeLessThan(LocalDateTime value) {
addCriterion("start_time <", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeLessThanOrEqualTo(LocalDateTime value) {
addCriterion("start_time <=", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeIn(List<LocalDateTime> values) {
addCriterion("start_time in", values, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotIn(List<LocalDateTime> values) {
addCriterion("start_time not in", values, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("start_time between", value1, value2, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("start_time not between", value1, value2, "startTime");
return (Criteria) this;
}
public Criteria andEndTimeIsNull() {
addCriterion("end_time is null");
return (Criteria) this;
}
public Criteria andEndTimeIsNotNull() {
addCriterion("end_time is not null");
return (Criteria) this;
}
public Criteria andEndTimeEqualTo(LocalDateTime value) {
addCriterion("end_time =", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotEqualTo(LocalDateTime value) {
addCriterion("end_time <>", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeGreaterThan(LocalDateTime value) {
addCriterion("end_time >", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeGreaterThanOrEqualTo(LocalDateTime value) {
addCriterion("end_time >=", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeLessThan(LocalDateTime value) {
addCriterion("end_time <", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeLessThanOrEqualTo(LocalDateTime value) {
addCriterion("end_time <=", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeIn(List<LocalDateTime> values) {
addCriterion("end_time in", values, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotIn(List<LocalDateTime> values) {
addCriterion("end_time not in", values, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("end_time between", value1, value2, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("end_time not between", value1, value2, "endTime");
return (Criteria) this;
}
public Criteria andCreatorIdIsNull() {
addCriterion("creator_id is null");
return (Criteria) this;
}
public Criteria andCreatorIdIsNotNull() {
addCriterion("creator_id is not null");
return (Criteria) this;
}
public Criteria andCreatorIdEqualTo(Long value) {
addCriterion("creator_id =", value, "creatorId");
return (Criteria) this;
}
public Criteria andCreatorIdNotEqualTo(Long value) {
addCriterion("creator_id <>", value, "creatorId");
return (Criteria) this;
}
public Criteria andCreatorIdGreaterThan(Long value) {
addCriterion("creator_id >", value, "creatorId");
return (Criteria) this;
}
public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) {
addCriterion("creator_id >=", value, "creatorId");
return (Criteria) this;
}
public Criteria andCreatorIdLessThan(Long value) {
addCriterion("creator_id <", value, "creatorId");
return (Criteria) this;
}
public Criteria andCreatorIdLessThanOrEqualTo(Long value) {
addCriterion("creator_id <=", value, "creatorId");
return (Criteria) this;
}
public Criteria andCreatorIdIn(List<Long> values) {
addCriterion("creator_id in", values, "creatorId");
return (Criteria) this;
}
public Criteria andCreatorIdNotIn(List<Long> values) {
addCriterion("creator_id not in", values, "creatorId");
return (Criteria) this;
}
public Criteria andCreatorIdBetween(Long value1, Long value2) {
addCriterion("creator_id between", value1, value2, "creatorId");
return (Criteria) this;
}
public Criteria andCreatorIdNotBetween(Long value1, Long value2) {
addCriterion("creator_id not between", value1, value2, "creatorId");
return (Criteria) this;
}
public Criteria 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<String> values) {
addCriterion("dsc in", values, "dsc");
return (Criteria) this;
}
public Criteria andDscNotIn(List<String> 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);
}
}
}

View File

@ -65,5 +65,10 @@ public class PermissionSubject implements Serializable {
*/ */
private LocalDateTime createTime; private LocalDateTime createTime;
/**
* 来自对应的分发id(rts_permission_distribute)
*/
private Long distributeId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -804,6 +804,66 @@ public class PermissionSubjectExample {
addCriterion("create_time not between", value1, value2, "createTime"); addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this; 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<Long> values) {
addCriterion("distribute_id in", values, "distributeId");
return (Criteria) this;
}
public Criteria andDistributeIdNotIn(List<Long> 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;
}
} }
/** /**

View File

@ -13,6 +13,7 @@
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" /> <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" /> <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="distribute_id" jdbcType="BIGINT" property="distributeId" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
@ -74,7 +75,7 @@
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, permission_id, subject_type, subject_id, amount, remains, `status`, forever, 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
</sql> </sql>
<select id="selectByExample" parameterType="club.joylink.rtss.entity.permission.PermissionSubjectExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="club.joylink.rtss.entity.permission.PermissionSubjectExample" resultMap="BaseResultMap">
select select
@ -118,11 +119,13 @@
insert into rts_permission_subject (id, permission_id, subject_type, insert into rts_permission_subject (id, permission_id, subject_type,
subject_id, amount, remains, subject_id, amount, remains,
`status`, forever, start_time, `status`, forever, start_time,
end_time, create_time) end_time, create_time, distribute_id
)
values (#{id,jdbcType=BIGINT}, #{permissionId,jdbcType=BIGINT}, #{subjectType,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{permissionId,jdbcType=BIGINT}, #{subjectType,jdbcType=VARCHAR},
#{subjectId,jdbcType=BIGINT}, #{amount,jdbcType=INTEGER}, #{remains,jdbcType=INTEGER}, #{subjectId,jdbcType=BIGINT}, #{amount,jdbcType=INTEGER}, #{remains,jdbcType=INTEGER},
#{status,jdbcType=VARCHAR}, #{forever,jdbcType=BIT}, #{startTime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}, #{forever,jdbcType=BIT}, #{startTime,jdbcType=TIMESTAMP},
#{endTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}) #{endTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{distributeId,jdbcType=BIGINT}
)
</insert> </insert>
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.permission.PermissionSubject"> <insert id="insertSelective" parameterType="club.joylink.rtss.entity.permission.PermissionSubject">
insert into rts_permission_subject insert into rts_permission_subject
@ -160,6 +163,9 @@
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="distributeId != null">
distribute_id,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -195,6 +201,9 @@
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="distributeId != null">
#{distributeId,jdbcType=BIGINT},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="club.joylink.rtss.entity.permission.PermissionSubjectExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="club.joylink.rtss.entity.permission.PermissionSubjectExample" resultType="java.lang.Long">
@ -239,6 +248,9 @@
<if test="record.createTime != null"> <if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.distributeId != null">
distribute_id = #{record.distributeId,jdbcType=BIGINT},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -256,7 +268,8 @@
forever = #{record.forever,jdbcType=BIT}, forever = #{record.forever,jdbcType=BIT},
start_time = #{record.startTime,jdbcType=TIMESTAMP}, start_time = #{record.startTime,jdbcType=TIMESTAMP},
end_time = #{record.endTime,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}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -294,6 +307,9 @@
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="distributeId != null">
distribute_id = #{distributeId,jdbcType=BIGINT},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
@ -308,7 +324,8 @@
forever = #{forever,jdbcType=BIT}, forever = #{forever,jdbcType=BIT},
start_time = #{startTime,jdbcType=TIMESTAMP}, start_time = #{startTime,jdbcType=TIMESTAMP},
end_time = #{endTime,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} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>

View File

@ -0,0 +1,331 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="club.joylink.rtss.dao.permission.RtsPermissionDistributeDAO">
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.permission.PermissionDistribute">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="permission_id" jdbcType="BIGINT" property="permissionId" />
<result column="source_subject_id" jdbcType="BIGINT" property="sourceSubjectId" />
<result column="amount" jdbcType="INTEGER" property="amount" />
<result column="remains" jdbcType="INTEGER" property="remains" />
<result column="forever" jdbcType="BIT" property="forever" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
<result column="dsc" jdbcType="VARCHAR" property="dsc" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, permission_id, source_subject_id, amount, remains, forever, create_time, update_time,
start_time, end_time, creator_id, dsc
</sql>
<select id="selectByExample" parameterType="club.joylink.rtss.entity.permission.PermissionDistributeExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from rts_permission_distribute
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from rts_permission_distribute
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from rts_permission_distribute
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.permission.PermissionDistributeExample">
delete from rts_permission_distribute
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="club.joylink.rtss.entity.permission.PermissionDistribute">
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>
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.permission.PermissionDistribute">
insert into rts_permission_distribute
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="permissionId != null">
permission_id,
</if>
<if test="sourceSubjectId != null">
source_subject_id,
</if>
<if test="amount != null">
amount,
</if>
<if test="remains != null">
remains,
</if>
<if test="forever != null">
forever,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="creatorId != null">
creator_id,
</if>
<if test="dsc != null">
dsc,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="permissionId != null">
#{permissionId,jdbcType=BIGINT},
</if>
<if test="sourceSubjectId != null">
#{sourceSubjectId,jdbcType=BIGINT},
</if>
<if test="amount != null">
#{amount,jdbcType=INTEGER},
</if>
<if test="remains != null">
#{remains,jdbcType=INTEGER},
</if>
<if test="forever != null">
#{forever,jdbcType=BIT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="startTime != null">
#{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
#{endTime,jdbcType=TIMESTAMP},
</if>
<if test="creatorId != null">
#{creatorId,jdbcType=BIGINT},
</if>
<if test="dsc != null">
#{dsc,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="club.joylink.rtss.entity.permission.PermissionDistributeExample" resultType="java.lang.Long">
select count(*) from rts_permission_distribute
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update rts_permission_distribute
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.permissionId != null">
permission_id = #{record.permissionId,jdbcType=BIGINT},
</if>
<if test="record.sourceSubjectId != null">
source_subject_id = #{record.sourceSubjectId,jdbcType=BIGINT},
</if>
<if test="record.amount != null">
amount = #{record.amount,jdbcType=INTEGER},
</if>
<if test="record.remains != null">
remains = #{record.remains,jdbcType=INTEGER},
</if>
<if test="record.forever != null">
forever = #{record.forever,jdbcType=BIT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.startTime != null">
start_time = #{record.startTime,jdbcType=TIMESTAMP},
</if>
<if test="record.endTime != null">
end_time = #{record.endTime,jdbcType=TIMESTAMP},
</if>
<if test="record.creatorId != null">
creator_id = #{record.creatorId,jdbcType=BIGINT},
</if>
<if test="record.dsc != null">
dsc = #{record.dsc,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.permission.PermissionDistribute">
update rts_permission_distribute
<set>
<if test="permissionId != null">
permission_id = #{permissionId,jdbcType=BIGINT},
</if>
<if test="sourceSubjectId != null">
source_subject_id = #{sourceSubjectId,jdbcType=BIGINT},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=INTEGER},
</if>
<if test="remains != null">
remains = #{remains,jdbcType=INTEGER},
</if>
<if test="forever != null">
forever = #{forever,jdbcType=BIT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=TIMESTAMP},
</if>
<if test="creatorId != null">
creator_id = #{creatorId,jdbcType=BIGINT},
</if>
<if test="dsc != null">
dsc = #{dsc,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.permission.PermissionDistribute">
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}
</update>
</mapper>