Commit 03f0128d authored by shiyu's avatar shiyu

藏品详情新增标签

parent 8799a5d0
......@@ -45,6 +45,11 @@ public interface CommConsts {
*/
public static final String DEFAULT_AVATAR_URL = "https://cdn.wanwudezhi.com/mall-portal/image/4337400862";
/**
* 系统默认用户背景URL
*/
public static final String DEFAULT_BACKGROUND_URL = "https://cdn.wanwudezhi.com/static/web-static/image/1c679aa4e27789e491c070d52577efb1_1125x480.png";
}
package com.wwdz.ch.core.entity;
import com.wwdz.ch.db.domain.distribution.CollectionItemsRelation;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.util.Date;
......@@ -232,7 +233,7 @@ public class SupplierItemVo implements Entity {
/**
* 商品所属标签id
*/
private List<Long> bookIdList;
private List<CollectionItemsRelation> bookIdList;
/**
* 商家自购价
......
package com.wwdz.ch.db.dao;
import com.wwdz.ch.db.domain.BidRecord;
import com.wwdz.ch.db.domain.CollectionBookSort;
public interface CollectionBookSortDao {
int add(CollectionBookSort collectionBookSort);
int update(long userId, String sortInfo);
CollectionBookSort find(long userId);
boolean isExisted(long userId);
}
package com.wwdz.ch.db.dao;
public interface CollectorWhiteListDao {
boolean isExisted(long collectorId);
}
package com.wwdz.ch.db.domain;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import com.xxdxxs.entity.Entity;
import lombok.Data;
/**
* @author shiyu
* @date 2024/04/09
*/
@Data
public class CollectionBookSort implements Entity {
private Integer id;
/**
* 用户id
*/
private Long userId;
/**
* 收藏标签顺序,逗号分隔
*/
private String sortInfo;
private static final long serialVersionUID = 1L;
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", userId=").append(userId);
sb.append(", sortInfo=").append(sortInfo);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
CollectionBookSort other = (CollectionBookSort) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getSortInfo() == null ? other.getSortInfo() == null : this.getSortInfo().equals(other.getSortInfo()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getSortInfo() == null) ? 0 : getSortInfo().hashCode());
return result;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
userId("user_id", "userId", "BIGINT", false),
sortInfo("sort_info", "sortInfo", "LONGVARCHAR", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "`";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "`";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}
\ No newline at end of file
package com.wwdz.ch.db.domain;
import java.util.ArrayList;
import java.util.List;
public class CollectionBookSortExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public CollectionBookSortExample() {
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;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public CollectionBookSortExample orderBy(String orderByClause) {
this.setOrderByClause(orderByClause);
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public CollectionBookSortExample orderBy(String ... orderByClauses) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < orderByClauses.length; i++) {
sb.append(orderByClauses[i]);
if (i < orderByClauses.length - 1) {
sb.append(" , ");
}
}
this.setOrderByClause(sb.toString());
return this;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria(this);
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Criteria newAndCreateCriteria() {
CollectionBookSortExample example = new CollectionBookSortExample();
return example.createCriteria();
}
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(Integer value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdEqualToColumn(CollectionBookSort.Column column) {
addCriterion(new StringBuilder("id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Integer value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdNotEqualToColumn(CollectionBookSort.Column column) {
addCriterion(new StringBuilder("id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdGreaterThan(Integer value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanColumn(CollectionBookSort.Column column) {
addCriterion(new StringBuilder("id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanOrEqualToColumn(CollectionBookSort.Column column) {
addCriterion(new StringBuilder("id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdLessThan(Integer value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanColumn(CollectionBookSort.Column column) {
addCriterion(new StringBuilder("id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Integer value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanOrEqualToColumn(CollectionBookSort.Column column) {
addCriterion(new StringBuilder("id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdIn(List<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Integer value1, Integer value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Integer value1, Integer value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdEqualToColumn(CollectionBookSort.Column column) {
addCriterion(new StringBuilder("user_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdNotEqualToColumn(CollectionBookSort.Column column) {
addCriterion(new StringBuilder("user_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdGreaterThanColumn(CollectionBookSort.Column column) {
addCriterion(new StringBuilder("user_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdGreaterThanOrEqualToColumn(CollectionBookSort.Column column) {
addCriterion(new StringBuilder("user_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdLessThanColumn(CollectionBookSort.Column column) {
addCriterion(new StringBuilder("user_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdLessThanOrEqualToColumn(CollectionBookSort.Column column) {
addCriterion(new StringBuilder("user_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private CollectionBookSortExample example;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected Criteria(CollectionBookSortExample example) {
super();
this.example = example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public CollectionBookSortExample example() {
return this.example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
if (ifAdd) {
add.add(this);
}
return this;
}
/**
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public interface ICriteriaAdd {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Criteria add(Criteria add);
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
package com.wwdz.ch.db.domain;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import com.xxdxxs.entity.Entity;
import lombok.Data;
/**
* @author shiyu
* @date 2024/04/09
*/
@Data
public class CollectorWhiteList implements Entity {
private Integer id;
/**
* 藏家id
*/
private Long collectorId;
/**
* 创建时间
*/
private Date createTime;
/**
* 是否有效
*/
private Boolean isValid;
private static final long serialVersionUID = 1L;
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", collectorId=").append(collectorId);
sb.append(", createTime=").append(createTime);
sb.append(", isValid=").append(isValid);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
CollectorWhiteList other = (CollectorWhiteList) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCollectorId() == null ? other.getCollectorId() == null : this.getCollectorId().equals(other.getCollectorId()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getIsValid() == null ? other.getIsValid() == null : this.getIsValid().equals(other.getIsValid()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getCollectorId() == null) ? 0 : getCollectorId().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getIsValid() == null) ? 0 : getIsValid().hashCode());
return result;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
collectorId("collector_id", "collectorId", "BIGINT", false),
createTime("create_time", "createTime", "TIMESTAMP", false),
isValid("is_valid", "isValid", "BIT", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "`";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "`";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}
\ No newline at end of file
package com.wwdz.ch.db.domain;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class CollectorWhiteListExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public CollectorWhiteListExample() {
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;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public CollectorWhiteListExample orderBy(String orderByClause) {
this.setOrderByClause(orderByClause);
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public CollectorWhiteListExample orderBy(String ... orderByClauses) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < orderByClauses.length; i++) {
sb.append(orderByClauses[i]);
if (i < orderByClauses.length - 1) {
sb.append(" , ");
}
}
this.setOrderByClause(sb.toString());
return this;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria(this);
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Criteria newAndCreateCriteria() {
CollectorWhiteListExample example = new CollectorWhiteListExample();
return example.createCriteria();
}
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(Integer value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdEqualToColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Integer value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdNotEqualToColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdGreaterThan(Integer value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanOrEqualToColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdLessThan(Integer value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Integer value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanOrEqualToColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdIn(List<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Integer value1, Integer value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Integer value1, Integer value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andCollectorIdIsNull() {
addCriterion("collector_id is null");
return (Criteria) this;
}
public Criteria andCollectorIdIsNotNull() {
addCriterion("collector_id is not null");
return (Criteria) this;
}
public Criteria andCollectorIdEqualTo(Long value) {
addCriterion("collector_id =", value, "collectorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCollectorIdEqualToColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("collector_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCollectorIdNotEqualTo(Long value) {
addCriterion("collector_id <>", value, "collectorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCollectorIdNotEqualToColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("collector_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCollectorIdGreaterThan(Long value) {
addCriterion("collector_id >", value, "collectorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCollectorIdGreaterThanColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("collector_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCollectorIdGreaterThanOrEqualTo(Long value) {
addCriterion("collector_id >=", value, "collectorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCollectorIdGreaterThanOrEqualToColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("collector_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCollectorIdLessThan(Long value) {
addCriterion("collector_id <", value, "collectorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCollectorIdLessThanColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("collector_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCollectorIdLessThanOrEqualTo(Long value) {
addCriterion("collector_id <=", value, "collectorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCollectorIdLessThanOrEqualToColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("collector_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCollectorIdIn(List<Long> values) {
addCriterion("collector_id in", values, "collectorId");
return (Criteria) this;
}
public Criteria andCollectorIdNotIn(List<Long> values) {
addCriterion("collector_id not in", values, "collectorId");
return (Criteria) this;
}
public Criteria andCollectorIdBetween(Long value1, Long value2) {
addCriterion("collector_id between", value1, value2, "collectorId");
return (Criteria) this;
}
public Criteria andCollectorIdNotBetween(Long value1, Long value2) {
addCriterion("collector_id not between", value1, value2, "collectorId");
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;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeEqualToColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("create_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeNotEqualToColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("create_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("create_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanOrEqualToColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("create_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("create_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanOrEqualToColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("create_time <= ").append(column.getEscapedColumnName()).toString());
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 andIsValidIsNull() {
addCriterion("is_valid is null");
return (Criteria) this;
}
public Criteria andIsValidIsNotNull() {
addCriterion("is_valid is not null");
return (Criteria) this;
}
public Criteria andIsValidEqualTo(Boolean value) {
addCriterion("is_valid =", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidEqualToColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("is_valid = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidNotEqualTo(Boolean value) {
addCriterion("is_valid <>", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidNotEqualToColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("is_valid <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidGreaterThan(Boolean value) {
addCriterion("is_valid >", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidGreaterThanColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("is_valid > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidGreaterThanOrEqualTo(Boolean value) {
addCriterion("is_valid >=", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidGreaterThanOrEqualToColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("is_valid >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidLessThan(Boolean value) {
addCriterion("is_valid <", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidLessThanColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("is_valid < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidLessThanOrEqualTo(Boolean value) {
addCriterion("is_valid <=", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidLessThanOrEqualToColumn(CollectorWhiteList.Column column) {
addCriterion(new StringBuilder("is_valid <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidIn(List<Boolean> values) {
addCriterion("is_valid in", values, "isValid");
return (Criteria) this;
}
public Criteria andIsValidNotIn(List<Boolean> values) {
addCriterion("is_valid not in", values, "isValid");
return (Criteria) this;
}
public Criteria andIsValidBetween(Boolean value1, Boolean value2) {
addCriterion("is_valid between", value1, value2, "isValid");
return (Criteria) this;
}
public Criteria andIsValidNotBetween(Boolean value1, Boolean value2) {
addCriterion("is_valid not between", value1, value2, "isValid");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private CollectorWhiteListExample example;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected Criteria(CollectorWhiteListExample example) {
super();
this.example = example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public CollectorWhiteListExample example() {
return this.example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
if (ifAdd) {
add.add(this);
}
return this;
}
/**
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public interface ICriteriaAdd {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Criteria add(Criteria add);
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
......@@ -52,4 +52,9 @@ public class CollectionBookRequestDto extends BaseRequestDto implements Entity
* 分享id
*/
private String shareRecordId;
/**
* 排序信息
*/
private String sortInfo;
}
package com.wwdz.ch.db.impl;
import com.wwdz.ch.db.dao.CollectionBookSortDao;
import com.wwdz.ch.db.domain.CollectionBookSort;
import com.wwdz.ch.db.domain.CollectionBookSortExample;
import com.wwdz.ch.db.mapper.CollectionBookSortMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@Repository
public class CollectionBookSortDaoImpl implements CollectionBookSortDao {
@Autowired
CollectionBookSortMapper collectionBookSortMapper;
@Override
public int add(CollectionBookSort collectionBookSort) {
return collectionBookSortMapper.insert(collectionBookSort);
}
@Override
public int update(long userId, String sortInfo) {
CollectionBookSort collectionBookSort = new CollectionBookSort();
collectionBookSort.setSortInfo(sortInfo);
CollectionBookSortExample example = new CollectionBookSortExample();
CollectionBookSortExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId);
return collectionBookSortMapper.updateByExampleSelective(collectionBookSort, example);
}
@Override
public CollectionBookSort find(long userId) {
CollectionBookSortExample example = new CollectionBookSortExample();
CollectionBookSortExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId);
return collectionBookSortMapper.selectOneByExampleWithBLOBs(example);
}
@Override
public boolean isExisted(long userId) {
CollectionBookSortExample example = new CollectionBookSortExample();
CollectionBookSortExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId);
return collectionBookSortMapper.countByExample(example) > 0;
}
}
package com.wwdz.ch.db.impl;
import com.wwdz.ch.db.dao.CollectorWhiteListDao;
import com.wwdz.ch.db.domain.CollectorWhiteListExample;
import com.wwdz.ch.db.mapper.CollectorWhiteListMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@Repository
public class CollectorWhiteListDaoImpl implements CollectorWhiteListDao {
@Autowired
CollectorWhiteListMapper collectorWhiteListMapper;
@Override
public boolean isExisted(long collectorId) {
CollectorWhiteListExample example = new CollectorWhiteListExample();
CollectorWhiteListExample.Criteria criteria = example.createCriteria();
criteria.andCollectorIdEqualTo(collectorId);
criteria.andIsValidEqualTo(true);
return collectorWhiteListMapper.countByExample(example) > 0;
}
}
package com.wwdz.ch.db.mapper;
import com.wwdz.ch.db.domain.CollectionBookSort;
import com.wwdz.ch.db.domain.CollectionBookSortExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface CollectionBookSortMapper {
long countByExample(CollectionBookSortExample example);
int deleteByExample(CollectionBookSortExample example);
int deleteByPrimaryKey(Integer id);
int insert(CollectionBookSort record);
int insertSelective(CollectionBookSort record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionBookSort selectOneByExample(CollectionBookSortExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionBookSort selectOneByExampleSelective(@Param("example") CollectionBookSortExample example, @Param("selective") CollectionBookSort.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionBookSort selectOneByExampleWithBLOBs(CollectionBookSortExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<CollectionBookSort> selectByExampleSelective(@Param("example") CollectionBookSortExample example, @Param("selective") CollectionBookSort.Column ... selective);
List<CollectionBookSort> selectByExampleWithBLOBs(CollectionBookSortExample example);
List<CollectionBookSort> selectByExample(CollectionBookSortExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionBookSort selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") CollectionBookSort.Column ... selective);
CollectionBookSort selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") CollectionBookSort record, @Param("example") CollectionBookSortExample example);
int updateByExampleWithBLOBs(@Param("record") CollectionBookSort record, @Param("example") CollectionBookSortExample example);
int updateByExample(@Param("record") CollectionBookSort record, @Param("example") CollectionBookSortExample example);
int updateByPrimaryKeySelective(CollectionBookSort record);
int updateByPrimaryKeyWithBLOBs(CollectionBookSort record);
int updateByPrimaryKey(CollectionBookSort record);
}
\ No newline at end of file
package com.wwdz.ch.db.mapper;
import com.wwdz.ch.db.domain.CollectorWhiteList;
import com.wwdz.ch.db.domain.CollectorWhiteListExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface CollectorWhiteListMapper {
long countByExample(CollectorWhiteListExample example);
int deleteByExample(CollectorWhiteListExample example);
int deleteByPrimaryKey(Integer id);
int insert(CollectorWhiteList record);
int insertSelective(CollectorWhiteList record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectorWhiteList selectOneByExample(CollectorWhiteListExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectorWhiteList selectOneByExampleSelective(@Param("example") CollectorWhiteListExample example, @Param("selective") CollectorWhiteList.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<CollectorWhiteList> selectByExampleSelective(@Param("example") CollectorWhiteListExample example, @Param("selective") CollectorWhiteList.Column ... selective);
List<CollectorWhiteList> selectByExample(CollectorWhiteListExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectorWhiteList selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") CollectorWhiteList.Column ... selective);
CollectorWhiteList selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") CollectorWhiteList record, @Param("example") CollectorWhiteListExample example);
int updateByExample(@Param("record") CollectorWhiteList record, @Param("example") CollectorWhiteListExample example);
int updateByPrimaryKeySelective(CollectorWhiteList record);
int updateByPrimaryKey(CollectorWhiteList record);
}
\ No newline at end of file
<?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.wwdz.ch.db.mapper.CollectionBookSortMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.CollectionBookSort">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.wwdz.ch.db.domain.CollectionBookSort">
<result column="sort_info" jdbcType="LONGVARCHAR" property="sortInfo" />
</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, user_id
</sql>
<sql id="Blob_Column_List">
sort_info
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.wwdz.ch.db.domain.CollectionBookSortExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from collection_book_sort
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.CollectionBookSortExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from collection_book_sort
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExampleSelective" parameterType="map" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if test="example.distinct">
distinct
</if>
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, sort_info
</otherwise>
</choose>
from collection_book_sort
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from collection_book_sort
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, sort_info
</otherwise>
</choose>
from collection_book_sort
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from collection_book_sort
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.CollectionBookSortExample">
delete from collection_book_sort
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.CollectionBookSort">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into collection_book_sort (user_id, sort_info)
values (#{userId,jdbcType=BIGINT}, #{sortInfo,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.CollectionBookSort">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into collection_book_sort
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="sortInfo != null">
sort_info,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="sortInfo != null">
#{sortInfo,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.CollectionBookSortExample" resultType="java.lang.Long">
select count(*) from collection_book_sort
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update collection_book_sort
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.sortInfo != null">
sort_info = #{record.sortInfo,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update collection_book_sort
set id = #{record.id,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=BIGINT},
sort_info = #{record.sortInfo,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update collection_book_sort
set id = #{record.id,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.CollectionBookSort">
update collection_book_sort
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="sortInfo != null">
sort_info = #{sortInfo,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.wwdz.ch.db.domain.CollectionBookSort">
update collection_book_sort
set user_id = #{userId,jdbcType=BIGINT},
sort_info = #{sortInfo,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.CollectionBookSort">
update collection_book_sort
set user_id = #{userId,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.CollectionBookSortExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include refid="Base_Column_List" />
from collection_book_sort
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleWithBLOBs" parameterType="com.wwdz.ch.db.domain.CollectionBookSortExample" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from collection_book_sort
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleSelective" parameterType="map" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, sort_info
</otherwise>
</choose>
from collection_book_sort
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
<?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.wwdz.ch.db.mapper.CollectorWhiteListMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.CollectorWhiteList">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="collector_id" jdbcType="BIGINT" property="collectorId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="is_valid" jdbcType="BIT" property="isValid" />
</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, collector_id, create_time, is_valid
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.CollectorWhiteListExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from collector_white_list
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if test="example.distinct">
distinct
</if>
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, collector_id, create_time, is_valid
</otherwise>
</choose>
from collector_white_list
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from collector_white_list
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, collector_id, create_time, is_valid
</otherwise>
</choose>
from collector_white_list
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from collector_white_list
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.CollectorWhiteListExample">
delete from collector_white_list
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.CollectorWhiteList">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into collector_white_list (collector_id, create_time, is_valid
)
values (#{collectorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{isValid,jdbcType=BIT}
)
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.CollectorWhiteList">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into collector_white_list
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="collectorId != null">
collector_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="isValid != null">
is_valid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="collectorId != null">
#{collectorId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="isValid != null">
#{isValid,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.CollectorWhiteListExample" resultType="java.lang.Long">
select count(*) from collector_white_list
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update collector_white_list
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.collectorId != null">
collector_id = #{record.collectorId,jdbcType=BIGINT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isValid != null">
is_valid = #{record.isValid,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update collector_white_list
set id = #{record.id,jdbcType=INTEGER},
collector_id = #{record.collectorId,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
is_valid = #{record.isValid,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.CollectorWhiteList">
update collector_white_list
<set>
<if test="collectorId != null">
collector_id = #{collectorId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="isValid != null">
is_valid = #{isValid,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.CollectorWhiteList">
update collector_white_list
set collector_id = #{collectorId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
is_valid = #{isValid,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.CollectorWhiteListExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include refid="Base_Column_List" />
from collector_white_list
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, collector_id, create_time, is_valid
</otherwise>
</choose>
from collector_white_list
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
package com.wwdz.ch.wx.constant;
/**
* 藏家默认展示的标签
*/
public class CollectionBookConstants {
private String saleing;
}
......@@ -162,8 +162,13 @@ public class UserServiceImpl implements UserService {
result.put("token", dto.getToken());
result.put("tokenExpire", userToken.getExpireTime().toString());
result.put("isInvited", true);
User user = userDao.queryById(dto.getUserId());
logger.info("登录用户的信息:{}", JsonUtils.from(user));
CloudServerResponse<com.wwdz.user.api.model.user.User> userCloudServerResponse = userReadService.getUserIsNotDelete(dto.getUserId());
if (userCloudServerResponse.getCode() != 1001) {
return Result.failed("用户信息初始化失败");
}
com.wwdz.user.api.model.user.User wUser = userCloudServerResponse.getResult();
User user = User.of(wUser);
logger.info(">>>>>>> 登录用户的信息:{}", JsonUtils.from(user));
String phone = user.getMobile();
//如果用户手机号为空,则调用微信接口查询出手机号进行保存
......
......@@ -2,9 +2,11 @@ package com.wwdz.ch.wx.impl.distribution;
import com.github.pagehelper.PageInfo;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dao.CollectionBookSortDao;
import com.wwdz.ch.db.dao.distribution.CollectionBookDao;
import com.wwdz.ch.db.dao.distribution.CollectionItemsRelationDao;
import com.wwdz.ch.db.dao.distribution.CollectionShareRecordDao;
import com.wwdz.ch.db.domain.CollectionBookSort;
import com.wwdz.ch.db.domain.distribution.CollectionBook;
import com.wwdz.ch.db.domain.distribution.CollectionShareRecord;
import com.wwdz.ch.db.dto.request.distribution.CollectionBookRequestDto;
......@@ -33,6 +35,9 @@ public class CollectionBookServiceImpl implements CollectionBookService {
@Autowired
CollectionShareRecordDao collectionShareRecordDao;
@Autowired
CollectionBookSortDao collectionBookSortDao;
@Override
public Result create(CollectionBookRequestDto dto) {
try {
......@@ -127,6 +132,21 @@ public class CollectionBookServiceImpl implements CollectionBookService {
}
@Override
public Result updateSort(CollectionBookRequestDto dto) {
try {
if (!collectionBookSortDao.isExisted(dto.getUserId())) {
CollectionBookSort collectionBookSort = new CollectionBookSort();
collectionBookSort.setUserId(dto.getUserId());
collectionBookSort.setSortInfo(dto.getSortInfo());
collectionBookSortDao.add(collectionBookSort);
} else {
collectionBookSortDao.update(dto.getUserId(), dto.getSortInfo());
}
return Result.success();
} catch (Exception e) {
logger.error("标签顺序修改 error: {}", e);
}
return Result.failed();
}
}
......@@ -7,6 +7,7 @@ import com.wwdz.ch.core.util.CacheUtil;
import com.wwdz.ch.core.util.PriceUtil;
import com.wwdz.ch.core.util.RedisUtils;
import com.wwdz.ch.db.bean.DistributionOrderNum;
import com.wwdz.ch.db.dao.FollowFansRecordDao;
import com.wwdz.ch.db.dao.SwitchDao;
import com.wwdz.ch.db.dao.distribution.*;
import com.wwdz.ch.db.domain.User;
......@@ -68,6 +69,9 @@ public class SelfPageServiceImpl implements SelfPageService {
@Autowired
SwitchDao switchDao;
@Autowired
FollowFansRecordDao followFansRecordDao;
@Override
......@@ -179,6 +183,11 @@ public class SelfPageServiceImpl implements SelfPageService {
User user = cacheUtil.getAppletUserById(itemUserId);
map.put("avatar", StringUtils.isEmpty(user.getAvatar()) ? CommConsts.DEFAULT_AVATAR_URL : user.getAvatar());
map.put("name", StringUtils.isEmpty(user.getNickname()) ? "微信用户" : user.getNickname());
map.put("background", StringUtils.isEmpty(user.getBackground()) ? CommConsts.DEFAULT_BACKGROUND_URL : user.getBackground());
map.put("profile", user.getProfile());
long fansNum = followFansRecordDao.countFans(itemUserId);
map.put("fansNum", fansNum);
map.put("targetUserId", itemUserId);
long count = supplierItemDao.countByCreatorId(itemUserId);
map.put("count", count);
return Result.success(map);
......
......@@ -702,8 +702,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
supplierItemVo.setCollectedNum((int) countNum);
//查询商品所属标签
List<CollectionItemsRelation> collectionItemsRelations = collectionItemsRelationDao.findByItemId(itemId);
List<Long> bookIds = collectionItemsRelations.stream().map(CollectionItemsRelation::getCollectionBookId).collect(Collectors.toList());
supplierItemVo.setBookIdList(bookIds);
supplierItemVo.setBookIdList(collectionItemsRelations);
return Result.success(supplierItemVo);
} catch (Exception e) {
logger.error("查询上传的藏品详情 error : {}", e);
......
......@@ -35,4 +35,11 @@ public interface CollectionBookService {
* @return
*/
Result delete(CollectionBookRequestDto dto);
/**
* 标签排序
* @param dto
* @return
*/
Result updateSort(CollectionBookRequestDto dto);
}
......@@ -5,6 +5,7 @@ import com.wwdz.ch.core.consts.ResultCode;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.distribution.CollectionBookRequestDto;
import com.wwdz.ch.wx.service.distribution.CollectionBookService;
import com.xxdxxs.utils.StringUtils;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -64,4 +65,15 @@ public class CollectionBookController {
}
return collectionBookService.delete(dto);
}
@ApiOperation(value = "藏品标签排序")
@PostMapping("/updateSort")
public Result updateSort(@RequestBody CollectionBookRequestDto dto) {
logger.info("藏品标签排序,请求参数:{}", JSON.toJSONString(dto));
if (dto.getUserId() == null || StringUtils.isEmpty(dto.getSortInfo())) {
return Result.failed(ResultCode.PARAM_ERROR);
}
return collectionBookService.updateSort(dto);
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment