Commit 9ce4cd60 authored by shiyu's avatar shiyu

个人藏馆

parent d6d0987c
...@@ -196,5 +196,41 @@ public class DistributionEnum { ...@@ -196,5 +196,41 @@ public class DistributionEnum {
} }
/**
* 藏品分享类型
*/
public enum CollectionShareTypeStateEnum {
ITEM(1, "藏品"),
PAGE(2, "个人藏馆"),
;
private int code;
private String des;
CollectionShareTypeStateEnum(int code, String des) {
this.code = code;
this.des = des;
}
public static String getNameByCode(int code) {
for (CollectionShareTypeStateEnum collectionShareTypeStateEnum : CollectionShareTypeStateEnum.values()) {
if (code == collectionShareTypeStateEnum.getCode()) {
return collectionShareTypeStateEnum.getDes();
}
}
return null;
}
public int getCode() {
return code;
}
public String getDes() {
return des;
}
}
} }
...@@ -5,6 +5,7 @@ import com.xxdxxs.entity.Entity; ...@@ -5,6 +5,7 @@ import com.xxdxxs.entity.Entity;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.Map; import java.util.Map;
@Data @Data
...@@ -193,5 +194,25 @@ public class SupplierItemVo implements Entity { ...@@ -193,5 +194,25 @@ public class SupplierItemVo implements Entity {
*/ */
private String rebateAmount; private String rebateAmount;
/**
* 是否客态
*/
private Boolean isMine;
/**
* 商品上传人id
*/
private Long creatorId;
private String creatorName;
/**
* 收藏数
*/
private Integer collectedNum;
/**
* 收藏人头像
*/
private List<String> collectorsAvatar;
} }
package com.wwdz.ch.db.dao.distribution;
import com.wwdz.ch.db.domain.distribution.CollectionShareRecord;
import com.wwdz.ch.db.domain.distribution.DistributorShareRecord;
import com.wwdz.ch.db.dto.request.distribution.CollectionShareRecordRequestDto;
import java.util.List;
public interface CollectionShareRecordDao {
/**
* 插入新记录
*
* @param collectionItemsRelation
* @return
*/
int insert(CollectionShareRecord collectionItemsRelation);
/**
* 查询记录
* @param dto
* @return
*/
List<CollectionShareRecord> find(CollectionShareRecordRequestDto dto);
/**
* 根据分享id查询记录
* @param shareId
* @return
*/
CollectionShareRecord findById(String shareId);
}
package com.wwdz.ch.db.dao.distribution;
import com.wwdz.ch.db.domain.distribution.ItemCollectedRecord;
import com.wwdz.ch.db.dto.request.distribution.ItemCollectedRecordRequestDto;
import java.util.List;
public interface ItemCollectedRecordDao {
/**
* 插入新记录
*
* @param itemCollectedRecord
* @return
*/
int insert(ItemCollectedRecord itemCollectedRecord);
/**
* 查询记录
* @param dto
* @return
*/
List<ItemCollectedRecord> find(ItemCollectedRecordRequestDto dto);
/**
* 取消收藏
* @param itemId
* @param collectorsId
* @return
*/
int cancel(long itemId, long collectorsId);
/**
* 统计商品被收藏数
*
* @param itemId
* @return
*/
long countByItemId(long itemId);
}
package com.wwdz.ch.db.domain.distribution;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import com.xxdxxs.entity.Entity;
import lombok.Data;
/**
* 藏品分享记录
* @author shiyu
* @date 2024/03/21
*/
@Data
public class CollectionShareRecord implements Entity {
private Integer id;
/**
* 藏品所属用户id
*/
private Long itemUserId;
/**
* 分享记录id
*/
private String shareRecordId;
/**
* 分享的藏品或藏馆id
*/
private Long shareTargetId;
/**
* 分享人
*/
private Long sharerId;
/**
* 创建时间
*/
private Date createTime;
/**
* 更细时间
*/
private Date updateTime;
/**
* 分享的类型1藏品2藏馆
*/
private Integer type;
/**
* 是否删除
*/
private Boolean isDeleted;
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(", itemUserId=").append(itemUserId);
sb.append(", shareRecordId=").append(shareRecordId);
sb.append(", shareTargetId=").append(shareTargetId);
sb.append(", sharerId=").append(sharerId);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", type=").append(type);
sb.append(", isDeleted=").append(isDeleted);
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;
}
CollectionShareRecord other = (CollectionShareRecord) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getItemUserId() == null ? other.getItemUserId() == null : this.getItemUserId().equals(other.getItemUserId()))
&& (this.getShareRecordId() == null ? other.getShareRecordId() == null : this.getShareRecordId().equals(other.getShareRecordId()))
&& (this.getShareTargetId() == null ? other.getShareTargetId() == null : this.getShareTargetId().equals(other.getShareTargetId()))
&& (this.getSharerId() == null ? other.getSharerId() == null : this.getSharerId().equals(other.getSharerId()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getItemUserId() == null) ? 0 : getItemUserId().hashCode());
result = prime * result + ((getShareRecordId() == null) ? 0 : getShareRecordId().hashCode());
result = prime * result + ((getShareTargetId() == null) ? 0 : getShareTargetId().hashCode());
result = prime * result + ((getSharerId() == null) ? 0 : getSharerId().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
return result;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
itemUserId("item_user_id", "itemUserId", "BIGINT", false),
shareRecordId("share_record_id", "shareRecordId", "VARCHAR", false),
shareTargetId("share_target_id", "shareTargetId", "BIGINT", false),
sharerId("sharer_id", "sharerId", "BIGINT", false),
createTime("create_time", "createTime", "TIMESTAMP", false),
updateTime("update_time", "updateTime", "TIMESTAMP", false),
type("type", "type", "INTEGER", true),
isDeleted("is_deleted", "isDeleted", "BIT", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_share_record
*
* @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_share_record
*
* @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_share_record
*
* @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_share_record
*
* @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_share_record
*
* @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_share_record
*
* @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_share_record
*
* @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_share_record
*
* @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_share_record
*
* @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_share_record
*
* @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_share_record
*
* @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_share_record
*
* @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_share_record
*
* @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_share_record
*
* @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_share_record
*
* @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.distribution;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class CollectionShareRecordExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public CollectionShareRecordExample() {
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_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public CollectionShareRecordExample orderBy(String orderByClause) {
this.setOrderByClause(orderByClause);
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public CollectionShareRecordExample 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_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Criteria newAndCreateCriteria() {
CollectionShareRecordExample example = new CollectionShareRecordExample();
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_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdEqualToColumn(CollectionShareRecord.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_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdNotEqualToColumn(CollectionShareRecord.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_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanColumn(CollectionShareRecord.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_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanOrEqualToColumn(CollectionShareRecord.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_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanColumn(CollectionShareRecord.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_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanOrEqualToColumn(CollectionShareRecord.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 andItemUserIdIsNull() {
addCriterion("item_user_id is null");
return (Criteria) this;
}
public Criteria andItemUserIdIsNotNull() {
addCriterion("item_user_id is not null");
return (Criteria) this;
}
public Criteria andItemUserIdEqualTo(Long value) {
addCriterion("item_user_id =", value, "itemUserId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemUserIdEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("item_user_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemUserIdNotEqualTo(Long value) {
addCriterion("item_user_id <>", value, "itemUserId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemUserIdNotEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("item_user_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemUserIdGreaterThan(Long value) {
addCriterion("item_user_id >", value, "itemUserId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemUserIdGreaterThanColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("item_user_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("item_user_id >=", value, "itemUserId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemUserIdGreaterThanOrEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("item_user_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemUserIdLessThan(Long value) {
addCriterion("item_user_id <", value, "itemUserId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemUserIdLessThanColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("item_user_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemUserIdLessThanOrEqualTo(Long value) {
addCriterion("item_user_id <=", value, "itemUserId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemUserIdLessThanOrEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("item_user_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemUserIdIn(List<Long> values) {
addCriterion("item_user_id in", values, "itemUserId");
return (Criteria) this;
}
public Criteria andItemUserIdNotIn(List<Long> values) {
addCriterion("item_user_id not in", values, "itemUserId");
return (Criteria) this;
}
public Criteria andItemUserIdBetween(Long value1, Long value2) {
addCriterion("item_user_id between", value1, value2, "itemUserId");
return (Criteria) this;
}
public Criteria andItemUserIdNotBetween(Long value1, Long value2) {
addCriterion("item_user_id not between", value1, value2, "itemUserId");
return (Criteria) this;
}
public Criteria andShareRecordIdIsNull() {
addCriterion("share_record_id is null");
return (Criteria) this;
}
public Criteria andShareRecordIdIsNotNull() {
addCriterion("share_record_id is not null");
return (Criteria) this;
}
public Criteria andShareRecordIdEqualTo(String value) {
addCriterion("share_record_id =", value, "shareRecordId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andShareRecordIdEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("share_record_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andShareRecordIdNotEqualTo(String value) {
addCriterion("share_record_id <>", value, "shareRecordId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andShareRecordIdNotEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("share_record_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andShareRecordIdGreaterThan(String value) {
addCriterion("share_record_id >", value, "shareRecordId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andShareRecordIdGreaterThanColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("share_record_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andShareRecordIdGreaterThanOrEqualTo(String value) {
addCriterion("share_record_id >=", value, "shareRecordId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andShareRecordIdGreaterThanOrEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("share_record_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andShareRecordIdLessThan(String value) {
addCriterion("share_record_id <", value, "shareRecordId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andShareRecordIdLessThanColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("share_record_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andShareRecordIdLessThanOrEqualTo(String value) {
addCriterion("share_record_id <=", value, "shareRecordId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andShareRecordIdLessThanOrEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("share_record_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andShareRecordIdLike(String value) {
addCriterion("share_record_id like", value, "shareRecordId");
return (Criteria) this;
}
public Criteria andShareRecordIdNotLike(String value) {
addCriterion("share_record_id not like", value, "shareRecordId");
return (Criteria) this;
}
public Criteria andShareRecordIdIn(List<String> values) {
addCriterion("share_record_id in", values, "shareRecordId");
return (Criteria) this;
}
public Criteria andShareRecordIdNotIn(List<String> values) {
addCriterion("share_record_id not in", values, "shareRecordId");
return (Criteria) this;
}
public Criteria andShareRecordIdBetween(String value1, String value2) {
addCriterion("share_record_id between", value1, value2, "shareRecordId");
return (Criteria) this;
}
public Criteria andShareRecordIdNotBetween(String value1, String value2) {
addCriterion("share_record_id not between", value1, value2, "shareRecordId");
return (Criteria) this;
}
public Criteria andShareTargetIdIsNull() {
addCriterion("share_target_id is null");
return (Criteria) this;
}
public Criteria andShareTargetIdIsNotNull() {
addCriterion("share_target_id is not null");
return (Criteria) this;
}
public Criteria andShareTargetIdEqualTo(Long value) {
addCriterion("share_target_id =", value, "shareTargetId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andShareTargetIdEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("share_target_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andShareTargetIdNotEqualTo(Long value) {
addCriterion("share_target_id <>", value, "shareTargetId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andShareTargetIdNotEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("share_target_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andShareTargetIdGreaterThan(Long value) {
addCriterion("share_target_id >", value, "shareTargetId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andShareTargetIdGreaterThanColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("share_target_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andShareTargetIdGreaterThanOrEqualTo(Long value) {
addCriterion("share_target_id >=", value, "shareTargetId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andShareTargetIdGreaterThanOrEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("share_target_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andShareTargetIdLessThan(Long value) {
addCriterion("share_target_id <", value, "shareTargetId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andShareTargetIdLessThanColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("share_target_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andShareTargetIdLessThanOrEqualTo(Long value) {
addCriterion("share_target_id <=", value, "shareTargetId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andShareTargetIdLessThanOrEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("share_target_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andShareTargetIdIn(List<Long> values) {
addCriterion("share_target_id in", values, "shareTargetId");
return (Criteria) this;
}
public Criteria andShareTargetIdNotIn(List<Long> values) {
addCriterion("share_target_id not in", values, "shareTargetId");
return (Criteria) this;
}
public Criteria andShareTargetIdBetween(Long value1, Long value2) {
addCriterion("share_target_id between", value1, value2, "shareTargetId");
return (Criteria) this;
}
public Criteria andShareTargetIdNotBetween(Long value1, Long value2) {
addCriterion("share_target_id not between", value1, value2, "shareTargetId");
return (Criteria) this;
}
public Criteria andSharerIdIsNull() {
addCriterion("sharer_id is null");
return (Criteria) this;
}
public Criteria andSharerIdIsNotNull() {
addCriterion("sharer_id is not null");
return (Criteria) this;
}
public Criteria andSharerIdEqualTo(Long value) {
addCriterion("sharer_id =", value, "sharerId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSharerIdEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("sharer_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSharerIdNotEqualTo(Long value) {
addCriterion("sharer_id <>", value, "sharerId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSharerIdNotEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("sharer_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSharerIdGreaterThan(Long value) {
addCriterion("sharer_id >", value, "sharerId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSharerIdGreaterThanColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("sharer_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSharerIdGreaterThanOrEqualTo(Long value) {
addCriterion("sharer_id >=", value, "sharerId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSharerIdGreaterThanOrEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("sharer_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSharerIdLessThan(Long value) {
addCriterion("sharer_id <", value, "sharerId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSharerIdLessThanColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("sharer_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSharerIdLessThanOrEqualTo(Long value) {
addCriterion("sharer_id <=", value, "sharerId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSharerIdLessThanOrEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("sharer_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSharerIdIn(List<Long> values) {
addCriterion("sharer_id in", values, "sharerId");
return (Criteria) this;
}
public Criteria andSharerIdNotIn(List<Long> values) {
addCriterion("sharer_id not in", values, "sharerId");
return (Criteria) this;
}
public Criteria andSharerIdBetween(Long value1, Long value2) {
addCriterion("sharer_id between", value1, value2, "sharerId");
return (Criteria) this;
}
public Criteria andSharerIdNotBetween(Long value1, Long value2) {
addCriterion("sharer_id not between", value1, value2, "sharerId");
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 collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeEqualToColumn(CollectionShareRecord.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 collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeNotEqualToColumn(CollectionShareRecord.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 collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanColumn(CollectionShareRecord.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 collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanOrEqualToColumn(CollectionShareRecord.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 collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanColumn(CollectionShareRecord.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 collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanOrEqualToColumn(CollectionShareRecord.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 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;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("update_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeNotEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("update_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeGreaterThanColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("update_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeGreaterThanOrEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("update_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeLessThanColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("update_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeLessThanOrEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("update_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("`type` is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("`type` is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Integer value) {
addCriterion("`type` =", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("`type` = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Integer value) {
addCriterion("`type` <>", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeNotEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("`type` <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Integer value) {
addCriterion("`type` >", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeGreaterThanColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("`type` > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("`type` >=", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeGreaterThanOrEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("`type` >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeLessThan(Integer value) {
addCriterion("`type` <", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeLessThanColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("`type` < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Integer value) {
addCriterion("`type` <=", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeLessThanOrEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("`type` <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeIn(List<Integer> values) {
addCriterion("`type` in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Integer> values) {
addCriterion("`type` not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Integer value1, Integer value2) {
addCriterion("`type` between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
addCriterion("`type` not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andIsDeletedIsNull() {
addCriterion("is_deleted is null");
return (Criteria) this;
}
public Criteria andIsDeletedIsNotNull() {
addCriterion("is_deleted is not null");
return (Criteria) this;
}
public Criteria andIsDeletedEqualTo(Boolean value) {
addCriterion("is_deleted =", value, "isDeleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsDeletedEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("is_deleted = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsDeletedNotEqualTo(Boolean value) {
addCriterion("is_deleted <>", value, "isDeleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsDeletedNotEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("is_deleted <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsDeletedGreaterThan(Boolean value) {
addCriterion("is_deleted >", value, "isDeleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsDeletedGreaterThanColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("is_deleted > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsDeletedGreaterThanOrEqualTo(Boolean value) {
addCriterion("is_deleted >=", value, "isDeleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsDeletedGreaterThanOrEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("is_deleted >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsDeletedLessThan(Boolean value) {
addCriterion("is_deleted <", value, "isDeleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsDeletedLessThanColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("is_deleted < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsDeletedLessThanOrEqualTo(Boolean value) {
addCriterion("is_deleted <=", value, "isDeleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsDeletedLessThanOrEqualToColumn(CollectionShareRecord.Column column) {
addCriterion(new StringBuilder("is_deleted <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsDeletedIn(List<Boolean> values) {
addCriterion("is_deleted in", values, "isDeleted");
return (Criteria) this;
}
public Criteria andIsDeletedNotIn(List<Boolean> values) {
addCriterion("is_deleted not in", values, "isDeleted");
return (Criteria) this;
}
public Criteria andIsDeletedBetween(Boolean value1, Boolean value2) {
addCriterion("is_deleted between", value1, value2, "isDeleted");
return (Criteria) this;
}
public Criteria andIsDeletedNotBetween(Boolean value1, Boolean value2) {
addCriterion("is_deleted not between", value1, value2, "isDeleted");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private CollectionShareRecordExample example;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected Criteria(CollectionShareRecordExample example) {
super();
this.example = example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public CollectionShareRecordExample example() {
return this.example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @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_share_record
*
* @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_share_record
*
* @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.distribution;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import com.xxdxxs.entity.Entity;
import lombok.Data;
/**
* 商品收藏记录
* @author shiyu
* @date 2024/03/21
*/
@Data
public class ItemCollectedRecord implements Entity {
private Integer id;
/**
* 藏品所属用户id
*/
private Long itemUserId;
/**
* 藏品id
*/
private Long itemId;
/**
* 收藏人id
*/
private Long collectorsId;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 是否删除
*/
private Boolean isDeleted;
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(", itemUserId=").append(itemUserId);
sb.append(", itemId=").append(itemId);
sb.append(", collectorsId=").append(collectorsId);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", isDeleted=").append(isDeleted);
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;
}
ItemCollectedRecord other = (ItemCollectedRecord) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getItemUserId() == null ? other.getItemUserId() == null : this.getItemUserId().equals(other.getItemUserId()))
&& (this.getItemId() == null ? other.getItemId() == null : this.getItemId().equals(other.getItemId()))
&& (this.getCollectorsId() == null ? other.getCollectorsId() == null : this.getCollectorsId().equals(other.getCollectorsId()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getItemUserId() == null) ? 0 : getItemUserId().hashCode());
result = prime * result + ((getItemId() == null) ? 0 : getItemId().hashCode());
result = prime * result + ((getCollectorsId() == null) ? 0 : getCollectorsId().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
return result;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
itemUserId("item_user_id", "itemUserId", "BIGINT", false),
itemId("item_id", "itemId", "BIGINT", false),
collectorsId("collectors_id", "collectorsId", "BIGINT", false),
createTime("create_time", "createTime", "TIMESTAMP", false),
updateTime("update_time", "updateTime", "TIMESTAMP", false),
isDeleted("is_deleted", "isDeleted", "BIT", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table item_collected_record
*
* @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 item_collected_record
*
* @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 item_collected_record
*
* @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 item_collected_record
*
* @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 item_collected_record
*
* @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 item_collected_record
*
* @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 item_collected_record
*
* @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 item_collected_record
*
* @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 item_collected_record
*
* @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 item_collected_record
*
* @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 item_collected_record
*
* @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 item_collected_record
*
* @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 item_collected_record
*
* @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 item_collected_record
*
* @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 item_collected_record
*
* @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.distribution;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class ItemCollectedRecordExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public ItemCollectedRecordExample() {
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 item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ItemCollectedRecordExample orderBy(String orderByClause) {
this.setOrderByClause(orderByClause);
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ItemCollectedRecordExample 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 item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Criteria newAndCreateCriteria() {
ItemCollectedRecordExample example = new ItemCollectedRecordExample();
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 item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdEqualToColumn(ItemCollectedRecord.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 item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdNotEqualToColumn(ItemCollectedRecord.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 item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanColumn(ItemCollectedRecord.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 item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanOrEqualToColumn(ItemCollectedRecord.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 item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanColumn(ItemCollectedRecord.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 item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanOrEqualToColumn(ItemCollectedRecord.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 andItemUserIdIsNull() {
addCriterion("item_user_id is null");
return (Criteria) this;
}
public Criteria andItemUserIdIsNotNull() {
addCriterion("item_user_id is not null");
return (Criteria) this;
}
public Criteria andItemUserIdEqualTo(Long value) {
addCriterion("item_user_id =", value, "itemUserId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemUserIdEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("item_user_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemUserIdNotEqualTo(Long value) {
addCriterion("item_user_id <>", value, "itemUserId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemUserIdNotEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("item_user_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemUserIdGreaterThan(Long value) {
addCriterion("item_user_id >", value, "itemUserId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemUserIdGreaterThanColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("item_user_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("item_user_id >=", value, "itemUserId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemUserIdGreaterThanOrEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("item_user_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemUserIdLessThan(Long value) {
addCriterion("item_user_id <", value, "itemUserId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemUserIdLessThanColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("item_user_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemUserIdLessThanOrEqualTo(Long value) {
addCriterion("item_user_id <=", value, "itemUserId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemUserIdLessThanOrEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("item_user_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemUserIdIn(List<Long> values) {
addCriterion("item_user_id in", values, "itemUserId");
return (Criteria) this;
}
public Criteria andItemUserIdNotIn(List<Long> values) {
addCriterion("item_user_id not in", values, "itemUserId");
return (Criteria) this;
}
public Criteria andItemUserIdBetween(Long value1, Long value2) {
addCriterion("item_user_id between", value1, value2, "itemUserId");
return (Criteria) this;
}
public Criteria andItemUserIdNotBetween(Long value1, Long value2) {
addCriterion("item_user_id not between", value1, value2, "itemUserId");
return (Criteria) this;
}
public Criteria andItemIdIsNull() {
addCriterion("item_id is null");
return (Criteria) this;
}
public Criteria andItemIdIsNotNull() {
addCriterion("item_id is not null");
return (Criteria) this;
}
public Criteria andItemIdEqualTo(Long value) {
addCriterion("item_id =", value, "itemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("item_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemIdNotEqualTo(Long value) {
addCriterion("item_id <>", value, "itemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdNotEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("item_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemIdGreaterThan(Long value) {
addCriterion("item_id >", value, "itemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdGreaterThanColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("item_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemIdGreaterThanOrEqualTo(Long value) {
addCriterion("item_id >=", value, "itemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdGreaterThanOrEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("item_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemIdLessThan(Long value) {
addCriterion("item_id <", value, "itemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdLessThanColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("item_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemIdLessThanOrEqualTo(Long value) {
addCriterion("item_id <=", value, "itemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdLessThanOrEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("item_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemIdIn(List<Long> values) {
addCriterion("item_id in", values, "itemId");
return (Criteria) this;
}
public Criteria andItemIdNotIn(List<Long> values) {
addCriterion("item_id not in", values, "itemId");
return (Criteria) this;
}
public Criteria andItemIdBetween(Long value1, Long value2) {
addCriterion("item_id between", value1, value2, "itemId");
return (Criteria) this;
}
public Criteria andItemIdNotBetween(Long value1, Long value2) {
addCriterion("item_id not between", value1, value2, "itemId");
return (Criteria) this;
}
public Criteria andCollectorsIdIsNull() {
addCriterion("collectors_id is null");
return (Criteria) this;
}
public Criteria andCollectorsIdIsNotNull() {
addCriterion("collectors_id is not null");
return (Criteria) this;
}
public Criteria andCollectorsIdEqualTo(Long value) {
addCriterion("collectors_id =", value, "collectorsId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCollectorsIdEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("collectors_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCollectorsIdNotEqualTo(Long value) {
addCriterion("collectors_id <>", value, "collectorsId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCollectorsIdNotEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("collectors_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCollectorsIdGreaterThan(Long value) {
addCriterion("collectors_id >", value, "collectorsId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCollectorsIdGreaterThanColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("collectors_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCollectorsIdGreaterThanOrEqualTo(Long value) {
addCriterion("collectors_id >=", value, "collectorsId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCollectorsIdGreaterThanOrEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("collectors_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCollectorsIdLessThan(Long value) {
addCriterion("collectors_id <", value, "collectorsId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCollectorsIdLessThanColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("collectors_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCollectorsIdLessThanOrEqualTo(Long value) {
addCriterion("collectors_id <=", value, "collectorsId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCollectorsIdLessThanOrEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("collectors_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCollectorsIdIn(List<Long> values) {
addCriterion("collectors_id in", values, "collectorsId");
return (Criteria) this;
}
public Criteria andCollectorsIdNotIn(List<Long> values) {
addCriterion("collectors_id not in", values, "collectorsId");
return (Criteria) this;
}
public Criteria andCollectorsIdBetween(Long value1, Long value2) {
addCriterion("collectors_id between", value1, value2, "collectorsId");
return (Criteria) this;
}
public Criteria andCollectorsIdNotBetween(Long value1, Long value2) {
addCriterion("collectors_id not between", value1, value2, "collectorsId");
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 item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeEqualToColumn(ItemCollectedRecord.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 item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeNotEqualToColumn(ItemCollectedRecord.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 item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanColumn(ItemCollectedRecord.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 item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanOrEqualToColumn(ItemCollectedRecord.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 item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanColumn(ItemCollectedRecord.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 item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanOrEqualToColumn(ItemCollectedRecord.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 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;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("update_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeNotEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("update_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeGreaterThanColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("update_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeGreaterThanOrEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("update_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeLessThanColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("update_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeLessThanOrEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("update_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andIsDeletedIsNull() {
addCriterion("is_deleted is null");
return (Criteria) this;
}
public Criteria andIsDeletedIsNotNull() {
addCriterion("is_deleted is not null");
return (Criteria) this;
}
public Criteria andIsDeletedEqualTo(Boolean value) {
addCriterion("is_deleted =", value, "isDeleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsDeletedEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("is_deleted = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsDeletedNotEqualTo(Boolean value) {
addCriterion("is_deleted <>", value, "isDeleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsDeletedNotEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("is_deleted <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsDeletedGreaterThan(Boolean value) {
addCriterion("is_deleted >", value, "isDeleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsDeletedGreaterThanColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("is_deleted > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsDeletedGreaterThanOrEqualTo(Boolean value) {
addCriterion("is_deleted >=", value, "isDeleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsDeletedGreaterThanOrEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("is_deleted >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsDeletedLessThan(Boolean value) {
addCriterion("is_deleted <", value, "isDeleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsDeletedLessThanColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("is_deleted < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsDeletedLessThanOrEqualTo(Boolean value) {
addCriterion("is_deleted <=", value, "isDeleted");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsDeletedLessThanOrEqualToColumn(ItemCollectedRecord.Column column) {
addCriterion(new StringBuilder("is_deleted <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsDeletedIn(List<Boolean> values) {
addCriterion("is_deleted in", values, "isDeleted");
return (Criteria) this;
}
public Criteria andIsDeletedNotIn(List<Boolean> values) {
addCriterion("is_deleted not in", values, "isDeleted");
return (Criteria) this;
}
public Criteria andIsDeletedBetween(Boolean value1, Boolean value2) {
addCriterion("is_deleted between", value1, value2, "isDeleted");
return (Criteria) this;
}
public Criteria andIsDeletedNotBetween(Boolean value1, Boolean value2) {
addCriterion("is_deleted not between", value1, value2, "isDeleted");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private ItemCollectedRecordExample example;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected Criteria(ItemCollectedRecordExample example) {
super();
this.example = example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ItemCollectedRecordExample example() {
return this.example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @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 item_collected_record
*
* @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 item_collected_record
*
* @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.dto.request.distribution;
import com.wwdz.ch.db.dto.request.BaseRequestDto;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.util.Date;
@Data
public class CollectionShareRecordRequestDto extends BaseRequestDto implements Entity {
private Integer id;
/**
* 藏品所属用户id
*/
private Long itemUserId;
/**
* 分享记录id
*/
private String shareRecordId;
/**
* 分享的藏品或藏馆id
*/
private Long shareTargetId;
/**
* 分享人
*/
private Long sharerId;
/**
* 创建时间
*/
private Date createTime;
/**
* 更细时间
*/
private Date updateTime;
/**
* 分享的类型1藏品2藏馆
*/
private Integer type;
/**
* 是否删除
*/
private Boolean isDeleted;
}
package com.wwdz.ch.db.dto.request.distribution;
import com.wwdz.ch.db.dto.request.BaseRequestDto;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.util.Date;
@Data
public class ItemCollectedRecordRequestDto extends BaseRequestDto implements Entity {
private Integer id;
/**
* 藏品所属用户id
*/
private Long itemUserId;
/**
* 藏品id
*/
private Long itemId;
/**
* 收藏人id
*/
private Long collectorsId;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 是否删除
*/
private Boolean isDeleted;
}
...@@ -157,4 +157,6 @@ public class SupplierItemRequestDto extends BaseRequestDto implements Entity { ...@@ -157,4 +157,6 @@ public class SupplierItemRequestDto extends BaseRequestDto implements Entity {
*/ */
private Long creatorId; private Long creatorId;
} }
package com.wwdz.ch.db.impl.distribution;
import com.wwdz.ch.db.dao.distribution.CollectionShareRecordDao;
import com.wwdz.ch.db.domain.distribution.CollectionShareRecord;
import com.wwdz.ch.db.domain.distribution.CollectionShareRecordExample;
import com.wwdz.ch.db.dto.request.distribution.CollectionShareRecordRequestDto;
import com.wwdz.ch.db.mapper.distribution.CollectionShareRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public class CollectionShareRecordDaoImpl implements CollectionShareRecordDao {
@Autowired
CollectionShareRecordMapper collectionShareRecordMapper;
@Override
public int insert(CollectionShareRecord collectionItemsRelation) {
return collectionShareRecordMapper.insert(collectionItemsRelation);
}
@Override
public List<CollectionShareRecord> find(CollectionShareRecordRequestDto dto) {
return null;
}
@Override
public CollectionShareRecord findById(String shareId) {
CollectionShareRecordExample example = new CollectionShareRecordExample();
CollectionShareRecordExample.Criteria criteria = example.createCriteria();
criteria.andShareRecordIdEqualTo(shareId);
return collectionShareRecordMapper.selectOneByExample(example);
}
}
package com.wwdz.ch.db.impl.distribution;
import com.wwdz.ch.db.dao.distribution.ItemCollectedRecordDao;
import com.wwdz.ch.db.domain.distribution.ItemCollectedRecord;
import com.wwdz.ch.db.domain.distribution.ItemCollectedRecordExample;
import com.wwdz.ch.db.dto.request.distribution.ItemCollectedRecordRequestDto;
import com.wwdz.ch.db.mapper.distribution.ItemCollectedRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List;
@Repository
public class ItemCollectedRecordDaoImpl implements ItemCollectedRecordDao {
@Autowired
ItemCollectedRecordMapper itemCollectedRecordMapper;
@Override
public int insert(ItemCollectedRecord itemCollectedRecord) {
return itemCollectedRecordMapper.insert(itemCollectedRecord);
}
@Override
public List<ItemCollectedRecord> find(ItemCollectedRecordRequestDto dto) {
return null;
}
@Override
public int cancel(long itemId, long collectorsId) {
ItemCollectedRecordExample example = new ItemCollectedRecordExample();
ItemCollectedRecordExample.Criteria criteria = example.createCriteria();
criteria.andItemIdEqualTo(itemId);
criteria.andCollectorsIdEqualTo(collectorsId);
ItemCollectedRecord itemCollectedRecord = new ItemCollectedRecord();
itemCollectedRecord.setIsDeleted(true);
itemCollectedRecord.setUpdateTime(new Date());
return itemCollectedRecordMapper.updateByExampleSelective(itemCollectedRecord, example);
}
@Override
public long countByItemId(long itemId) {
ItemCollectedRecordExample example = new ItemCollectedRecordExample();
ItemCollectedRecordExample.Criteria criteria = example.createCriteria();
criteria.andItemIdEqualTo(itemId);
criteria.andIsDeletedEqualTo(false);
return itemCollectedRecordMapper.countByExample(example);
}
}
package com.wwdz.ch.db.mapper.distribution;
import com.wwdz.ch.db.domain.distribution.CollectionShareRecord;
import com.wwdz.ch.db.domain.distribution.CollectionShareRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface CollectionShareRecordMapper {
long countByExample(CollectionShareRecordExample example);
int deleteByExample(CollectionShareRecordExample example);
int deleteByPrimaryKey(Integer id);
int insert(CollectionShareRecord record);
int insertSelective(CollectionShareRecord record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionShareRecord selectOneByExample(CollectionShareRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionShareRecord selectOneByExampleSelective(@Param("example") CollectionShareRecordExample example, @Param("selective") CollectionShareRecord.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<CollectionShareRecord> selectByExampleSelective(@Param("example") CollectionShareRecordExample example, @Param("selective") CollectionShareRecord.Column ... selective);
List<CollectionShareRecord> selectByExample(CollectionShareRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_share_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionShareRecord selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") CollectionShareRecord.Column ... selective);
CollectionShareRecord selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") CollectionShareRecord record, @Param("example") CollectionShareRecordExample example);
int updateByExample(@Param("record") CollectionShareRecord record, @Param("example") CollectionShareRecordExample example);
int updateByPrimaryKeySelective(CollectionShareRecord record);
int updateByPrimaryKey(CollectionShareRecord record);
}
\ No newline at end of file
package com.wwdz.ch.db.mapper.distribution;
import com.wwdz.ch.db.domain.distribution.ItemCollectedRecord;
import com.wwdz.ch.db.domain.distribution.ItemCollectedRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ItemCollectedRecordMapper {
long countByExample(ItemCollectedRecordExample example);
int deleteByExample(ItemCollectedRecordExample example);
int deleteByPrimaryKey(Integer id);
int insert(ItemCollectedRecord record);
int insertSelective(ItemCollectedRecord record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ItemCollectedRecord selectOneByExample(ItemCollectedRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ItemCollectedRecord selectOneByExampleSelective(@Param("example") ItemCollectedRecordExample example, @Param("selective") ItemCollectedRecord.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<ItemCollectedRecord> selectByExampleSelective(@Param("example") ItemCollectedRecordExample example, @Param("selective") ItemCollectedRecord.Column ... selective);
List<ItemCollectedRecord> selectByExample(ItemCollectedRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item_collected_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ItemCollectedRecord selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") ItemCollectedRecord.Column ... selective);
ItemCollectedRecord selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") ItemCollectedRecord record, @Param("example") ItemCollectedRecordExample example);
int updateByExample(@Param("record") ItemCollectedRecord record, @Param("example") ItemCollectedRecordExample example);
int updateByPrimaryKeySelective(ItemCollectedRecord record);
int updateByPrimaryKey(ItemCollectedRecord 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.distribution.CollectionShareRecordMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.distribution.CollectionShareRecord">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="item_user_id" jdbcType="BIGINT" property="itemUserId" />
<result column="share_record_id" jdbcType="VARCHAR" property="shareRecordId" />
<result column="share_target_id" jdbcType="BIGINT" property="shareTargetId" />
<result column="sharer_id" jdbcType="BIGINT" property="sharerId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="is_deleted" jdbcType="BIT" property="isDeleted" />
</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, item_user_id, share_record_id, share_target_id, sharer_id, create_time, update_time,
`type`, is_deleted
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.distribution.CollectionShareRecordExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from collection_share_record
<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, item_user_id, share_record_id, share_target_id, sharer_id, create_time, update_time,
`type`, is_deleted
</otherwise>
</choose>
from collection_share_record
<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 collection_share_record
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, item_user_id, share_record_id, share_target_id, sharer_id, create_time, update_time,
`type`, is_deleted
</otherwise>
</choose>
from collection_share_record
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from collection_share_record
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.distribution.CollectionShareRecordExample">
delete from collection_share_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.distribution.CollectionShareRecord">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into collection_share_record (item_user_id, share_record_id, share_target_id,
sharer_id, create_time, update_time,
`type`, is_deleted)
values (#{itemUserId,jdbcType=BIGINT}, #{shareRecordId,jdbcType=VARCHAR}, #{shareTargetId,jdbcType=BIGINT},
#{sharerId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{type,jdbcType=INTEGER}, #{isDeleted,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.distribution.CollectionShareRecord">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into collection_share_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="itemUserId != null">
item_user_id,
</if>
<if test="shareRecordId != null">
share_record_id,
</if>
<if test="shareTargetId != null">
share_target_id,
</if>
<if test="sharerId != null">
sharer_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="type != null">
`type`,
</if>
<if test="isDeleted != null">
is_deleted,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="itemUserId != null">
#{itemUserId,jdbcType=BIGINT},
</if>
<if test="shareRecordId != null">
#{shareRecordId,jdbcType=VARCHAR},
</if>
<if test="shareTargetId != null">
#{shareTargetId,jdbcType=BIGINT},
</if>
<if test="sharerId != null">
#{sharerId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="isDeleted != null">
#{isDeleted,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.distribution.CollectionShareRecordExample" resultType="java.lang.Long">
select count(*) from collection_share_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update collection_share_record
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.itemUserId != null">
item_user_id = #{record.itemUserId,jdbcType=BIGINT},
</if>
<if test="record.shareRecordId != null">
share_record_id = #{record.shareRecordId,jdbcType=VARCHAR},
</if>
<if test="record.shareTargetId != null">
share_target_id = #{record.shareTargetId,jdbcType=BIGINT},
</if>
<if test="record.sharerId != null">
sharer_id = #{record.sharerId,jdbcType=BIGINT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.type != null">
`type` = #{record.type,jdbcType=INTEGER},
</if>
<if test="record.isDeleted != null">
is_deleted = #{record.isDeleted,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update collection_share_record
set id = #{record.id,jdbcType=INTEGER},
item_user_id = #{record.itemUserId,jdbcType=BIGINT},
share_record_id = #{record.shareRecordId,jdbcType=VARCHAR},
share_target_id = #{record.shareTargetId,jdbcType=BIGINT},
sharer_id = #{record.sharerId,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
`type` = #{record.type,jdbcType=INTEGER},
is_deleted = #{record.isDeleted,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.distribution.CollectionShareRecord">
update collection_share_record
<set>
<if test="itemUserId != null">
item_user_id = #{itemUserId,jdbcType=BIGINT},
</if>
<if test="shareRecordId != null">
share_record_id = #{shareRecordId,jdbcType=VARCHAR},
</if>
<if test="shareTargetId != null">
share_target_id = #{shareTargetId,jdbcType=BIGINT},
</if>
<if test="sharerId != null">
sharer_id = #{sharerId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="type != null">
`type` = #{type,jdbcType=INTEGER},
</if>
<if test="isDeleted != null">
is_deleted = #{isDeleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.distribution.CollectionShareRecord">
update collection_share_record
set item_user_id = #{itemUserId,jdbcType=BIGINT},
share_record_id = #{shareRecordId,jdbcType=VARCHAR},
share_target_id = #{shareTargetId,jdbcType=BIGINT},
sharer_id = #{sharerId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
`type` = #{type,jdbcType=INTEGER},
is_deleted = #{isDeleted,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.distribution.CollectionShareRecordExample" 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_share_record
<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, item_user_id, share_record_id, share_target_id, sharer_id, create_time, update_time,
`type`, is_deleted
</otherwise>
</choose>
from collection_share_record
<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.distribution.ItemCollectedRecordMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.distribution.ItemCollectedRecord">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="item_user_id" jdbcType="BIGINT" property="itemUserId" />
<result column="item_id" jdbcType="BIGINT" property="itemId" />
<result column="collectors_id" jdbcType="BIGINT" property="collectorsId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_deleted" jdbcType="BIT" property="isDeleted" />
</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, item_user_id, item_id, collectors_id, create_time, update_time, is_deleted
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.distribution.ItemCollectedRecordExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from item_collected_record
<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, item_user_id, item_id, collectors_id, create_time, update_time, is_deleted
</otherwise>
</choose>
from item_collected_record
<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 item_collected_record
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, item_user_id, item_id, collectors_id, create_time, update_time, is_deleted
</otherwise>
</choose>
from item_collected_record
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from item_collected_record
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.distribution.ItemCollectedRecordExample">
delete from item_collected_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.distribution.ItemCollectedRecord">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into item_collected_record (item_user_id, item_id, collectors_id,
create_time, update_time, is_deleted
)
values (#{itemUserId,jdbcType=BIGINT}, #{itemId,jdbcType=BIGINT}, #{collectorsId,jdbcType=BIGINT},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT}
)
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.distribution.ItemCollectedRecord">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into item_collected_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="itemUserId != null">
item_user_id,
</if>
<if test="itemId != null">
item_id,
</if>
<if test="collectorsId != null">
collectors_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="isDeleted != null">
is_deleted,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="itemUserId != null">
#{itemUserId,jdbcType=BIGINT},
</if>
<if test="itemId != null">
#{itemId,jdbcType=BIGINT},
</if>
<if test="collectorsId != null">
#{collectorsId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null">
#{isDeleted,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.distribution.ItemCollectedRecordExample" resultType="java.lang.Long">
select count(*) from item_collected_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update item_collected_record
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.itemUserId != null">
item_user_id = #{record.itemUserId,jdbcType=BIGINT},
</if>
<if test="record.itemId != null">
item_id = #{record.itemId,jdbcType=BIGINT},
</if>
<if test="record.collectorsId != null">
collectors_id = #{record.collectorsId,jdbcType=BIGINT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isDeleted != null">
is_deleted = #{record.isDeleted,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update item_collected_record
set id = #{record.id,jdbcType=INTEGER},
item_user_id = #{record.itemUserId,jdbcType=BIGINT},
item_id = #{record.itemId,jdbcType=BIGINT},
collectors_id = #{record.collectorsId,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_deleted = #{record.isDeleted,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.distribution.ItemCollectedRecord">
update item_collected_record
<set>
<if test="itemUserId != null">
item_user_id = #{itemUserId,jdbcType=BIGINT},
</if>
<if test="itemId != null">
item_id = #{itemId,jdbcType=BIGINT},
</if>
<if test="collectorsId != null">
collectors_id = #{collectorsId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isDeleted != null">
is_deleted = #{isDeleted,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.distribution.ItemCollectedRecord">
update item_collected_record
set item_user_id = #{itemUserId,jdbcType=BIGINT},
item_id = #{itemId,jdbcType=BIGINT},
collectors_id = #{collectorsId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.distribution.ItemCollectedRecordExample" 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 item_collected_record
<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, item_user_id, item_id, collectors_id, create_time, update_time, is_deleted
</otherwise>
</choose>
from item_collected_record
<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
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.mapper.distribution" <javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.mapper.distribution"
targetProject="ch-dao/src/main/java"/> targetProject="ch-dao/src/main/java"/>
<table tableName="supplier_item" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true"> <table tableName="collection_share_record" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<generatedKey column="id" sqlStatement="Mysql" identity="true" /> <generatedKey column="id" sqlStatement="Mysql" identity="true" />
</table> </table>
......
...@@ -98,7 +98,7 @@ public class CollectionItemsRelationServiceImpl implements CollectionItemsRelati ...@@ -98,7 +98,7 @@ public class CollectionItemsRelationServiceImpl implements CollectionItemsRelati
}); });
collectionBookVo.setPageSearchResult(PageSearchResult.of(pageInfo, list)); collectionBookVo.setPageSearchResult(PageSearchResult.of(pageInfo, list));
return Result.success(collectionBookVo); return Result.success(collectionBookVo);
}catch (Exception e) { } catch (Exception e) {
logger.error("查询个人藏馆信息失败 error: {}", e); logger.error("查询个人藏馆信息失败 error: {}", e);
} }
return Result.failed(); return Result.failed();
......
package com.wwdz.ch.wx.impl.distribution;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.core.util.UUID;
import com.wwdz.ch.db.dao.distribution.CollectionShareRecordDao;
import com.wwdz.ch.db.dao.distribution.SupplierItemDao;
import com.wwdz.ch.db.domain.distribution.CollectionShareRecord;
import com.wwdz.ch.db.dto.request.distribution.CollectionShareRecordRequestDto;
import com.wwdz.ch.wx.service.distribution.CollectionShareRecordService;
import com.xxdxxs.utils.EntityMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.HashMap;
@Service
public class CollectionShareRecordServiceImpl implements CollectionShareRecordService {
private static final Logger logger = LoggerFactory.getLogger(CollectionShareRecordServiceImpl.class);
@Autowired
CollectionShareRecordDao collectionShareRecordDao;
@Autowired
SupplierItemDao supplierItemDao;
@Override
public Result createShareRecord(CollectionShareRecordRequestDto dto) {
try {
String shareRecordId = UUID.fastUUID().toString(true);
CollectionShareRecord collectionShareRecord = new CollectionShareRecord();
EntityMapper.copyAttribute(dto, collectionShareRecord);
collectionShareRecord.setShareRecordId(shareRecordId);
collectionShareRecord.setCreateTime(new Date());
collectionShareRecord.setUpdateTime(new Date());
collectionShareRecord.setIsDeleted(false);
collectionShareRecordDao.insert(collectionShareRecord);
return Result.success(new HashMap<String, String>(){{put("shareId", shareRecordId);}});
} catch (Exception e) {
logger.error("创建藏品分享链接失败 error: {}", e);
}
return Result.failed();
}
}
package com.wwdz.ch.wx.impl.distribution;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.core.util.UUID;
import com.wwdz.ch.db.dao.distribution.ItemCollectedRecordDao;
import com.wwdz.ch.db.domain.distribution.ItemCollectedRecord;
import com.wwdz.ch.db.dto.request.distribution.ItemCollectedRecordRequestDto;
import com.wwdz.ch.wx.service.distribution.ItemCollectedRecordService;
import com.xxdxxs.utils.EntityMapper;
import jdk.nashorn.internal.ir.EmptyNode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
/**
* 收藏藏品记录
*/
@Service
public class ItemCollectedRecordServiceImpl implements ItemCollectedRecordService {
private static final Logger logger = LoggerFactory.getLogger(ItemCollectedRecordServiceImpl.class);
@Autowired
ItemCollectedRecordDao itemCollectedRecordDao;
@Override
public Result createItemCollectedRecord(ItemCollectedRecordRequestDto dto) {
try {
ItemCollectedRecord itemCollectedRecord = new ItemCollectedRecord();
itemCollectedRecord.setIsDeleted(false);
itemCollectedRecord.setCreateTime(new Date());
itemCollectedRecord.setUpdateTime(new Date());
itemCollectedRecordDao.insert(itemCollectedRecord);
return Result.success();
} catch (Exception e) {
logger.error("创建收藏记录 error: {}", e);
}
return Result.failed();
}
@Override
public Result cancel(ItemCollectedRecordRequestDto dto) {
try {
itemCollectedRecordDao.cancel(dto.getItemId(), dto.getCollectorsId());
return Result.success();
} catch (Exception e) {
logger.error("取消收藏 error: {}", e);
}
return Result.failed();
}
}
...@@ -5,6 +5,7 @@ import com.wwdz.ch.core.consts.DistributionEnum; ...@@ -5,6 +5,7 @@ import com.wwdz.ch.core.consts.DistributionEnum;
import com.wwdz.ch.core.consts.ResultCode; import com.wwdz.ch.core.consts.ResultCode;
import com.wwdz.ch.core.type.PageSearchResult; import com.wwdz.ch.core.type.PageSearchResult;
import com.wwdz.ch.core.type.Result; import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.core.util.CacheUtil;
import com.wwdz.ch.core.util.MediaUtil; import com.wwdz.ch.core.util.MediaUtil;
import com.wwdz.ch.core.util.PriceUtil; import com.wwdz.ch.core.util.PriceUtil;
import com.wwdz.ch.db.dao.SwitchDao; import com.wwdz.ch.db.dao.SwitchDao;
...@@ -85,6 +86,12 @@ public class SupplierItemServiceImpl implements SupplierItemService { ...@@ -85,6 +86,12 @@ public class SupplierItemServiceImpl implements SupplierItemService {
@Autowired @Autowired
CollectionItemsRelationService collectionItemsRelationService; CollectionItemsRelationService collectionItemsRelationService;
@Autowired
CacheUtil cacheUtil;
@Autowired
ItemCollectedRecordDao itemCollectedRecordDao;
@Override @Override
public Result findList(SupplierItemRequestDto dto) { public Result findList(SupplierItemRequestDto dto) {
try { try {
...@@ -544,4 +551,35 @@ public class SupplierItemServiceImpl implements SupplierItemService { ...@@ -544,4 +551,35 @@ public class SupplierItemServiceImpl implements SupplierItemService {
} }
@Override
public Result findCollectionItemDetail(SupplierItemRequestDto dto) {
try {
SupplierItemVo supplierItemVo = new SupplierItemVo();
long userId = dto.getUserId();
SupplierItem supplierItem = supplierItemDao.findById(dto.getId());
if (supplierItem.getCreatorId().longValue() != userId) {
supplierItemVo.setIsMine(false);
} else {
supplierItemVo.setIsMine(true);
}
EntityMapper.copyAttribute(supplierItem, supplierItemVo);
supplierItemVo.setItemId(supplierItem.getId());
supplierItemVo.setDistributionPrice(PriceUtil.convertPriceFenToYuan(supplierItem.getDistributionPrice()));
supplierItemVo.setHomePageImage(MediaUtil.getHomePageImage(supplierItem.getImages(), supplierItem.getVideos()));
supplierItemVo.setCreatorName(cacheUtil.getAppletUserNameById(dto.getCreatorId()));
//查询藏品被收藏的次数
long countNum = itemCollectedRecordDao.countByItemId(dto.getId());
supplierItemVo.setCollectedNum((int) countNum);
return Result.success(supplierItemVo);
} catch (Exception e) {
logger.error("查询藏品详情 error : {}", e);
}
return Result.failed();
}
} }
package com.wwdz.ch.wx.service.distribution;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.distribution.CollectionShareRecordRequestDto;
public interface CollectionShareRecordService {
/**
* 创建藏品分享记录
* @param dto
* @return
*/
Result createShareRecord(CollectionShareRecordRequestDto dto);
}
package com.wwdz.ch.wx.service.distribution;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.distribution.ItemCollectedRecordRequestDto;
public interface ItemCollectedRecordService {
/**
* 创建商品被收藏记录
* @param dto
* @return
*/
Result createItemCollectedRecord(ItemCollectedRecordRequestDto dto);
/**
* 取消收藏
* @param dto
* @return
*/
Result cancel(ItemCollectedRecordRequestDto dto);
}
...@@ -68,4 +68,11 @@ public interface SupplierItemService { ...@@ -68,4 +68,11 @@ public interface SupplierItemService {
Result findAuctionDetail(SupplierItemRequestDto dto); Result findAuctionDetail(SupplierItemRequestDto dto);
/**
* 查询用户上传的商品详情
* @param dto
* @return
*/
Result findCollectionItemDetail(SupplierItemRequestDto 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