Commit 44fe0598 authored by shiyu's avatar shiyu

盲盒专区列表

parent 8ffa328e
package com.wwdz.ch.core.consts;
public class SellActivityEnum {
/**
* 优惠券有效期类型
*/
public enum TypeEnum {
FULL_REDUCE(1, "满减"),
REBATE(2, "折扣比例"),
;
private int code;
private String des;
TypeEnum(int code, String des) {
this.code = code;
this.des = des;
}
public static String getNameByCode(int code) {
for (SellActivityEnum.TypeEnum typeEnum : SellActivityEnum.TypeEnum.values()) {
if (code == typeEnum.getCode()) {
return typeEnum.getDes();
}
}
return null;
}
public int getCode() {
return code;
}
public String getDes() {
return des;
}
}
}
package com.wwdz.ch.db.dao.distribution;
import com.wwdz.ch.db.domain.distribution.SellActivity;
import com.wwdz.ch.db.dto.request.distribution.SellActivityRequestDto;
import java.util.List;
public interface SellActivityDao {
boolean insert(SellActivity sellActivity);
SellActivity findById(long id);
List<SellActivity> findList(SellActivityRequestDto dto);
}
package com.wwdz.ch.db.domain.distribution;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import lombok.Data;
/**
* @author shiyu
* @date 2024/11/14
*/
@Data
public class SellActivity implements Serializable {
/**
* id
*/
private Long id;
/**
* 活动名称
*/
private String name;
/**
* 门槛金额,无门槛则为0
*/
private Long thresholdAmount;
/**
* 优惠金额
*/
private Long discountAmount;
/**
* 折扣比例
*/
private BigDecimal discountRebate;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建时间
*/
private Date updateTime;
/**
* 开始有效时间
*/
private Date startTime;
/**
* 失效时间
*/
private Date endTime;
/**
* 种类1.仅线下;2仅线上;3线上线下
*/
private Integer kind;
/**
* 类型1满减,2折扣
*/
private Integer type;
/**
* 是否有效
*/
private Boolean isValid;
private static final long serialVersionUID = 1L;
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", thresholdAmount=").append(thresholdAmount);
sb.append(", discountAmount=").append(discountAmount);
sb.append(", discountRebate=").append(discountRebate);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", startTime=").append(startTime);
sb.append(", endTime=").append(endTime);
sb.append(", kind=").append(kind);
sb.append(", type=").append(type);
sb.append(", isValid=").append(isValid);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
SellActivity other = (SellActivity) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
&& (this.getThresholdAmount() == null ? other.getThresholdAmount() == null : this.getThresholdAmount().equals(other.getThresholdAmount()))
&& (this.getDiscountAmount() == null ? other.getDiscountAmount() == null : this.getDiscountAmount().equals(other.getDiscountAmount()))
&& (this.getDiscountRebate() == null ? other.getDiscountRebate() == null : this.getDiscountRebate().equals(other.getDiscountRebate()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
&& (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
&& (this.getKind() == null ? other.getKind() == null : this.getKind().equals(other.getKind()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getIsValid() == null ? other.getIsValid() == null : this.getIsValid().equals(other.getIsValid()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
result = prime * result + ((getThresholdAmount() == null) ? 0 : getThresholdAmount().hashCode());
result = prime * result + ((getDiscountAmount() == null) ? 0 : getDiscountAmount().hashCode());
result = prime * result + ((getDiscountRebate() == null) ? 0 : getDiscountRebate().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
result = prime * result + ((getKind() == null) ? 0 : getKind().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getIsValid() == null) ? 0 : getIsValid().hashCode());
return result;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "BIGINT", false),
name("name", "name", "VARCHAR", true),
thresholdAmount("threshold_amount", "thresholdAmount", "BIGINT", false),
discountAmount("discount_amount", "discountAmount", "BIGINT", false),
discountRebate("discount_rebate", "discountRebate", "DECIMAL", false),
createTime("create_time", "createTime", "TIMESTAMP", false),
updateTime("update_time", "updateTime", "TIMESTAMP", false),
startTime("start_time", "startTime", "TIMESTAMP", false),
endTime("end_time", "endTime", "TIMESTAMP", false),
kind("kind", "kind", "INTEGER", false),
type("type", "type", "INTEGER", true),
isValid("is_valid", "isValid", "BIT", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table sell_activity
*
* @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 sell_activity
*
* @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 sell_activity
*
* @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 sell_activity
*
* @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 sell_activity
*
* @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 sell_activity
*
* @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 sell_activity
*
* @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 sell_activity
*
* @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 sell_activity
*
* @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 sell_activity
*
* @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 sell_activity
*
* @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 sell_activity
*
* @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 sell_activity
*
* @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 sell_activity
*
* @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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}
\ No newline at end of file
package com.wwdz.ch.db.domain.distribution;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SellActivityExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public SellActivityExample() {
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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public SellActivityExample orderBy(String orderByClause) {
this.setOrderByClause(orderByClause);
return this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public SellActivityExample 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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Criteria newAndCreateCriteria() {
SellActivityExample example = new SellActivityExample();
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(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdNotEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdGreaterThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIdLessThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("`name` is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("`name` is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("`name` =", value, "name");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNameEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("`name` = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("`name` <>", value, "name");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNameNotEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("`name` <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("`name` >", value, "name");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNameGreaterThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("`name` > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("`name` >=", value, "name");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNameGreaterThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("`name` >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("`name` <", value, "name");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNameLessThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("`name` < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("`name` <=", value, "name");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andNameLessThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("`name` <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("`name` like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("`name` not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("`name` not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("`name` between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("`name` not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andThresholdAmountIsNull() {
addCriterion("threshold_amount is null");
return (Criteria) this;
}
public Criteria andThresholdAmountIsNotNull() {
addCriterion("threshold_amount is not null");
return (Criteria) this;
}
public Criteria andThresholdAmountEqualTo(Long value) {
addCriterion("threshold_amount =", value, "thresholdAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andThresholdAmountEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("threshold_amount = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andThresholdAmountNotEqualTo(Long value) {
addCriterion("threshold_amount <>", value, "thresholdAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andThresholdAmountNotEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("threshold_amount <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andThresholdAmountGreaterThan(Long value) {
addCriterion("threshold_amount >", value, "thresholdAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andThresholdAmountGreaterThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("threshold_amount > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andThresholdAmountGreaterThanOrEqualTo(Long value) {
addCriterion("threshold_amount >=", value, "thresholdAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andThresholdAmountGreaterThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("threshold_amount >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andThresholdAmountLessThan(Long value) {
addCriterion("threshold_amount <", value, "thresholdAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andThresholdAmountLessThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("threshold_amount < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andThresholdAmountLessThanOrEqualTo(Long value) {
addCriterion("threshold_amount <=", value, "thresholdAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andThresholdAmountLessThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("threshold_amount <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andThresholdAmountIn(List<Long> values) {
addCriterion("threshold_amount in", values, "thresholdAmount");
return (Criteria) this;
}
public Criteria andThresholdAmountNotIn(List<Long> values) {
addCriterion("threshold_amount not in", values, "thresholdAmount");
return (Criteria) this;
}
public Criteria andThresholdAmountBetween(Long value1, Long value2) {
addCriterion("threshold_amount between", value1, value2, "thresholdAmount");
return (Criteria) this;
}
public Criteria andThresholdAmountNotBetween(Long value1, Long value2) {
addCriterion("threshold_amount not between", value1, value2, "thresholdAmount");
return (Criteria) this;
}
public Criteria andDiscountAmountIsNull() {
addCriterion("discount_amount is null");
return (Criteria) this;
}
public Criteria andDiscountAmountIsNotNull() {
addCriterion("discount_amount is not null");
return (Criteria) this;
}
public Criteria andDiscountAmountEqualTo(Long value) {
addCriterion("discount_amount =", value, "discountAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDiscountAmountEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("discount_amount = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDiscountAmountNotEqualTo(Long value) {
addCriterion("discount_amount <>", value, "discountAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDiscountAmountNotEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("discount_amount <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDiscountAmountGreaterThan(Long value) {
addCriterion("discount_amount >", value, "discountAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDiscountAmountGreaterThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("discount_amount > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDiscountAmountGreaterThanOrEqualTo(Long value) {
addCriterion("discount_amount >=", value, "discountAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDiscountAmountGreaterThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("discount_amount >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDiscountAmountLessThan(Long value) {
addCriterion("discount_amount <", value, "discountAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDiscountAmountLessThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("discount_amount < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDiscountAmountLessThanOrEqualTo(Long value) {
addCriterion("discount_amount <=", value, "discountAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDiscountAmountLessThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("discount_amount <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDiscountAmountIn(List<Long> values) {
addCriterion("discount_amount in", values, "discountAmount");
return (Criteria) this;
}
public Criteria andDiscountAmountNotIn(List<Long> values) {
addCriterion("discount_amount not in", values, "discountAmount");
return (Criteria) this;
}
public Criteria andDiscountAmountBetween(Long value1, Long value2) {
addCriterion("discount_amount between", value1, value2, "discountAmount");
return (Criteria) this;
}
public Criteria andDiscountAmountNotBetween(Long value1, Long value2) {
addCriterion("discount_amount not between", value1, value2, "discountAmount");
return (Criteria) this;
}
public Criteria andDiscountRebateIsNull() {
addCriterion("discount_rebate is null");
return (Criteria) this;
}
public Criteria andDiscountRebateIsNotNull() {
addCriterion("discount_rebate is not null");
return (Criteria) this;
}
public Criteria andDiscountRebateEqualTo(BigDecimal value) {
addCriterion("discount_rebate =", value, "discountRebate");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDiscountRebateEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("discount_rebate = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDiscountRebateNotEqualTo(BigDecimal value) {
addCriterion("discount_rebate <>", value, "discountRebate");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDiscountRebateNotEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("discount_rebate <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDiscountRebateGreaterThan(BigDecimal value) {
addCriterion("discount_rebate >", value, "discountRebate");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDiscountRebateGreaterThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("discount_rebate > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDiscountRebateGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("discount_rebate >=", value, "discountRebate");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDiscountRebateGreaterThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("discount_rebate >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDiscountRebateLessThan(BigDecimal value) {
addCriterion("discount_rebate <", value, "discountRebate");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDiscountRebateLessThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("discount_rebate < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDiscountRebateLessThanOrEqualTo(BigDecimal value) {
addCriterion("discount_rebate <=", value, "discountRebate");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andDiscountRebateLessThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("discount_rebate <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andDiscountRebateIn(List<BigDecimal> values) {
addCriterion("discount_rebate in", values, "discountRebate");
return (Criteria) this;
}
public Criteria andDiscountRebateNotIn(List<BigDecimal> values) {
addCriterion("discount_rebate not in", values, "discountRebate");
return (Criteria) this;
}
public Criteria andDiscountRebateBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("discount_rebate between", value1, value2, "discountRebate");
return (Criteria) this;
}
public Criteria andDiscountRebateNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("discount_rebate not between", value1, value2, "discountRebate");
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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeEqualToColumn(SellActivity.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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeNotEqualToColumn(SellActivity.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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanColumn(SellActivity.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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeGreaterThanOrEqualToColumn(SellActivity.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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanColumn(SellActivity.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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andCreateTimeLessThanOrEqualToColumn(SellActivity.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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeEqualToColumn(SellActivity.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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeNotEqualToColumn(SellActivity.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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeGreaterThanColumn(SellActivity.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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeGreaterThanOrEqualToColumn(SellActivity.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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeLessThanColumn(SellActivity.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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andUpdateTimeLessThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("update_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andStartTimeIsNull() {
addCriterion("start_time is null");
return (Criteria) this;
}
public Criteria andStartTimeIsNotNull() {
addCriterion("start_time is not null");
return (Criteria) this;
}
public Criteria andStartTimeEqualTo(Date value) {
addCriterion("start_time =", value, "startTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStartTimeEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("start_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStartTimeNotEqualTo(Date value) {
addCriterion("start_time <>", value, "startTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStartTimeNotEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("start_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStartTimeGreaterThan(Date value) {
addCriterion("start_time >", value, "startTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStartTimeGreaterThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("start_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStartTimeGreaterThanOrEqualTo(Date value) {
addCriterion("start_time >=", value, "startTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStartTimeGreaterThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("start_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStartTimeLessThan(Date value) {
addCriterion("start_time <", value, "startTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStartTimeLessThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("start_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStartTimeLessThanOrEqualTo(Date value) {
addCriterion("start_time <=", value, "startTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andStartTimeLessThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("start_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andStartTimeIn(List<Date> values) {
addCriterion("start_time in", values, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotIn(List<Date> values) {
addCriterion("start_time not in", values, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeBetween(Date value1, Date value2) {
addCriterion("start_time between", value1, value2, "startTime");
return (Criteria) this;
}
public Criteria andStartTimeNotBetween(Date value1, Date value2) {
addCriterion("start_time not between", value1, value2, "startTime");
return (Criteria) this;
}
public Criteria andEndTimeIsNull() {
addCriterion("end_time is null");
return (Criteria) this;
}
public Criteria andEndTimeIsNotNull() {
addCriterion("end_time is not null");
return (Criteria) this;
}
public Criteria andEndTimeEqualTo(Date value) {
addCriterion("end_time =", value, "endTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andEndTimeEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("end_time = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andEndTimeNotEqualTo(Date value) {
addCriterion("end_time <>", value, "endTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andEndTimeNotEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("end_time <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andEndTimeGreaterThan(Date value) {
addCriterion("end_time >", value, "endTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andEndTimeGreaterThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("end_time > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andEndTimeGreaterThanOrEqualTo(Date value) {
addCriterion("end_time >=", value, "endTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andEndTimeGreaterThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("end_time >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andEndTimeLessThan(Date value) {
addCriterion("end_time <", value, "endTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andEndTimeLessThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("end_time < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andEndTimeLessThanOrEqualTo(Date value) {
addCriterion("end_time <=", value, "endTime");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andEndTimeLessThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("end_time <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andEndTimeIn(List<Date> values) {
addCriterion("end_time in", values, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotIn(List<Date> values) {
addCriterion("end_time not in", values, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeBetween(Date value1, Date value2) {
addCriterion("end_time between", value1, value2, "endTime");
return (Criteria) this;
}
public Criteria andEndTimeNotBetween(Date value1, Date value2) {
addCriterion("end_time not between", value1, value2, "endTime");
return (Criteria) this;
}
public Criteria andKindIsNull() {
addCriterion("kind is null");
return (Criteria) this;
}
public Criteria andKindIsNotNull() {
addCriterion("kind is not null");
return (Criteria) this;
}
public Criteria andKindEqualTo(Integer value) {
addCriterion("kind =", value, "kind");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andKindEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("kind = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andKindNotEqualTo(Integer value) {
addCriterion("kind <>", value, "kind");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andKindNotEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("kind <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andKindGreaterThan(Integer value) {
addCriterion("kind >", value, "kind");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andKindGreaterThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("kind > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andKindGreaterThanOrEqualTo(Integer value) {
addCriterion("kind >=", value, "kind");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andKindGreaterThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("kind >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andKindLessThan(Integer value) {
addCriterion("kind <", value, "kind");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andKindLessThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("kind < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andKindLessThanOrEqualTo(Integer value) {
addCriterion("kind <=", value, "kind");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andKindLessThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("kind <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andKindIn(List<Integer> values) {
addCriterion("kind in", values, "kind");
return (Criteria) this;
}
public Criteria andKindNotIn(List<Integer> values) {
addCriterion("kind not in", values, "kind");
return (Criteria) this;
}
public Criteria andKindBetween(Integer value1, Integer value2) {
addCriterion("kind between", value1, value2, "kind");
return (Criteria) this;
}
public Criteria andKindNotBetween(Integer value1, Integer value2) {
addCriterion("kind not between", value1, value2, "kind");
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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeEqualToColumn(SellActivity.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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeNotEqualToColumn(SellActivity.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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeGreaterThanColumn(SellActivity.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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeGreaterThanOrEqualToColumn(SellActivity.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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeLessThanColumn(SellActivity.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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andTypeLessThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("`type` <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andTypeIn(List<Integer> values) {
addCriterion("`type` in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Integer> values) {
addCriterion("`type` not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Integer value1, Integer value2) {
addCriterion("`type` between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
addCriterion("`type` not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andIsValidIsNull() {
addCriterion("is_valid is null");
return (Criteria) this;
}
public Criteria andIsValidIsNotNull() {
addCriterion("is_valid is not null");
return (Criteria) this;
}
public Criteria andIsValidEqualTo(Boolean value) {
addCriterion("is_valid =", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("is_valid = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidNotEqualTo(Boolean value) {
addCriterion("is_valid <>", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidNotEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("is_valid <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidGreaterThan(Boolean value) {
addCriterion("is_valid >", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidGreaterThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("is_valid > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidGreaterThanOrEqualTo(Boolean value) {
addCriterion("is_valid >=", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidGreaterThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("is_valid >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidLessThan(Boolean value) {
addCriterion("is_valid <", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidLessThanColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("is_valid < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidLessThanOrEqualTo(Boolean value) {
addCriterion("is_valid <=", value, "isValid");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andIsValidLessThanOrEqualToColumn(SellActivity.Column column) {
addCriterion(new StringBuilder("is_valid <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andIsValidIn(List<Boolean> values) {
addCriterion("is_valid in", values, "isValid");
return (Criteria) this;
}
public Criteria andIsValidNotIn(List<Boolean> values) {
addCriterion("is_valid not in", values, "isValid");
return (Criteria) this;
}
public Criteria andIsValidBetween(Boolean value1, Boolean value2) {
addCriterion("is_valid between", value1, value2, "isValid");
return (Criteria) this;
}
public Criteria andIsValidNotBetween(Boolean value1, Boolean value2) {
addCriterion("is_valid not between", value1, value2, "isValid");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private SellActivityExample example;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
protected Criteria(SellActivityExample example) {
super();
this.example = example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public SellActivityExample example() {
return this.example;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @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 sell_activity
*
* @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 sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Criteria add(Criteria add);
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
package com.wwdz.ch.db.dto.request.distribution;
import com.wwdz.ch.db.dto.request.BaseRequestDto;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Data
public class SellActivityRequestDto extends BaseRequestDto implements Entity {
/**
* id
*/
private Long id;
/**
* 活动名称
*/
private String name;
/**
* 订单金额
*/
private Long orderAmount;
/**
* 门槛金额,无门槛则为0
*/
private Long thresholdAmount;
/**
* 优惠金额
*/
private Long discountAmount;
/**
* 折扣比例
*/
private BigDecimal discountRebate;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建时间
*/
private Date updateTime;
/**
* 开始有效时间
*/
private Date startTime;
/**
* 失效时间
*/
private Date endTime;
private Date queryStartTime;
private Date queryEndTime;
private Date currentTime;
/**
* 种类1.仅线下;2仅线上;3线上线下
*/
private Integer kind;
/**
* 类型1满减,2折扣
*/
private Integer type;
/**
* 是否有效
*/
private Boolean isValid;
}
package com.wwdz.ch.db.impl.distribution;
import com.wwdz.ch.db.dao.distribution.SellActivityDao;
import com.wwdz.ch.db.domain.distribution.SellActivity;
import com.wwdz.ch.db.domain.distribution.SellActivityExample;
import com.wwdz.ch.db.dto.request.distribution.SellActivityRequestDto;
import com.wwdz.ch.db.mapper.distribution.SellActivityMapper;
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 SellActivityDaoImpl implements SellActivityDao {
@Autowired
SellActivityMapper sellActivityMapper;
@Override
public boolean insert(SellActivity sellActivity) {
sellActivity.setCreateTime(new Date());
sellActivity.setUpdateTime(new Date());
return sellActivityMapper.insert(sellActivity) > 0;
}
@Override
public SellActivity findById(long id) {
return sellActivityMapper.selectByPrimaryKey(id);
}
@Override
public List<SellActivity> findList(SellActivityRequestDto dto) {
SellActivityExample example = new SellActivityExample();
SellActivityExample.Criteria criteria = example.createCriteria();
JdbcHelper.ifPresent(dto.getCurrentTime(), criteria::andStartTimeLessThanOrEqualTo);
JdbcHelper.ifPresent(dto.getCurrentTime(), criteria::andEndTimeGreaterThanOrEqualTo);
criteria.andIsValidEqualTo(true);
if (StringUtils.hasLength(dto.getOrder())) {
example.setOrderByClause(" threshold_amount " + dto.getOrder());
} else {
example.setOrderByClause(" threshold_amount desc");
}
return sellActivityMapper.selectByExample(example);
}
}
package com.wwdz.ch.db.mapper.distribution;
import com.wwdz.ch.db.domain.distribution.SellActivity;
import com.wwdz.ch.db.domain.distribution.SellActivityExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface SellActivityMapper {
long countByExample(SellActivityExample example);
int deleteByExample(SellActivityExample example);
int deleteByPrimaryKey(Long id);
int insert(SellActivity record);
int insertSelective(SellActivity record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
SellActivity selectOneByExample(SellActivityExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
SellActivity selectOneByExampleSelective(@Param("example") SellActivityExample example, @Param("selective") SellActivity.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<SellActivity> selectByExampleSelective(@Param("example") SellActivityExample example, @Param("selective") SellActivity.Column ... selective);
List<SellActivity> selectByExample(SellActivityExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sell_activity
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
SellActivity selectByPrimaryKeySelective(@Param("id") Long id, @Param("selective") SellActivity.Column ... selective);
SellActivity selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") SellActivity record, @Param("example") SellActivityExample example);
int updateByExample(@Param("record") SellActivity record, @Param("example") SellActivityExample example);
int updateByPrimaryKeySelective(SellActivity record);
int updateByPrimaryKey(SellActivity record);
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.wwdz.ch.db.mapper.distribution.SellActivityMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.distribution.SellActivity">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="threshold_amount" jdbcType="BIGINT" property="thresholdAmount" />
<result column="discount_amount" jdbcType="BIGINT" property="discountAmount" />
<result column="discount_rebate" jdbcType="DECIMAL" property="discountRebate" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
<result column="kind" jdbcType="INTEGER" property="kind" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="is_valid" jdbcType="BIT" property="isValid" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, `name`, threshold_amount, discount_amount, discount_rebate, create_time, update_time,
start_time, end_time, kind, `type`, is_valid
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.distribution.SellActivityExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from sell_activity
<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, `name`, threshold_amount, discount_amount, discount_rebate, create_time, update_time,
start_time, end_time, kind, `type`, is_valid
</otherwise>
</choose>
from sell_activity
<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.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sell_activity
where id = #{id,jdbcType=BIGINT}
</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, `name`, threshold_amount, discount_amount, discount_rebate, create_time, update_time,
start_time, end_time, kind, `type`, is_valid
</otherwise>
</choose>
from sell_activity
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from sell_activity
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.distribution.SellActivityExample">
delete from sell_activity
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.distribution.SellActivity">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into sell_activity (`name`, threshold_amount, discount_amount,
discount_rebate, create_time, update_time,
start_time, end_time, kind,
`type`, is_valid)
values (#{name,jdbcType=VARCHAR}, #{thresholdAmount,jdbcType=BIGINT}, #{discountAmount,jdbcType=BIGINT},
#{discountRebate,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{kind,jdbcType=INTEGER},
#{type,jdbcType=INTEGER}, #{isValid,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.distribution.SellActivity">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into sell_activity
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">
`name`,
</if>
<if test="thresholdAmount != null">
threshold_amount,
</if>
<if test="discountAmount != null">
discount_amount,
</if>
<if test="discountRebate != null">
discount_rebate,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="kind != null">
kind,
</if>
<if test="type != null">
`type`,
</if>
<if test="isValid != null">
is_valid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="thresholdAmount != null">
#{thresholdAmount,jdbcType=BIGINT},
</if>
<if test="discountAmount != null">
#{discountAmount,jdbcType=BIGINT},
</if>
<if test="discountRebate != null">
#{discountRebate,jdbcType=DECIMAL},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="startTime != null">
#{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
#{endTime,jdbcType=TIMESTAMP},
</if>
<if test="kind != null">
#{kind,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="isValid != null">
#{isValid,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.distribution.SellActivityExample" resultType="java.lang.Long">
select count(*) from sell_activity
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update sell_activity
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.thresholdAmount != null">
threshold_amount = #{record.thresholdAmount,jdbcType=BIGINT},
</if>
<if test="record.discountAmount != null">
discount_amount = #{record.discountAmount,jdbcType=BIGINT},
</if>
<if test="record.discountRebate != null">
discount_rebate = #{record.discountRebate,jdbcType=DECIMAL},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.startTime != null">
start_time = #{record.startTime,jdbcType=TIMESTAMP},
</if>
<if test="record.endTime != null">
end_time = #{record.endTime,jdbcType=TIMESTAMP},
</if>
<if test="record.kind != null">
kind = #{record.kind,jdbcType=INTEGER},
</if>
<if test="record.type != null">
`type` = #{record.type,jdbcType=INTEGER},
</if>
<if test="record.isValid != null">
is_valid = #{record.isValid,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update sell_activity
set id = #{record.id,jdbcType=BIGINT},
`name` = #{record.name,jdbcType=VARCHAR},
threshold_amount = #{record.thresholdAmount,jdbcType=BIGINT},
discount_amount = #{record.discountAmount,jdbcType=BIGINT},
discount_rebate = #{record.discountRebate,jdbcType=DECIMAL},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
start_time = #{record.startTime,jdbcType=TIMESTAMP},
end_time = #{record.endTime,jdbcType=TIMESTAMP},
kind = #{record.kind,jdbcType=INTEGER},
`type` = #{record.type,jdbcType=INTEGER},
is_valid = #{record.isValid,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.distribution.SellActivity">
update sell_activity
<set>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="thresholdAmount != null">
threshold_amount = #{thresholdAmount,jdbcType=BIGINT},
</if>
<if test="discountAmount != null">
discount_amount = #{discountAmount,jdbcType=BIGINT},
</if>
<if test="discountRebate != null">
discount_rebate = #{discountRebate,jdbcType=DECIMAL},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=TIMESTAMP},
</if>
<if test="kind != null">
kind = #{kind,jdbcType=INTEGER},
</if>
<if test="type != null">
`type` = #{type,jdbcType=INTEGER},
</if>
<if test="isValid != null">
is_valid = #{isValid,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.distribution.SellActivity">
update sell_activity
set `name` = #{name,jdbcType=VARCHAR},
threshold_amount = #{thresholdAmount,jdbcType=BIGINT},
discount_amount = #{discountAmount,jdbcType=BIGINT},
discount_rebate = #{discountRebate,jdbcType=DECIMAL},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
start_time = #{startTime,jdbcType=TIMESTAMP},
end_time = #{endTime,jdbcType=TIMESTAMP},
kind = #{kind,jdbcType=INTEGER},
`type` = #{type,jdbcType=INTEGER},
is_valid = #{isValid,jdbcType=BIT}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.distribution.SellActivityExample" 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 sell_activity
<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, `name`, threshold_amount, discount_amount, discount_rebate, create_time, update_time,
start_time, end_time, kind, `type`, is_valid
</otherwise>
</choose>
from sell_activity
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.mapper.distribution" <javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.mapper.distribution"
targetProject="ch-dao/src/main/java"/> targetProject="ch-dao/src/main/java"/>
<table tableName="distribution_order" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true"> <table tableName="sell_activity" 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>
......
...@@ -8,6 +8,11 @@ import java.util.List; ...@@ -8,6 +8,11 @@ import java.util.List;
@Data @Data
public class BlindBoxInfoVo implements Entity { public class BlindBoxInfoVo implements Entity {
/**
* 商品id
*/
private Long itemId;
/** /**
* 名称 * 名称
*/ */
...@@ -39,13 +44,5 @@ public class BlindBoxInfoVo implements Entity { ...@@ -39,13 +44,5 @@ public class BlindBoxInfoVo implements Entity {
*/ */
private String buyRecord; private String buyRecord;
/**
* 优惠活动
*/
private String sellActivity;
/**
* 背景图
*/
private String backgroundImage;
} }
...@@ -3,6 +3,8 @@ package com.wwdz.ch.wx.entity.vo.distribution; ...@@ -3,6 +3,8 @@ package com.wwdz.ch.wx.entity.vo.distribution;
import com.xxdxxs.entity.Entity; import com.xxdxxs.entity.Entity;
import lombok.Data; import lombok.Data;
import java.util.List;
@Data @Data
public class ItemSkuVo implements Entity { public class ItemSkuVo implements Entity {
...@@ -26,4 +28,14 @@ public class ItemSkuVo implements Entity { ...@@ -26,4 +28,14 @@ public class ItemSkuVo implements Entity {
*/ */
private String price; private String price;
/**
* 图片
*/
private List<String> images;
/**
* 描述
*/
private String description;
} }
...@@ -67,7 +67,7 @@ public class BlindBoxServiceImpl implements BlindBoxService { ...@@ -67,7 +67,7 @@ public class BlindBoxServiceImpl implements BlindBoxService {
itemList.add(imageList); itemList.add(imageList);
} }
BlindBoxVo blindBoxVo = new BlindBoxVo(); BlindBoxVo blindBoxVo = new BlindBoxVo();
blindBoxVo.setSellActivity("全场限时 立减5元"); blindBoxVo.setSellActivity("全场限时立减5元");
blindBoxVo.setItemList(itemList); blindBoxVo.setItemList(itemList);
return Result.success(blindBoxVo); return Result.success(blindBoxVo);
} catch (Exception e) { } catch (Exception e) {
...@@ -88,6 +88,7 @@ public class BlindBoxServiceImpl implements BlindBoxService { ...@@ -88,6 +88,7 @@ public class BlindBoxServiceImpl implements BlindBoxService {
for (SupplierItem supplierItem : supplierItemList) { for (SupplierItem supplierItem : supplierItemList) {
BlindBoxInfoVo blindBoxInfoVo = new BlindBoxInfoVo(); BlindBoxInfoVo blindBoxInfoVo = new BlindBoxInfoVo();
long itemId = supplierItem.getId(); long itemId = supplierItem.getId();
blindBoxInfoVo.setItemId(itemId);
ItemSkuRequestDto itemSkuRequestDto = new ItemSkuRequestDto(); ItemSkuRequestDto itemSkuRequestDto = new ItemSkuRequestDto();
itemSkuRequestDto.setItemId(itemId); itemSkuRequestDto.setItemId(itemId);
itemSkuRequestDto.setLimit(5); itemSkuRequestDto.setLimit(5);
...@@ -125,7 +126,11 @@ public class BlindBoxServiceImpl implements BlindBoxService { ...@@ -125,7 +126,11 @@ public class BlindBoxServiceImpl implements BlindBoxService {
} }
blindBoxInfoVoList.add(blindBoxInfoVo); blindBoxInfoVoList.add(blindBoxInfoVo);
} }
return Result.success(blindBoxInfoVoList); Map<String, Object> map = new HashMap<>();
map.put("data", blindBoxInfoVoList);
map.put("sellActivity", "全场限时立减5元");
map.put("backgroundImage", "");
return Result.success(map);
} catch (Exception e) { } catch (Exception e) {
logger.error("查询盲袋商品列表 error : {}", e); logger.error("查询盲袋商品列表 error : {}", e);
} }
...@@ -135,7 +140,7 @@ public class BlindBoxServiceImpl implements BlindBoxService { ...@@ -135,7 +140,7 @@ public class BlindBoxServiceImpl implements BlindBoxService {
@Override @Override
public Result findDetail(SupplierItemRequestDto dto) { public Result findDetail(SupplierItemRequestDto dto) {
try { try {
long itemId = dto.getId(); long itemId = dto.getItemId();
BlindBoxDetailVo blindBoxDetailVo = new BlindBoxDetailVo(); BlindBoxDetailVo blindBoxDetailVo = new BlindBoxDetailVo();
SupplierItem supplierItem = supplierItemDao.findById(dto.getItemId()); SupplierItem supplierItem = supplierItemDao.findById(dto.getItemId());
ItemSkuRequestDto itemSkuRequestDto = new ItemSkuRequestDto(); ItemSkuRequestDto itemSkuRequestDto = new ItemSkuRequestDto();
...@@ -205,10 +210,20 @@ public class BlindBoxServiceImpl implements BlindBoxService { ...@@ -205,10 +210,20 @@ public class BlindBoxServiceImpl implements BlindBoxService {
codeList.add(codeMap); codeList.add(codeMap);
} }
blindBoxDetailVo.setIsSelledRecords(codeList); blindBoxDetailVo.setIsSelledRecords(codeList);
return Result.success(blindBoxDetailVo);
} catch (Exception e) {
logger.error("查询盲袋商品详情 error : {}", e);
}
return Result.failed();
}
@Override
public Result findSkuDetail(ItemSkuRequestDto dto) {
try {
return Result.success();
} catch (Exception e) { } catch (Exception e) {
logger.error("查询盲袋商品列表 error : {}", e); logger.error("查询商品sku详情 error : {}", e);
} }
return Result.failed(); return Result.failed();
} }
......
...@@ -458,7 +458,6 @@ public class DistributionOrderServiceImpl implements DistributionOrderService { ...@@ -458,7 +458,6 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
} }
//查询佣金比例 //查询佣金比例
double rebate = distributorProfitService.getIntroduceRebate(dto.getBuyerId(), introducerId); double rebate = distributorProfitService.getIntroduceRebate(dto.getBuyerId(), introducerId);
DistributionOrder distributionOrder = new DistributionOrder(); DistributionOrder distributionOrder = new DistributionOrder();
distributionOrder.setIntroduceRebate(BigDecimal.valueOf(rebate)); distributionOrder.setIntroduceRebate(BigDecimal.valueOf(rebate));
distributionOrder.setIntroducerId(introducerId); distributionOrder.setIntroducerId(introducerId);
......
package com.wwdz.ch.wx.service.distribution; package com.wwdz.ch.wx.service.distribution;
import com.wwdz.ch.core.type.Result; import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.distribution.ItemSkuRequestDto;
import com.wwdz.ch.db.dto.request.distribution.SupplierItemRequestDto; import com.wwdz.ch.db.dto.request.distribution.SupplierItemRequestDto;
/** /**
...@@ -31,4 +32,11 @@ public interface BlindBoxService { ...@@ -31,4 +32,11 @@ public interface BlindBoxService {
*/ */
Result findDetail(SupplierItemRequestDto dto); Result findDetail(SupplierItemRequestDto dto);
/**
* 查询盲袋商品详情
* @param dto
* @return
*/
Result findSkuDetail(ItemSkuRequestDto dto);
} }
...@@ -2,6 +2,7 @@ package com.wwdz.ch.wx.web.distribution; ...@@ -2,6 +2,7 @@ package com.wwdz.ch.wx.web.distribution;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.wwdz.ch.core.consts.ResultCode;
import com.wwdz.ch.core.type.Result; import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.distribution.SupplierItemRequestDto; import com.wwdz.ch.db.dto.request.distribution.SupplierItemRequestDto;
import com.wwdz.ch.wx.service.distribution.BlindBoxService; import com.wwdz.ch.wx.service.distribution.BlindBoxService;
...@@ -43,6 +44,9 @@ public class BlindBoxController { ...@@ -43,6 +44,9 @@ public class BlindBoxController {
@PostMapping("/findDetail") @PostMapping("/findDetail")
public Result findDetail(@RequestBody SupplierItemRequestDto dto) { public Result findDetail(@RequestBody SupplierItemRequestDto dto) {
logger.info("查询福袋详情,请求参数:{}", JSON.toJSONString(dto)); logger.info("查询福袋详情,请求参数:{}", JSON.toJSONString(dto));
if (dto.getItemId() == null) {
return Result.failed(ResultCode.PARAM_ERROR);
}
return blindBoxService.findDetail(dto); return blindBoxService.findDetail(dto);
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment