Commit 44abce69 authored by shiyu's avatar shiyu

以物换物

parent 02fa1ab7
......@@ -49,6 +49,11 @@ public interface CommConsts {
public static final Long SYSTEM_ACCOUNT = 8888888888L;
/**
* 平台自营店铺账号
*/
public static final Long SELF_SUPPORT_ACCOUNT = 6666666666L;
/**
* 用户未登录的默认账号
*/
......
......@@ -8,6 +8,8 @@ public class DistributionEnum {
public enum DistributionOrderStateEnum {
PRE_PAY(1, "待付款"),
PRE_SALE(5, "众筹中"),
PRE_EXCHANGE(6, "待换货"),
PRE_INSPECTION(8, "待验货"),
PRE_SEND(10, "待发货"),
PRE_SIGNED(20, "待收货"),
AFTER_SALE(30, "售后中"),
......@@ -57,6 +59,7 @@ public class DistributionEnum {
DISCOUNT(4, "折扣品"),
AUCTION_PERFORMANCE(5, "竞拍专场"),
GROUP_PURCHASE(6, "团购"),
EXCHANGE(7, "交换"),
;
private int code;
......@@ -172,6 +175,7 @@ public class DistributionEnum {
SYSTEM_ITEM(3, "平台藏品"),
COLLECTOR_AUCTION_ITEM(4, "藏家拍卖品"),
GROUPPURASE_ITEM(5, "团购商品"),
EXCHANGE_ITEM(6, "可交换商品"),
;
private int code;
......
......@@ -14,6 +14,8 @@ public class SupplierItemVo implements Entity {
private Long itemId;
private Integer itemNum;
/**
* 商品名称
*/
......
package com.wwdz.ch.db.dao.distribution;
import com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshot;
import java.util.List;
public interface ExchangeOrderSnapshotDao {
boolean insert(ExchangeOrderSnapshot exchangeOrderSnapshot);
boolean update(ExchangeOrderSnapshot exchangeOrderSnapshot);
List<ExchangeOrderSnapshot> findByOrderId(String orderId);
}
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/09/03
*/
@Data
public class ExchangeOrderSnapshot implements Entity {
private Integer id;
/**
* 订单号
*/
private String distributionOrderId;
/**
* 交换购买的商品id
*/
private Long exchangeItemId;
/**
* 商品id
*/
private Long itemId;
/**
* 商品名称
*/
private String itemName;
/**
* 商品数量
*/
private Integer itemNum;
/**
* 库存
*/
private Integer stock;
/**
* 分销价格,要除以100
*/
private Long distributionPrice;
/**
* 官方预估价,要除以100
*/
private Long officialEstimatedPrice;
/**
* 商品所属用户
*/
private Long creatorId;
/**
* 用户发出的快递公司编码
*/
private String logisticsCode;
/**
* 运单号
*/
private String waybill;
/**
* 用户发货时间
*/
private Date deliveryTime;
/**
* 平台签收时间
*/
private Date signedTime;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 商品图片,分号分隔
*/
private String images;
/**
* 商品视频,分号分隔
*/
private String videos;
/**
* 商品详细介绍,是富文本格式
*/
private String description;
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(", distributionOrderId=").append(distributionOrderId);
sb.append(", exchangeItemId=").append(exchangeItemId);
sb.append(", itemId=").append(itemId);
sb.append(", itemName=").append(itemName);
sb.append(", itemNum=").append(itemNum);
sb.append(", stock=").append(stock);
sb.append(", distributionPrice=").append(distributionPrice);
sb.append(", officialEstimatedPrice=").append(officialEstimatedPrice);
sb.append(", creatorId=").append(creatorId);
sb.append(", logisticsCode=").append(logisticsCode);
sb.append(", waybill=").append(waybill);
sb.append(", deliveryTime=").append(deliveryTime);
sb.append(", signedTime=").append(signedTime);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", images=").append(images);
sb.append(", videos=").append(videos);
sb.append(", description=").append(description);
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;
}
ExchangeOrderSnapshot other = (ExchangeOrderSnapshot) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getDistributionOrderId() == null ? other.getDistributionOrderId() == null : this.getDistributionOrderId().equals(other.getDistributionOrderId()))
&& (this.getExchangeItemId() == null ? other.getExchangeItemId() == null : this.getExchangeItemId().equals(other.getExchangeItemId()))
&& (this.getItemId() == null ? other.getItemId() == null : this.getItemId().equals(other.getItemId()))
&& (this.getItemName() == null ? other.getItemName() == null : this.getItemName().equals(other.getItemName()))
&& (this.getItemNum() == null ? other.getItemNum() == null : this.getItemNum().equals(other.getItemNum()))
&& (this.getStock() == null ? other.getStock() == null : this.getStock().equals(other.getStock()))
&& (this.getDistributionPrice() == null ? other.getDistributionPrice() == null : this.getDistributionPrice().equals(other.getDistributionPrice()))
&& (this.getOfficialEstimatedPrice() == null ? other.getOfficialEstimatedPrice() == null : this.getOfficialEstimatedPrice().equals(other.getOfficialEstimatedPrice()))
&& (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId()))
&& (this.getLogisticsCode() == null ? other.getLogisticsCode() == null : this.getLogisticsCode().equals(other.getLogisticsCode()))
&& (this.getWaybill() == null ? other.getWaybill() == null : this.getWaybill().equals(other.getWaybill()))
&& (this.getDeliveryTime() == null ? other.getDeliveryTime() == null : this.getDeliveryTime().equals(other.getDeliveryTime()))
&& (this.getSignedTime() == null ? other.getSignedTime() == null : this.getSignedTime().equals(other.getSignedTime()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getImages() == null ? other.getImages() == null : this.getImages().equals(other.getImages()))
&& (this.getVideos() == null ? other.getVideos() == null : this.getVideos().equals(other.getVideos()))
&& (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getDistributionOrderId() == null) ? 0 : getDistributionOrderId().hashCode());
result = prime * result + ((getExchangeItemId() == null) ? 0 : getExchangeItemId().hashCode());
result = prime * result + ((getItemId() == null) ? 0 : getItemId().hashCode());
result = prime * result + ((getItemName() == null) ? 0 : getItemName().hashCode());
result = prime * result + ((getItemNum() == null) ? 0 : getItemNum().hashCode());
result = prime * result + ((getStock() == null) ? 0 : getStock().hashCode());
result = prime * result + ((getDistributionPrice() == null) ? 0 : getDistributionPrice().hashCode());
result = prime * result + ((getOfficialEstimatedPrice() == null) ? 0 : getOfficialEstimatedPrice().hashCode());
result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode());
result = prime * result + ((getLogisticsCode() == null) ? 0 : getLogisticsCode().hashCode());
result = prime * result + ((getWaybill() == null) ? 0 : getWaybill().hashCode());
result = prime * result + ((getDeliveryTime() == null) ? 0 : getDeliveryTime().hashCode());
result = prime * result + ((getSignedTime() == null) ? 0 : getSignedTime().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getImages() == null) ? 0 : getImages().hashCode());
result = prime * result + ((getVideos() == null) ? 0 : getVideos().hashCode());
result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
return result;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
distributionOrderId("distribution_order_id", "distributionOrderId", "VARCHAR", false),
exchangeItemId("exchange_item_id", "exchangeItemId", "BIGINT", false),
itemId("item_id", "itemId", "BIGINT", false),
itemName("item_name", "itemName", "VARCHAR", false),
itemNum("item_num", "itemNum", "INTEGER", false),
stock("stock", "stock", "INTEGER", false),
distributionPrice("distribution_price", "distributionPrice", "BIGINT", false),
officialEstimatedPrice("official_estimated_price", "officialEstimatedPrice", "BIGINT", false),
creatorId("creator_id", "creatorId", "BIGINT", false),
logisticsCode("logistics_code", "logisticsCode", "VARCHAR", false),
waybill("waybill", "waybill", "VARCHAR", false),
deliveryTime("delivery_time", "deliveryTime", "TIMESTAMP", false),
signedTime("signed_time", "signedTime", "TIMESTAMP", false),
createTime("create_time", "createTime", "TIMESTAMP", false),
updateTime("update_time", "updateTime", "TIMESTAMP", false),
images("images", "images", "LONGVARCHAR", false),
videos("videos", "videos", "LONGVARCHAR", false),
description("description", "description", "LONGVARCHAR", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table exchange_order_snapshot
*
* @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 exchange_order_snapshot
*
* @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 exchange_order_snapshot
*
* @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 exchange_order_snapshot
*
* @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 exchange_order_snapshot
*
* @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 exchange_order_snapshot
*
* @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 exchange_order_snapshot
*
* @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 exchange_order_snapshot
*
* @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 exchange_order_snapshot
*
* @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 exchange_order_snapshot
*
* @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 exchange_order_snapshot
*
* @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 exchange_order_snapshot
*
* @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 exchange_order_snapshot
*
* @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 exchange_order_snapshot
*
* @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 exchange_order_snapshot
*
* @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 ExchangeOrderSnapshotExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public ExchangeOrderSnapshotExample() {
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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ExchangeOrderSnapshotExample orderBy(String orderByClause) {
this.setOrderByClause(orderByClause);
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ExchangeOrderSnapshotExample 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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Criteria newAndCreateCriteria() {
ExchangeOrderSnapshotExample example = new ExchangeOrderSnapshotExample();
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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdEqualToColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdNotEqualToColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanOrEqualToColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanOrEqualToColumn(ExchangeOrderSnapshot.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 andDistributionOrderIdIsNull() {
addCriterion("distribution_order_id is null");
return (Criteria) this;
}
public Criteria andDistributionOrderIdIsNotNull() {
addCriterion("distribution_order_id is not null");
return (Criteria) this;
}
public Criteria andDistributionOrderIdEqualTo(String value) {
addCriterion("distribution_order_id =", value, "distributionOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDistributionOrderIdEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("distribution_order_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDistributionOrderIdNotEqualTo(String value) {
addCriterion("distribution_order_id <>", value, "distributionOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDistributionOrderIdNotEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("distribution_order_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDistributionOrderIdGreaterThan(String value) {
addCriterion("distribution_order_id >", value, "distributionOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDistributionOrderIdGreaterThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("distribution_order_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDistributionOrderIdGreaterThanOrEqualTo(String value) {
addCriterion("distribution_order_id >=", value, "distributionOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDistributionOrderIdGreaterThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("distribution_order_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDistributionOrderIdLessThan(String value) {
addCriterion("distribution_order_id <", value, "distributionOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDistributionOrderIdLessThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("distribution_order_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDistributionOrderIdLessThanOrEqualTo(String value) {
addCriterion("distribution_order_id <=", value, "distributionOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDistributionOrderIdLessThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("distribution_order_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDistributionOrderIdLike(String value) {
addCriterion("distribution_order_id like", value, "distributionOrderId");
return (Criteria) this;
}
public Criteria andDistributionOrderIdNotLike(String value) {
addCriterion("distribution_order_id not like", value, "distributionOrderId");
return (Criteria) this;
}
public Criteria andDistributionOrderIdIn(List<String> values) {
addCriterion("distribution_order_id in", values, "distributionOrderId");
return (Criteria) this;
}
public Criteria andDistributionOrderIdNotIn(List<String> values) {
addCriterion("distribution_order_id not in", values, "distributionOrderId");
return (Criteria) this;
}
public Criteria andDistributionOrderIdBetween(String value1, String value2) {
addCriterion("distribution_order_id between", value1, value2, "distributionOrderId");
return (Criteria) this;
}
public Criteria andDistributionOrderIdNotBetween(String value1, String value2) {
addCriterion("distribution_order_id not between", value1, value2, "distributionOrderId");
return (Criteria) this;
}
public Criteria andExchangeItemIdIsNull() {
addCriterion("exchange_item_id is null");
return (Criteria) this;
}
public Criteria andExchangeItemIdIsNotNull() {
addCriterion("exchange_item_id is not null");
return (Criteria) this;
}
public Criteria andExchangeItemIdEqualTo(Long value) {
addCriterion("exchange_item_id =", value, "exchangeItemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andExchangeItemIdEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("exchange_item_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andExchangeItemIdNotEqualTo(Long value) {
addCriterion("exchange_item_id <>", value, "exchangeItemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andExchangeItemIdNotEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("exchange_item_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andExchangeItemIdGreaterThan(Long value) {
addCriterion("exchange_item_id >", value, "exchangeItemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andExchangeItemIdGreaterThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("exchange_item_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andExchangeItemIdGreaterThanOrEqualTo(Long value) {
addCriterion("exchange_item_id >=", value, "exchangeItemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andExchangeItemIdGreaterThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("exchange_item_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andExchangeItemIdLessThan(Long value) {
addCriterion("exchange_item_id <", value, "exchangeItemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andExchangeItemIdLessThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("exchange_item_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andExchangeItemIdLessThanOrEqualTo(Long value) {
addCriterion("exchange_item_id <=", value, "exchangeItemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andExchangeItemIdLessThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("exchange_item_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andExchangeItemIdIn(List<Long> values) {
addCriterion("exchange_item_id in", values, "exchangeItemId");
return (Criteria) this;
}
public Criteria andExchangeItemIdNotIn(List<Long> values) {
addCriterion("exchange_item_id not in", values, "exchangeItemId");
return (Criteria) this;
}
public Criteria andExchangeItemIdBetween(Long value1, Long value2) {
addCriterion("exchange_item_id between", value1, value2, "exchangeItemId");
return (Criteria) this;
}
public Criteria andExchangeItemIdNotBetween(Long value1, Long value2) {
addCriterion("exchange_item_id not between", value1, value2, "exchangeItemId");
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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdEqualToColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdNotEqualToColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdGreaterThanColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdGreaterThanOrEqualToColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdLessThanColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdLessThanOrEqualToColumn(ExchangeOrderSnapshot.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 andItemNameIsNull() {
addCriterion("item_name is null");
return (Criteria) this;
}
public Criteria andItemNameIsNotNull() {
addCriterion("item_name is not null");
return (Criteria) this;
}
public Criteria andItemNameEqualTo(String value) {
addCriterion("item_name =", value, "itemName");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemNameEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("item_name = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemNameNotEqualTo(String value) {
addCriterion("item_name <>", value, "itemName");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemNameNotEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("item_name <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemNameGreaterThan(String value) {
addCriterion("item_name >", value, "itemName");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemNameGreaterThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("item_name > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemNameGreaterThanOrEqualTo(String value) {
addCriterion("item_name >=", value, "itemName");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemNameGreaterThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("item_name >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemNameLessThan(String value) {
addCriterion("item_name <", value, "itemName");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemNameLessThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("item_name < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemNameLessThanOrEqualTo(String value) {
addCriterion("item_name <=", value, "itemName");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemNameLessThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("item_name <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemNameLike(String value) {
addCriterion("item_name like", value, "itemName");
return (Criteria) this;
}
public Criteria andItemNameNotLike(String value) {
addCriterion("item_name not like", value, "itemName");
return (Criteria) this;
}
public Criteria andItemNameIn(List<String> values) {
addCriterion("item_name in", values, "itemName");
return (Criteria) this;
}
public Criteria andItemNameNotIn(List<String> values) {
addCriterion("item_name not in", values, "itemName");
return (Criteria) this;
}
public Criteria andItemNameBetween(String value1, String value2) {
addCriterion("item_name between", value1, value2, "itemName");
return (Criteria) this;
}
public Criteria andItemNameNotBetween(String value1, String value2) {
addCriterion("item_name not between", value1, value2, "itemName");
return (Criteria) this;
}
public Criteria andItemNumIsNull() {
addCriterion("item_num is null");
return (Criteria) this;
}
public Criteria andItemNumIsNotNull() {
addCriterion("item_num is not null");
return (Criteria) this;
}
public Criteria andItemNumEqualTo(Integer value) {
addCriterion("item_num =", value, "itemNum");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemNumEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("item_num = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemNumNotEqualTo(Integer value) {
addCriterion("item_num <>", value, "itemNum");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemNumNotEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("item_num <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemNumGreaterThan(Integer value) {
addCriterion("item_num >", value, "itemNum");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemNumGreaterThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("item_num > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemNumGreaterThanOrEqualTo(Integer value) {
addCriterion("item_num >=", value, "itemNum");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemNumGreaterThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("item_num >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemNumLessThan(Integer value) {
addCriterion("item_num <", value, "itemNum");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemNumLessThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("item_num < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemNumLessThanOrEqualTo(Integer value) {
addCriterion("item_num <=", value, "itemNum");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemNumLessThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("item_num <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andItemNumIn(List<Integer> values) {
addCriterion("item_num in", values, "itemNum");
return (Criteria) this;
}
public Criteria andItemNumNotIn(List<Integer> values) {
addCriterion("item_num not in", values, "itemNum");
return (Criteria) this;
}
public Criteria andItemNumBetween(Integer value1, Integer value2) {
addCriterion("item_num between", value1, value2, "itemNum");
return (Criteria) this;
}
public Criteria andItemNumNotBetween(Integer value1, Integer value2) {
addCriterion("item_num not between", value1, value2, "itemNum");
return (Criteria) this;
}
public Criteria andStockIsNull() {
addCriterion("stock is null");
return (Criteria) this;
}
public Criteria andStockIsNotNull() {
addCriterion("stock is not null");
return (Criteria) this;
}
public Criteria andStockEqualTo(Integer value) {
addCriterion("stock =", value, "stock");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStockEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("stock = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStockNotEqualTo(Integer value) {
addCriterion("stock <>", value, "stock");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStockNotEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("stock <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStockGreaterThan(Integer value) {
addCriterion("stock >", value, "stock");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStockGreaterThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("stock > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStockGreaterThanOrEqualTo(Integer value) {
addCriterion("stock >=", value, "stock");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStockGreaterThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("stock >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStockLessThan(Integer value) {
addCriterion("stock <", value, "stock");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStockLessThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("stock < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStockLessThanOrEqualTo(Integer value) {
addCriterion("stock <=", value, "stock");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStockLessThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("stock <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStockIn(List<Integer> values) {
addCriterion("stock in", values, "stock");
return (Criteria) this;
}
public Criteria andStockNotIn(List<Integer> values) {
addCriterion("stock not in", values, "stock");
return (Criteria) this;
}
public Criteria andStockBetween(Integer value1, Integer value2) {
addCriterion("stock between", value1, value2, "stock");
return (Criteria) this;
}
public Criteria andStockNotBetween(Integer value1, Integer value2) {
addCriterion("stock not between", value1, value2, "stock");
return (Criteria) this;
}
public Criteria andDistributionPriceIsNull() {
addCriterion("distribution_price is null");
return (Criteria) this;
}
public Criteria andDistributionPriceIsNotNull() {
addCriterion("distribution_price is not null");
return (Criteria) this;
}
public Criteria andDistributionPriceEqualTo(Long value) {
addCriterion("distribution_price =", value, "distributionPrice");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDistributionPriceEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("distribution_price = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDistributionPriceNotEqualTo(Long value) {
addCriterion("distribution_price <>", value, "distributionPrice");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDistributionPriceNotEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("distribution_price <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDistributionPriceGreaterThan(Long value) {
addCriterion("distribution_price >", value, "distributionPrice");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDistributionPriceGreaterThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("distribution_price > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDistributionPriceGreaterThanOrEqualTo(Long value) {
addCriterion("distribution_price >=", value, "distributionPrice");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDistributionPriceGreaterThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("distribution_price >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDistributionPriceLessThan(Long value) {
addCriterion("distribution_price <", value, "distributionPrice");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDistributionPriceLessThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("distribution_price < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDistributionPriceLessThanOrEqualTo(Long value) {
addCriterion("distribution_price <=", value, "distributionPrice");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDistributionPriceLessThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("distribution_price <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDistributionPriceIn(List<Long> values) {
addCriterion("distribution_price in", values, "distributionPrice");
return (Criteria) this;
}
public Criteria andDistributionPriceNotIn(List<Long> values) {
addCriterion("distribution_price not in", values, "distributionPrice");
return (Criteria) this;
}
public Criteria andDistributionPriceBetween(Long value1, Long value2) {
addCriterion("distribution_price between", value1, value2, "distributionPrice");
return (Criteria) this;
}
public Criteria andDistributionPriceNotBetween(Long value1, Long value2) {
addCriterion("distribution_price not between", value1, value2, "distributionPrice");
return (Criteria) this;
}
public Criteria andOfficialEstimatedPriceIsNull() {
addCriterion("official_estimated_price is null");
return (Criteria) this;
}
public Criteria andOfficialEstimatedPriceIsNotNull() {
addCriterion("official_estimated_price is not null");
return (Criteria) this;
}
public Criteria andOfficialEstimatedPriceEqualTo(Long value) {
addCriterion("official_estimated_price =", value, "officialEstimatedPrice");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOfficialEstimatedPriceEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("official_estimated_price = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOfficialEstimatedPriceNotEqualTo(Long value) {
addCriterion("official_estimated_price <>", value, "officialEstimatedPrice");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOfficialEstimatedPriceNotEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("official_estimated_price <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOfficialEstimatedPriceGreaterThan(Long value) {
addCriterion("official_estimated_price >", value, "officialEstimatedPrice");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOfficialEstimatedPriceGreaterThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("official_estimated_price > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOfficialEstimatedPriceGreaterThanOrEqualTo(Long value) {
addCriterion("official_estimated_price >=", value, "officialEstimatedPrice");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOfficialEstimatedPriceGreaterThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("official_estimated_price >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOfficialEstimatedPriceLessThan(Long value) {
addCriterion("official_estimated_price <", value, "officialEstimatedPrice");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOfficialEstimatedPriceLessThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("official_estimated_price < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOfficialEstimatedPriceLessThanOrEqualTo(Long value) {
addCriterion("official_estimated_price <=", value, "officialEstimatedPrice");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andOfficialEstimatedPriceLessThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("official_estimated_price <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andOfficialEstimatedPriceIn(List<Long> values) {
addCriterion("official_estimated_price in", values, "officialEstimatedPrice");
return (Criteria) this;
}
public Criteria andOfficialEstimatedPriceNotIn(List<Long> values) {
addCriterion("official_estimated_price not in", values, "officialEstimatedPrice");
return (Criteria) this;
}
public Criteria andOfficialEstimatedPriceBetween(Long value1, Long value2) {
addCriterion("official_estimated_price between", value1, value2, "officialEstimatedPrice");
return (Criteria) this;
}
public Criteria andOfficialEstimatedPriceNotBetween(Long value1, Long value2) {
addCriterion("official_estimated_price not between", value1, value2, "officialEstimatedPrice");
return (Criteria) this;
}
public Criteria andCreatorIdIsNull() {
addCriterion("creator_id is null");
return (Criteria) this;
}
public Criteria andCreatorIdIsNotNull() {
addCriterion("creator_id is not null");
return (Criteria) this;
}
public Criteria andCreatorIdEqualTo(Long value) {
addCriterion("creator_id =", value, "creatorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreatorIdEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("creator_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreatorIdNotEqualTo(Long value) {
addCriterion("creator_id <>", value, "creatorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreatorIdNotEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("creator_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreatorIdGreaterThan(Long value) {
addCriterion("creator_id >", value, "creatorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreatorIdGreaterThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("creator_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) {
addCriterion("creator_id >=", value, "creatorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreatorIdGreaterThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("creator_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreatorIdLessThan(Long value) {
addCriterion("creator_id <", value, "creatorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreatorIdLessThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("creator_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreatorIdLessThanOrEqualTo(Long value) {
addCriterion("creator_id <=", value, "creatorId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreatorIdLessThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("creator_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andCreatorIdIn(List<Long> values) {
addCriterion("creator_id in", values, "creatorId");
return (Criteria) this;
}
public Criteria andCreatorIdNotIn(List<Long> values) {
addCriterion("creator_id not in", values, "creatorId");
return (Criteria) this;
}
public Criteria andCreatorIdBetween(Long value1, Long value2) {
addCriterion("creator_id between", value1, value2, "creatorId");
return (Criteria) this;
}
public Criteria andCreatorIdNotBetween(Long value1, Long value2) {
addCriterion("creator_id not between", value1, value2, "creatorId");
return (Criteria) this;
}
public Criteria andLogisticsCodeIsNull() {
addCriterion("logistics_code is null");
return (Criteria) this;
}
public Criteria andLogisticsCodeIsNotNull() {
addCriterion("logistics_code is not null");
return (Criteria) this;
}
public Criteria andLogisticsCodeEqualTo(String value) {
addCriterion("logistics_code =", value, "logisticsCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("logistics_code = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andLogisticsCodeNotEqualTo(String value) {
addCriterion("logistics_code <>", value, "logisticsCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeNotEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("logistics_code <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andLogisticsCodeGreaterThan(String value) {
addCriterion("logistics_code >", value, "logisticsCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeGreaterThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("logistics_code > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andLogisticsCodeGreaterThanOrEqualTo(String value) {
addCriterion("logistics_code >=", value, "logisticsCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeGreaterThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("logistics_code >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andLogisticsCodeLessThan(String value) {
addCriterion("logistics_code <", value, "logisticsCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeLessThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("logistics_code < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andLogisticsCodeLessThanOrEqualTo(String value) {
addCriterion("logistics_code <=", value, "logisticsCode");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeLessThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("logistics_code <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andLogisticsCodeLike(String value) {
addCriterion("logistics_code like", value, "logisticsCode");
return (Criteria) this;
}
public Criteria andLogisticsCodeNotLike(String value) {
addCriterion("logistics_code not like", value, "logisticsCode");
return (Criteria) this;
}
public Criteria andLogisticsCodeIn(List<String> values) {
addCriterion("logistics_code in", values, "logisticsCode");
return (Criteria) this;
}
public Criteria andLogisticsCodeNotIn(List<String> values) {
addCriterion("logistics_code not in", values, "logisticsCode");
return (Criteria) this;
}
public Criteria andLogisticsCodeBetween(String value1, String value2) {
addCriterion("logistics_code between", value1, value2, "logisticsCode");
return (Criteria) this;
}
public Criteria andLogisticsCodeNotBetween(String value1, String value2) {
addCriterion("logistics_code not between", value1, value2, "logisticsCode");
return (Criteria) this;
}
public Criteria andWaybillIsNull() {
addCriterion("waybill is null");
return (Criteria) this;
}
public Criteria andWaybillIsNotNull() {
addCriterion("waybill is not null");
return (Criteria) this;
}
public Criteria andWaybillEqualTo(String value) {
addCriterion("waybill =", value, "waybill");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("waybill = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andWaybillNotEqualTo(String value) {
addCriterion("waybill <>", value, "waybill");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillNotEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("waybill <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andWaybillGreaterThan(String value) {
addCriterion("waybill >", value, "waybill");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillGreaterThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("waybill > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andWaybillGreaterThanOrEqualTo(String value) {
addCriterion("waybill >=", value, "waybill");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillGreaterThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("waybill >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andWaybillLessThan(String value) {
addCriterion("waybill <", value, "waybill");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillLessThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("waybill < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andWaybillLessThanOrEqualTo(String value) {
addCriterion("waybill <=", value, "waybill");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillLessThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("waybill <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andWaybillLike(String value) {
addCriterion("waybill like", value, "waybill");
return (Criteria) this;
}
public Criteria andWaybillNotLike(String value) {
addCriterion("waybill not like", value, "waybill");
return (Criteria) this;
}
public Criteria andWaybillIn(List<String> values) {
addCriterion("waybill in", values, "waybill");
return (Criteria) this;
}
public Criteria andWaybillNotIn(List<String> values) {
addCriterion("waybill not in", values, "waybill");
return (Criteria) this;
}
public Criteria andWaybillBetween(String value1, String value2) {
addCriterion("waybill between", value1, value2, "waybill");
return (Criteria) this;
}
public Criteria andWaybillNotBetween(String value1, String value2) {
addCriterion("waybill not between", value1, value2, "waybill");
return (Criteria) this;
}
public Criteria andDeliveryTimeIsNull() {
addCriterion("delivery_time is null");
return (Criteria) this;
}
public Criteria andDeliveryTimeIsNotNull() {
addCriterion("delivery_time is not null");
return (Criteria) this;
}
public Criteria andDeliveryTimeEqualTo(Date value) {
addCriterion("delivery_time =", value, "deliveryTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDeliveryTimeEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("delivery_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDeliveryTimeNotEqualTo(Date value) {
addCriterion("delivery_time <>", value, "deliveryTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDeliveryTimeNotEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("delivery_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDeliveryTimeGreaterThan(Date value) {
addCriterion("delivery_time >", value, "deliveryTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDeliveryTimeGreaterThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("delivery_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDeliveryTimeGreaterThanOrEqualTo(Date value) {
addCriterion("delivery_time >=", value, "deliveryTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDeliveryTimeGreaterThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("delivery_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDeliveryTimeLessThan(Date value) {
addCriterion("delivery_time <", value, "deliveryTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDeliveryTimeLessThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("delivery_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDeliveryTimeLessThanOrEqualTo(Date value) {
addCriterion("delivery_time <=", value, "deliveryTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDeliveryTimeLessThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("delivery_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDeliveryTimeIn(List<Date> values) {
addCriterion("delivery_time in", values, "deliveryTime");
return (Criteria) this;
}
public Criteria andDeliveryTimeNotIn(List<Date> values) {
addCriterion("delivery_time not in", values, "deliveryTime");
return (Criteria) this;
}
public Criteria andDeliveryTimeBetween(Date value1, Date value2) {
addCriterion("delivery_time between", value1, value2, "deliveryTime");
return (Criteria) this;
}
public Criteria andDeliveryTimeNotBetween(Date value1, Date value2) {
addCriterion("delivery_time not between", value1, value2, "deliveryTime");
return (Criteria) this;
}
public Criteria andSignedTimeIsNull() {
addCriterion("signed_time is null");
return (Criteria) this;
}
public Criteria andSignedTimeIsNotNull() {
addCriterion("signed_time is not null");
return (Criteria) this;
}
public Criteria andSignedTimeEqualTo(Date value) {
addCriterion("signed_time =", value, "signedTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSignedTimeEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("signed_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSignedTimeNotEqualTo(Date value) {
addCriterion("signed_time <>", value, "signedTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSignedTimeNotEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("signed_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSignedTimeGreaterThan(Date value) {
addCriterion("signed_time >", value, "signedTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSignedTimeGreaterThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("signed_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSignedTimeGreaterThanOrEqualTo(Date value) {
addCriterion("signed_time >=", value, "signedTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSignedTimeGreaterThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("signed_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSignedTimeLessThan(Date value) {
addCriterion("signed_time <", value, "signedTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSignedTimeLessThanColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("signed_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSignedTimeLessThanOrEqualTo(Date value) {
addCriterion("signed_time <=", value, "signedTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSignedTimeLessThanOrEqualToColumn(ExchangeOrderSnapshot.Column column) {
addCriterion(new StringBuilder("signed_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSignedTimeIn(List<Date> values) {
addCriterion("signed_time in", values, "signedTime");
return (Criteria) this;
}
public Criteria andSignedTimeNotIn(List<Date> values) {
addCriterion("signed_time not in", values, "signedTime");
return (Criteria) this;
}
public Criteria andSignedTimeBetween(Date value1, Date value2) {
addCriterion("signed_time between", value1, value2, "signedTime");
return (Criteria) this;
}
public Criteria andSignedTimeNotBetween(Date value1, Date value2) {
addCriterion("signed_time not between", value1, value2, "signedTime");
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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeEqualToColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeNotEqualToColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanOrEqualToColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanOrEqualToColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeEqualToColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeNotEqualToColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeGreaterThanColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeGreaterThanOrEqualToColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeLessThanColumn(ExchangeOrderSnapshot.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 exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeLessThanOrEqualToColumn(ExchangeOrderSnapshot.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 static class Criteria extends GeneratedCriteria {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private ExchangeOrderSnapshotExample example;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected Criteria(ExchangeOrderSnapshotExample example) {
super();
this.example = example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ExchangeOrderSnapshotExample example() {
return this.example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @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 exchange_order_snapshot
*
* @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 exchange_order_snapshot
*
* @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
......@@ -159,7 +159,7 @@ public class SupplierItemRequestDto extends BaseRequestDto implements Entity {
private String rebate;
/**
* 商品类型1一口价2竞拍3用户上传4折扣商品
* 商品类型1一口价2竞拍3用户上传4折扣商品7换藏商品
*/
private Integer type;
......@@ -275,4 +275,9 @@ public class SupplierItemRequestDto extends BaseRequestDto implements Entity {
*/
private Long introducerId;
/**
* 官方估价是否可以为空
*/
private Boolean officialEstimatedPriceNotNull;
}
package com.wwdz.ch.db.impl.distribution;
import com.wwdz.ch.db.dao.distribution.ExchangeOrderSnapshotDao;
import com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshot;
import com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshotExample;
import com.wwdz.ch.db.mapper.distribution.ExchangeOrderSnapshotMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public class ExchangeOrderSnapshotDaoImpl implements ExchangeOrderSnapshotDao {
@Autowired
ExchangeOrderSnapshotMapper exchangeOrderSnapshotMapper;
@Override
public boolean insert(ExchangeOrderSnapshot exchangeOrderSnapshot) {
return exchangeOrderSnapshotMapper.insert(exchangeOrderSnapshot) > 0;
}
@Override
public boolean update(ExchangeOrderSnapshot exchangeOrderSnapshot) {
ExchangeOrderSnapshotExample example = new ExchangeOrderSnapshotExample();
ExchangeOrderSnapshotExample.Criteria criteria = example.createCriteria();
criteria.andDistributionOrderIdEqualTo(exchangeOrderSnapshot.getDistributionOrderId());
return exchangeOrderSnapshotMapper.updateByExampleSelective(exchangeOrderSnapshot, example) > 0;
}
@Override
public List<ExchangeOrderSnapshot> findByOrderId(String orderId) {
ExchangeOrderSnapshotExample example = new ExchangeOrderSnapshotExample();
ExchangeOrderSnapshotExample.Criteria criteria = example.createCriteria();
criteria.andDistributionOrderIdEqualTo(orderId);
return exchangeOrderSnapshotMapper.selectByExampleWithBLOBs(example);
}
}
......@@ -45,6 +45,9 @@ public class SupplierItemDaoImpl implements SupplierItemDao {
JdbcHelper.ifPresent(dto.getIsAbleSale(), criteria::andIsAbleSaleEqualTo);
JdbcHelper.ifPresent(dto.getIsDeleted(), criteria::andIsDeletedEqualTo);
JdbcHelper.ifPresent(dto.getCreatorId(), criteria::andCreatorIdEqualTo);
if (dto.getOfficialEstimatedPriceNotNull() != null && dto.getOfficialEstimatedPriceNotNull()) {
criteria.andOfficialEstimatedPriceIsNotNull();
}
supplierItemExample.setOrderByClause(" create_time desc");
PageHelper.startPage(dto.getPage(), dto.getLimit());
return supplierItemMapper.selectByExampleWithBLOBs(supplierItemExample);
......@@ -62,9 +65,11 @@ public class SupplierItemDaoImpl implements SupplierItemDao {
criteria.andNameLike("%" + dto.getName() + "%");
}
JdbcHelper.ifPresent(dto.getType(), criteria::andTypeEqualTo);
JdbcHelper.ifPresent(dto.getFilterType(), criteria::andTypeNotIn);
JdbcHelper.ifPresent(dto.getStock(), criteria::andStockGreaterThan);
JdbcHelper.ifPresent(dto.getIsOnSale(), criteria::andIsOnSaleEqualTo);
JdbcHelper.ifPresent(dto.getIsDeleted(), criteria::andIsDeletedEqualTo);
// JdbcHelper.ifPresent(dto.getIsDeleted(), criteria::andIsDeletedEqualTo);
criteria.andIsDeletedEqualTo(false);
supplierItemExample.setOrderByClause(" is_on_sale desc, stock desc, create_time desc");
PageHelper.startPage(dto.getPage(), dto.getLimit());
return supplierItemMapper.selectByExampleWithBLOBs(supplierItemExample);
......
package com.wwdz.ch.db.mapper.distribution;
import com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshot;
import com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshotExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ExchangeOrderSnapshotMapper {
long countByExample(ExchangeOrderSnapshotExample example);
int deleteByExample(ExchangeOrderSnapshotExample example);
int deleteByPrimaryKey(Integer id);
int insert(ExchangeOrderSnapshot record);
int insertSelective(ExchangeOrderSnapshot record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ExchangeOrderSnapshot selectOneByExample(ExchangeOrderSnapshotExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ExchangeOrderSnapshot selectOneByExampleSelective(@Param("example") ExchangeOrderSnapshotExample example, @Param("selective") ExchangeOrderSnapshot.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ExchangeOrderSnapshot selectOneByExampleWithBLOBs(ExchangeOrderSnapshotExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<ExchangeOrderSnapshot> selectByExampleSelective(@Param("example") ExchangeOrderSnapshotExample example, @Param("selective") ExchangeOrderSnapshot.Column ... selective);
List<ExchangeOrderSnapshot> selectByExampleWithBLOBs(ExchangeOrderSnapshotExample example);
List<ExchangeOrderSnapshot> selectByExample(ExchangeOrderSnapshotExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table exchange_order_snapshot
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ExchangeOrderSnapshot selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") ExchangeOrderSnapshot.Column ... selective);
ExchangeOrderSnapshot selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") ExchangeOrderSnapshot record, @Param("example") ExchangeOrderSnapshotExample example);
int updateByExampleWithBLOBs(@Param("record") ExchangeOrderSnapshot record, @Param("example") ExchangeOrderSnapshotExample example);
int updateByExample(@Param("record") ExchangeOrderSnapshot record, @Param("example") ExchangeOrderSnapshotExample example);
int updateByPrimaryKeySelective(ExchangeOrderSnapshot record);
int updateByPrimaryKeyWithBLOBs(ExchangeOrderSnapshot record);
int updateByPrimaryKey(ExchangeOrderSnapshot 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.ExchangeOrderSnapshotMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshot">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="distribution_order_id" jdbcType="VARCHAR" property="distributionOrderId" />
<result column="exchange_item_id" jdbcType="BIGINT" property="exchangeItemId" />
<result column="item_id" jdbcType="BIGINT" property="itemId" />
<result column="item_name" jdbcType="VARCHAR" property="itemName" />
<result column="item_num" jdbcType="INTEGER" property="itemNum" />
<result column="stock" jdbcType="INTEGER" property="stock" />
<result column="distribution_price" jdbcType="BIGINT" property="distributionPrice" />
<result column="official_estimated_price" jdbcType="BIGINT" property="officialEstimatedPrice" />
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
<result column="logistics_code" jdbcType="VARCHAR" property="logisticsCode" />
<result column="waybill" jdbcType="VARCHAR" property="waybill" />
<result column="delivery_time" jdbcType="TIMESTAMP" property="deliveryTime" />
<result column="signed_time" jdbcType="TIMESTAMP" property="signedTime" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshot">
<result column="images" jdbcType="LONGVARCHAR" property="images" />
<result column="videos" jdbcType="LONGVARCHAR" property="videos" />
<result column="description" jdbcType="LONGVARCHAR" property="description" />
</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, distribution_order_id, exchange_item_id, item_id, item_name, item_num, stock,
distribution_price, official_estimated_price, creator_id, logistics_code, waybill,
delivery_time, signed_time, create_time, update_time
</sql>
<sql id="Blob_Column_List">
images, videos, description
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshotExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from exchange_order_snapshot
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshotExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from exchange_order_snapshot
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExampleSelective" parameterType="map" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if test="example.distinct">
distinct
</if>
<choose>
<when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, distribution_order_id, exchange_item_id, item_id, item_name, item_num, stock,
distribution_price, official_estimated_price, creator_id, logistics_code, waybill,
delivery_time, signed_time, create_time, update_time, images, videos, description
</otherwise>
</choose>
from exchange_order_snapshot
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from exchange_order_snapshot
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, distribution_order_id, exchange_item_id, item_id, item_name, item_num, stock,
distribution_price, official_estimated_price, creator_id, logistics_code, waybill,
delivery_time, signed_time, create_time, update_time, images, videos, description
</otherwise>
</choose>
from exchange_order_snapshot
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from exchange_order_snapshot
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshotExample">
delete from exchange_order_snapshot
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshot">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into exchange_order_snapshot (distribution_order_id, exchange_item_id,
item_id, item_name, item_num,
stock, distribution_price, official_estimated_price,
creator_id, logistics_code, waybill,
delivery_time, signed_time, create_time,
update_time, images, videos,
description)
values (#{distributionOrderId,jdbcType=VARCHAR}, #{exchangeItemId,jdbcType=BIGINT},
#{itemId,jdbcType=BIGINT}, #{itemName,jdbcType=VARCHAR}, #{itemNum,jdbcType=INTEGER},
#{stock,jdbcType=INTEGER}, #{distributionPrice,jdbcType=BIGINT}, #{officialEstimatedPrice,jdbcType=BIGINT},
#{creatorId,jdbcType=BIGINT}, #{logisticsCode,jdbcType=VARCHAR}, #{waybill,jdbcType=VARCHAR},
#{deliveryTime,jdbcType=TIMESTAMP}, #{signedTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{images,jdbcType=LONGVARCHAR}, #{videos,jdbcType=LONGVARCHAR},
#{description,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshot">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into exchange_order_snapshot
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="distributionOrderId != null">
distribution_order_id,
</if>
<if test="exchangeItemId != null">
exchange_item_id,
</if>
<if test="itemId != null">
item_id,
</if>
<if test="itemName != null">
item_name,
</if>
<if test="itemNum != null">
item_num,
</if>
<if test="stock != null">
stock,
</if>
<if test="distributionPrice != null">
distribution_price,
</if>
<if test="officialEstimatedPrice != null">
official_estimated_price,
</if>
<if test="creatorId != null">
creator_id,
</if>
<if test="logisticsCode != null">
logistics_code,
</if>
<if test="waybill != null">
waybill,
</if>
<if test="deliveryTime != null">
delivery_time,
</if>
<if test="signedTime != null">
signed_time,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="images != null">
images,
</if>
<if test="videos != null">
videos,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="distributionOrderId != null">
#{distributionOrderId,jdbcType=VARCHAR},
</if>
<if test="exchangeItemId != null">
#{exchangeItemId,jdbcType=BIGINT},
</if>
<if test="itemId != null">
#{itemId,jdbcType=BIGINT},
</if>
<if test="itemName != null">
#{itemName,jdbcType=VARCHAR},
</if>
<if test="itemNum != null">
#{itemNum,jdbcType=INTEGER},
</if>
<if test="stock != null">
#{stock,jdbcType=INTEGER},
</if>
<if test="distributionPrice != null">
#{distributionPrice,jdbcType=BIGINT},
</if>
<if test="officialEstimatedPrice != null">
#{officialEstimatedPrice,jdbcType=BIGINT},
</if>
<if test="creatorId != null">
#{creatorId,jdbcType=BIGINT},
</if>
<if test="logisticsCode != null">
#{logisticsCode,jdbcType=VARCHAR},
</if>
<if test="waybill != null">
#{waybill,jdbcType=VARCHAR},
</if>
<if test="deliveryTime != null">
#{deliveryTime,jdbcType=TIMESTAMP},
</if>
<if test="signedTime != null">
#{signedTime,jdbcType=TIMESTAMP},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="images != null">
#{images,jdbcType=LONGVARCHAR},
</if>
<if test="videos != null">
#{videos,jdbcType=LONGVARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshotExample" resultType="java.lang.Long">
select count(*) from exchange_order_snapshot
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update exchange_order_snapshot
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.distributionOrderId != null">
distribution_order_id = #{record.distributionOrderId,jdbcType=VARCHAR},
</if>
<if test="record.exchangeItemId != null">
exchange_item_id = #{record.exchangeItemId,jdbcType=BIGINT},
</if>
<if test="record.itemId != null">
item_id = #{record.itemId,jdbcType=BIGINT},
</if>
<if test="record.itemName != null">
item_name = #{record.itemName,jdbcType=VARCHAR},
</if>
<if test="record.itemNum != null">
item_num = #{record.itemNum,jdbcType=INTEGER},
</if>
<if test="record.stock != null">
stock = #{record.stock,jdbcType=INTEGER},
</if>
<if test="record.distributionPrice != null">
distribution_price = #{record.distributionPrice,jdbcType=BIGINT},
</if>
<if test="record.officialEstimatedPrice != null">
official_estimated_price = #{record.officialEstimatedPrice,jdbcType=BIGINT},
</if>
<if test="record.creatorId != null">
creator_id = #{record.creatorId,jdbcType=BIGINT},
</if>
<if test="record.logisticsCode != null">
logistics_code = #{record.logisticsCode,jdbcType=VARCHAR},
</if>
<if test="record.waybill != null">
waybill = #{record.waybill,jdbcType=VARCHAR},
</if>
<if test="record.deliveryTime != null">
delivery_time = #{record.deliveryTime,jdbcType=TIMESTAMP},
</if>
<if test="record.signedTime != null">
signed_time = #{record.signedTime,jdbcType=TIMESTAMP},
</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.images != null">
images = #{record.images,jdbcType=LONGVARCHAR},
</if>
<if test="record.videos != null">
videos = #{record.videos,jdbcType=LONGVARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update exchange_order_snapshot
set id = #{record.id,jdbcType=INTEGER},
distribution_order_id = #{record.distributionOrderId,jdbcType=VARCHAR},
exchange_item_id = #{record.exchangeItemId,jdbcType=BIGINT},
item_id = #{record.itemId,jdbcType=BIGINT},
item_name = #{record.itemName,jdbcType=VARCHAR},
item_num = #{record.itemNum,jdbcType=INTEGER},
stock = #{record.stock,jdbcType=INTEGER},
distribution_price = #{record.distributionPrice,jdbcType=BIGINT},
official_estimated_price = #{record.officialEstimatedPrice,jdbcType=BIGINT},
creator_id = #{record.creatorId,jdbcType=BIGINT},
logistics_code = #{record.logisticsCode,jdbcType=VARCHAR},
waybill = #{record.waybill,jdbcType=VARCHAR},
delivery_time = #{record.deliveryTime,jdbcType=TIMESTAMP},
signed_time = #{record.signedTime,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
images = #{record.images,jdbcType=LONGVARCHAR},
videos = #{record.videos,jdbcType=LONGVARCHAR},
description = #{record.description,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update exchange_order_snapshot
set id = #{record.id,jdbcType=INTEGER},
distribution_order_id = #{record.distributionOrderId,jdbcType=VARCHAR},
exchange_item_id = #{record.exchangeItemId,jdbcType=BIGINT},
item_id = #{record.itemId,jdbcType=BIGINT},
item_name = #{record.itemName,jdbcType=VARCHAR},
item_num = #{record.itemNum,jdbcType=INTEGER},
stock = #{record.stock,jdbcType=INTEGER},
distribution_price = #{record.distributionPrice,jdbcType=BIGINT},
official_estimated_price = #{record.officialEstimatedPrice,jdbcType=BIGINT},
creator_id = #{record.creatorId,jdbcType=BIGINT},
logistics_code = #{record.logisticsCode,jdbcType=VARCHAR},
waybill = #{record.waybill,jdbcType=VARCHAR},
delivery_time = #{record.deliveryTime,jdbcType=TIMESTAMP},
signed_time = #{record.signedTime,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshot">
update exchange_order_snapshot
<set>
<if test="distributionOrderId != null">
distribution_order_id = #{distributionOrderId,jdbcType=VARCHAR},
</if>
<if test="exchangeItemId != null">
exchange_item_id = #{exchangeItemId,jdbcType=BIGINT},
</if>
<if test="itemId != null">
item_id = #{itemId,jdbcType=BIGINT},
</if>
<if test="itemName != null">
item_name = #{itemName,jdbcType=VARCHAR},
</if>
<if test="itemNum != null">
item_num = #{itemNum,jdbcType=INTEGER},
</if>
<if test="stock != null">
stock = #{stock,jdbcType=INTEGER},
</if>
<if test="distributionPrice != null">
distribution_price = #{distributionPrice,jdbcType=BIGINT},
</if>
<if test="officialEstimatedPrice != null">
official_estimated_price = #{officialEstimatedPrice,jdbcType=BIGINT},
</if>
<if test="creatorId != null">
creator_id = #{creatorId,jdbcType=BIGINT},
</if>
<if test="logisticsCode != null">
logistics_code = #{logisticsCode,jdbcType=VARCHAR},
</if>
<if test="waybill != null">
waybill = #{waybill,jdbcType=VARCHAR},
</if>
<if test="deliveryTime != null">
delivery_time = #{deliveryTime,jdbcType=TIMESTAMP},
</if>
<if test="signedTime != null">
signed_time = #{signedTime,jdbcType=TIMESTAMP},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="images != null">
images = #{images,jdbcType=LONGVARCHAR},
</if>
<if test="videos != null">
videos = #{videos,jdbcType=LONGVARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshot">
update exchange_order_snapshot
set distribution_order_id = #{distributionOrderId,jdbcType=VARCHAR},
exchange_item_id = #{exchangeItemId,jdbcType=BIGINT},
item_id = #{itemId,jdbcType=BIGINT},
item_name = #{itemName,jdbcType=VARCHAR},
item_num = #{itemNum,jdbcType=INTEGER},
stock = #{stock,jdbcType=INTEGER},
distribution_price = #{distributionPrice,jdbcType=BIGINT},
official_estimated_price = #{officialEstimatedPrice,jdbcType=BIGINT},
creator_id = #{creatorId,jdbcType=BIGINT},
logistics_code = #{logisticsCode,jdbcType=VARCHAR},
waybill = #{waybill,jdbcType=VARCHAR},
delivery_time = #{deliveryTime,jdbcType=TIMESTAMP},
signed_time = #{signedTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
images = #{images,jdbcType=LONGVARCHAR},
videos = #{videos,jdbcType=LONGVARCHAR},
description = #{description,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshot">
update exchange_order_snapshot
set distribution_order_id = #{distributionOrderId,jdbcType=VARCHAR},
exchange_item_id = #{exchangeItemId,jdbcType=BIGINT},
item_id = #{itemId,jdbcType=BIGINT},
item_name = #{itemName,jdbcType=VARCHAR},
item_num = #{itemNum,jdbcType=INTEGER},
stock = #{stock,jdbcType=INTEGER},
distribution_price = #{distributionPrice,jdbcType=BIGINT},
official_estimated_price = #{officialEstimatedPrice,jdbcType=BIGINT},
creator_id = #{creatorId,jdbcType=BIGINT},
logistics_code = #{logisticsCode,jdbcType=VARCHAR},
waybill = #{waybill,jdbcType=VARCHAR},
delivery_time = #{deliveryTime,jdbcType=TIMESTAMP},
signed_time = #{signedTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshotExample" 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 exchange_order_snapshot
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleWithBLOBs" parameterType="com.wwdz.ch.db.domain.distribution.ExchangeOrderSnapshotExample" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from exchange_order_snapshot
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleSelective" parameterType="map" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, distribution_order_id, exchange_item_id, item_id, item_name, item_num, stock,
distribution_price, official_estimated_price, creator_id, logistics_code, waybill,
delivery_time, signed_time, create_time, update_time, images, videos, description
</otherwise>
</choose>
from exchange_order_snapshot
<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 @@
<javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.mapper.distribution"
targetProject="ch-dao/src/main/java"/>
<table tableName="supplier_item" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<table tableName="exchange_order_snapshot" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<generatedKey column="id" sqlStatement="Mysql" identity="true" />
</table>
......
......@@ -46,7 +46,11 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
"/wx/distributionOrder/refund", "/wx/collectionBook/findList","/wx/collectionItemsRelation/findInfos","/wx/collectionItemsRelation/findList",
"/wx/supplierItem/findItemsOfCurrentDistributor", "/wx/selfPage/updateSwitch","/wx/selfPage/checkIsMine",
"/wx/specialPerformance/sendMsg", "/wx/specialPerformance/sendMsgTest", "/wx/groupPurchase/systemAddRecord","/wx/officialAccount/**",
"/wx/supplierItem/**","/wx/specialPerformance/**","/wx/groupPurchase/**","/wx/disposableSubscribeRecord/**", "/wx/auctionRecord/findList"
"/wx/supplierItem/**","/wx/specialPerformance/**","/wx/groupPurchase/**","/wx/disposableSubscribeRecord/**", "/wx/auctionRecord/findList",
"/wx/selfPage/countIntroduceAmount",
"/wx/exchange/**"
//下列路径上线注释
/* ,"/wx/specialPerformance/**"
, "/wx/supplierItem/**", "/wx/shareRecord/**", "/wx/distributionOrder/**", "/wx/selfPage/**", "/wx/auctionRecord/**",
......
package com.wwdz.ch.wx.entity.request;
import com.wwdz.ch.db.dto.request.BaseRequestDto;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class ExchangeRequestDto extends BaseRequestDto implements Entity {
/**
* 商品id
*/
private Long userId;
private String userOpenId;
/**
* 被交换的商品id
*/
private Long exchangeItemId;
/**
* 被交换的商品数量
*/
private Integer exchangeItemNum;
private List<ItemSimpleDto> itemList;
/**
* 用户收货地址
*/
private Long addressId;
/**
* 用户名称
*/
private String receiverName;
/**
* 用户电话
*/
private String receiverPhone;
/**
* 用户收货地址
*/
private String receiverAddress;
/**
* 收藏册id
*/
private Long collectionBookId;
/**
* 用户发出的快递公司编码
*/
private String logisticsCode;
/**
* 运单号
*/
private String waybill;
/**
* 用户发货时间
*/
private Date deliveryTime;
/**
* 平台签收时间
*/
private Date signedTime;
}
package com.wwdz.ch.wx.entity.request;
import com.xxdxxs.entity.Entity;
import lombok.Data;
@Data
public class ItemSimpleDto implements Entity {
/**
* 商品id
*/
private Long itemId;
/**
* 商品数量
*/
private Integer itemNum;
}
package com.wwdz.ch.wx.entity.vo.distribution;
import com.wwdz.ch.core.entity.SupplierItemVo;
import com.wwdz.ch.wx.entity.GroupPurchaseInfo;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Data
......@@ -278,4 +280,12 @@ public class DistributionOrderDetailVo implements Entity {
private String groupPurchaseStateName;
private GroupPurchaseInfo groupPurchaseInfo;
/**
* 以物换物场景
* 用户用来交换的商品的信息
*/
private UserExchangeInfo userExchangeInfo;
}
package com.wwdz.ch.wx.entity.vo.distribution;
import com.wwdz.ch.core.entity.SupplierItemVo;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.util.List;
@Data
public class UserExchangeInfo implements Entity {
private List<SupplierItemVo> list;
private String fromLogisticsCode;
private String fromLogisticsName;
private String fromWaybill;
private String content;
}
......@@ -247,18 +247,20 @@ public class CollectionItemsRelationServiceImpl implements CollectionItemsRelati
EntityMapper.copyAttribute(supplierItem, supplierItemVo);
supplierItemVo.setDistributionPrice(PriceUtil.convertPriceFenToYuan(supplierItem.getDistributionPrice()));
supplierItemVo.setHomePageImage(MediaUtil.getHomePageImage(supplierItem.getImages(), supplierItem.getVideos()));
if (dto.getCollectionBookId().longValue() == CollectionBookConstants.DefaultBookEnum.AUCTIONING.getId()){
List<AuctionConfig> auctionConfigList = pageInfo.getList();
Map<Long, AuctionConfig> map = auctionConfigList.stream().collect(Collectors.toMap(AuctionConfig::getItemId, Function.identity() , (k1, k2) ->k2));
supplierItemVo.setRealEndTime(map.get(supplierItem.getId()).getRealEndTime());
AuctionRecord auctionRecord = auctionRecordDao.findLastedRecord(supplierItem.getId());
if (auctionRecord != null) {
supplierItemVo.setCurrentPrice(PriceUtil.convertPriceFenToYuan(auctionRecord.getPrice()));
} else {
supplierItemVo.setCurrentPrice(PriceUtil.convertPriceFenToYuan(map.get(supplierItem.getId()).getStartPrice()));
if (dto.getCollectionBookId() != null) {
if (dto.getCollectionBookId().longValue() == CollectionBookConstants.DefaultBookEnum.AUCTIONING.getId()) {
List<AuctionConfig> auctionConfigList = pageInfo.getList();
Map<Long, AuctionConfig> map = auctionConfigList.stream().collect(Collectors.toMap(AuctionConfig::getItemId, Function.identity(), (k1, k2) -> k2));
supplierItemVo.setRealEndTime(map.get(supplierItem.getId()).getRealEndTime());
AuctionRecord auctionRecord = auctionRecordDao.findLastedRecord(supplierItem.getId());
if (auctionRecord != null) {
supplierItemVo.setCurrentPrice(PriceUtil.convertPriceFenToYuan(auctionRecord.getPrice()));
} else {
supplierItemVo.setCurrentPrice(PriceUtil.convertPriceFenToYuan(map.get(supplierItem.getId()).getStartPrice()));
}
supplierItemVo.setState(AuctionEnum.StateEnum.AUCTIONING.getCode());
supplierItemVo.setStateName(AuctionEnum.StateEnum.AUCTIONING.getDes());
}
supplierItemVo.setState(AuctionEnum.StateEnum.AUCTIONING.getCode());
supplierItemVo.setStateName(AuctionEnum.StateEnum.AUCTIONING.getDes());
}
list.add(supplierItemVo);
}
......
......@@ -6,6 +6,7 @@ import com.wechat.pay.java.service.refund.model.Refund;
import com.wechat.pay.java.service.refund.model.Status;
import com.wwdz.ch.core.api.wxpay.WxPayServiceApi;
import com.wwdz.ch.core.consts.*;
import com.wwdz.ch.core.entity.SupplierItemVo;
import com.wwdz.ch.core.entity.wxPay.DistributionOrderRefundRequestDto;
import com.wwdz.ch.core.notify.AliSmsSender;
import com.wwdz.ch.core.type.PageSearchResult;
......@@ -27,6 +28,7 @@ import com.wwdz.ch.core.entity.SignedNoticeMsg;
import com.wwdz.ch.wx.entity.GroupPurchaseInfo;
import com.wwdz.ch.wx.entity.vo.distribution.DistributionOrderDetailVo;
import com.wwdz.ch.wx.entity.vo.distribution.DistributionOrderVo;
import com.wwdz.ch.wx.entity.vo.distribution.UserExchangeInfo;
import com.wwdz.ch.wx.service.distribution.DistributionOrderService;
import com.wwdz.ch.wx.service.distribution.DistributorProfitService;
import com.wwdz.ch.core.service.SendMsgService;
......@@ -139,6 +141,9 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
@Autowired
IntroduceRecordDao introduceRecordDao;
@Autowired
ExchangeOrderSnapshotDao exchangeOrderSnapshotDao;
@Transactional
@Override
public Result createDistributionOrder(DistributionOrderRequestDto dto) {
......@@ -1072,6 +1077,37 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
distributionOrderDetailVo.setIdentifyOrderId(identifyOrder.getIdentifyOrderId());
}
}
//以物换物的订单
if (distributionOrder.getType() == DistributionEnum.DistributionTypeEnum.EXCHANGE.getCode()) {
UserExchangeInfo userExchangeInfo = new UserExchangeInfo();
List<ExchangeOrderSnapshot> exchangeOrderSnapshotList = exchangeOrderSnapshotDao.findByOrderId(dto.getDistributionOrderId());
if (!CollectionUtils.isEmpty(exchangeOrderSnapshotList)) {
userExchangeInfo.setFromWaybill(exchangeOrderSnapshotList.get(0).getWaybill());
userExchangeInfo.setFromLogisticsCode(exchangeOrderSnapshotList.get(0).getLogisticsCode());
userExchangeInfo.setFromLogisticsName(LogisticsEnum.getNameByCode(exchangeOrderSnapshotList.get(0).getLogisticsCode()));
String content;
if (StringUtils.hasLength(exchangeOrderSnapshotList.get(0).getWaybill())) {
content = "商品已寄出,快递信息:" + LogisticsEnum.getNameByCode(exchangeOrderSnapshotList.get(0).getLogisticsCode()) + "," + exchangeOrderSnapshotList.get(0).getWaybill();
} else {
content = "商品未寄出";
}
userExchangeInfo.setContent(content);
}
List<SupplierItemVo> supplierItemVos = new ArrayList<>();
for (ExchangeOrderSnapshot exchangeOrderSnapshot : exchangeOrderSnapshotList) {
SupplierItemVo supplierItemVo = new SupplierItemVo();
supplierItemVo.setItemId(exchangeOrderSnapshot.getItemId());
supplierItemVo.setName(exchangeOrderSnapshot.getItemName());
supplierItemVo.setItemNum(exchangeOrderSnapshot.getItemNum());
supplierItemVo.setDistributionPrice(PriceUtil.convertPriceFenToYuan(exchangeOrderSnapshot.getDistributionPrice()));
supplierItemVo.setOfficialEstimatedPrice(PriceUtil.convertPriceFenToYuan(exchangeOrderSnapshot.getOfficialEstimatedPrice()));
supplierItemVo.setHomePageImage(MediaUtil.getHomePageImage(exchangeOrderSnapshot.getImages(), exchangeOrderSnapshot.getVideos()));
supplierItemVos.add(supplierItemVo);
}
userExchangeInfo.setList(supplierItemVos);
distributionOrderDetailVo.setUserExchangeInfo(userExchangeInfo);
}
//一口价支付截止时间为下单半小时后,竞拍为24小时
Date date = distributionOrder.getCreateTime();
if (type == DistributionEnum.DistributionTypeEnum.FIXED_PRICE.getCode() || type == DistributionEnum.DistributionTypeEnum.GROUP_PURCHASE.getCode()) {
......
package com.wwdz.ch.wx.impl.distribution;
import com.github.pagehelper.PageInfo;
import com.wwdz.ch.core.consts.AuctionEnum;
import com.wwdz.ch.core.consts.CommConsts;
import com.wwdz.ch.core.consts.DistributionEnum;
import com.wwdz.ch.core.entity.SupplierItemVo;
import com.wwdz.ch.core.type.PageSearchResult;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.core.util.IdUtils;
import com.wwdz.ch.core.util.MediaUtil;
import com.wwdz.ch.core.util.PriceUtil;
import com.wwdz.ch.db.dao.distribution.*;
import com.wwdz.ch.db.domain.distribution.*;
import com.wwdz.ch.db.dto.request.distribution.*;
import com.wwdz.ch.wx.constant.CollectionBookConstants;
import com.wwdz.ch.wx.entity.request.ExchangeRequestDto;
import com.wwdz.ch.wx.entity.request.ItemSimpleDto;
import com.wwdz.ch.wx.service.distribution.ExchangeService;
import com.xxdxxs.utils.EntityMapper;
import com.xxdxxs.utils.StringUtils;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.util.CollectionUtils;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@Service
public class ExchangeServiceImpl implements ExchangeService {
private static final Logger logger = LoggerFactory.getLogger(DistributorProfitServiceImpl.class);
@Autowired
DistributionOrderDao distributionOrderDao;
@Autowired
SupplierItemDao supplierItemDao;
@Autowired
AuctionConfigDao auctionConfigDao;
@Autowired
AuctionRecordDao auctionRecordDao;
@Autowired
CollectionItemsRelationDao collectionItemsRelationDao;
@Autowired
ExchangeOrderSnapshotDao exchangeOrderSnapshotDao;
@Override
public Result checkEnoughItem(ExchangeRequestDto dto) {
try {
SupplierItemRequestDto supplierItemRequestDto = new SupplierItemRequestDto();
supplierItemRequestDto.setCreatorId(dto.getUserId());
//必须要有官方预估价
supplierItemRequestDto.setOfficialEstimatedPriceNotNull(true);
supplierItemRequestDto.setIsDeleted(false);
List<SupplierItem> supplierItemList = supplierItemDao.findList(supplierItemRequestDto);
if (CollectionUtils.isEmpty(supplierItemList)) {
return Result.failed("请先上传藏品,等待平台估价");
}
return Result.success();
} catch (Exception e) {
logger.error("检测用户是否有足够的商品 error:{}", e);
}
return Result.failed();
}
@Override
public Result findItemList(ExchangeRequestDto dto) {
try {
SupplierItemRequestDto supplierItemRequestDto = new SupplierItemRequestDto();
supplierItemRequestDto.setPage(dto.getPage());
supplierItemRequestDto.setLimit(dto.getLimit());
List<SupplierItem> supplierItemList = new ArrayList<>();
PageInfo pageInfo = null;
Long targetUserId = dto.getUserId();
//标签id为空则查询所有的藏品
if (dto.getCollectionBookId() == null) {
//查询所有的上传藏品
supplierItemRequestDto.setType(DistributionEnum.DistributionTypeEnum.COLLECT.getCode());
supplierItemRequestDto.setCreatorId(targetUserId);
supplierItemRequestDto.setIsDeleted(false);
supplierItemList = supplierItemDao.findList(supplierItemRequestDto);
pageInfo = new PageInfo<>(supplierItemList);
} else if (dto.getCollectionBookId().longValue() == CollectionBookConstants.DefaultBookEnum.SALEING.getId()) {
//换藏中, 表示上架售卖中
supplierItemRequestDto.setCreatorId(targetUserId);
supplierItemRequestDto.setType(DistributionEnum.DistributionTypeEnum.COLLECT.getCode());
supplierItemRequestDto.setIsOnSale(true);
supplierItemRequestDto.setIsDeleted(false);
supplierItemList = supplierItemDao.findList(supplierItemRequestDto);
pageInfo = new PageInfo<>(supplierItemList);
} else if (dto.getCollectionBookId().longValue() == CollectionBookConstants.DefaultBookEnum.FINISHED.getId()) {
//已结缘, 表示卖完了
supplierItemRequestDto.setType(DistributionEnum.DistributionTypeEnum.COLLECT.getCode());
supplierItemRequestDto.setCreatorId(targetUserId);
supplierItemRequestDto.setStock(0);
supplierItemList = supplierItemDao.findSellOutList(supplierItemRequestDto);
pageInfo = new PageInfo<>(supplierItemList);
} else if (dto.getCollectionBookId().longValue() == CollectionBookConstants.DefaultBookEnum.AUCTIONING.getId()) {
AuctionConfigRequestDto auctionConfigRequestDto = new AuctionConfigRequestDto();
auctionConfigRequestDto.setCreatorId(targetUserId);
auctionConfigRequestDto.setState(AuctionEnum.StateEnum.AUCTIONING.getCode());
auctionConfigRequestDto.setLimit(dto.getLimit());
auctionConfigRequestDto.setPage(dto.getPage());
List<AuctionConfig> auctionConfigList = auctionConfigDao.findList(auctionConfigRequestDto);
pageInfo = new PageInfo<>(auctionConfigList);
List<Long> itemIds = auctionConfigList.stream().map(AuctionConfig::getItemId).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(itemIds)) {
SupplierItemRequestDto requestDto = new SupplierItemRequestDto();
requestDto.setIds(itemIds);
requestDto.setIsDeleted(false);
supplierItemList = supplierItemDao.findList(requestDto);
}
}
else {
//查询对应标签下的商品
CollectionItemsRelationRequestDto collectionItemsRelationRequestDto = new CollectionItemsRelationRequestDto();
collectionItemsRelationRequestDto.setCollectionBookId(dto.getCollectionBookId());
collectionItemsRelationRequestDto.setPage(dto.getPage());
collectionItemsRelationRequestDto.setLimit(dto.getLimit());
List<CollectionItemsRelation> collectionItemsRelationList = collectionItemsRelationDao.find(collectionItemsRelationRequestDto);
pageInfo = new PageInfo<>(collectionItemsRelationList);
List<Long> itemIds = collectionItemsRelationList.stream().map(CollectionItemsRelation::getItemId).collect(Collectors.toList());
logger.info("查询标签下的藏品id:{}", itemIds);
if (!CollectionUtils.isEmpty(itemIds)) {
supplierItemRequestDto.setIds(itemIds);
supplierItemRequestDto.setIsDeleted(false);
supplierItemRequestDto.setPage(1);
supplierItemRequestDto.setLimit(100);
supplierItemList = supplierItemDao.findList(supplierItemRequestDto);
}
}
List<SupplierItemVo> list = new ArrayList<>();
for (SupplierItem supplierItem : supplierItemList) {
SupplierItemVo supplierItemVo = new SupplierItemVo();
EntityMapper.copyAttribute(supplierItem, supplierItemVo);
supplierItemVo.setDistributionPrice(PriceUtil.convertPriceFenToYuan(supplierItem.getDistributionPrice()));
supplierItemVo.setHomePageImage(MediaUtil.getHomePageImage(supplierItem.getImages(), supplierItem.getVideos()));
if (dto.getCollectionBookId() != null) {
if (dto.getCollectionBookId().longValue() == CollectionBookConstants.DefaultBookEnum.AUCTIONING.getId()) {
List<AuctionConfig> auctionConfigList = pageInfo.getList();
Map<Long, AuctionConfig> map = auctionConfigList.stream().collect(Collectors.toMap(AuctionConfig::getItemId, Function.identity(), (k1, k2) -> k2));
supplierItemVo.setRealEndTime(map.get(supplierItem.getId()).getRealEndTime());
AuctionRecord auctionRecord = auctionRecordDao.findLastedRecord(supplierItem.getId());
if (auctionRecord != null) {
supplierItemVo.setCurrentPrice(PriceUtil.convertPriceFenToYuan(auctionRecord.getPrice()));
} else {
supplierItemVo.setCurrentPrice(PriceUtil.convertPriceFenToYuan(map.get(supplierItem.getId()).getStartPrice()));
}
supplierItemVo.setState(AuctionEnum.StateEnum.AUCTIONING.getCode());
supplierItemVo.setStateName(AuctionEnum.StateEnum.AUCTIONING.getDes());
}
}
list.add(supplierItemVo);
}
logger.info("查询用户标签下的藏品数目:{}", list.size());
//查询交换的商品
SupplierItem supplierItem = supplierItemDao.findById(dto.getExchangeItemId());
SupplierItemVo supplierItemVo = new SupplierItemVo();
EntityMapper.copyAttribute(supplierItem, supplierItemVo);
supplierItemVo.setItemId(supplierItem.getId());
supplierItemVo.setItemNum(dto.getExchangeItemNum());
supplierItemVo.setSupplyPrice(PriceUtil.convertPriceFenToYuan(supplierItem.getSupplyPrice()));
supplierItemVo.setDistributionPrice(PriceUtil.convertPriceFenToYuan(supplierItem.getDistributionPrice()));
supplierItemVo.setOfficialEstimatedPrice(PriceUtil.convertPriceFenToYuan(supplierItem.getOfficialEstimatedPrice()));
supplierItemVo.setHomePageImage(MediaUtil.getHomePageImage(supplierItem.getImages(), supplierItem.getVideos()));
Map<String, Object> map = new HashMap<>();
map.put("itemList", PageSearchResult.of(pageInfo, list));
map.put("exchangeItem", supplierItemVo);
return Result.success(map);
}catch (Exception e) {
logger.error("查询用户可交换的藏品失败 error: {}", e);
}
return Result.failed();
}
@Transactional
@Override
public Result exchange(ExchangeRequestDto dto) {
try {
long exchangeItemId = dto.getExchangeItemId();
//查询交换的商品价值
SupplierItem supplierItem = supplierItemDao.findById(exchangeItemId);
long exchangeItemPrice = supplierItem.getOfficialEstimatedPrice() * dto.getExchangeItemNum();
List<ItemSimpleDto> itemSimpleDtoList = dto.getItemList();
//查询用户藏品的价值
long userItemPrice = 0;
for (ItemSimpleDto itemSimpleDto : itemSimpleDtoList) {
SupplierItem userItem = supplierItemDao.findById(itemSimpleDto.getItemId());
userItemPrice = userItemPrice + userItem.getOfficialEstimatedPrice() * itemSimpleDto.getItemNum();
}
if (exchangeItemPrice > userItemPrice) {
return Result.failed("您的藏品价格低于交换的商品价值,不支持换藏");
}
//可以换藏,则创建订单
String distributionOrderId = IdUtils.getOrderNumber(CommConsts.DISTRIBUTION_ORDER_PREFIX);
DistributionOrder distributionOrder = new DistributionOrder();
distributionOrder.setItemId(exchangeItemId);
distributionOrder.setItemNum(dto.getExchangeItemNum());
distributionOrder.setDistributionOrderId(distributionOrderId);
distributionOrder.setBuyerId(dto.getUserId());
distributionOrder.setBuyerOpenid(dto.getUserOpenId());
distributionOrder.setShopId(supplierItem.getCreatorId());
distributionOrder.setSellerId(supplierItem.getCreatorId());
distributionOrder.setAmount(exchangeItemPrice);
distributionOrder.setAddressId(dto.getAddressId());
distributionOrder.setReceiverAddress(dto.getReceiverAddress());
distributionOrder.setReceiverName(dto.getReceiverName());
distributionOrder.setReceiverPhone(dto.getReceiverPhone());
distributionOrder.setCreateTime(new Date());
distributionOrder.setUpdateTime(new Date());
distributionOrder.setType(DistributionEnum.DistributionTypeEnum.EXCHANGE.getCode());
//待换货状态
distributionOrder.setState(DistributionEnum.DistributionOrderStateEnum.PRE_EXCHANGE.getCode());
distributionOrderDao.insert(distributionOrder);
//保存订单中用户交换商品快照
for (ItemSimpleDto itemSimpleDto : itemSimpleDtoList) {
SupplierItem userItem = supplierItemDao.findById(itemSimpleDto.getItemId());
ExchangeOrderSnapshot exchangeOrderSnapshot = new ExchangeOrderSnapshot();
EntityMapper.copyAttribute(userItem, exchangeOrderSnapshot);
exchangeOrderSnapshot.setExchangeItemId(exchangeItemId);
exchangeOrderSnapshot.setDistributionOrderId(distributionOrderId);
exchangeOrderSnapshot.setItemId(itemSimpleDto.getItemId());
exchangeOrderSnapshot.setItemNum(itemSimpleDto.getItemNum());
exchangeOrderSnapshot.setItemName(userItem.getName());
exchangeOrderSnapshot.setCreateTime(new Date());
exchangeOrderSnapshot.setUpdateTime(new Date());
exchangeOrderSnapshotDao.insert(exchangeOrderSnapshot);
}
Map<String, Object> map = new HashMap<>();
map.put("distributionOrderId", distributionOrderId);
return Result.success(map);
} catch (Exception e) {
logger.error("以物换物 error:{}", e);
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
}
return Result.failed();
}
@Override
public Result delivery(DistributionOrderRequestDto dto) {
try {
String distributionOrderId = dto.getDistributionOrderId();
DistributionOrder distributionOrder = distributionOrderDao.findById(distributionOrderId);
if (distributionOrder.getState() != DistributionEnum.DistributionOrderStateEnum.PRE_EXCHANGE.getCode()) {
return Result.failed("订单状态错误,不能发货");
}
distributionOrderDao.updateState(distributionOrderId, DistributionEnum.DistributionOrderStateEnum.PRE_INSPECTION.getCode());
ExchangeOrderSnapshot exchangeOrderSnapshot = new ExchangeOrderSnapshot();
exchangeOrderSnapshot.setDistributionOrderId(distributionOrderId);
exchangeOrderSnapshot.setLogisticsCode(dto.getLogisticsCode());
exchangeOrderSnapshot.setWaybill(dto.getWaybill());
exchangeOrderSnapshot.setDeliveryTime(new Date());
exchangeOrderSnapshotDao.update(exchangeOrderSnapshot);
return Result.success();
} catch (Exception e) {
logger.info("用户换藏发货失败 error: {}", e);
}
return Result.failed();
}
}
......@@ -220,6 +220,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
supplierItemVo.setItemId(supplierItem.getId());
supplierItemVo.setSupplyPrice(PriceUtil.convertPriceFenToYuan(supplierItem.getSupplyPrice()));
supplierItemVo.setDistributionPrice(PriceUtil.convertPriceFenToYuan(supplierItem.getDistributionPrice()));
supplierItemVo.setOfficialEstimatedPrice(PriceUtil.convertPriceFenToYuan(supplierItem.getOfficialEstimatedPrice()));
supplierItemVo.setHomePageImage(MediaUtil.getHomePageImage(supplierItem.getImages(), supplierItem.getVideos()));
supplierItemVos.add(supplierItemVo);
}
......
package com.wwdz.ch.wx.service.distribution;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.distribution.DistributionOrderRequestDto;
import com.wwdz.ch.wx.entity.request.ExchangeRequestDto;
public interface ExchangeService {
/**
* 检测用户是否有足够的商品
* @param dto
* @return
*/
Result checkEnoughItem(ExchangeRequestDto dto);
/**
* 查询用户可交换的商品列表
* @param dto
* @return
*/
Result findItemList(ExchangeRequestDto dto);
/**
* 以物换物
* @param dto
* @return
*/
Result exchange(ExchangeRequestDto dto);
/**
* 用户换藏发货
* @param dto
* @return
*/
Result delivery(DistributionOrderRequestDto dto);
}
package com.wwdz.ch.wx.web.distribution;
import com.alibaba.fastjson.JSON;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.distribution.DistributionOrderRequestDto;
import com.wwdz.ch.wx.entity.request.ExchangeRequestDto;
import com.wwdz.ch.wx.service.distribution.ExchangeService;
import com.xxdxxs.service.FormHandler;
import com.xxdxxs.validation.Validator;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/wx/exchange")
public class ExchangeController {
private static final Logger logger = LoggerFactory.getLogger(ExchangeController.class);
@Autowired
ExchangeService exchangeService;
@ApiOperation(value = "检测用户是否有足够的商品")
@PostMapping("/checkEnoughItem")
public Result checkEnoughItem(@RequestBody ExchangeRequestDto dto) {
logger.info("检测用户是否有足够的商品,请求参数:{}", JSON.toJSONString(dto));
Validator validator = new Validator(FormHandler.ofEntity(dto));
validator.set("userId", "用户id").must().number()
.end();
if (!validator.isValid()) {
return Result.failed(validator.getErrorInfo());
}
return exchangeService.checkEnoughItem(dto);
}
@ApiOperation(value = "查询用户可交换的商品列表")
@PostMapping("/findItemList")
public Result findItemList(@RequestBody ExchangeRequestDto dto) {
logger.info("查询用户可交换的商品列表,请求参数:{}", JSON.toJSONString(dto));
Validator validator = new Validator(FormHandler.ofEntity(dto));
validator.set("userId", "用户id").must().number()
.end();
if (!validator.isValid()) {
return Result.failed(validator.getErrorInfo());
}
return exchangeService.findItemList(dto);
}
@ApiOperation(value = "以物换物")
@PostMapping("/exchange")
public Result exchange(@RequestBody ExchangeRequestDto dto) {
logger.info("以物换物,请求参数:{}", JSON.toJSONString(dto));
Validator validator = new Validator(FormHandler.ofEntity(dto));
validator.set("userId", "用户id").must().number()
.set("userOpenId", "用户微信openid").must().string()
.set("exchangeItemId", "被交换的商品id").must().number()
.set("exchangeItemNum", "被交换的商品数量").must().number()
.end();
if (!validator.isValid()) {
return Result.failed(validator.getErrorInfo());
}
return exchangeService.exchange(dto);
}
@ApiOperation(value = "用户换藏发货")
@PostMapping("/delivery")
public Result delivery(@RequestBody DistributionOrderRequestDto dto) {
logger.info("藏家发货,请求参数:{}", JSON.toJSONString(dto));
Validator validator = new Validator(FormHandler.ofEntity(dto));
validator.set("distributionOrderId", "订单号").must().string()
.set("logisticsCode", "快递公司编码").must().string()
.set("waybill", "运单号").must().string()
.end();
if (!validator.isValid()) {
return Result.failed(validator.getErrorInfo());
}
return exchangeService.delivery(dto);
}
}
package com.wwdz.ch.wx.web.distribution;
import com.alibaba.fastjson.JSON;
import com.wwdz.ch.core.consts.CommConsts;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.wx.entity.request.SelfPageRequestDto;
import com.wwdz.ch.wx.service.distribution.SelfPageService;
......@@ -99,11 +100,8 @@ public class SelfPageController {
@PostMapping("/countIntroduceAmount")
public Result countIntroduceAmount(@RequestBody SelfPageRequestDto dto) {
logger.info("查询介绍佣金,请求参数:{}", JSON.toJSONString(dto));
Validator validator = new Validator(FormHandler.ofEntity(dto));
validator.set("userId", "用户id").must().number()
.end();
if (!validator.isValid()) {
return Result.failed(validator.getErrorInfo());
if (dto.getUserId() == null) {
dto.setUserId(CommConsts.SYSTEM_ACCOUNT_FOR_UNLOGIN);
}
return userAccountDetailService.countIntroduceAmount(dto.getUserId());
}
......
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