新权限分发领取功能

This commit is contained in:
tiger_zhou 2022-10-18 09:27:16 +08:00
parent 0e34851966
commit c8a8bdc6ee
13 changed files with 1602 additions and 59 deletions

View File

@ -0,0 +1,35 @@
package club.joylink.rtss.dao.permission;
import java.util.List;
import club.joylink.rtss.entity.permission.PermissionDistribute;
import club.joylink.rtss.entity.permission.PermissionDistributeExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface PermissionDistributeDAO {
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

@ -1,8 +1,9 @@
package club.joylink.rtss.dao.permission; package club.joylink.rtss.dao.permission;
import java.util.List;
import club.joylink.rtss.entity.permission.PermissionSubject; import club.joylink.rtss.entity.permission.PermissionSubject;
import club.joylink.rtss.entity.permission.PermissionSubjectExample; import club.joylink.rtss.entity.permission.PermissionSubjectExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@ -31,4 +32,4 @@ public interface PermissionSubjectDAO {
int updateByPrimaryKeySelective(PermissionSubject record); int updateByPrimaryKeySelective(PermissionSubject record);
int updateByPrimaryKey(PermissionSubject record); int updateByPrimaryKey(PermissionSubject record);
} }

View File

@ -0,0 +1,71 @@
package club.joylink.rtss.entity.permission;
import java.io.Serializable;
import java.util.Date;
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 Date createTime;
/**
* 修改时间
*/
private Date updateTime;
/**
* 开始时间
*/
private Date startTime;
/**
* 结束时间
*/
private Date endTime;
/**
* 创建者id
*/
private Long createId;
/**
* 备注描述
*/
private String dsc;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,953 @@
package club.joylink.rtss.entity.permission;
import java.util.ArrayList;
import java.util.Date;
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(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date 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(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date 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(Date value) {
addCriterion("start_time =", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotEqualTo(Date value) {
addCriterion("start_time <>", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeGreaterThan(Date value) {
addCriterion("start_time >", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeGreaterThanOrEqualTo(Date value) {
addCriterion("start_time >=", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeLessThan(Date value) {
addCriterion("start_time <", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeLessThanOrEqualTo(Date value) {
addCriterion("start_time <=", value, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeIn(List<Date> values) {
addCriterion("start_time in", values, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotIn(List<Date> values) {
addCriterion("start_time not in", values, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeBetween(Date value1, Date value2) {
addCriterion("start_time between", value1, value2, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotBetween(Date value1, Date 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(Date value) {
addCriterion("end_time =", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotEqualTo(Date value) {
addCriterion("end_time <>", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeGreaterThan(Date value) {
addCriterion("end_time >", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeGreaterThanOrEqualTo(Date value) {
addCriterion("end_time >=", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeLessThan(Date value) {
addCriterion("end_time <", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeLessThanOrEqualTo(Date value) {
addCriterion("end_time <=", value, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeIn(List<Date> values) {
addCriterion("end_time in", values, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotIn(List<Date> values) {
addCriterion("end_time not in", values, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeBetween(Date value1, Date value2) {
addCriterion("end_time between", value1, value2, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotBetween(Date value1, Date value2) {
addCriterion("end_time not between", value1, value2, "endTime");
return (Criteria) this;
}
public Criteria andCreateIdIsNull() {
addCriterion("create_id is null");
return (Criteria) this;
}
public Criteria andCreateIdIsNotNull() {
addCriterion("create_id is not null");
return (Criteria) this;
}
public Criteria andCreateIdEqualTo(Long value) {
addCriterion("create_id =", value, "createId");
return (Criteria) this;
}
public Criteria andCreateIdNotEqualTo(Long value) {
addCriterion("create_id <>", value, "createId");
return (Criteria) this;
}
public Criteria andCreateIdGreaterThan(Long value) {
addCriterion("create_id >", value, "createId");
return (Criteria) this;
}
public Criteria andCreateIdGreaterThanOrEqualTo(Long value) {
addCriterion("create_id >=", value, "createId");
return (Criteria) this;
}
public Criteria andCreateIdLessThan(Long value) {
addCriterion("create_id <", value, "createId");
return (Criteria) this;
}
public Criteria andCreateIdLessThanOrEqualTo(Long value) {
addCriterion("create_id <=", value, "createId");
return (Criteria) this;
}
public Criteria andCreateIdIn(List<Long> values) {
addCriterion("create_id in", values, "createId");
return (Criteria) this;
}
public Criteria andCreateIdNotIn(List<Long> values) {
addCriterion("create_id not in", values, "createId");
return (Criteria) this;
}
public Criteria andCreateIdBetween(Long value1, Long value2) {
addCriterion("create_id between", value1, value2, "createId");
return (Criteria) this;
}
public Criteria andCreateIdNotBetween(Long value1, Long value2) {
addCriterion("create_id not between", value1, value2, "createId");
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

@ -1,7 +1,7 @@
package club.joylink.rtss.entity.permission; package club.joylink.rtss.entity.permission;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime; import java.util.Date;
import lombok.Data; import lombok.Data;
/** /**
@ -53,17 +53,22 @@ public class PermissionSubject implements Serializable {
/** /**
* 开始时间 * 开始时间
*/ */
private LocalDateTime startTime; private Date startTime;
/** /**
* 结束时间 * 结束时间
*/ */
private LocalDateTime endTime; private Date endTime;
/** /**
* 创建时间 * 创建时间
*/ */
private LocalDateTime createTime; private Date createTime;
/**
* 来自对应的分发id(rts_permission_distribute)
*/
private Long distributeId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -1,7 +1,7 @@
package club.joylink.rtss.entity.permission; package club.joylink.rtss.entity.permission;
import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
public class PermissionSubjectExample { public class PermissionSubjectExample {
@ -635,52 +635,52 @@ public class PermissionSubjectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeEqualTo(LocalDateTime value) { public Criteria andStartTimeEqualTo(Date value) {
addCriterion("start_time =", value, "startTime"); addCriterion("start_time =", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeNotEqualTo(LocalDateTime value) { public Criteria andStartTimeNotEqualTo(Date value) {
addCriterion("start_time <>", value, "startTime"); addCriterion("start_time <>", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeGreaterThan(LocalDateTime value) { public Criteria andStartTimeGreaterThan(Date value) {
addCriterion("start_time >", value, "startTime"); addCriterion("start_time >", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeGreaterThanOrEqualTo(LocalDateTime value) { public Criteria andStartTimeGreaterThanOrEqualTo(Date value) {
addCriterion("start_time >=", value, "startTime"); addCriterion("start_time >=", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeLessThan(LocalDateTime value) { public Criteria andStartTimeLessThan(Date value) {
addCriterion("start_time <", value, "startTime"); addCriterion("start_time <", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeLessThanOrEqualTo(LocalDateTime value) { public Criteria andStartTimeLessThanOrEqualTo(Date value) {
addCriterion("start_time <=", value, "startTime"); addCriterion("start_time <=", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeIn(List<LocalDateTime> values) { public Criteria andStartTimeIn(List<Date> values) {
addCriterion("start_time in", values, "startTime"); addCriterion("start_time in", values, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeNotIn(List<LocalDateTime> values) { public Criteria andStartTimeNotIn(List<Date> values) {
addCriterion("start_time not in", values, "startTime"); addCriterion("start_time not in", values, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andStartTimeBetween(Date value1, Date value2) {
addCriterion("start_time between", value1, value2, "startTime"); addCriterion("start_time between", value1, value2, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andStartTimeNotBetween(Date value1, Date value2) {
addCriterion("start_time not between", value1, value2, "startTime"); addCriterion("start_time not between", value1, value2, "startTime");
return (Criteria) this; return (Criteria) this;
} }
@ -695,52 +695,52 @@ public class PermissionSubjectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeEqualTo(LocalDateTime value) { public Criteria andEndTimeEqualTo(Date value) {
addCriterion("end_time =", value, "endTime"); addCriterion("end_time =", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeNotEqualTo(LocalDateTime value) { public Criteria andEndTimeNotEqualTo(Date value) {
addCriterion("end_time <>", value, "endTime"); addCriterion("end_time <>", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeGreaterThan(LocalDateTime value) { public Criteria andEndTimeGreaterThan(Date value) {
addCriterion("end_time >", value, "endTime"); addCriterion("end_time >", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeGreaterThanOrEqualTo(LocalDateTime value) { public Criteria andEndTimeGreaterThanOrEqualTo(Date value) {
addCriterion("end_time >=", value, "endTime"); addCriterion("end_time >=", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeLessThan(LocalDateTime value) { public Criteria andEndTimeLessThan(Date value) {
addCriterion("end_time <", value, "endTime"); addCriterion("end_time <", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeLessThanOrEqualTo(LocalDateTime value) { public Criteria andEndTimeLessThanOrEqualTo(Date value) {
addCriterion("end_time <=", value, "endTime"); addCriterion("end_time <=", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeIn(List<LocalDateTime> values) { public Criteria andEndTimeIn(List<Date> values) {
addCriterion("end_time in", values, "endTime"); addCriterion("end_time in", values, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeNotIn(List<LocalDateTime> values) { public Criteria andEndTimeNotIn(List<Date> values) {
addCriterion("end_time not in", values, "endTime"); addCriterion("end_time not in", values, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andEndTimeBetween(Date value1, Date value2) {
addCriterion("end_time between", value1, value2, "endTime"); addCriterion("end_time between", value1, value2, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andEndTimeNotBetween(Date value1, Date value2) {
addCriterion("end_time not between", value1, value2, "endTime"); addCriterion("end_time not between", value1, value2, "endTime");
return (Criteria) this; return (Criteria) this;
} }
@ -755,55 +755,115 @@ public class PermissionSubjectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeEqualTo(LocalDateTime value) { public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime"); addCriterion("create_time =", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime"); addCriterion("create_time <>", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeGreaterThan(LocalDateTime value) { public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime"); addCriterion("create_time >", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime"); addCriterion("create_time >=", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeLessThan(LocalDateTime value) { public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime"); addCriterion("create_time <", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime"); addCriterion("create_time <=", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeIn(List<LocalDateTime> values) { public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime"); addCriterion("create_time in", values, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeNotIn(List<LocalDateTime> values) { public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime"); addCriterion("create_time not in", values, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime"); addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
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;
}
} }
/** /**
@ -900,4 +960,4 @@ public class PermissionSubjectExample {
this(condition, value, secondValue, null); this(condition, value, secondValue, null);
} }
} }
} }

View File

@ -0,0 +1,20 @@
package club.joylink.rtss.services.permission;
import club.joylink.rtss.vo.LoginUserInfoVO;
import club.joylink.rtss.vo.permission.PermissionDistributeVO;
public interface IPermissionDistributeService {
/**
* 分发权限
* @param vo
* @param userInfoVO
*/
void distributePermission(PermissionDistributeVO vo , LoginUserInfoVO userInfoVO);
/**
* 领取权限
*/
void requestDistributePer();
}

View File

@ -0,0 +1,4 @@
package club.joylink.rtss.services.permission;
public interface IPermissionSubjectService {
}

View File

@ -0,0 +1,20 @@
package club.joylink.rtss.services.permission;
import club.joylink.rtss.dao.permission.PermissionDistributeDAO;
import club.joylink.rtss.services.QRCodeManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
@Slf4j
public class PermissionDistributeServiceImpl implements IPermissionDistributeService{
@Resource
private PermissionDistributeDAO distributeDAO;
@Resource
private QRCodeManager qrCodeManager;
}

View File

@ -0,0 +1,14 @@
package club.joylink.rtss.services.permission;
import club.joylink.rtss.dao.permission.PermissionSubjectDAO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
@Slf4j
public class PermissionSubjectServiceImpl implements IPermissionSubjectService{
@Resource
private PermissionSubjectDAO subjectDAO;
}

View File

@ -0,0 +1,28 @@
package club.joylink.rtss.vo.permission;
import club.joylink.rtss.entity.permission.PermissionDistribute;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
@Data
public class PermissionDistributeVO implements Serializable {
private static final long serialVersionUID = 2597089293400946877L;
private Long permissionId;
private String sourceSubjectId;
private Integer amount;
private Integer remains;
private Boolean forever;
private LocalDateTime createTime;
private LocalDateTime updateTime;
private LocalDateTime startTime;
private LocalDateTime endTime;
private String dsc;
public PermissionDistribute toBean(){
PermissionDistribute pd = new PermissionDistribute();
return pd;
}
}

View File

@ -0,0 +1,323 @@
<?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.PermissionDistributeDAO">
<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="create_id" jdbcType="BIGINT" property="createId" />
<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, create_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" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.permission.PermissionDistribute" useGeneratedKeys="true">
insert into rts_permission_distribute (permission_id, source_subject_id, amount,
remains, forever, create_time,
update_time, start_time, end_time,
create_id, dsc)
values (#{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},
#{createId,jdbcType=BIGINT}, #{dsc,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.permission.PermissionDistribute" useGeneratedKeys="true">
insert into rts_permission_distribute
<trim prefix="(" suffix=")" suffixOverrides=",">
<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="createId != null">
create_id,
</if>
<if test="dsc != null">
dsc,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<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="createId != null">
#{createId,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.createId != null">
create_id = #{record.createId,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},
create_id = #{record.createId,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="createId != null">
create_id = #{createId,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},
create_id = #{createId,jdbcType=BIGINT},
dsc = #{dsc,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

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
@ -114,22 +115,19 @@
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="club.joylink.rtss.entity.permission.PermissionSubject"> <insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.permission.PermissionSubject" useGeneratedKeys="true">
insert into rts_permission_subject (id, permission_id, subject_type, insert into rts_permission_subject (permission_id, subject_type, subject_id,
subject_id, amount, remains, amount, remains, `status`,
`status`, forever, start_time, forever, start_time, end_time,
end_time, create_time) create_time, distribute_id)
values (#{id,jdbcType=BIGINT}, #{permissionId,jdbcType=BIGINT}, #{subjectType,jdbcType=VARCHAR}, values (#{permissionId,jdbcType=BIGINT}, #{subjectType,jdbcType=VARCHAR}, #{subjectId,jdbcType=BIGINT},
#{subjectId,jdbcType=BIGINT}, #{amount,jdbcType=INTEGER}, #{remains,jdbcType=INTEGER}, #{amount,jdbcType=INTEGER}, #{remains,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{forever,jdbcType=BIT}, #{startTime,jdbcType=TIMESTAMP}, #{forever,jdbcType=BIT}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
#{endTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{distributeId,jdbcType=BIGINT})
</insert> </insert>
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.permission.PermissionSubject"> <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.permission.PermissionSubject" useGeneratedKeys="true">
insert into rts_permission_subject insert into rts_permission_subject
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="permissionId != null"> <if test="permissionId != null">
permission_id, permission_id,
</if> </if>
@ -160,11 +158,11 @@
<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">
#{id,jdbcType=BIGINT},
</if>
<if test="permissionId != null"> <if test="permissionId != null">
#{permissionId,jdbcType=BIGINT}, #{permissionId,jdbcType=BIGINT},
</if> </if>
@ -195,6 +193,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 +240,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 +260,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 +299,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 +316,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>