新增接口,修改数据库部分表,重新生成相关类
parent
88a33ff073
commit
4f6e0837c4
@ -0,0 +1,740 @@
|
||||
package com.sztzjy.resource_center.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class SysResourceExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public SysResourceExample() {
|
||||
oredCriteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<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;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<>();
|
||||
}
|
||||
|
||||
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 andResourceIdIsNull() {
|
||||
addCriterion("resource_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceIdIsNotNull() {
|
||||
addCriterion("resource_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceIdEqualTo(String value) {
|
||||
addCriterion("resource_id =", value, "resourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceIdNotEqualTo(String value) {
|
||||
addCriterion("resource_id <>", value, "resourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceIdGreaterThan(String value) {
|
||||
addCriterion("resource_id >", value, "resourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("resource_id >=", value, "resourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceIdLessThan(String value) {
|
||||
addCriterion("resource_id <", value, "resourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("resource_id <=", value, "resourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceIdLike(String value) {
|
||||
addCriterion("resource_id like", value, "resourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceIdNotLike(String value) {
|
||||
addCriterion("resource_id not like", value, "resourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceIdIn(List<String> values) {
|
||||
addCriterion("resource_id in", values, "resourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceIdNotIn(List<String> values) {
|
||||
addCriterion("resource_id not in", values, "resourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceIdBetween(String value1, String value2) {
|
||||
addCriterion("resource_id between", value1, value2, "resourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceIdNotBetween(String value1, String value2) {
|
||||
addCriterion("resource_id not between", value1, value2, "resourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceNameIsNull() {
|
||||
addCriterion("resource_name is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceNameIsNotNull() {
|
||||
addCriterion("resource_name is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceNameEqualTo(String value) {
|
||||
addCriterion("resource_name =", value, "resourceName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceNameNotEqualTo(String value) {
|
||||
addCriterion("resource_name <>", value, "resourceName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceNameGreaterThan(String value) {
|
||||
addCriterion("resource_name >", value, "resourceName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("resource_name >=", value, "resourceName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceNameLessThan(String value) {
|
||||
addCriterion("resource_name <", value, "resourceName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("resource_name <=", value, "resourceName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceNameLike(String value) {
|
||||
addCriterion("resource_name like", value, "resourceName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceNameNotLike(String value) {
|
||||
addCriterion("resource_name not like", value, "resourceName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceNameIn(List<String> values) {
|
||||
addCriterion("resource_name in", values, "resourceName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceNameNotIn(List<String> values) {
|
||||
addCriterion("resource_name not in", values, "resourceName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceNameBetween(String value1, String value2) {
|
||||
addCriterion("resource_name between", value1, value2, "resourceName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceNameNotBetween(String value1, String value2) {
|
||||
addCriterion("resource_name not between", value1, value2, "resourceName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlIsNull() {
|
||||
addCriterion("url is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlIsNotNull() {
|
||||
addCriterion("url is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlEqualTo(String value) {
|
||||
addCriterion("url =", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotEqualTo(String value) {
|
||||
addCriterion("url <>", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlGreaterThan(String value) {
|
||||
addCriterion("url >", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("url >=", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlLessThan(String value) {
|
||||
addCriterion("url <", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlLessThanOrEqualTo(String value) {
|
||||
addCriterion("url <=", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlLike(String value) {
|
||||
addCriterion("url like", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotLike(String value) {
|
||||
addCriterion("url not like", value, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlIn(List<String> values) {
|
||||
addCriterion("url in", values, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotIn(List<String> values) {
|
||||
addCriterion("url not in", values, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlBetween(String value1, String value2) {
|
||||
addCriterion("url between", value1, value2, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUrlNotBetween(String value1, String value2) {
|
||||
addCriterion("url not between", value1, value2, "url");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceTypeIsNull() {
|
||||
addCriterion("resource_type is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceTypeIsNotNull() {
|
||||
addCriterion("resource_type is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceTypeEqualTo(String value) {
|
||||
addCriterion("resource_type =", value, "resourceType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceTypeNotEqualTo(String value) {
|
||||
addCriterion("resource_type <>", value, "resourceType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceTypeGreaterThan(String value) {
|
||||
addCriterion("resource_type >", value, "resourceType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceTypeGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("resource_type >=", value, "resourceType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceTypeLessThan(String value) {
|
||||
addCriterion("resource_type <", value, "resourceType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceTypeLessThanOrEqualTo(String value) {
|
||||
addCriterion("resource_type <=", value, "resourceType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceTypeLike(String value) {
|
||||
addCriterion("resource_type like", value, "resourceType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceTypeNotLike(String value) {
|
||||
addCriterion("resource_type not like", value, "resourceType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceTypeIn(List<String> values) {
|
||||
addCriterion("resource_type in", values, "resourceType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceTypeNotIn(List<String> values) {
|
||||
addCriterion("resource_type not in", values, "resourceType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceTypeBetween(String value1, String value2) {
|
||||
addCriterion("resource_type between", value1, value2, "resourceType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andResourceTypeNotBetween(String value1, String value2) {
|
||||
addCriterion("resource_type not between", value1, value2, "resourceType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIsNull() {
|
||||
addCriterion("source is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIsNotNull() {
|
||||
addCriterion("source is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceEqualTo(String value) {
|
||||
addCriterion("source =", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceNotEqualTo(String value) {
|
||||
addCriterion("source <>", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceGreaterThan(String value) {
|
||||
addCriterion("source >", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("source >=", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceLessThan(String value) {
|
||||
addCriterion("source <", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceLessThanOrEqualTo(String value) {
|
||||
addCriterion("source <=", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceLike(String value) {
|
||||
addCriterion("source like", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceNotLike(String value) {
|
||||
addCriterion("source not like", value, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceIn(List<String> values) {
|
||||
addCriterion("source in", values, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceNotIn(List<String> values) {
|
||||
addCriterion("source not in", values, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceBetween(String value1, String value2) {
|
||||
addCriterion("source between", value1, value2, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSourceNotBetween(String value1, String value2) {
|
||||
addCriterion("source not between", value1, value2, "source");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSchoolIdIsNull() {
|
||||
addCriterion("school_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSchoolIdIsNotNull() {
|
||||
addCriterion("school_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSchoolIdEqualTo(String value) {
|
||||
addCriterion("school_id =", value, "schoolId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSchoolIdNotEqualTo(String value) {
|
||||
addCriterion("school_id <>", value, "schoolId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSchoolIdGreaterThan(String value) {
|
||||
addCriterion("school_id >", value, "schoolId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSchoolIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("school_id >=", value, "schoolId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSchoolIdLessThan(String value) {
|
||||
addCriterion("school_id <", value, "schoolId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSchoolIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("school_id <=", value, "schoolId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSchoolIdLike(String value) {
|
||||
addCriterion("school_id like", value, "schoolId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSchoolIdNotLike(String value) {
|
||||
addCriterion("school_id not like", value, "schoolId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSchoolIdIn(List<String> values) {
|
||||
addCriterion("school_id in", values, "schoolId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSchoolIdNotIn(List<String> values) {
|
||||
addCriterion("school_id not in", values, "schoolId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSchoolIdBetween(String value1, String value2) {
|
||||
addCriterion("school_id between", value1, value2, "schoolId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSchoolIdNotBetween(String value1, String value2) {
|
||||
addCriterion("school_id not between", value1, value2, "schoolId");
|
||||
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 static class Criteria extends GeneratedCriteria {
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.sztzjy.resource_center.entity.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SysResourceDto {
|
||||
@ApiModelProperty("资源ID")
|
||||
private String resourceId;
|
||||
|
||||
@ApiModelProperty("资源名称")
|
||||
private String resourceName;
|
||||
|
||||
@ApiModelProperty("资源类型 /视频/课件")
|
||||
private String resourceType;
|
||||
|
||||
@ApiModelProperty("来源(内置/老师新增)")
|
||||
private String source;
|
||||
|
||||
@ApiModelProperty("学校ID")
|
||||
private String schoolId;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("所属课程ID")
|
||||
private String oneId;
|
||||
|
||||
@ApiModelProperty("所属课程名称")
|
||||
private String oneName;
|
||||
|
||||
@ApiModelProperty("所属章ID")
|
||||
private String twoId;
|
||||
|
||||
@ApiModelProperty("所属章名称")
|
||||
private String twoName;
|
||||
|
||||
@ApiModelProperty("所属节ID")
|
||||
private String threeId;
|
||||
|
||||
@ApiModelProperty("所属节名称")
|
||||
private String threeName;
|
||||
|
||||
@ApiModelProperty("资源文件")
|
||||
private MultipartFile file;
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.sztzjy.resource_center.mapper;
|
||||
|
||||
import com.sztzjy.resource_center.entity.SysResource;
|
||||
import com.sztzjy.resource_center.entity.SysResourceExample;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.sztzjy.resource_center.entity.dto.SysResourceDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@Mapper
|
||||
public interface SysResourceMapper {
|
||||
long countByExample(SysResourceExample example);
|
||||
|
||||
int deleteByExample(SysResourceExample example);
|
||||
|
||||
int deleteByPrimaryKey(String resourceId);
|
||||
|
||||
int insert(SysResource record);
|
||||
|
||||
int insertSelective(SysResource record);
|
||||
|
||||
List<SysResource> selectByExample(SysResourceExample example);
|
||||
|
||||
SysResource selectByPrimaryKey(String resourceId);
|
||||
|
||||
int updateByExampleSelective(@Param("record") SysResource record, @Param("example") SysResourceExample example);
|
||||
|
||||
int updateByExample(@Param("record") SysResource record, @Param("example") SysResourceExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(SysResource record);
|
||||
|
||||
int updateByPrimaryKey(SysResource record);
|
||||
|
||||
List<SysResourceDto> selectResource(@Param("oneId") String oneId,
|
||||
@Param("twoId") String twoId,
|
||||
@Param("threeId") String threeId,
|
||||
@Param("resourceName") String resourceName);
|
||||
|
||||
}
|
@ -0,0 +1,295 @@
|
||||
<?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="com.sztzjy.resource_center.mapper.SysResourceMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sztzjy.resource_center.entity.SysResource">
|
||||
<id column="resource_id" jdbcType="VARCHAR" property="resourceId"/>
|
||||
<result column="resource_name" jdbcType="VARCHAR" property="resourceName"/>
|
||||
<result column="url" jdbcType="VARCHAR" property="url"/>
|
||||
<result column="resource_type" jdbcType="VARCHAR" property="resourceType"/>
|
||||
<result column="source" jdbcType="VARCHAR" property="source"/>
|
||||
<result column="school_id" jdbcType="VARCHAR" property="schoolId"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||
separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||||
separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
resource_id
|
||||
, resource_name, url, resource_type, source, school_id, create_time, update_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
from sys_resource
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from sys_resource
|
||||
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete
|
||||
from sys_resource
|
||||
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample">
|
||||
delete from sys_resource
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sztzjy.resource_center.entity.SysResource">
|
||||
insert into sys_resource (resource_id, resource_name, url,
|
||||
resource_type, source, school_id,
|
||||
create_time, update_time)
|
||||
values (#{resourceId,jdbcType=VARCHAR}, #{resourceName,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},
|
||||
#{resourceType,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{schoolId,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sztzjy.resource_center.entity.SysResource">
|
||||
insert into sys_resource
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="resourceId != null">
|
||||
resource_id,
|
||||
</if>
|
||||
<if test="resourceName != null">
|
||||
resource_name,
|
||||
</if>
|
||||
<if test="url != null">
|
||||
url,
|
||||
</if>
|
||||
<if test="resourceType != null">
|
||||
resource_type,
|
||||
</if>
|
||||
<if test="source != null">
|
||||
source,
|
||||
</if>
|
||||
<if test="schoolId != null">
|
||||
school_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="resourceId != null">
|
||||
#{resourceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="resourceName != null">
|
||||
#{resourceName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="url != null">
|
||||
#{url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="resourceType != null">
|
||||
#{resourceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="source != null">
|
||||
#{source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="schoolId != null">
|
||||
#{schoolId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.sztzjy.resource_center.entity.SysResourceExample"
|
||||
resultType="java.lang.Long">
|
||||
select count(*) from sys_resource
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update sys_resource
|
||||
<set>
|
||||
<if test="record.resourceId != null">
|
||||
resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.resourceName != null">
|
||||
resource_name = #{record.resourceName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.url != null">
|
||||
url = #{record.url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.resourceType != null">
|
||||
resource_type = #{record.resourceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.source != null">
|
||||
source = #{record.source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.schoolId != null">
|
||||
school_id = #{record.schoolId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update sys_resource
|
||||
set resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
||||
resource_name = #{record.resourceName,jdbcType=VARCHAR},
|
||||
url = #{record.url,jdbcType=VARCHAR},
|
||||
resource_type = #{record.resourceType,jdbcType=VARCHAR},
|
||||
source = #{record.source,jdbcType=VARCHAR},
|
||||
school_id = #{record.schoolId,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.resource_center.entity.SysResource">
|
||||
update sys_resource
|
||||
<set>
|
||||
<if test="resourceName != null">
|
||||
resource_name = #{resourceName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="url != null">
|
||||
url = #{url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="resourceType != null">
|
||||
resource_type = #{resourceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="source != null">
|
||||
source = #{source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="schoolId != null">
|
||||
school_id = #{schoolId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sztzjy.resource_center.entity.SysResource">
|
||||
update sys_resource
|
||||
set resource_name = #{resourceName,jdbcType=VARCHAR},
|
||||
url = #{url,jdbcType=VARCHAR},
|
||||
resource_type = #{resourceType,jdbcType=VARCHAR},
|
||||
source = #{source,jdbcType=VARCHAR},
|
||||
school_id = #{schoolId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where resource_id = #{resourceId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
|
||||
|
||||
<resultMap id="SelectResourceMap" type="com.sztzjy.resource_center.entity.dto.SysResourceDto">
|
||||
<id column="resource_id" jdbcType="VARCHAR" property="resourceId"/>
|
||||
<result column="resource_name" jdbcType="VARCHAR" property="resourceName"/>
|
||||
<result column="resource_name" jdbcType="VARCHAR" property="resourceName"/>
|
||||
<result column="resource_type" jdbcType="VARCHAR" property="resourceType"/>
|
||||
<result column="one_name" jdbcType="VARCHAR" property="oneName"/>
|
||||
<result column="two_name" jdbcType="VARCHAR" property="twoName"/>
|
||||
<result column="three_name" jdbcType="VARCHAR" property="threeName"/>
|
||||
</resultMap>
|
||||
<select id="selectResource" parameterType="java.lang.String" resultMap="SelectResourceMap">
|
||||
SELECT sr.resource_id,sr.resource_name,sr.resource_type,sra.one_name,sra.two_name,sra.three_name
|
||||
FROM sys_resource sr
|
||||
JOIN sys_resource_and_course sra ON sr.resource_id = sra.resource_id
|
||||
<where>
|
||||
<if test="oneId != null and oneId != ''">
|
||||
sra.one_id = #{oneId}
|
||||
</if>
|
||||
<if test="twoId != null and twoId != ''">
|
||||
and sra.two_id = #{twoId}
|
||||
</if>
|
||||
<if test="threeId != null and threeId != ''">
|
||||
and sra.three_id = #{threeId}
|
||||
</if>
|
||||
<if test="resourceName != null and resourceName != ''">
|
||||
and sr.resource_name = #{resourceName}
|
||||
</if>
|
||||
</where>
|
||||
order by sr.create_time
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue