Commit 2308b6ef authored by shiyu's avatar shiyu

小程序个人主页新增寄售单退货单数量显示

parent 3543d3fe
...@@ -104,6 +104,9 @@ public class ConsignSaleEnum { ...@@ -104,6 +104,9 @@ public class ConsignSaleEnum {
CUSTOM_CANCEL(100, "用户取消寄售"), CUSTOM_CANCEL(100, "用户取消寄售"),
SYS_CANCEL(101, "平台取消寄售"), SYS_CANCEL(101, "平台取消寄售"),
TIME_OUT_CANCEL(102, "超时未确认,取消寄售"), TIME_OUT_CANCEL(102, "超时未确认,取消寄售"),
WAIT_RETURN(116, "货品待收回"),
RETURNED(122, "货品已收回"),
; ;
private int code; private int code;
...@@ -142,8 +145,10 @@ public class ConsignSaleEnum { ...@@ -142,8 +145,10 @@ public class ConsignSaleEnum {
IDENTIFY(30,"平台实物鉴定并定价", "平台签收后,会在1~3天完成货品的鉴定和估价", "40,50,53,60"), IDENTIFY(30,"平台实物鉴定并定价", "平台签收后,会在1~3天完成货品的鉴定和估价", "40,50,53,60"),
CONSIGN_SALEING(40, "平台寄售中", "", "70"), CONSIGN_SALEING(40, "平台寄售中", "", "70"),
PRE_PAY(50,"货品售出,待结款", "货品售出后,平台会在20天内完成打款。如果实际的售出价低于预估价,则会在售出后由客服通知您具体情况。", "80"), PRE_PAY(50,"货品售出,待结款", "货品售出后,平台会在20天内完成打款。如果实际的售出价低于预估价,则会在售出后由客服通知您具体情况。", "80"),
FINISH_PAT(60,"平台完成结款", "", "90"), FINISH_PAY(60,"平台完成结款", "", "90"),
CANCEL(70,"取消寄售", "", "100,101"), CANCEL(70,"取消寄售", "", "100,101,102"),
WAIT_RETURN(80,"货品待收回", "平台会在3天内通过邮寄将货品退回。", "100,101,102"),
RETURNED(90,"货品已收回", "", "122"),
; ;
......
package com.wwdz.ch.core.consts;
public class ReturnOrderEnum {
/**
* 用户端寄售单的状态
*/
public enum StateEnum {
WAIT_RETURN(10, "待退回"),
OUTBOUND(20, "已出库"),
FINISH(30, "完成退货"),
;
private int code;
private String des;
StateEnum(int code, String des) {
this.code = code;
this.des = des;
}
public static String getNameByCode(int code) {
for (ConsignSaleEnum.SaleForUserStateEnum saleForUserStateEnum : ConsignSaleEnum.SaleForUserStateEnum.values()) {
if (code == saleForUserStateEnum.getCode()) {
return saleForUserStateEnum.getDes();
}
}
return null;
}
public int getCode() {
return code;
}
public String getDes() {
return des;
}
}
public enum OperateTypeEnum {
CUSTOM_CANCEL(100, "用户取消寄售"),
SYS_CANCEL(101, "平台取消寄售"),
TIME_OUT_CANCEL(102, "超时未确认,取消寄售"),
WAIT_RETURN(116, "货品待退回"),
SEND_RETURN(120, "货品已发出"),
USER_SIGNED(130, "用户已签收"),
SYSTEM_SIGNED(131, "系统默认已签收"),
;
private int code;
private String des;
OperateTypeEnum(int code, String des) {
this.code = code;
this.des = des;
}
public static String getNameByCode(int code) {
for (ConsignSaleEnum.OperateTypeEnum operateTypeEnum : ConsignSaleEnum.OperateTypeEnum.values()) {
if (code == operateTypeEnum.getCode()) {
return operateTypeEnum.getDes();
}
}
return null;
}
public int getCode() {
return code;
}
public String getDes() {
return des;
}
}
/**
* 时间线接你打
*/
public enum NodeDescEnum {
CANCEL(70, "取消寄售", ""),
WAIT_RETURN(80, "货品待退回", "平台人员需要在寄售单取消后3天内将货品发出。"),
RETURNED(90, "货品已发出", ""),
SIGNED(100, "货品已签收", ""),
;
private int code;
private String node;
private String des;
NodeDescEnum(int code, String node, String des) {
this.code = code;
this.node = node;
this.des = des;
}
public int getCode() {
return code;
}
public String getNode() {
return node;
}
public String getDes() {
return des;
}
}
}
package com.wwdz.ch.core.entity;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.util.Date;
import java.util.Map;
@Data
public class ReturnOrderVo implements Entity {
/**
* 退货单号
*/
private String returnOrderId;
/**
* 寄售单号
*/
private String saleId;
/**
* 商品ID
*/
private Long itemId;
/**
* 商品名称
*/
private String itemName;
// 用于列表展示的图片对象
private Map<String, Object> homePageImage;
/**
* 商品图片
*/
private String itemImg;
/**
* 用户ID
*/
private Long userId;
/**
* 状态
*/
private Integer state;
/**
* 状态
*/
private String stateName;
/**
* 创建时间
*/
private Date createTime;
/**
* 原因
*/
private String remark;
/**
* 物流公司
*/
private String logisticsCode;
/**
* 物流公司名称
*/
private String logisticsName;
/**
* 快递单号
*/
private String waybill;
}
...@@ -57,4 +57,13 @@ public interface ConsignSaleDao { ...@@ -57,4 +57,13 @@ public interface ConsignSaleDao {
* @return * @return
*/ */
List<ConsignSale> findValuateConfirmOrdersByPage(ConsignSaleRequestDto dto); List<ConsignSale> findValuateConfirmOrdersByPage(ConsignSaleRequestDto dto);
/**
* 统计不包含某些状态的寄售单数量
* @param userId
* @param filterStates
* @return
*/
long countByState(long userId, List<Integer> filterStates);
} }
package com.wwdz.ch.db.dao;
import com.wwdz.ch.db.domain.ConsignSale;
import com.wwdz.ch.db.domain.ReturnOrder;
import com.wwdz.ch.db.dto.request.ConsignSaleRequestDto;
import com.wwdz.ch.db.dto.request.ReturnOrderRequestDto;
import java.util.List;
public interface ReturnOrderDao {
/**
* 插入新记录
*
* @param returnOrder
* @return
*/
int insert(ReturnOrder returnOrder);
/**
* 更新记录
*
* @param returnOrder
* @return
*/
int update(ReturnOrder returnOrder);
ReturnOrder findById(String returnOrderId);
/**
* 根据商品id查询寄售单
* @param itemId
* @return
*/
List<ReturnOrder> findByItemId(long itemId);
/**
*
* @param dto
* @return
*/
List<ReturnOrder> findByPage(ReturnOrderRequestDto dto);
/**
* 统计不包含某些状态的退货单数量
* @param userId
* @param filterStates
* @return
*/
long countByState(long userId, List<Integer> filterStates);
}
package com.wwdz.ch.db.dao;
import com.wwdz.ch.db.domain.ConsignSaleRecord;
import com.wwdz.ch.db.domain.ReturnOrderRecord;
import java.util.List;
public interface ReturnOrderRecordDao {
/**
* 插入新记录
* @param returnOrderRecord
* @return
*/
int insert(ReturnOrderRecord returnOrderRecord);
int insert(String returnOrderId, String content, int type, String remark);
/**
* 查询记录
* @param returnOrderId
* @return
*/
List<ReturnOrderRecord> findByReturnOrderId(String returnOrderId);
/**
* 根据操作类型查询记录
* @param returnOrderId
* @param type
* @return
*/
ReturnOrderRecord findByType(String returnOrderId, int type);
}
...@@ -10,7 +10,7 @@ import lombok.Data; ...@@ -10,7 +10,7 @@ import lombok.Data;
/** /**
* @author shiyu * @author shiyu
* @date 2023/12/21 * @date 2024/01/02
*/ */
@Data @Data
public class ConsignSale implements Entity { public class ConsignSale implements Entity {
...@@ -71,6 +71,11 @@ public class ConsignSale implements Entity { ...@@ -71,6 +71,11 @@ public class ConsignSale implements Entity {
*/ */
private Integer systemState; private Integer systemState;
/**
* 退货地址id
*/
private Long addressId;
/** /**
* 快递公司编码 * 快递公司编码
*/ */
...@@ -116,6 +121,7 @@ public class ConsignSale implements Entity { ...@@ -116,6 +121,7 @@ public class ConsignSale implements Entity {
sb.append(", settleAmount=").append(settleAmount); sb.append(", settleAmount=").append(settleAmount);
sb.append(", customState=").append(customState); sb.append(", customState=").append(customState);
sb.append(", systemState=").append(systemState); sb.append(", systemState=").append(systemState);
sb.append(", addressId=").append(addressId);
sb.append(", logisticsCode=").append(logisticsCode); sb.append(", logisticsCode=").append(logisticsCode);
sb.append(", waybill=").append(waybill); sb.append(", waybill=").append(waybill);
sb.append(", credential=").append(credential); sb.append(", credential=").append(credential);
...@@ -150,6 +156,7 @@ public class ConsignSale implements Entity { ...@@ -150,6 +156,7 @@ public class ConsignSale implements Entity {
&& (this.getSettleAmount() == null ? other.getSettleAmount() == null : this.getSettleAmount().equals(other.getSettleAmount())) && (this.getSettleAmount() == null ? other.getSettleAmount() == null : this.getSettleAmount().equals(other.getSettleAmount()))
&& (this.getCustomState() == null ? other.getCustomState() == null : this.getCustomState().equals(other.getCustomState())) && (this.getCustomState() == null ? other.getCustomState() == null : this.getCustomState().equals(other.getCustomState()))
&& (this.getSystemState() == null ? other.getSystemState() == null : this.getSystemState().equals(other.getSystemState())) && (this.getSystemState() == null ? other.getSystemState() == null : this.getSystemState().equals(other.getSystemState()))
&& (this.getAddressId() == null ? other.getAddressId() == null : this.getAddressId().equals(other.getAddressId()))
&& (this.getLogisticsCode() == null ? other.getLogisticsCode() == null : this.getLogisticsCode().equals(other.getLogisticsCode())) && (this.getLogisticsCode() == null ? other.getLogisticsCode() == null : this.getLogisticsCode().equals(other.getLogisticsCode()))
&& (this.getWaybill() == null ? other.getWaybill() == null : this.getWaybill().equals(other.getWaybill())) && (this.getWaybill() == null ? other.getWaybill() == null : this.getWaybill().equals(other.getWaybill()))
&& (this.getCredential() == null ? other.getCredential() == null : this.getCredential().equals(other.getCredential())) && (this.getCredential() == null ? other.getCredential() == null : this.getCredential().equals(other.getCredential()))
...@@ -173,6 +180,7 @@ public class ConsignSale implements Entity { ...@@ -173,6 +180,7 @@ public class ConsignSale implements Entity {
result = prime * result + ((getSettleAmount() == null) ? 0 : getSettleAmount().hashCode()); result = prime * result + ((getSettleAmount() == null) ? 0 : getSettleAmount().hashCode());
result = prime * result + ((getCustomState() == null) ? 0 : getCustomState().hashCode()); result = prime * result + ((getCustomState() == null) ? 0 : getCustomState().hashCode());
result = prime * result + ((getSystemState() == null) ? 0 : getSystemState().hashCode()); result = prime * result + ((getSystemState() == null) ? 0 : getSystemState().hashCode());
result = prime * result + ((getAddressId() == null) ? 0 : getAddressId().hashCode());
result = prime * result + ((getLogisticsCode() == null) ? 0 : getLogisticsCode().hashCode()); result = prime * result + ((getLogisticsCode() == null) ? 0 : getLogisticsCode().hashCode());
result = prime * result + ((getWaybill() == null) ? 0 : getWaybill().hashCode()); result = prime * result + ((getWaybill() == null) ? 0 : getWaybill().hashCode());
result = prime * result + ((getCredential() == null) ? 0 : getCredential().hashCode()); result = prime * result + ((getCredential() == null) ? 0 : getCredential().hashCode());
...@@ -201,6 +209,7 @@ public class ConsignSale implements Entity { ...@@ -201,6 +209,7 @@ public class ConsignSale implements Entity {
settleAmount("settle_amount", "settleAmount", "INTEGER", false), settleAmount("settle_amount", "settleAmount", "INTEGER", false),
customState("custom_state", "customState", "INTEGER", false), customState("custom_state", "customState", "INTEGER", false),
systemState("system_state", "systemState", "INTEGER", false), systemState("system_state", "systemState", "INTEGER", false),
addressId("address_id", "addressId", "BIGINT", false),
logisticsCode("logistics_code", "logisticsCode", "VARCHAR", false), logisticsCode("logistics_code", "logisticsCode", "VARCHAR", false),
waybill("waybill", "waybill", "VARCHAR", false), waybill("waybill", "waybill", "VARCHAR", false),
credential("credential", "credential", "VARCHAR", false), credential("credential", "credential", "VARCHAR", false),
......
...@@ -1752,6 +1752,138 @@ public class ConsignSaleExample { ...@@ -1752,6 +1752,138 @@ public class ConsignSaleExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andAddressIdIsNull() {
addCriterion("address_id is null");
return (Criteria) this;
}
public Criteria andAddressIdIsNotNull() {
addCriterion("address_id is not null");
return (Criteria) this;
}
public Criteria andAddressIdEqualTo(Long value) {
addCriterion("address_id =", value, "addressId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andAddressIdEqualToColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("address_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddressIdNotEqualTo(Long value) {
addCriterion("address_id <>", value, "addressId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andAddressIdNotEqualToColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("address_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddressIdGreaterThan(Long value) {
addCriterion("address_id >", value, "addressId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andAddressIdGreaterThanColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("address_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddressIdGreaterThanOrEqualTo(Long value) {
addCriterion("address_id >=", value, "addressId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andAddressIdGreaterThanOrEqualToColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("address_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddressIdLessThan(Long value) {
addCriterion("address_id <", value, "addressId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andAddressIdLessThanColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("address_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddressIdLessThanOrEqualTo(Long value) {
addCriterion("address_id <=", value, "addressId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table consign_sale
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andAddressIdLessThanOrEqualToColumn(ConsignSale.Column column) {
addCriterion(new StringBuilder("address_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddressIdIn(List<Long> values) {
addCriterion("address_id in", values, "addressId");
return (Criteria) this;
}
public Criteria andAddressIdNotIn(List<Long> values) {
addCriterion("address_id not in", values, "addressId");
return (Criteria) this;
}
public Criteria andAddressIdBetween(Long value1, Long value2) {
addCriterion("address_id between", value1, value2, "addressId");
return (Criteria) this;
}
public Criteria andAddressIdNotBetween(Long value1, Long value2) {
addCriterion("address_id not between", value1, value2, "addressId");
return (Criteria) this;
}
public Criteria andLogisticsCodeIsNull() { public Criteria andLogisticsCodeIsNull() {
addCriterion("logistics_code is null"); addCriterion("logistics_code is null");
return (Criteria) this; return (Criteria) this;
......
package com.wwdz.ch.db.domain;
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/01/02
*/
@Data
public class ReturnOrder implements Entity {
private Integer id;
/**
* 退货订单id
*/
private String returnOrderId;
/**
* 对应的寄售单号
*/
private String saleId;
/**
* 商品id
*/
private Long itemId;
/**
* 用户id
*/
private Long userId;
/**
* 退货地址id
*/
private Long addressId;
/**
* 快递公司编码
*/
private String logisticsCode;
/**
* 运单号
*/
private String waybill;
/**
* 状态
*/
private Integer state;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
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(", returnOrderId=").append(returnOrderId);
sb.append(", saleId=").append(saleId);
sb.append(", itemId=").append(itemId);
sb.append(", userId=").append(userId);
sb.append(", addressId=").append(addressId);
sb.append(", logisticsCode=").append(logisticsCode);
sb.append(", waybill=").append(waybill);
sb.append(", state=").append(state);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
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;
}
ReturnOrder other = (ReturnOrder) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getReturnOrderId() == null ? other.getReturnOrderId() == null : this.getReturnOrderId().equals(other.getReturnOrderId()))
&& (this.getSaleId() == null ? other.getSaleId() == null : this.getSaleId().equals(other.getSaleId()))
&& (this.getItemId() == null ? other.getItemId() == null : this.getItemId().equals(other.getItemId()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getAddressId() == null ? other.getAddressId() == null : this.getAddressId().equals(other.getAddressId()))
&& (this.getLogisticsCode() == null ? other.getLogisticsCode() == null : this.getLogisticsCode().equals(other.getLogisticsCode()))
&& (this.getWaybill() == null ? other.getWaybill() == null : this.getWaybill().equals(other.getWaybill()))
&& (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getReturnOrderId() == null) ? 0 : getReturnOrderId().hashCode());
result = prime * result + ((getSaleId() == null) ? 0 : getSaleId().hashCode());
result = prime * result + ((getItemId() == null) ? 0 : getItemId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getAddressId() == null) ? 0 : getAddressId().hashCode());
result = prime * result + ((getLogisticsCode() == null) ? 0 : getLogisticsCode().hashCode());
result = prime * result + ((getWaybill() == null) ? 0 : getWaybill().hashCode());
result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
return result;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
returnOrderId("return_order_id", "returnOrderId", "VARCHAR", false),
saleId("sale_id", "saleId", "VARCHAR", false),
itemId("item_id", "itemId", "BIGINT", false),
userId("user_id", "userId", "BIGINT", false),
addressId("address_id", "addressId", "BIGINT", false),
logisticsCode("logistics_code", "logisticsCode", "VARCHAR", false),
waybill("waybill", "waybill", "VARCHAR", false),
state("state", "state", "INTEGER", true),
createTime("create_time", "createTime", "TIMESTAMP", false),
updateTime("update_time", "updateTime", "TIMESTAMP", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table return_order
*
* @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 return_order
*
* @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 return_order
*
* @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 return_order
*
* @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 return_order
*
* @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 return_order
*
* @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 return_order
*
* @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 return_order
*
* @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 return_order
*
* @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 return_order
*
* @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 return_order
*
* @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 return_order
*
* @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 return_order
*
* @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 return_order
*
* @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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}
\ No newline at end of file
package com.wwdz.ch.db.domain;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class ReturnOrderExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public ReturnOrderExample() {
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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ReturnOrderExample orderBy(String orderByClause) {
this.setOrderByClause(orderByClause);
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ReturnOrderExample 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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Criteria newAndCreateCriteria() {
ReturnOrderExample example = new ReturnOrderExample();
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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdNotEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanOrEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanOrEqualToColumn(ReturnOrder.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 andReturnOrderIdIsNull() {
addCriterion("return_order_id is null");
return (Criteria) this;
}
public Criteria andReturnOrderIdIsNotNull() {
addCriterion("return_order_id is not null");
return (Criteria) this;
}
public Criteria andReturnOrderIdEqualTo(String value) {
addCriterion("return_order_id =", value, "returnOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andReturnOrderIdEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("return_order_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andReturnOrderIdNotEqualTo(String value) {
addCriterion("return_order_id <>", value, "returnOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andReturnOrderIdNotEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("return_order_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andReturnOrderIdGreaterThan(String value) {
addCriterion("return_order_id >", value, "returnOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andReturnOrderIdGreaterThanColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("return_order_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andReturnOrderIdGreaterThanOrEqualTo(String value) {
addCriterion("return_order_id >=", value, "returnOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andReturnOrderIdGreaterThanOrEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("return_order_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andReturnOrderIdLessThan(String value) {
addCriterion("return_order_id <", value, "returnOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andReturnOrderIdLessThanColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("return_order_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andReturnOrderIdLessThanOrEqualTo(String value) {
addCriterion("return_order_id <=", value, "returnOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andReturnOrderIdLessThanOrEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("return_order_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andReturnOrderIdLike(String value) {
addCriterion("return_order_id like", value, "returnOrderId");
return (Criteria) this;
}
public Criteria andReturnOrderIdNotLike(String value) {
addCriterion("return_order_id not like", value, "returnOrderId");
return (Criteria) this;
}
public Criteria andReturnOrderIdIn(List<String> values) {
addCriterion("return_order_id in", values, "returnOrderId");
return (Criteria) this;
}
public Criteria andReturnOrderIdNotIn(List<String> values) {
addCriterion("return_order_id not in", values, "returnOrderId");
return (Criteria) this;
}
public Criteria andReturnOrderIdBetween(String value1, String value2) {
addCriterion("return_order_id between", value1, value2, "returnOrderId");
return (Criteria) this;
}
public Criteria andReturnOrderIdNotBetween(String value1, String value2) {
addCriterion("return_order_id not between", value1, value2, "returnOrderId");
return (Criteria) this;
}
public Criteria andSaleIdIsNull() {
addCriterion("sale_id is null");
return (Criteria) this;
}
public Criteria andSaleIdIsNotNull() {
addCriterion("sale_id is not null");
return (Criteria) this;
}
public Criteria andSaleIdEqualTo(String value) {
addCriterion("sale_id =", value, "saleId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSaleIdEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("sale_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSaleIdNotEqualTo(String value) {
addCriterion("sale_id <>", value, "saleId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSaleIdNotEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("sale_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSaleIdGreaterThan(String value) {
addCriterion("sale_id >", value, "saleId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSaleIdGreaterThanColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("sale_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSaleIdGreaterThanOrEqualTo(String value) {
addCriterion("sale_id >=", value, "saleId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSaleIdGreaterThanOrEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("sale_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSaleIdLessThan(String value) {
addCriterion("sale_id <", value, "saleId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSaleIdLessThanColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("sale_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSaleIdLessThanOrEqualTo(String value) {
addCriterion("sale_id <=", value, "saleId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andSaleIdLessThanOrEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("sale_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andSaleIdLike(String value) {
addCriterion("sale_id like", value, "saleId");
return (Criteria) this;
}
public Criteria andSaleIdNotLike(String value) {
addCriterion("sale_id not like", value, "saleId");
return (Criteria) this;
}
public Criteria andSaleIdIn(List<String> values) {
addCriterion("sale_id in", values, "saleId");
return (Criteria) this;
}
public Criteria andSaleIdNotIn(List<String> values) {
addCriterion("sale_id not in", values, "saleId");
return (Criteria) this;
}
public Criteria andSaleIdBetween(String value1, String value2) {
addCriterion("sale_id between", value1, value2, "saleId");
return (Criteria) this;
}
public Criteria andSaleIdNotBetween(String value1, String value2) {
addCriterion("sale_id not between", value1, value2, "saleId");
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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdNotEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdGreaterThanColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdGreaterThanOrEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdLessThanColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andItemIdLessThanOrEqualToColumn(ReturnOrder.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 andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("user_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdNotEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("user_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdGreaterThanColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("user_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdGreaterThanOrEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("user_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdLessThanColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("user_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUserIdLessThanOrEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("user_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andAddressIdIsNull() {
addCriterion("address_id is null");
return (Criteria) this;
}
public Criteria andAddressIdIsNotNull() {
addCriterion("address_id is not null");
return (Criteria) this;
}
public Criteria andAddressIdEqualTo(Long value) {
addCriterion("address_id =", value, "addressId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andAddressIdEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("address_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddressIdNotEqualTo(Long value) {
addCriterion("address_id <>", value, "addressId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andAddressIdNotEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("address_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddressIdGreaterThan(Long value) {
addCriterion("address_id >", value, "addressId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andAddressIdGreaterThanColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("address_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddressIdGreaterThanOrEqualTo(Long value) {
addCriterion("address_id >=", value, "addressId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andAddressIdGreaterThanOrEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("address_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddressIdLessThan(Long value) {
addCriterion("address_id <", value, "addressId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andAddressIdLessThanColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("address_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddressIdLessThanOrEqualTo(Long value) {
addCriterion("address_id <=", value, "addressId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andAddressIdLessThanOrEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("address_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andAddressIdIn(List<Long> values) {
addCriterion("address_id in", values, "addressId");
return (Criteria) this;
}
public Criteria andAddressIdNotIn(List<Long> values) {
addCriterion("address_id not in", values, "addressId");
return (Criteria) this;
}
public Criteria andAddressIdBetween(Long value1, Long value2) {
addCriterion("address_id between", value1, value2, "addressId");
return (Criteria) this;
}
public Criteria andAddressIdNotBetween(Long value1, Long value2) {
addCriterion("address_id not between", value1, value2, "addressId");
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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeNotEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeGreaterThanColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeGreaterThanOrEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeLessThanColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andLogisticsCodeLessThanOrEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillNotEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillGreaterThanColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillGreaterThanOrEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillLessThanColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andWaybillLessThanOrEqualToColumn(ReturnOrder.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 andStateIsNull() {
addCriterion("`state` is null");
return (Criteria) this;
}
public Criteria andStateIsNotNull() {
addCriterion("`state` is not null");
return (Criteria) this;
}
public Criteria andStateEqualTo(Integer value) {
addCriterion("`state` =", value, "state");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStateEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("`state` = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStateNotEqualTo(Integer value) {
addCriterion("`state` <>", value, "state");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStateNotEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("`state` <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStateGreaterThan(Integer value) {
addCriterion("`state` >", value, "state");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStateGreaterThanColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("`state` > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStateGreaterThanOrEqualTo(Integer value) {
addCriterion("`state` >=", value, "state");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStateGreaterThanOrEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("`state` >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStateLessThan(Integer value) {
addCriterion("`state` <", value, "state");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStateLessThanColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("`state` < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStateLessThanOrEqualTo(Integer value) {
addCriterion("`state` <=", value, "state");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStateLessThanOrEqualToColumn(ReturnOrder.Column column) {
addCriterion(new StringBuilder("`state` <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStateIn(List<Integer> values) {
addCriterion("`state` in", values, "state");
return (Criteria) this;
}
public Criteria andStateNotIn(List<Integer> values) {
addCriterion("`state` not in", values, "state");
return (Criteria) this;
}
public Criteria andStateBetween(Integer value1, Integer value2) {
addCriterion("`state` between", value1, value2, "state");
return (Criteria) this;
}
public Criteria andStateNotBetween(Integer value1, Integer value2) {
addCriterion("`state` not between", value1, value2, "state");
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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeNotEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanOrEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanOrEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeNotEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeGreaterThanColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeGreaterThanOrEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeLessThanColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeLessThanOrEqualToColumn(ReturnOrder.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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private ReturnOrderExample example;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected Criteria(ReturnOrderExample example) {
super();
this.example = example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ReturnOrderExample example() {
return this.example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @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 return_order
*
* @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 return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Criteria add(Criteria add);
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
package com.wwdz.ch.db.domain;
import java.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/01/02
*/
@Data
public class ReturnOrderRecord implements Entity {
private Integer id;
private String returnOrderId;
/**
* 操作时间
*/
private Date createTime;
/**
* 操作内容
*/
private String content;
/**
* 描述
*/
private String remark;
/**
* 操作类型
*/
private Integer type;
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(", returnOrderId=").append(returnOrderId);
sb.append(", createTime=").append(createTime);
sb.append(", content=").append(content);
sb.append(", remark=").append(remark);
sb.append(", type=").append(type);
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;
}
ReturnOrderRecord other = (ReturnOrderRecord) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getReturnOrderId() == null ? other.getReturnOrderId() == null : this.getReturnOrderId().equals(other.getReturnOrderId()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getReturnOrderId() == null) ? 0 : getReturnOrderId().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
return result;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
returnOrderId("return_order_id", "returnOrderId", "VARCHAR", false),
createTime("create_time", "createTime", "TIMESTAMP", false),
content("content", "content", "VARCHAR", false),
remark("remark", "remark", "VARCHAR", false),
type("type", "type", "INTEGER", true);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "`";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "`";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}
\ No newline at end of file
package com.wwdz.ch.db.domain;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class ReturnOrderRecordExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public ReturnOrderRecordExample() {
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 return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ReturnOrderRecordExample orderBy(String orderByClause) {
this.setOrderByClause(orderByClause);
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ReturnOrderRecordExample 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 return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Criteria newAndCreateCriteria() {
ReturnOrderRecordExample example = new ReturnOrderRecordExample();
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 return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdEqualToColumn(ReturnOrderRecord.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 return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdNotEqualToColumn(ReturnOrderRecord.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 return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanColumn(ReturnOrderRecord.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 return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanOrEqualToColumn(ReturnOrderRecord.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 return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanColumn(ReturnOrderRecord.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 return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanOrEqualToColumn(ReturnOrderRecord.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 andReturnOrderIdIsNull() {
addCriterion("return_order_id is null");
return (Criteria) this;
}
public Criteria andReturnOrderIdIsNotNull() {
addCriterion("return_order_id is not null");
return (Criteria) this;
}
public Criteria andReturnOrderIdEqualTo(String value) {
addCriterion("return_order_id =", value, "returnOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andReturnOrderIdEqualToColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("return_order_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andReturnOrderIdNotEqualTo(String value) {
addCriterion("return_order_id <>", value, "returnOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andReturnOrderIdNotEqualToColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("return_order_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andReturnOrderIdGreaterThan(String value) {
addCriterion("return_order_id >", value, "returnOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andReturnOrderIdGreaterThanColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("return_order_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andReturnOrderIdGreaterThanOrEqualTo(String value) {
addCriterion("return_order_id >=", value, "returnOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andReturnOrderIdGreaterThanOrEqualToColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("return_order_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andReturnOrderIdLessThan(String value) {
addCriterion("return_order_id <", value, "returnOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andReturnOrderIdLessThanColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("return_order_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andReturnOrderIdLessThanOrEqualTo(String value) {
addCriterion("return_order_id <=", value, "returnOrderId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andReturnOrderIdLessThanOrEqualToColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("return_order_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andReturnOrderIdLike(String value) {
addCriterion("return_order_id like", value, "returnOrderId");
return (Criteria) this;
}
public Criteria andReturnOrderIdNotLike(String value) {
addCriterion("return_order_id not like", value, "returnOrderId");
return (Criteria) this;
}
public Criteria andReturnOrderIdIn(List<String> values) {
addCriterion("return_order_id in", values, "returnOrderId");
return (Criteria) this;
}
public Criteria andReturnOrderIdNotIn(List<String> values) {
addCriterion("return_order_id not in", values, "returnOrderId");
return (Criteria) this;
}
public Criteria andReturnOrderIdBetween(String value1, String value2) {
addCriterion("return_order_id between", value1, value2, "returnOrderId");
return (Criteria) this;
}
public Criteria andReturnOrderIdNotBetween(String value1, String value2) {
addCriterion("return_order_id not between", value1, value2, "returnOrderId");
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 return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeEqualToColumn(ReturnOrderRecord.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 return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeNotEqualToColumn(ReturnOrderRecord.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 return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanColumn(ReturnOrderRecord.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 return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanOrEqualToColumn(ReturnOrderRecord.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 return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanColumn(ReturnOrderRecord.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 return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanOrEqualToColumn(ReturnOrderRecord.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 andContentIsNull() {
addCriterion("content is null");
return (Criteria) this;
}
public Criteria andContentIsNotNull() {
addCriterion("content is not null");
return (Criteria) this;
}
public Criteria andContentEqualTo(String value) {
addCriterion("content =", value, "content");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andContentEqualToColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("content = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andContentNotEqualTo(String value) {
addCriterion("content <>", value, "content");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andContentNotEqualToColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("content <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andContentGreaterThan(String value) {
addCriterion("content >", value, "content");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andContentGreaterThanColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("content > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andContentGreaterThanOrEqualTo(String value) {
addCriterion("content >=", value, "content");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andContentGreaterThanOrEqualToColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("content >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andContentLessThan(String value) {
addCriterion("content <", value, "content");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andContentLessThanColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("content < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andContentLessThanOrEqualTo(String value) {
addCriterion("content <=", value, "content");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andContentLessThanOrEqualToColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("content <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andContentLike(String value) {
addCriterion("content like", value, "content");
return (Criteria) this;
}
public Criteria andContentNotLike(String value) {
addCriterion("content not like", value, "content");
return (Criteria) this;
}
public Criteria andContentIn(List<String> values) {
addCriterion("content in", values, "content");
return (Criteria) this;
}
public Criteria andContentNotIn(List<String> values) {
addCriterion("content not in", values, "content");
return (Criteria) this;
}
public Criteria andContentBetween(String value1, String value2) {
addCriterion("content between", value1, value2, "content");
return (Criteria) this;
}
public Criteria andContentNotBetween(String value1, String value2) {
addCriterion("content not between", value1, value2, "content");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRemarkEqualToColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("remark = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRemarkNotEqualToColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("remark <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRemarkGreaterThanColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("remark > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRemarkGreaterThanOrEqualToColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("remark >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRemarkLessThanColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("remark < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRemarkLessThanOrEqualToColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("remark <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("`type` is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("`type` is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Integer value) {
addCriterion("`type` =", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeEqualToColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("`type` = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Integer value) {
addCriterion("`type` <>", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeNotEqualToColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("`type` <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Integer value) {
addCriterion("`type` >", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeGreaterThanColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("`type` > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("`type` >=", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeGreaterThanOrEqualToColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("`type` >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeLessThan(Integer value) {
addCriterion("`type` <", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeLessThanColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("`type` < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Integer value) {
addCriterion("`type` <=", value, "type");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeLessThanOrEqualToColumn(ReturnOrderRecord.Column column) {
addCriterion(new StringBuilder("`type` <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeIn(List<Integer> values) {
addCriterion("`type` in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Integer> values) {
addCriterion("`type` not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Integer value1, Integer value2) {
addCriterion("`type` between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
addCriterion("`type` not between", value1, value2, "type");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private ReturnOrderRecordExample example;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected Criteria(ReturnOrderRecordExample example) {
super();
this.example = example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public ReturnOrderRecordExample example() {
return this.example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIf(boolean ifAdd, ICriteriaAdd add) {
if (ifAdd) {
add.add(this);
}
return this;
}
/**
* This interface was generated by MyBatis Generator.
* This interface corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public interface ICriteriaAdd {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Criteria add(Criteria add);
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
...@@ -109,4 +109,9 @@ public class ConsignSaleRequestDto extends BaseRequestDto implements Entity { ...@@ -109,4 +109,9 @@ public class ConsignSaleRequestDto extends BaseRequestDto implements Entity {
* 结款凭证 * 结款凭证
*/ */
private String credential; private String credential;
/**
* 退货地址id
*/
private Long addressId;
} }
package com.wwdz.ch.db.dto.request;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class ReturnOrderRequestDto extends BaseRequestDto implements Entity {
/**
* 退货单号
*/
private String returnOrderId;
/**
* 寄售单号
*/
private String saleId;
/**
* 商品ID
*/
private Long itemId;
private List<Long> itemIds;
/**
* 商品名称
*/
private String itemName;
/**
* 商品名称/寄售单号
* 正则判断根据哪个字段查询
*/
private String searchParam;
/**
* 用户ID
*/
private Long userId;
/**
* 客户端状态
*/
private Integer state;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 快递公司编码
*/
private String logisticsCode;
/**
* 运单号
*/
private String waybill;
}
...@@ -92,4 +92,13 @@ public class ConsignSaleDaoImpl implements ConsignSaleDao { ...@@ -92,4 +92,13 @@ public class ConsignSaleDaoImpl implements ConsignSaleDao {
PageHelper.startPage(dto.getPage(), dto.getLimit()); PageHelper.startPage(dto.getPage(), dto.getLimit());
return consignSaleMapper.selectByExample(example); return consignSaleMapper.selectByExample(example);
} }
public long countByState(long userId, List<Integer> filterStates) {
ConsignSaleExample example = new ConsignSaleExample();
ConsignSaleExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId);
criteria.andSystemStateNotIn(filterStates);
return consignSaleMapper.countByExample(example);
}
} }
package com.wwdz.ch.db.impl;
import com.github.pagehelper.PageHelper;
import com.wwdz.ch.db.dao.ReturnOrderDao;
import com.wwdz.ch.db.domain.ConsignSaleExample;
import com.wwdz.ch.db.domain.ReturnOrder;
import com.wwdz.ch.db.domain.ReturnOrderExample;
import com.wwdz.ch.db.dto.request.ReturnOrderRequestDto;
import com.wwdz.ch.db.mapper.ReturnOrderMapper;
import com.xxdxxs.db.component.JdbcHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List;
@Repository
public class ReturnOrderDaoImpl implements ReturnOrderDao {
@Autowired
ReturnOrderMapper returnOrderMapper;
@Override
public int insert(ReturnOrder returnOrder) {
return returnOrderMapper.insert(returnOrder);
}
@Override
public int update(ReturnOrder returnOrder) {
ReturnOrderExample example = new ReturnOrderExample();
ReturnOrderExample.Criteria criteria = example.createCriteria();
criteria.andReturnOrderIdEqualTo(returnOrder.getReturnOrderId());
returnOrder.setUpdateTime(new Date());
return returnOrderMapper.updateByExampleSelective(returnOrder, example);
}
@Override
public ReturnOrder findById(String returnOrderId) {
ReturnOrderExample example = new ReturnOrderExample();
ReturnOrderExample.Criteria criteria = example.createCriteria();
criteria.andReturnOrderIdEqualTo(returnOrderId);
return returnOrderMapper.selectOneByExample(example);
}
@Override
public List<ReturnOrder> findByItemId(long itemId) {
ReturnOrderExample example = new ReturnOrderExample();
ReturnOrderExample.Criteria criteria = example.createCriteria();
criteria.andItemIdEqualTo(itemId);
return returnOrderMapper.selectByExample(example);
}
@Override
public List<ReturnOrder> findByPage(ReturnOrderRequestDto dto) {
ReturnOrderExample example = new ReturnOrderExample();
ReturnOrderExample.Criteria criteria = example.createCriteria();
JdbcHelper.ifPresent(dto.getReturnOrderId(), criteria::andReturnOrderIdEqualTo);
JdbcHelper.ifPresent(dto.getSaleId(), criteria::andSaleIdEqualTo);
JdbcHelper.ifPresent(dto.getWaybill(), criteria::andWaybillEqualTo);
JdbcHelper.ifPresent(dto.getItemId(), criteria::andItemIdEqualTo);
JdbcHelper.ifPresent(dto.getItemIds(), criteria::andItemIdIn);
JdbcHelper.ifPresent(dto.getUserId(), criteria::andUserIdEqualTo);
JdbcHelper.ifPresent(dto.getState(), criteria::andStateEqualTo);
example.orderBy(" create_time desc");
PageHelper.startPage(dto.getPage(), dto.getLimit());
return returnOrderMapper.selectByExample(example);
}
public long countByState(long userId, List<Integer> filterStates) {
ReturnOrderExample example = new ReturnOrderExample();
ReturnOrderExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId);
criteria.andStateNotIn(filterStates);
return returnOrderMapper.countByExample(example);
}
}
package com.wwdz.ch.db.impl;
import com.wwdz.ch.db.dao.ReturnOrderRecordDao;
import com.wwdz.ch.db.domain.ReturnOrderRecord;
import com.wwdz.ch.db.domain.ReturnOrderRecordExample;
import com.wwdz.ch.db.mapper.ReturnOrderRecordMapper;
import com.xxdxxs.db.component.JdbcHelper;
import com.xxdxxs.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List;
@Repository
public class ReturnOrderRecordDaoImpl implements ReturnOrderRecordDao {
@Autowired
ReturnOrderRecordMapper returnOrderRecordMapper;
@Override
public int insert(ReturnOrderRecord returnOrderRecord) {
return returnOrderRecordMapper.insert(returnOrderRecord);
}
@Override
public int insert(String returnOrderId, String content, int type, String remark) {
ReturnOrderRecord returnOrderRecord = new ReturnOrderRecord();
returnOrderRecord.setReturnOrderId(returnOrderId);
returnOrderRecord.setCreateTime(new Date());
returnOrderRecord.setContent(content);
returnOrderRecord.setType(type);
if (StringUtils.hasLength(remark)) {
returnOrderRecord.setRemark(remark);
}
return returnOrderRecordMapper.insertSelective(returnOrderRecord);
}
@Override
public List<ReturnOrderRecord> findByReturnOrderId(String returnOrderId) {
ReturnOrderRecordExample example = new ReturnOrderRecordExample();
ReturnOrderRecordExample.Criteria criteria = example.createCriteria();
JdbcHelper.ifPresent(returnOrderId, criteria::andReturnOrderIdEqualTo);
example.orderBy(" create_time asc");
return returnOrderRecordMapper.selectByExample(example);
}
@Override
public ReturnOrderRecord findByType(String returnOrderId, int type) {
ReturnOrderRecordExample example = new ReturnOrderRecordExample();
ReturnOrderRecordExample.Criteria criteria = example.createCriteria();
criteria.andReturnOrderIdEqualTo(returnOrderId);
criteria.andTypeEqualTo(type);
return returnOrderRecordMapper.selectOneByExample(example);
}
}
...@@ -7,6 +7,7 @@ import java.util.List; ...@@ -7,6 +7,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@Mapper @Mapper
public interface ConsignSaleMapper { public interface ConsignSaleMapper {
long countByExample(ConsignSaleExample example); long countByExample(ConsignSaleExample example);
......
package com.wwdz.ch.db.mapper;
import com.wwdz.ch.db.domain.ReturnOrder;
import com.wwdz.ch.db.domain.ReturnOrderExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ReturnOrderMapper {
long countByExample(ReturnOrderExample example);
int deleteByExample(ReturnOrderExample example);
int deleteByPrimaryKey(Integer id);
int insert(ReturnOrder record);
int insertSelective(ReturnOrder record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ReturnOrder selectOneByExample(ReturnOrderExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ReturnOrder selectOneByExampleSelective(@Param("example") ReturnOrderExample example, @Param("selective") ReturnOrder.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<ReturnOrder> selectByExampleSelective(@Param("example") ReturnOrderExample example, @Param("selective") ReturnOrder.Column ... selective);
List<ReturnOrder> selectByExample(ReturnOrderExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ReturnOrder selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") ReturnOrder.Column ... selective);
ReturnOrder selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") ReturnOrder record, @Param("example") ReturnOrderExample example);
int updateByExample(@Param("record") ReturnOrder record, @Param("example") ReturnOrderExample example);
int updateByPrimaryKeySelective(ReturnOrder record);
int updateByPrimaryKey(ReturnOrder record);
}
\ No newline at end of file
package com.wwdz.ch.db.mapper;
import com.wwdz.ch.db.domain.ReturnOrderRecord;
import com.wwdz.ch.db.domain.ReturnOrderRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ReturnOrderRecordMapper {
long countByExample(ReturnOrderRecordExample example);
int deleteByExample(ReturnOrderRecordExample example);
int deleteByPrimaryKey(Integer id);
int insert(ReturnOrderRecord record);
int insertSelective(ReturnOrderRecord record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ReturnOrderRecord selectOneByExample(ReturnOrderRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ReturnOrderRecord selectOneByExampleSelective(@Param("example") ReturnOrderRecordExample example, @Param("selective") ReturnOrderRecord.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<ReturnOrderRecord> selectByExampleSelective(@Param("example") ReturnOrderRecordExample example, @Param("selective") ReturnOrderRecord.Column ... selective);
List<ReturnOrderRecord> selectByExample(ReturnOrderRecordExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table return_order_record
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
ReturnOrderRecord selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") ReturnOrderRecord.Column ... selective);
ReturnOrderRecord selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") ReturnOrderRecord record, @Param("example") ReturnOrderRecordExample example);
int updateByExample(@Param("record") ReturnOrderRecord record, @Param("example") ReturnOrderRecordExample example);
int updateByPrimaryKeySelective(ReturnOrderRecord record);
int updateByPrimaryKey(ReturnOrderRecord record);
}
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<result column="settle_amount" jdbcType="INTEGER" property="settleAmount" /> <result column="settle_amount" jdbcType="INTEGER" property="settleAmount" />
<result column="custom_state" jdbcType="INTEGER" property="customState" /> <result column="custom_state" jdbcType="INTEGER" property="customState" />
<result column="system_state" jdbcType="INTEGER" property="systemState" /> <result column="system_state" jdbcType="INTEGER" property="systemState" />
<result column="address_id" jdbcType="BIGINT" property="addressId" />
<result column="logistics_code" jdbcType="VARCHAR" property="logisticsCode" /> <result column="logistics_code" jdbcType="VARCHAR" property="logisticsCode" />
<result column="waybill" jdbcType="VARCHAR" property="waybill" /> <result column="waybill" jdbcType="VARCHAR" property="waybill" />
<result column="credential" jdbcType="VARCHAR" property="credential" /> <result column="credential" jdbcType="VARCHAR" property="credential" />
...@@ -80,8 +81,8 @@ ...@@ -80,8 +81,8 @@
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price, id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
settle_amount, custom_state, system_state, logistics_code, waybill, credential, create_time, settle_amount, custom_state, system_state, address_id, logistics_code, waybill, credential,
update_time create_time, update_time
</sql> </sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.ConsignSaleExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.wwdz.ch.db.domain.ConsignSaleExample" resultMap="BaseResultMap">
select select
...@@ -117,8 +118,8 @@ ...@@ -117,8 +118,8 @@
</when> </when>
<otherwise> <otherwise>
id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price, id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
settle_amount, custom_state, system_state, logistics_code, waybill, credential, settle_amount, custom_state, system_state, address_id, logistics_code, waybill,
create_time, update_time credential, create_time, update_time
</otherwise> </otherwise>
</choose> </choose>
from consign_sale from consign_sale
...@@ -150,8 +151,8 @@ ...@@ -150,8 +151,8 @@
</when> </when>
<otherwise> <otherwise>
id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price, id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
settle_amount, custom_state, system_state, logistics_code, waybill, credential, settle_amount, custom_state, system_state, address_id, logistics_code, waybill,
create_time, update_time credential, create_time, update_time
</otherwise> </otherwise>
</choose> </choose>
from consign_sale from consign_sale
...@@ -174,15 +175,15 @@ ...@@ -174,15 +175,15 @@
insert into consign_sale (sale_id, item_id, user_id, insert into consign_sale (sale_id, item_id, user_id,
sale_time, user_price, img_valuation, sale_time, user_price, img_valuation,
valuation, deal_price, settle_amount, valuation, deal_price, settle_amount,
custom_state, system_state, logistics_code, custom_state, system_state, address_id,
waybill, credential, create_time, logistics_code, waybill, credential,
update_time) create_time, update_time)
values (#{saleId,jdbcType=VARCHAR}, #{itemId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, values (#{saleId,jdbcType=VARCHAR}, #{itemId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT},
#{saleTime,jdbcType=TIMESTAMP}, #{userPrice,jdbcType=INTEGER}, #{imgValuation,jdbcType=VARCHAR}, #{saleTime,jdbcType=TIMESTAMP}, #{userPrice,jdbcType=INTEGER}, #{imgValuation,jdbcType=VARCHAR},
#{valuation,jdbcType=INTEGER}, #{dealPrice,jdbcType=INTEGER}, #{settleAmount,jdbcType=INTEGER}, #{valuation,jdbcType=INTEGER}, #{dealPrice,jdbcType=INTEGER}, #{settleAmount,jdbcType=INTEGER},
#{customState,jdbcType=INTEGER}, #{systemState,jdbcType=INTEGER}, #{logisticsCode,jdbcType=VARCHAR}, #{customState,jdbcType=INTEGER}, #{systemState,jdbcType=INTEGER}, #{addressId,jdbcType=BIGINT},
#{waybill,jdbcType=VARCHAR}, #{credential,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{logisticsCode,jdbcType=VARCHAR}, #{waybill,jdbcType=VARCHAR}, #{credential,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.ConsignSale"> <insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.ConsignSale">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
...@@ -223,6 +224,9 @@ ...@@ -223,6 +224,9 @@
<if test="systemState != null"> <if test="systemState != null">
system_state, system_state,
</if> </if>
<if test="addressId != null">
address_id,
</if>
<if test="logisticsCode != null"> <if test="logisticsCode != null">
logistics_code, logistics_code,
</if> </if>
...@@ -273,6 +277,9 @@ ...@@ -273,6 +277,9 @@
<if test="systemState != null"> <if test="systemState != null">
#{systemState,jdbcType=INTEGER}, #{systemState,jdbcType=INTEGER},
</if> </if>
<if test="addressId != null">
#{addressId,jdbcType=BIGINT},
</if>
<if test="logisticsCode != null"> <if test="logisticsCode != null">
#{logisticsCode,jdbcType=VARCHAR}, #{logisticsCode,jdbcType=VARCHAR},
</if> </if>
...@@ -335,6 +342,9 @@ ...@@ -335,6 +342,9 @@
<if test="record.systemState != null"> <if test="record.systemState != null">
system_state = #{record.systemState,jdbcType=INTEGER}, system_state = #{record.systemState,jdbcType=INTEGER},
</if> </if>
<if test="record.addressId != null">
address_id = #{record.addressId,jdbcType=BIGINT},
</if>
<if test="record.logisticsCode != null"> <if test="record.logisticsCode != null">
logistics_code = #{record.logisticsCode,jdbcType=VARCHAR}, logistics_code = #{record.logisticsCode,jdbcType=VARCHAR},
</if> </if>
...@@ -369,6 +379,7 @@ ...@@ -369,6 +379,7 @@
settle_amount = #{record.settleAmount,jdbcType=INTEGER}, settle_amount = #{record.settleAmount,jdbcType=INTEGER},
custom_state = #{record.customState,jdbcType=INTEGER}, custom_state = #{record.customState,jdbcType=INTEGER},
system_state = #{record.systemState,jdbcType=INTEGER}, system_state = #{record.systemState,jdbcType=INTEGER},
address_id = #{record.addressId,jdbcType=BIGINT},
logistics_code = #{record.logisticsCode,jdbcType=VARCHAR}, logistics_code = #{record.logisticsCode,jdbcType=VARCHAR},
waybill = #{record.waybill,jdbcType=VARCHAR}, waybill = #{record.waybill,jdbcType=VARCHAR},
credential = #{record.credential,jdbcType=VARCHAR}, credential = #{record.credential,jdbcType=VARCHAR},
...@@ -414,6 +425,9 @@ ...@@ -414,6 +425,9 @@
<if test="systemState != null"> <if test="systemState != null">
system_state = #{systemState,jdbcType=INTEGER}, system_state = #{systemState,jdbcType=INTEGER},
</if> </if>
<if test="addressId != null">
address_id = #{addressId,jdbcType=BIGINT},
</if>
<if test="logisticsCode != null"> <if test="logisticsCode != null">
logistics_code = #{logisticsCode,jdbcType=VARCHAR}, logistics_code = #{logisticsCode,jdbcType=VARCHAR},
</if> </if>
...@@ -445,6 +459,7 @@ ...@@ -445,6 +459,7 @@
settle_amount = #{settleAmount,jdbcType=INTEGER}, settle_amount = #{settleAmount,jdbcType=INTEGER},
custom_state = #{customState,jdbcType=INTEGER}, custom_state = #{customState,jdbcType=INTEGER},
system_state = #{systemState,jdbcType=INTEGER}, system_state = #{systemState,jdbcType=INTEGER},
address_id = #{addressId,jdbcType=BIGINT},
logistics_code = #{logisticsCode,jdbcType=VARCHAR}, logistics_code = #{logisticsCode,jdbcType=VARCHAR},
waybill = #{waybill,jdbcType=VARCHAR}, waybill = #{waybill,jdbcType=VARCHAR},
credential = #{credential,jdbcType=VARCHAR}, credential = #{credential,jdbcType=VARCHAR},
...@@ -486,8 +501,8 @@ ...@@ -486,8 +501,8 @@
</when> </when>
<otherwise> <otherwise>
id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price, id, sale_id, item_id, user_id, sale_time, user_price, img_valuation, valuation, deal_price,
settle_amount, custom_state, system_state, logistics_code, waybill, credential, settle_amount, custom_state, system_state, address_id, logistics_code, waybill,
create_time, update_time credential, create_time, update_time
</otherwise> </otherwise>
</choose> </choose>
from consign_sale from consign_sale
......
<?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.ReturnOrderMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.ReturnOrder">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="return_order_id" jdbcType="VARCHAR" property="returnOrderId" />
<result column="sale_id" jdbcType="VARCHAR" property="saleId" />
<result column="item_id" jdbcType="BIGINT" property="itemId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="address_id" jdbcType="BIGINT" property="addressId" />
<result column="logistics_code" jdbcType="VARCHAR" property="logisticsCode" />
<result column="waybill" jdbcType="VARCHAR" property="waybill" />
<result column="state" jdbcType="INTEGER" property="state" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, return_order_id, sale_id, item_id, user_id, address_id, logistics_code, waybill,
`state`, create_time, update_time
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.ReturnOrderExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from return_order
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if test="example.distinct">
distinct
</if>
<choose>
<when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, return_order_id, sale_id, item_id, user_id, address_id, logistics_code, waybill,
`state`, create_time, update_time
</otherwise>
</choose>
from return_order
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from return_order
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, return_order_id, sale_id, item_id, user_id, address_id, logistics_code, waybill,
`state`, create_time, update_time
</otherwise>
</choose>
from return_order
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from return_order
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.ReturnOrderExample">
delete from return_order
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.ReturnOrder">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into return_order (return_order_id, sale_id, item_id,
user_id, address_id, logistics_code,
waybill, `state`, create_time,
update_time)
values (#{returnOrderId,jdbcType=VARCHAR}, #{saleId,jdbcType=VARCHAR}, #{itemId,jdbcType=BIGINT},
#{userId,jdbcType=BIGINT}, #{addressId,jdbcType=BIGINT}, #{logisticsCode,jdbcType=VARCHAR},
#{waybill,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.ReturnOrder">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into return_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="returnOrderId != null">
return_order_id,
</if>
<if test="saleId != null">
sale_id,
</if>
<if test="itemId != null">
item_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="addressId != null">
address_id,
</if>
<if test="logisticsCode != null">
logistics_code,
</if>
<if test="waybill != null">
waybill,
</if>
<if test="state != null">
`state`,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="returnOrderId != null">
#{returnOrderId,jdbcType=VARCHAR},
</if>
<if test="saleId != null">
#{saleId,jdbcType=VARCHAR},
</if>
<if test="itemId != null">
#{itemId,jdbcType=BIGINT},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="addressId != null">
#{addressId,jdbcType=BIGINT},
</if>
<if test="logisticsCode != null">
#{logisticsCode,jdbcType=VARCHAR},
</if>
<if test="waybill != null">
#{waybill,jdbcType=VARCHAR},
</if>
<if test="state != null">
#{state,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.ReturnOrderExample" resultType="java.lang.Long">
select count(*) from return_order
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update return_order
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.returnOrderId != null">
return_order_id = #{record.returnOrderId,jdbcType=VARCHAR},
</if>
<if test="record.saleId != null">
sale_id = #{record.saleId,jdbcType=VARCHAR},
</if>
<if test="record.itemId != null">
item_id = #{record.itemId,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.addressId != null">
address_id = #{record.addressId,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.state != null">
`state` = #{record.state,jdbcType=INTEGER},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update return_order
set id = #{record.id,jdbcType=INTEGER},
return_order_id = #{record.returnOrderId,jdbcType=VARCHAR},
sale_id = #{record.saleId,jdbcType=VARCHAR},
item_id = #{record.itemId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
address_id = #{record.addressId,jdbcType=BIGINT},
logistics_code = #{record.logisticsCode,jdbcType=VARCHAR},
waybill = #{record.waybill,jdbcType=VARCHAR},
`state` = #{record.state,jdbcType=INTEGER},
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.ReturnOrder">
update return_order
<set>
<if test="returnOrderId != null">
return_order_id = #{returnOrderId,jdbcType=VARCHAR},
</if>
<if test="saleId != null">
sale_id = #{saleId,jdbcType=VARCHAR},
</if>
<if test="itemId != null">
item_id = #{itemId,jdbcType=BIGINT},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="addressId != null">
address_id = #{addressId,jdbcType=BIGINT},
</if>
<if test="logisticsCode != null">
logistics_code = #{logisticsCode,jdbcType=VARCHAR},
</if>
<if test="waybill != null">
waybill = #{waybill,jdbcType=VARCHAR},
</if>
<if test="state != null">
`state` = #{state,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.ReturnOrder">
update return_order
set return_order_id = #{returnOrderId,jdbcType=VARCHAR},
sale_id = #{saleId,jdbcType=VARCHAR},
item_id = #{itemId,jdbcType=BIGINT},
user_id = #{userId,jdbcType=BIGINT},
address_id = #{addressId,jdbcType=BIGINT},
logistics_code = #{logisticsCode,jdbcType=VARCHAR},
waybill = #{waybill,jdbcType=VARCHAR},
`state` = #{state,jdbcType=INTEGER},
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.ReturnOrderExample" 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 return_order
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when test="selective != null and selective.length &gt; 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, return_order_id, sale_id, item_id, user_id, address_id, logistics_code, waybill,
`state`, create_time, update_time
</otherwise>
</choose>
from return_order
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.wwdz.ch.db.mapper.ReturnOrderRecordMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.ReturnOrderRecord">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="return_order_id" jdbcType="VARCHAR" property="returnOrderId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="type" jdbcType="INTEGER" property="type" />
</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, return_order_id, create_time, content, remark, `type`
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.ReturnOrderRecordExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from return_order_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if test="example.distinct">
distinct
</if>
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, return_order_id, create_time, content, remark, `type`
</otherwise>
</choose>
from return_order_record
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from return_order_record
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, return_order_id, create_time, content, remark, `type`
</otherwise>
</choose>
from return_order_record
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from return_order_record
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.ReturnOrderRecordExample">
delete from return_order_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.ReturnOrderRecord">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into return_order_record (return_order_id, create_time, content,
remark, `type`)
values (#{returnOrderId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{content,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.ReturnOrderRecord">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into return_order_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="returnOrderId != null">
return_order_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="content != null">
content,
</if>
<if test="remark != null">
remark,
</if>
<if test="type != null">
`type`,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="returnOrderId != null">
#{returnOrderId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.ReturnOrderRecordExample" resultType="java.lang.Long">
select count(*) from return_order_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update return_order_record
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.returnOrderId != null">
return_order_id = #{record.returnOrderId,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
`type` = #{record.type,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update return_order_record
set id = #{record.id,jdbcType=INTEGER},
return_order_id = #{record.returnOrderId,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
content = #{record.content,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.ReturnOrderRecord">
update return_order_record
<set>
<if test="returnOrderId != null">
return_order_id = #{returnOrderId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="type != null">
`type` = #{type,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.ReturnOrderRecord">
update return_order_record
set return_order_id = #{returnOrderId,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
content = #{content,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
`type` = #{type,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.ReturnOrderRecordExample" 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 return_order_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, return_order_id, create_time, content, remark, `type`
</otherwise>
</choose>
from return_order_record
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.mapper" <javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.mapper"
targetProject="ch-dao/src/main/java"/> targetProject="ch-dao/src/main/java"/>
<table tableName="consign_sale" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true"> <table tableName="return_order" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<generatedKey column="id" sqlStatement="Mysql" identity="true" /> <generatedKey column="id" sqlStatement="Mysql" identity="true" />
</table> </table>
......
...@@ -43,6 +43,16 @@ public class UserInfo implements Serializable { ...@@ -43,6 +43,16 @@ public class UserInfo implements Serializable {
private String profile; private String profile;
private String background; private String background;
/**
* 未完成寄售单数量
*/
private Integer consignOrderNumber;
/**
* 未完成退货单数量
*/
private Integer returnOrderNumber;
} }
package com.wwdz.ch.wx.entity.vo;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Data
public class ReturnOrderAppletVo implements Entity {
/**
* 退货单号
*/
private String returnOrderId;
/**
* 商品图片
*/
private String image;
private Map<String, Object> homePageImage;
/**
* 商品id
*/
private String itemId;
/**
* 商品名称
*/
private String itemName;
/**
* 寄售单号
*/
private String saleId;
/**
* 状态
*/
private Integer state;
/**
* 状态
*/
private String stateName;
/**
* 下单时间
*/
private Date saleTime;
/**
* 寄出时间
*/
private Date sendTime;
/**
* 签收时间
*/
private Date signedTime;
/**
* 物流公司
*/
private String logisticsCode;
/**
* 物流公司名称
*/
private String logisticsName;
/**
* 快递单号
*/
private String waybill;
/**
* 完成时间
*/
private Date finishTime;
/**
* 寄售单状态时间线
*/
private List<AppletStateNodeVo> nodeVoList;
}
...@@ -524,6 +524,7 @@ public class ConsignSaleServiceImpl implements ConsignSaleService { ...@@ -524,6 +524,7 @@ public class ConsignSaleServiceImpl implements ConsignSaleService {
consignSale.setSaleId(dto.getSaleId()); consignSale.setSaleId(dto.getSaleId());
consignSale.setLogisticsCode(dto.getLogisticsCode()); consignSale.setLogisticsCode(dto.getLogisticsCode());
consignSale.setWaybill(dto.getWaybill()); consignSale.setWaybill(dto.getWaybill());
consignSale.setAddressId(dto.getAddressId());
consignSale.setCustomState(ConsignSaleEnum.SaleForUserStateEnum.CONSIGNED.getCode()); consignSale.setCustomState(ConsignSaleEnum.SaleForUserStateEnum.CONSIGNED.getCode());
consignSale.setSystemState(ConsignSaleEnum.SaleForSysStateEnum.WAIT_TAKE.getCode()); consignSale.setSystemState(ConsignSaleEnum.SaleForSysStateEnum.WAIT_TAKE.getCode());
consignSaleDao.update(consignSale); consignSaleDao.update(consignSale);
......
...@@ -32,10 +32,7 @@ import com.wwdz.ch.wx.manager.AlipayLoginManager; ...@@ -32,10 +32,7 @@ import com.wwdz.ch.wx.manager.AlipayLoginManager;
import com.wwdz.ch.wx.manager.TikTokLoginManager; import com.wwdz.ch.wx.manager.TikTokLoginManager;
import com.wwdz.ch.wx.manager.UserTokenManager; import com.wwdz.ch.wx.manager.UserTokenManager;
import com.wwdz.ch.wx.manager.WxLoginManager; import com.wwdz.ch.wx.manager.WxLoginManager;
import com.wwdz.ch.wx.service.FollowFansRecordService; import com.wwdz.ch.wx.service.*;
import com.wwdz.ch.wx.service.ItemCommonService;
import com.wwdz.ch.wx.service.ItemService;
import com.wwdz.ch.wx.service.MessageService;
import com.wwdz.ch.wx.util.RedisUtil; import com.wwdz.ch.wx.util.RedisUtil;
import com.wwdz.ch.wx.util.StringUtil; import com.wwdz.ch.wx.util.StringUtil;
import com.wwdz.mall.common.vo.response.CloudServerResponse; import com.wwdz.mall.common.vo.response.CloudServerResponse;
...@@ -149,6 +146,9 @@ public class ItemServiceImpl implements ItemService { ...@@ -149,6 +146,9 @@ public class ItemServiceImpl implements ItemService {
@Reference @Reference
CommunityAttributeReadService communityAttributeReadService; CommunityAttributeReadService communityAttributeReadService;
@Autowired
ConsignSaleService consignSaleService;
@Override @Override
public Result nameList(ItemRequestDto dto) { public Result nameList(ItemRequestDto dto) {
try { try {
......
package com.wwdz.ch.wx.impl;
import com.github.pagehelper.PageInfo;
import com.wwdz.ch.core.consts.ConsignSaleEnum;
import com.wwdz.ch.core.consts.LogisticsEnum;
import com.wwdz.ch.core.consts.ReturnOrderEnum;
import com.wwdz.ch.core.entity.ConsignSaleVo;
import com.wwdz.ch.core.entity.ReturnOrderVo;
import com.wwdz.ch.core.type.PageSearchResult;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.core.util.MediaUtil;
import com.wwdz.ch.core.util.RegexUtil;
import com.wwdz.ch.db.dao.ItemDao;
import com.wwdz.ch.db.dao.ReturnOrderDao;
import com.wwdz.ch.db.dao.ReturnOrderRecordDao;
import com.wwdz.ch.db.domain.*;
import com.wwdz.ch.db.dto.request.CoinRequestDto;
import com.wwdz.ch.db.dto.request.ConsignSaleRequestDto;
import com.wwdz.ch.db.dto.request.ReturnOrderRequestDto;
import com.wwdz.ch.wx.entity.vo.AppletStateNodeVo;
import com.wwdz.ch.wx.entity.vo.ReturnOrderAppletVo;
import com.wwdz.ch.wx.service.ReturnOrderService;
import com.xxdxxs.utils.EntityMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
@Service
public class ReturnOrderServiceImpl implements ReturnOrderService {
private static final Logger logger = LoggerFactory.getLogger(ReturnOrderServiceImpl.class);
@Autowired
ReturnOrderDao returnOrderDao;
@Autowired
ReturnOrderRecordDao returnOrderRecordDao;
@Autowired
ItemDao itemDao;
@Override
public Result findList(ReturnOrderRequestDto dto) {
try {
if (StringUtils.hasLength(dto.getSearchParam())) {
//判断查询条件是否为中文,是的话就根据商品名称模糊查询
if (RegexUtil.isContainChinese(dto.getSearchParam())) {
CoinRequestDto coinRequestDto = new CoinRequestDto();
coinRequestDto.setUserId(dto.getUserId());
coinRequestDto.setName(dto.getSearchParam());
List<Item> items = itemDao.findList(coinRequestDto);
List<Long> itemIds = items.stream().map(Item::getId).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(itemIds)) {
dto.setItemIds(itemIds);
} else {
//没有对应名称的商品则直接返回空数据
return Result.success();
}
} else {
dto.setSaleId(dto.getSearchParam());
}
}
List<ReturnOrder> list = returnOrderDao.findByPage(dto);
PageInfo<ReturnOrder> pageInfo = new PageInfo<>(list);
if (CollectionUtils.isEmpty(list)) {
return Result.success();
}
List<Long> itemIds = list.stream().map(ReturnOrder::getItemId).collect(Collectors.toList());
//查询商品的信息
List<Item> itemList = itemDao.findDetails(itemIds);
Map<Long, Item> itemMap = itemList.stream().collect(Collectors.toMap(Item::getId, Function.identity()));
List<ReturnOrderVo> returnOrderVos = new ArrayList<>();
list.forEach(returnOrder -> {
ReturnOrderVo returnOrderVo = new ReturnOrderVo();
EntityMapper.copyAttribute(returnOrder, returnOrderVo);
long itemId = returnOrder.getItemId();
Item item = itemMap.get(itemId);
returnOrderVo.setHomePageImage(MediaUtil.getHomePageImage(item.getImages(), item.getVideos()));
returnOrderVo.setItemName(item.getName());
returnOrderVo.setStateName(ReturnOrderEnum.StateEnum.getNameByCode(returnOrder.getState()));
returnOrderVos.add(returnOrderVo);
});
PageSearchResult pageSearchResult = PageSearchResult.of(pageInfo, returnOrderVos);
return Result.success(pageSearchResult);
} catch (Exception e) {
logger.error("查询退货单列表error : {}", e);
}
return Result.failed();
}
@Override
public Result findDetail(ReturnOrderRequestDto dto) {
String returnOrderId = dto.getReturnOrderId();
List<ReturnOrderRecord> returnOrderRecordList = returnOrderRecordDao.findByReturnOrderId(returnOrderId);
ReturnOrder returnOrder = returnOrderDao.findById(returnOrderId);
long itemId = returnOrder.getItemId();
Item item = itemDao.findById(itemId);
ReturnOrderAppletVo returnOrderAppletVo = new ReturnOrderAppletVo();
returnOrderAppletVo.setSaleId(returnOrder.getSaleId());
returnOrderAppletVo.setReturnOrderId(returnOrderId);
returnOrderAppletVo.setHomePageImage(MediaUtil.getHomePageImage(item.getImages(), item.getVideos()));
returnOrderAppletVo.setItemName(item.getName());
returnOrderAppletVo.setLogisticsCode(returnOrder.getLogisticsCode());
returnOrderAppletVo.setLogisticsName(LogisticsEnum.getNameByCode(returnOrder.getLogisticsCode()));
returnOrderAppletVo.setWaybill(returnOrder.getWaybill());
returnOrderAppletVo.setState(returnOrder.getState());
returnOrderAppletVo.setStateName(ReturnOrderEnum.StateEnum.getNameByCode(returnOrder.getState()));
//货品寄回时间
returnOrderAppletVo.setSendTime(returnOrder.getCreateTime());
//货品寄回签收
returnOrderAppletVo.setSignedTime(null);
List<AppletStateNodeVo> appletStateNodeVoList = new ArrayList<>();
ReturnOrderEnum.NodeDescEnum[] nodeDescEnums = ReturnOrderEnum.NodeDescEnum.values();
List<ReturnOrderEnum.NodeDescEnum> nodeDescEnumList = Arrays.stream(nodeDescEnums).collect(Collectors.toList());
for (ReturnOrderEnum.NodeDescEnum nodeDescEnum : nodeDescEnumList) {
AppletStateNodeVo appletStateNodeVo = new AppletStateNodeVo();
appletStateNodeVo.setNode(nodeDescEnum.getNode());
appletStateNodeVo.setDesc(appletStateNodeVo.getDesc());
appletStateNodeVo.setPassed(false);
appletStateNodeVoList.add(appletStateNodeVo);
}
return null;
}
}
...@@ -3,8 +3,10 @@ package com.wwdz.ch.wx.impl; ...@@ -3,8 +3,10 @@ package com.wwdz.ch.wx.impl;
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
import com.alibaba.dubbo.config.annotation.Reference; import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.wwdz.ch.core.consts.ConsignSaleEnum;
import com.wwdz.ch.core.consts.IMEnum; import com.wwdz.ch.core.consts.IMEnum;
import com.wwdz.ch.core.consts.ResultCode; import com.wwdz.ch.core.consts.ResultCode;
import com.wwdz.ch.core.consts.ReturnOrderEnum;
import com.wwdz.ch.core.entity.im.SendChatMsgRequestDto; import com.wwdz.ch.core.entity.im.SendChatMsgRequestDto;
import com.wwdz.ch.core.im.api.ChatUserApi; import com.wwdz.ch.core.im.api.ChatUserApi;
import com.wwdz.ch.core.im.api.ConversationApi; import com.wwdz.ch.core.im.api.ConversationApi;
...@@ -18,6 +20,8 @@ import com.wwdz.ch.core.util.RegexUtil; ...@@ -18,6 +20,8 @@ import com.wwdz.ch.core.util.RegexUtil;
import com.wwdz.ch.core.util.UUID; import com.wwdz.ch.core.util.UUID;
import com.wwdz.ch.core.util.bcrypt.BCryptPasswordEncoder; import com.wwdz.ch.core.util.bcrypt.BCryptPasswordEncoder;
import com.wwdz.ch.db.dao.AiAssistantDao; import com.wwdz.ch.db.dao.AiAssistantDao;
import com.wwdz.ch.db.dao.ConsignSaleDao;
import com.wwdz.ch.db.dao.ReturnOrderDao;
import com.wwdz.ch.db.dao.UserDao; import com.wwdz.ch.db.dao.UserDao;
import com.wwdz.ch.db.domain.AiAssistant; import com.wwdz.ch.db.domain.AiAssistant;
import com.wwdz.ch.db.domain.Switch; import com.wwdz.ch.db.domain.Switch;
...@@ -55,10 +59,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport; ...@@ -55,10 +59,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.*;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/** /**
* 用户服务类 * 用户服务类
...@@ -129,6 +130,12 @@ public class UserServiceImpl implements UserService { ...@@ -129,6 +130,12 @@ public class UserServiceImpl implements UserService {
@Reference @Reference
CommunityAttributeReadService communityAttributeReadService; CommunityAttributeReadService communityAttributeReadService;
@Autowired
ConsignSaleDao consignSaleDao;
@Autowired
ReturnOrderDao returnOrderDao;
@Override @Override
public Result finishLogin(UserRequestDto dto) { public Result finishLogin(UserRequestDto dto) {
...@@ -584,7 +591,6 @@ public class UserServiceImpl implements UserService { ...@@ -584,7 +591,6 @@ public class UserServiceImpl implements UserService {
try { try {
UserInfo userInfo = new UserInfo(); UserInfo userInfo = new UserInfo();
userInfo.setUserId(dto.getUserId()); userInfo.setUserId(dto.getUserId());
//获取用户签名 //获取用户签名
try { try {
CloudServerResponse<CommunityUserAttributeDO> response = communityAttributeReadService.getCommunityUserAttributeByUserId(dto.getUserId()); CloudServerResponse<CommunityUserAttributeDO> response = communityAttributeReadService.getCommunityUserAttributeByUserId(dto.getUserId());
...@@ -596,11 +602,19 @@ public class UserServiceImpl implements UserService { ...@@ -596,11 +602,19 @@ public class UserServiceImpl implements UserService {
} }
itemCommonService.getPageViews(userInfo); itemCommonService.getPageViews(userInfo);
logger.info("【请求结束】查询关注粉丝浏览量"); //查询寄售单和退货单数量
List<Integer> filterConsignOrderStates = Arrays.asList(ConsignSaleEnum.SaleForSysStateEnum.FINISH.getCode(),ConsignSaleEnum.SaleForSysStateEnum.CANCEL.getCode());
long consignOrderNum = consignSaleDao.countByState(dto.getUserId(), filterConsignOrderStates);
List<Integer> filterReturnOrderStates = Arrays.asList(ReturnOrderEnum.StateEnum.FINISH.getCode());
long returnOrderNum = consignSaleDao.countByState(dto.getUserId(), filterReturnOrderStates);
userInfo.setConsignOrderNumber((int) consignOrderNum);
userInfo.setReturnOrderNumber((int) returnOrderNum);
logger.info("【请求结束】查询关注粉丝浏览量,寄售单退货单数量");
return Result.success(userInfo); return Result.success(userInfo);
} catch (Exception e) { } catch (Exception e) {
logger.error("查询关注粉丝浏览量失败", e); logger.error("查询关注粉丝浏览量、寄售单退货单数量失败", e);
return Result.failed("查询关注粉丝浏览量失败"); return Result.failed("查询关注粉丝浏览量、寄售单退货单数量失败");
} }
} }
......
package com.wwdz.ch.wx.service;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.ReturnOrderRequestDto;
public interface ReturnOrderService {
/**
* 查询退货单
* @param dto
* @return
*/
Result findList(ReturnOrderRequestDto dto);
/**
* 查询退货单详情
* @param dto
* @return
*/
Result findDetail(ReturnOrderRequestDto dto);
}
...@@ -65,7 +65,7 @@ public class ConsignSaleController { ...@@ -65,7 +65,7 @@ public class ConsignSaleController {
ConsignSaleRequestDto consignSaleRequestDto = new ConsignSaleRequestDto(); ConsignSaleRequestDto consignSaleRequestDto = new ConsignSaleRequestDto();
consignSaleRequestDto.setUserId(dto.getUserId()); consignSaleRequestDto.setUserId(dto.getUserId());
consignSaleRequestDto.setItemId(itemId); consignSaleRequestDto.setItemId(itemId);
consignSaleRequestDto.setUserPrice(Integer.valueOf(dto.getPrice())); consignSaleRequestDto.setUserPrice(Integer.valueOf(dto.getPrice()) * 100);
return consignSaleService.createConsignSaleOrder(consignSaleRequestDto); return consignSaleService.createConsignSaleOrder(consignSaleRequestDto);
} }
......
package com.wwdz.ch.wx.web;
import com.alibaba.fastjson.JSON;
import com.wwdz.ch.core.consts.LogisticsEnum;
import com.wwdz.ch.core.consts.ResultCode;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.ConsignSaleRequestDto;
import com.wwdz.ch.wx.entity.request.ItemRequestDto;
import com.wwdz.ch.wx.service.ConsignSaleService;
import com.wwdz.ch.wx.service.ItemService;
import com.xxdxxs.service.FormHandler;
import com.xxdxxs.utils.StringUtils;
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.util.ObjectUtils;
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;
import java.util.*;
/**
* 退货单
*/
@RestController
@RequestMapping("/wx/returnOrder")
public class ReturnOrderController {
private static final Logger logger = LoggerFactory.getLogger(ReturnOrderController.class);
@Autowired
ConsignSaleService consignSaleService;
@Autowired
ItemService itemService;
@ApiOperation(value = "用户查询退货单")
@PostMapping("/findList")
public Result findList(@RequestBody ConsignSaleRequestDto 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(ResultCode.PARAM_ERROR.getCode(), validator.getErrorInfo());
}
return consignSaleService.findList(dto);
}
@ApiOperation(value = "用户查询退货单详情")
@PostMapping("/findDetail")
public Result findDetail(@RequestBody ConsignSaleRequestDto dto) {
logger.info("【请求开始】用户查询寄售单详情,请求参数:{}", JSON.toJSONString(dto));
Validator validator = new Validator(FormHandler.ofEntity(dto));
validator.set("saleId", "寄售单号").must().string()
.end();
if (!validator.isValid()) {
return Result.failed(ResultCode.PARAM_ERROR.getCode(), validator.getErrorInfo());
}
return consignSaleService.findDetail(dto);
}
}
...@@ -2,7 +2,9 @@ package com.wwdz.ch.wx.web; ...@@ -2,7 +2,9 @@ package com.wwdz.ch.wx.web;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.wwdz.ch.core.type.Result; import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.ConsignSaleRequestDto;
import com.wwdz.ch.wx.entity.request.ItemRequestDto; import com.wwdz.ch.wx.entity.request.ItemRequestDto;
import com.wwdz.ch.wx.service.ConsignSaleService;
import com.wwdz.ch.wx.service.ItemService; import com.wwdz.ch.wx.service.ItemService;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -15,6 +17,7 @@ import org.springframework.web.multipart.MultipartFile; ...@@ -15,6 +17,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Map;
import java.util.Objects; import java.util.Objects;
/** /**
...@@ -26,7 +29,10 @@ public class WxItemController { ...@@ -26,7 +29,10 @@ public class WxItemController {
private static final Logger logger = LoggerFactory.getLogger(WxItemController.class); private static final Logger logger = LoggerFactory.getLogger(WxItemController.class);
@Autowired @Autowired
private ItemService itemService; ItemService itemService;
@Autowired
ConsignSaleService consignSaleService;
@ApiOperation(value = "藏品名称联想") @ApiOperation(value = "藏品名称联想")
@PostMapping("/findNames") @PostMapping("/findNames")
...@@ -138,7 +144,22 @@ public class WxItemController { ...@@ -138,7 +144,22 @@ public class WxItemController {
return Result.failed("请至少上传一张图片"); return Result.failed("请至少上传一张图片");
} }
dto.setPrice(StringUtils.isBlank(dto.getPrice()) ? "0" : dto.getPrice()); dto.setPrice(StringUtils.isBlank(dto.getPrice()) ? "0" : dto.getPrice());
return itemService.add(dto); Result<Map<String, Object>> addResult = itemService.add(dto);
if (addResult.getSuccess()) {
//如果isOnSale=true,表示商品需要寄售,则创建寄售单
if (dto.getIsOnSale()) {
long itemId = (long) addResult.getData().get("id");
ConsignSaleRequestDto consignSaleRequestDto = new ConsignSaleRequestDto();
consignSaleRequestDto.setItemId(itemId);
consignSaleRequestDto.setUserId(dto.getUserId());
consignSaleRequestDto.setUserPrice(Integer.valueOf(dto.getPrice()) * 100);
Result createConsignSaleResult = consignSaleService.createConsignSaleOrder(consignSaleRequestDto);
if (!createConsignSaleResult.getSuccess()) {
return createConsignSaleResult;
}
}
}
return addResult;
} }
@ApiOperation(value = "修改") @ApiOperation(value = "修改")
......
package com.wwdz.ch.wx.impl;
import com.alibaba.dubbo.config.annotation.Reference;
import com.wwdz.ch.wx.Application;
import com.wwdz.mall.common.vo.response.CloudServerResponse;
import com.wwdz.user.api.dto.res.address.UserAddressDTO;
import com.wwdz.user.api.enums.UserAddressTypeEnum;
import com.wwdz.user.api.service.address.UserAddressReadService;
import com.xxdxxs.utils.JsonUtils;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@SpringBootTest(classes= Application.class)
@RunWith(SpringJUnit4ClassRunner.class)
@EnableDubbo(scanBasePackages = {"com.wwdz.ch.wx"})
public class UserAddressServiceTest {
private static final Logger logger = LoggerFactory.getLogger(UserAddressServiceTest.class);
@Reference
UserAddressReadService userAddressReadService;
@Test
public void test() {
long userId = 3387401;
CloudServerResponse<UserAddressDTO> cloudServerResponse = userAddressReadService.getDefaultByType(userId, UserAddressTypeEnum.RECEIVE_ADDRESS.getType());
logger.info("cloudServerResponse = {}", cloudServerResponse);
logger.info("result = {}", JsonUtils.from(cloudServerResponse.getResult()));
}
}
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