加入支付宝回调接口逻辑,会员关系树和会员账户流水 mapper累
This commit is contained in:
@@ -7,11 +7,11 @@ package com.buy507.mall.model;
|
|||||||
*/
|
*/
|
||||||
public enum MemberLevel {
|
public enum MemberLevel {
|
||||||
|
|
||||||
Member(0), //普通会员
|
Member(0), //普通用户
|
||||||
Consumer(1), //消费商
|
Consumer(1), //vip会员
|
||||||
Partner(2), //经销商
|
Partner(2), //店长
|
||||||
Diamond(3), //合作商
|
Diamond(3), //代理
|
||||||
OneDiamond(4), //初级合作商
|
OneDiamond(4), //总监
|
||||||
TwoDiamond(5), //中级合作商
|
TwoDiamond(5), //中级合作商
|
||||||
ThreeDiamond(6), //高级合作商
|
ThreeDiamond(6), //高级合作商
|
||||||
FourDiamond(7); //特级合作商
|
FourDiamond(7); //特级合作商
|
||||||
|
|||||||
@@ -0,0 +1,105 @@
|
|||||||
|
package com.buy507.mall.model;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class UmsMemberAccountTransaction implements Serializable {
|
||||||
|
@ApiModelProperty(value = "主键id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "会员id")
|
||||||
|
private Long memberId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单id")
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "进帐金额")
|
||||||
|
private BigDecimal revenueAmount;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String remarks;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "提成比例")
|
||||||
|
private Integer commissionRatio;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getMemberId() {
|
||||||
|
return memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberId(Long memberId) {
|
||||||
|
this.memberId = memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOrderId() {
|
||||||
|
return orderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderId(Long orderId) {
|
||||||
|
this.orderId = orderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getRevenueAmount() {
|
||||||
|
return revenueAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRevenueAmount(BigDecimal revenueAmount) {
|
||||||
|
this.revenueAmount = revenueAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemarks() {
|
||||||
|
return remarks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemarks(String remarks) {
|
||||||
|
this.remarks = remarks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCommissionRatio() {
|
||||||
|
return commissionRatio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCommissionRatio(Integer commissionRatio) {
|
||||||
|
this.commissionRatio = commissionRatio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@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(", memberId=").append(memberId);
|
||||||
|
sb.append(", orderId=").append(orderId);
|
||||||
|
sb.append(", revenueAmount=").append(revenueAmount);
|
||||||
|
sb.append(", remarks=").append(remarks);
|
||||||
|
sb.append(", commissionRatio=").append(commissionRatio);
|
||||||
|
sb.append(", createTime=").append(createTime);
|
||||||
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||||
|
sb.append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,632 @@
|
|||||||
|
package com.buy507.mall.model;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class UmsMemberAccountTransactionExample {
|
||||||
|
protected String orderByClause;
|
||||||
|
|
||||||
|
protected boolean distinct;
|
||||||
|
|
||||||
|
protected List<Criteria> oredCriteria;
|
||||||
|
|
||||||
|
public UmsMemberAccountTransactionExample() {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria createCriteria() {
|
||||||
|
Criteria criteria = createCriteriaInternal();
|
||||||
|
if (oredCriteria.size() == 0) {
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
}
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criteria createCriteriaInternal() {
|
||||||
|
Criteria criteria = new Criteria();
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
oredCriteria.clear();
|
||||||
|
orderByClause = null;
|
||||||
|
distinct = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("id <>", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdGreaterThan(Long value) {
|
||||||
|
addCriterion("id >", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("id >=", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdLessThan(Long value) {
|
||||||
|
addCriterion("id <", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("id <=", value, "id");
|
||||||
|
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 andMemberIdIsNull() {
|
||||||
|
addCriterion("member_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdIsNotNull() {
|
||||||
|
addCriterion("member_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdEqualTo(Long value) {
|
||||||
|
addCriterion("member_id =", value, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("member_id <>", value, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdGreaterThan(Long value) {
|
||||||
|
addCriterion("member_id >", value, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("member_id >=", value, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdLessThan(Long value) {
|
||||||
|
addCriterion("member_id <", value, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("member_id <=", value, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdIn(List<Long> values) {
|
||||||
|
addCriterion("member_id in", values, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("member_id not in", values, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("member_id between", value1, value2, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("member_id not between", value1, value2, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andOrderIdIsNull() {
|
||||||
|
addCriterion("order_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andOrderIdIsNotNull() {
|
||||||
|
addCriterion("order_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andOrderIdEqualTo(Long value) {
|
||||||
|
addCriterion("order_id =", value, "orderId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andOrderIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("order_id <>", value, "orderId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andOrderIdGreaterThan(Long value) {
|
||||||
|
addCriterion("order_id >", value, "orderId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andOrderIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("order_id >=", value, "orderId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andOrderIdLessThan(Long value) {
|
||||||
|
addCriterion("order_id <", value, "orderId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andOrderIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("order_id <=", value, "orderId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andOrderIdIn(List<Long> values) {
|
||||||
|
addCriterion("order_id in", values, "orderId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andOrderIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("order_id not in", values, "orderId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andOrderIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("order_id between", value1, value2, "orderId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andOrderIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("order_id not between", value1, value2, "orderId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRevenueAmountIsNull() {
|
||||||
|
addCriterion("revenue_amount is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRevenueAmountIsNotNull() {
|
||||||
|
addCriterion("revenue_amount is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRevenueAmountEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("revenue_amount =", value, "revenueAmount");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRevenueAmountNotEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("revenue_amount <>", value, "revenueAmount");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRevenueAmountGreaterThan(BigDecimal value) {
|
||||||
|
addCriterion("revenue_amount >", value, "revenueAmount");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRevenueAmountGreaterThanOrEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("revenue_amount >=", value, "revenueAmount");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRevenueAmountLessThan(BigDecimal value) {
|
||||||
|
addCriterion("revenue_amount <", value, "revenueAmount");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRevenueAmountLessThanOrEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("revenue_amount <=", value, "revenueAmount");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRevenueAmountIn(List<BigDecimal> values) {
|
||||||
|
addCriterion("revenue_amount in", values, "revenueAmount");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRevenueAmountNotIn(List<BigDecimal> values) {
|
||||||
|
addCriterion("revenue_amount not in", values, "revenueAmount");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRevenueAmountBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
|
addCriterion("revenue_amount between", value1, value2, "revenueAmount");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRevenueAmountNotBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
|
addCriterion("revenue_amount not between", value1, value2, "revenueAmount");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRemarksIsNull() {
|
||||||
|
addCriterion("remarks is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRemarksIsNotNull() {
|
||||||
|
addCriterion("remarks is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRemarksEqualTo(String value) {
|
||||||
|
addCriterion("remarks =", value, "remarks");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRemarksNotEqualTo(String value) {
|
||||||
|
addCriterion("remarks <>", value, "remarks");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRemarksGreaterThan(String value) {
|
||||||
|
addCriterion("remarks >", value, "remarks");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRemarksGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("remarks >=", value, "remarks");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRemarksLessThan(String value) {
|
||||||
|
addCriterion("remarks <", value, "remarks");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRemarksLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("remarks <=", value, "remarks");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRemarksLike(String value) {
|
||||||
|
addCriterion("remarks like", value, "remarks");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRemarksNotLike(String value) {
|
||||||
|
addCriterion("remarks not like", value, "remarks");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRemarksIn(List<String> values) {
|
||||||
|
addCriterion("remarks in", values, "remarks");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRemarksNotIn(List<String> values) {
|
||||||
|
addCriterion("remarks not in", values, "remarks");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRemarksBetween(String value1, String value2) {
|
||||||
|
addCriterion("remarks between", value1, value2, "remarks");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andRemarksNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("remarks not between", value1, value2, "remarks");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioIsNull() {
|
||||||
|
addCriterion("commission_ratio is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioIsNotNull() {
|
||||||
|
addCriterion("commission_ratio is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioEqualTo(Integer value) {
|
||||||
|
addCriterion("commission_ratio =", value, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioNotEqualTo(Integer value) {
|
||||||
|
addCriterion("commission_ratio <>", value, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioGreaterThan(Integer value) {
|
||||||
|
addCriterion("commission_ratio >", value, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioGreaterThanOrEqualTo(Integer value) {
|
||||||
|
addCriterion("commission_ratio >=", value, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioLessThan(Integer value) {
|
||||||
|
addCriterion("commission_ratio <", value, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioLessThanOrEqualTo(Integer value) {
|
||||||
|
addCriterion("commission_ratio <=", value, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioIn(List<Integer> values) {
|
||||||
|
addCriterion("commission_ratio in", values, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioNotIn(List<Integer> values) {
|
||||||
|
addCriterion("commission_ratio not in", values, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioBetween(Integer value1, Integer value2) {
|
||||||
|
addCriterion("commission_ratio between", value1, value2, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioNotBetween(Integer value1, Integer value2) {
|
||||||
|
addCriterion("commission_ratio not between", value1, value2, "commissionRatio");
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||||
|
addCriterion("create_time <>", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||||
|
addCriterion("create_time >", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("create_time >=", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeLessThan(Date value) {
|
||||||
|
addCriterion("create_time <", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("create_time <=", value, "createTime");
|
||||||
|
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 static class Criteria extends GeneratedCriteria {
|
||||||
|
|
||||||
|
protected Criteria() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,10 +5,13 @@ import java.io.Serializable;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
public class UmsMemberLevel implements Serializable {
|
public class UmsMemberLevel implements Serializable {
|
||||||
|
@ApiModelProperty(value = "主键id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "会员名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "会员等级升级点")
|
||||||
private Integer growthPoint;
|
private Integer growthPoint;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否为默认等级:0->不是;1->是")
|
@ApiModelProperty(value = "是否为默认等级:0->不是;1->是")
|
||||||
@@ -38,8 +41,12 @@ public class UmsMemberLevel implements Serializable {
|
|||||||
@ApiModelProperty(value = "是否有生日特权")
|
@ApiModelProperty(value = "是否有生日特权")
|
||||||
private Integer priviledgeBirthday;
|
private Integer priviledgeBirthday;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "注释")
|
||||||
private String note;
|
private String note;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "提成比例")
|
||||||
|
private Integer commissionRatio;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
@@ -146,6 +153,14 @@ public class UmsMemberLevel implements Serializable {
|
|||||||
this.note = note;
|
this.note = note;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getCommissionRatio() {
|
||||||
|
return commissionRatio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCommissionRatio(Integer commissionRatio) {
|
||||||
|
this.commissionRatio = commissionRatio;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
@@ -165,6 +180,7 @@ public class UmsMemberLevel implements Serializable {
|
|||||||
sb.append(", priviledgeMemberPrice=").append(priviledgeMemberPrice);
|
sb.append(", priviledgeMemberPrice=").append(priviledgeMemberPrice);
|
||||||
sb.append(", priviledgeBirthday=").append(priviledgeBirthday);
|
sb.append(", priviledgeBirthday=").append(priviledgeBirthday);
|
||||||
sb.append(", note=").append(note);
|
sb.append(", note=").append(note);
|
||||||
|
sb.append(", commissionRatio=").append(commissionRatio);
|
||||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||||
sb.append("]");
|
sb.append("]");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|||||||
@@ -904,6 +904,66 @@ public class UmsMemberLevelExample {
|
|||||||
addCriterion("note not between", value1, value2, "note");
|
addCriterion("note not between", value1, value2, "note");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioIsNull() {
|
||||||
|
addCriterion("commission_ratio is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioIsNotNull() {
|
||||||
|
addCriterion("commission_ratio is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioEqualTo(Integer value) {
|
||||||
|
addCriterion("commission_ratio =", value, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioNotEqualTo(Integer value) {
|
||||||
|
addCriterion("commission_ratio <>", value, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioGreaterThan(Integer value) {
|
||||||
|
addCriterion("commission_ratio >", value, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioGreaterThanOrEqualTo(Integer value) {
|
||||||
|
addCriterion("commission_ratio >=", value, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioLessThan(Integer value) {
|
||||||
|
addCriterion("commission_ratio <", value, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioLessThanOrEqualTo(Integer value) {
|
||||||
|
addCriterion("commission_ratio <=", value, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioIn(List<Integer> values) {
|
||||||
|
addCriterion("commission_ratio in", values, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioNotIn(List<Integer> values) {
|
||||||
|
addCriterion("commission_ratio not in", values, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioBetween(Integer value1, Integer value2) {
|
||||||
|
addCriterion("commission_ratio between", value1, value2, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCommissionRatioNotBetween(Integer value1, Integer value2) {
|
||||||
|
addCriterion("commission_ratio not between", value1, value2, "commissionRatio");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Criteria extends GeneratedCriteria {
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
package com.buy507.mall.model;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class UmsMemberRelationTree implements Serializable {
|
||||||
|
@ApiModelProperty(value = "主键id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "会员id")
|
||||||
|
private Long memberId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "上级会员id")
|
||||||
|
private Integer higherLevelId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "0 未退出,1 退出队列")
|
||||||
|
private Integer quitQueueMark;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getMemberId() {
|
||||||
|
return memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberId(Long memberId) {
|
||||||
|
this.memberId = memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getHigherLevelId() {
|
||||||
|
return higherLevelId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHigherLevelId(Integer higherLevelId) {
|
||||||
|
this.higherLevelId = higherLevelId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getQuitQueueMark() {
|
||||||
|
return quitQueueMark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuitQueueMark(Integer quitQueueMark) {
|
||||||
|
this.quitQueueMark = quitQueueMark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@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(", memberId=").append(memberId);
|
||||||
|
sb.append(", higherLevelId=").append(higherLevelId);
|
||||||
|
sb.append(", quitQueueMark=").append(quitQueueMark);
|
||||||
|
sb.append(", createTime=").append(createTime);
|
||||||
|
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||||
|
sb.append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,501 @@
|
|||||||
|
package com.buy507.mall.model;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class UmsMemberRelationTreeExample {
|
||||||
|
protected String orderByClause;
|
||||||
|
|
||||||
|
protected boolean distinct;
|
||||||
|
|
||||||
|
protected List<Criteria> oredCriteria;
|
||||||
|
|
||||||
|
public UmsMemberRelationTreeExample() {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria createCriteria() {
|
||||||
|
Criteria criteria = createCriteriaInternal();
|
||||||
|
if (oredCriteria.size() == 0) {
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
}
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criteria createCriteriaInternal() {
|
||||||
|
Criteria criteria = new Criteria();
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
oredCriteria.clear();
|
||||||
|
orderByClause = null;
|
||||||
|
distinct = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("id <>", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdGreaterThan(Long value) {
|
||||||
|
addCriterion("id >", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("id >=", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdLessThan(Long value) {
|
||||||
|
addCriterion("id <", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("id <=", value, "id");
|
||||||
|
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 andMemberIdIsNull() {
|
||||||
|
addCriterion("member_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdIsNotNull() {
|
||||||
|
addCriterion("member_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdEqualTo(Long value) {
|
||||||
|
addCriterion("member_id =", value, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("member_id <>", value, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdGreaterThan(Long value) {
|
||||||
|
addCriterion("member_id >", value, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("member_id >=", value, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdLessThan(Long value) {
|
||||||
|
addCriterion("member_id <", value, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("member_id <=", value, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdIn(List<Long> values) {
|
||||||
|
addCriterion("member_id in", values, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("member_id not in", values, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("member_id between", value1, value2, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMemberIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("member_id not between", value1, value2, "memberId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHigherLevelIdIsNull() {
|
||||||
|
addCriterion("higher_level_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHigherLevelIdIsNotNull() {
|
||||||
|
addCriterion("higher_level_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHigherLevelIdEqualTo(Integer value) {
|
||||||
|
addCriterion("higher_level_id =", value, "higherLevelId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHigherLevelIdNotEqualTo(Integer value) {
|
||||||
|
addCriterion("higher_level_id <>", value, "higherLevelId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHigherLevelIdGreaterThan(Integer value) {
|
||||||
|
addCriterion("higher_level_id >", value, "higherLevelId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHigherLevelIdGreaterThanOrEqualTo(Integer value) {
|
||||||
|
addCriterion("higher_level_id >=", value, "higherLevelId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHigherLevelIdLessThan(Integer value) {
|
||||||
|
addCriterion("higher_level_id <", value, "higherLevelId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHigherLevelIdLessThanOrEqualTo(Integer value) {
|
||||||
|
addCriterion("higher_level_id <=", value, "higherLevelId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHigherLevelIdIn(List<Integer> values) {
|
||||||
|
addCriterion("higher_level_id in", values, "higherLevelId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHigherLevelIdNotIn(List<Integer> values) {
|
||||||
|
addCriterion("higher_level_id not in", values, "higherLevelId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHigherLevelIdBetween(Integer value1, Integer value2) {
|
||||||
|
addCriterion("higher_level_id between", value1, value2, "higherLevelId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andHigherLevelIdNotBetween(Integer value1, Integer value2) {
|
||||||
|
addCriterion("higher_level_id not between", value1, value2, "higherLevelId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andQuitQueueMarkIsNull() {
|
||||||
|
addCriterion("quit_queue_mark is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andQuitQueueMarkIsNotNull() {
|
||||||
|
addCriterion("quit_queue_mark is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andQuitQueueMarkEqualTo(Integer value) {
|
||||||
|
addCriterion("quit_queue_mark =", value, "quitQueueMark");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andQuitQueueMarkNotEqualTo(Integer value) {
|
||||||
|
addCriterion("quit_queue_mark <>", value, "quitQueueMark");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andQuitQueueMarkGreaterThan(Integer value) {
|
||||||
|
addCriterion("quit_queue_mark >", value, "quitQueueMark");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andQuitQueueMarkGreaterThanOrEqualTo(Integer value) {
|
||||||
|
addCriterion("quit_queue_mark >=", value, "quitQueueMark");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andQuitQueueMarkLessThan(Integer value) {
|
||||||
|
addCriterion("quit_queue_mark <", value, "quitQueueMark");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andQuitQueueMarkLessThanOrEqualTo(Integer value) {
|
||||||
|
addCriterion("quit_queue_mark <=", value, "quitQueueMark");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andQuitQueueMarkIn(List<Integer> values) {
|
||||||
|
addCriterion("quit_queue_mark in", values, "quitQueueMark");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andQuitQueueMarkNotIn(List<Integer> values) {
|
||||||
|
addCriterion("quit_queue_mark not in", values, "quitQueueMark");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andQuitQueueMarkBetween(Integer value1, Integer value2) {
|
||||||
|
addCriterion("quit_queue_mark between", value1, value2, "quitQueueMark");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andQuitQueueMarkNotBetween(Integer value1, Integer value2) {
|
||||||
|
addCriterion("quit_queue_mark not between", value1, value2, "quitQueueMark");
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||||
|
addCriterion("create_time <>", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||||
|
addCriterion("create_time >", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("create_time >=", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeLessThan(Date value) {
|
||||||
|
addCriterion("create_time <", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("create_time <=", value, "createTime");
|
||||||
|
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 static class Criteria extends GeneratedCriteria {
|
||||||
|
|
||||||
|
protected Criteria() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,243 @@
|
|||||||
|
<?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.buy507.mall.model.CmsTopic.UmsMemberAccountTransactionMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.buy507.mall.model.UmsMemberAccountTransaction">
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="member_id" jdbcType="BIGINT" property="memberId" />
|
||||||
|
<result column="order_id" jdbcType="BIGINT" property="orderId" />
|
||||||
|
<result column="revenue_amount" jdbcType="DECIMAL" property="revenueAmount" />
|
||||||
|
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||||
|
<result column="commission_ratio" jdbcType="INTEGER" property="commissionRatio" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
</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, member_id, order_id, revenue_amount, remarks, commission_ratio, create_time
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExample" parameterType="com.buy507.mall.model.UmsMemberAccountTransactionExample" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from ums_member_account_transaction
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from ums_member_account_transaction
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||||
|
delete from ums_member_account_transaction
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="com.buy507.mall.model.UmsMemberAccountTransactionExample">
|
||||||
|
delete from ums_member_account_transaction
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" parameterType="com.buy507.mall.model.UmsMemberAccountTransaction">
|
||||||
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
|
insert into ums_member_account_transaction (member_id, order_id, revenue_amount,
|
||||||
|
remarks, commission_ratio, create_time
|
||||||
|
)
|
||||||
|
values (#{memberId,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT}, #{revenueAmount,jdbcType=DECIMAL},
|
||||||
|
#{remarks,jdbcType=VARCHAR}, #{commissionRatio,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="com.buy507.mall.model.UmsMemberAccountTransaction">
|
||||||
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
|
insert into ums_member_account_transaction
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="memberId != null">
|
||||||
|
member_id,
|
||||||
|
</if>
|
||||||
|
<if test="orderId != null">
|
||||||
|
order_id,
|
||||||
|
</if>
|
||||||
|
<if test="revenueAmount != null">
|
||||||
|
revenue_amount,
|
||||||
|
</if>
|
||||||
|
<if test="remarks != null">
|
||||||
|
remarks,
|
||||||
|
</if>
|
||||||
|
<if test="commissionRatio != null">
|
||||||
|
commission_ratio,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="memberId != null">
|
||||||
|
#{memberId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="orderId != null">
|
||||||
|
#{orderId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="revenueAmount != null">
|
||||||
|
#{revenueAmount,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="remarks != null">
|
||||||
|
#{remarks,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="commissionRatio != null">
|
||||||
|
#{commissionRatio,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<select id="countByExample" parameterType="com.buy507.mall.model.UmsMemberAccountTransactionExample" resultType="java.lang.Long">
|
||||||
|
select count(*) from ums_member_account_transaction
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
|
update ums_member_account_transaction
|
||||||
|
<set>
|
||||||
|
<if test="record.id != null">
|
||||||
|
id = #{record.id,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.memberId != null">
|
||||||
|
member_id = #{record.memberId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.orderId != null">
|
||||||
|
order_id = #{record.orderId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.revenueAmount != null">
|
||||||
|
revenue_amount = #{record.revenueAmount,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="record.remarks != null">
|
||||||
|
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.commissionRatio != null">
|
||||||
|
commission_ratio = #{record.commissionRatio,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="record.createTime != null">
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update ums_member_account_transaction
|
||||||
|
set id = #{record.id,jdbcType=BIGINT},
|
||||||
|
member_id = #{record.memberId,jdbcType=BIGINT},
|
||||||
|
order_id = #{record.orderId,jdbcType=BIGINT},
|
||||||
|
revenue_amount = #{record.revenueAmount,jdbcType=DECIMAL},
|
||||||
|
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||||
|
commission_ratio = #{record.commissionRatio,jdbcType=INTEGER},
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.buy507.mall.model.UmsMemberAccountTransaction">
|
||||||
|
update ums_member_account_transaction
|
||||||
|
<set>
|
||||||
|
<if test="memberId != null">
|
||||||
|
member_id = #{memberId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="orderId != null">
|
||||||
|
order_id = #{orderId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="revenueAmount != null">
|
||||||
|
revenue_amount = #{revenueAmount,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="remarks != null">
|
||||||
|
remarks = #{remarks,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="commissionRatio != null">
|
||||||
|
commission_ratio = #{commissionRatio,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.buy507.mall.model.UmsMemberAccountTransaction">
|
||||||
|
update ums_member_account_transaction
|
||||||
|
set member_id = #{memberId,jdbcType=BIGINT},
|
||||||
|
order_id = #{orderId,jdbcType=BIGINT},
|
||||||
|
revenue_amount = #{revenueAmount,jdbcType=DECIMAL},
|
||||||
|
remarks = #{remarks,jdbcType=VARCHAR},
|
||||||
|
commission_ratio = #{commissionRatio,jdbcType=INTEGER},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
<result column="priviledge_member_price" jdbcType="INTEGER" property="priviledgeMemberPrice" />
|
<result column="priviledge_member_price" jdbcType="INTEGER" property="priviledgeMemberPrice" />
|
||||||
<result column="priviledge_birthday" jdbcType="INTEGER" property="priviledgeBirthday" />
|
<result column="priviledge_birthday" jdbcType="INTEGER" property="priviledgeBirthday" />
|
||||||
<result column="note" jdbcType="VARCHAR" property="note" />
|
<result column="note" jdbcType="VARCHAR" property="note" />
|
||||||
|
<result column="commission_ratio" jdbcType="INTEGER" property="commissionRatio" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<where>
|
<where>
|
||||||
@@ -77,7 +78,7 @@
|
|||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, name, growth_point, default_status, free_freight_point, comment_growth_point,
|
id, name, growth_point, default_status, free_freight_point, comment_growth_point,
|
||||||
priviledge_free_freight, priviledge_sign_in, priviledge_comment, priviledge_promotion,
|
priviledge_free_freight, priviledge_sign_in, priviledge_comment, priviledge_promotion,
|
||||||
priviledge_member_price, priviledge_birthday, note
|
priviledge_member_price, priviledge_birthday, note, commission_ratio
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="com.buy507.mall.model.UmsMemberLevelExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="com.buy507.mall.model.UmsMemberLevelExample" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
@@ -117,12 +118,12 @@
|
|||||||
free_freight_point, comment_growth_point, priviledge_free_freight,
|
free_freight_point, comment_growth_point, priviledge_free_freight,
|
||||||
priviledge_sign_in, priviledge_comment, priviledge_promotion,
|
priviledge_sign_in, priviledge_comment, priviledge_promotion,
|
||||||
priviledge_member_price, priviledge_birthday,
|
priviledge_member_price, priviledge_birthday,
|
||||||
note)
|
note, commission_ratio)
|
||||||
values (#{name,jdbcType=VARCHAR}, #{growthPoint,jdbcType=INTEGER}, #{defaultStatus,jdbcType=INTEGER},
|
values (#{name,jdbcType=VARCHAR}, #{growthPoint,jdbcType=INTEGER}, #{defaultStatus,jdbcType=INTEGER},
|
||||||
#{freeFreightPoint,jdbcType=DECIMAL}, #{commentGrowthPoint,jdbcType=INTEGER}, #{priviledgeFreeFreight,jdbcType=INTEGER},
|
#{freeFreightPoint,jdbcType=DECIMAL}, #{commentGrowthPoint,jdbcType=INTEGER}, #{priviledgeFreeFreight,jdbcType=INTEGER},
|
||||||
#{priviledgeSignIn,jdbcType=INTEGER}, #{priviledgeComment,jdbcType=INTEGER}, #{priviledgePromotion,jdbcType=INTEGER},
|
#{priviledgeSignIn,jdbcType=INTEGER}, #{priviledgeComment,jdbcType=INTEGER}, #{priviledgePromotion,jdbcType=INTEGER},
|
||||||
#{priviledgeMemberPrice,jdbcType=INTEGER}, #{priviledgeBirthday,jdbcType=INTEGER},
|
#{priviledgeMemberPrice,jdbcType=INTEGER}, #{priviledgeBirthday,jdbcType=INTEGER},
|
||||||
#{note,jdbcType=VARCHAR})
|
#{note,jdbcType=VARCHAR}, #{commissionRatio,jdbcType=INTEGER})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="com.buy507.mall.model.UmsMemberLevel">
|
<insert id="insertSelective" parameterType="com.buy507.mall.model.UmsMemberLevel">
|
||||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||||
@@ -166,6 +167,9 @@
|
|||||||
<if test="note != null">
|
<if test="note != null">
|
||||||
note,
|
note,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="commissionRatio != null">
|
||||||
|
commission_ratio,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="name != null">
|
<if test="name != null">
|
||||||
@@ -204,6 +208,9 @@
|
|||||||
<if test="note != null">
|
<if test="note != null">
|
||||||
#{note,jdbcType=VARCHAR},
|
#{note,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="commissionRatio != null">
|
||||||
|
#{commissionRatio,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="countByExample" parameterType="com.buy507.mall.model.UmsMemberLevelExample" resultType="java.lang.Long">
|
<select id="countByExample" parameterType="com.buy507.mall.model.UmsMemberLevelExample" resultType="java.lang.Long">
|
||||||
@@ -254,6 +261,9 @@
|
|||||||
<if test="record.note != null">
|
<if test="record.note != null">
|
||||||
note = #{record.note,jdbcType=VARCHAR},
|
note = #{record.note,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.commissionRatio != null">
|
||||||
|
commission_ratio = #{record.commissionRatio,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
@@ -273,7 +283,8 @@
|
|||||||
priviledge_promotion = #{record.priviledgePromotion,jdbcType=INTEGER},
|
priviledge_promotion = #{record.priviledgePromotion,jdbcType=INTEGER},
|
||||||
priviledge_member_price = #{record.priviledgeMemberPrice,jdbcType=INTEGER},
|
priviledge_member_price = #{record.priviledgeMemberPrice,jdbcType=INTEGER},
|
||||||
priviledge_birthday = #{record.priviledgeBirthday,jdbcType=INTEGER},
|
priviledge_birthday = #{record.priviledgeBirthday,jdbcType=INTEGER},
|
||||||
note = #{record.note,jdbcType=VARCHAR}
|
note = #{record.note,jdbcType=VARCHAR},
|
||||||
|
commission_ratio = #{record.commissionRatio,jdbcType=INTEGER}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
@@ -317,6 +328,9 @@
|
|||||||
<if test="note != null">
|
<if test="note != null">
|
||||||
note = #{note,jdbcType=VARCHAR},
|
note = #{note,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="commissionRatio != null">
|
||||||
|
commission_ratio = #{commissionRatio,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
@@ -333,7 +347,8 @@
|
|||||||
priviledge_promotion = #{priviledgePromotion,jdbcType=INTEGER},
|
priviledge_promotion = #{priviledgePromotion,jdbcType=INTEGER},
|
||||||
priviledge_member_price = #{priviledgeMemberPrice,jdbcType=INTEGER},
|
priviledge_member_price = #{priviledgeMemberPrice,jdbcType=INTEGER},
|
||||||
priviledge_birthday = #{priviledgeBirthday,jdbcType=INTEGER},
|
priviledge_birthday = #{priviledgeBirthday,jdbcType=INTEGER},
|
||||||
note = #{note,jdbcType=VARCHAR}
|
note = #{note,jdbcType=VARCHAR},
|
||||||
|
commission_ratio = #{commissionRatio,jdbcType=INTEGER}
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -0,0 +1,211 @@
|
|||||||
|
<?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.buy507.mall.model.CmsTopic.UmsMemberRelationTreeMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.buy507.mall.model.UmsMemberRelationTree">
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="member_id" jdbcType="BIGINT" property="memberId" />
|
||||||
|
<result column="higher_level_id" jdbcType="INTEGER" property="higherLevelId" />
|
||||||
|
<result column="quit_queue_mark" jdbcType="INTEGER" property="quitQueueMark" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
</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, member_id, higher_level_id, quit_queue_mark, create_time
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExample" parameterType="com.buy507.mall.model.UmsMemberRelationTreeExample" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from ums_member_relation_tree
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from ums_member_relation_tree
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||||
|
delete from ums_member_relation_tree
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="com.buy507.mall.model.UmsMemberRelationTreeExample">
|
||||||
|
delete from ums_member_relation_tree
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" parameterType="com.buy507.mall.model.UmsMemberRelationTree">
|
||||||
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
|
insert into ums_member_relation_tree (member_id, higher_level_id, quit_queue_mark,
|
||||||
|
create_time)
|
||||||
|
values (#{memberId,jdbcType=BIGINT}, #{higherLevelId,jdbcType=INTEGER}, #{quitQueueMark,jdbcType=INTEGER},
|
||||||
|
#{createTime,jdbcType=TIMESTAMP})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="com.buy507.mall.model.UmsMemberRelationTree">
|
||||||
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||||
|
SELECT LAST_INSERT_ID()
|
||||||
|
</selectKey>
|
||||||
|
insert into ums_member_relation_tree
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="memberId != null">
|
||||||
|
member_id,
|
||||||
|
</if>
|
||||||
|
<if test="higherLevelId != null">
|
||||||
|
higher_level_id,
|
||||||
|
</if>
|
||||||
|
<if test="quitQueueMark != null">
|
||||||
|
quit_queue_mark,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="memberId != null">
|
||||||
|
#{memberId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="higherLevelId != null">
|
||||||
|
#{higherLevelId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="quitQueueMark != null">
|
||||||
|
#{quitQueueMark,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<select id="countByExample" parameterType="com.buy507.mall.model.UmsMemberRelationTreeExample" resultType="java.lang.Long">
|
||||||
|
select count(*) from ums_member_relation_tree
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
|
update ums_member_relation_tree
|
||||||
|
<set>
|
||||||
|
<if test="record.id != null">
|
||||||
|
id = #{record.id,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.memberId != null">
|
||||||
|
member_id = #{record.memberId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.higherLevelId != null">
|
||||||
|
higher_level_id = #{record.higherLevelId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="record.quitQueueMark != null">
|
||||||
|
quit_queue_mark = #{record.quitQueueMark,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="record.createTime != null">
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update ums_member_relation_tree
|
||||||
|
set id = #{record.id,jdbcType=BIGINT},
|
||||||
|
member_id = #{record.memberId,jdbcType=BIGINT},
|
||||||
|
higher_level_id = #{record.higherLevelId,jdbcType=INTEGER},
|
||||||
|
quit_queue_mark = #{record.quitQueueMark,jdbcType=INTEGER},
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.buy507.mall.model.UmsMemberRelationTree">
|
||||||
|
update ums_member_relation_tree
|
||||||
|
<set>
|
||||||
|
<if test="memberId != null">
|
||||||
|
member_id = #{memberId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="higherLevelId != null">
|
||||||
|
higher_level_id = #{higherLevelId,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="quitQueueMark != null">
|
||||||
|
quit_queue_mark = #{quitQueueMark,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.buy507.mall.model.UmsMemberRelationTree">
|
||||||
|
update ums_member_relation_tree
|
||||||
|
set member_id = #{memberId,jdbcType=BIGINT},
|
||||||
|
higher_level_id = #{higherLevelId,jdbcType=INTEGER},
|
||||||
|
quit_queue_mark = #{quitQueueMark,jdbcType=INTEGER},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
@@ -2,6 +2,8 @@ package com.buy507.mall.portal.controller;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -166,13 +168,13 @@ public class OmsPortalOrderController {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付宝支付成功回调方法
|
* 支付宝支付回调方法
|
||||||
* @param request
|
* @param params
|
||||||
* @param response
|
|
||||||
*/
|
*/
|
||||||
|
@ApiOperation("支付宝支付回调")
|
||||||
@RequestMapping("/alipay/callback")
|
@RequestMapping("/alipay/callback")
|
||||||
public void alipayCallback(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
public void alipayCallback(@RequestParam Map<String, String> params) {
|
||||||
portalOrderService.wxPayCallback(request, response);
|
portalOrderService.alipayCallback(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ public interface OmsPortalOrderService {
|
|||||||
CommonResult<Map<String, String>> wxPrePay(Long orderId);
|
CommonResult<Map<String, String>> wxPrePay(Long orderId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付宝预支付
|
* 支付宝跳转
|
||||||
* @param orderId
|
* @param orderId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -101,5 +101,10 @@ public interface OmsPortalOrderService {
|
|||||||
* @param response
|
* @param response
|
||||||
*/
|
*/
|
||||||
void wxPayCallback(HttpServletRequest request, HttpServletResponse response) throws Exception;
|
void wxPayCallback(HttpServletRequest request, HttpServletResponse response) throws Exception;
|
||||||
|
/**
|
||||||
|
* 支付宝支付成功回调方法
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
*/
|
||||||
|
void alipayCallback(Map<String, String> params);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,16 +6,18 @@ import java.math.BigDecimal;
|
|||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSON;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.alipay.api.AlipayApiException;
|
||||||
|
import com.alipay.api.AlipayConfig;
|
||||||
|
import com.alipay.api.internal.util.AlipaySignature;
|
||||||
|
import com.buy507.mall.model.*;
|
||||||
import com.buy507.mall.portal.domain.*;
|
import com.buy507.mall.portal.domain.*;
|
||||||
import com.buy507.mall.portal.service.*;
|
import com.buy507.mall.portal.service.*;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -46,23 +48,6 @@ import com.buy507.mall.mapper.PmsProductMapper;
|
|||||||
import com.buy507.mall.mapper.PmsSkuStockMapper;
|
import com.buy507.mall.mapper.PmsSkuStockMapper;
|
||||||
import com.buy507.mall.mapper.UmsMemberMapper;
|
import com.buy507.mall.mapper.UmsMemberMapper;
|
||||||
import com.buy507.mall.mapper.UmsMemberReceiveAddressMapper;
|
import com.buy507.mall.mapper.UmsMemberReceiveAddressMapper;
|
||||||
import com.buy507.mall.model.DmsMemberTradeRecord;
|
|
||||||
import com.buy507.mall.model.DmsOfflinePaymentRecord;
|
|
||||||
import com.buy507.mall.model.DmsSellerBankAccount;
|
|
||||||
import com.buy507.mall.model.ItemType;
|
|
||||||
import com.buy507.mall.model.OmsCartItem;
|
|
||||||
import com.buy507.mall.model.OmsCartItemExample;
|
|
||||||
import com.buy507.mall.model.OmsExpressCompany;
|
|
||||||
import com.buy507.mall.model.OmsOrder;
|
|
||||||
import com.buy507.mall.model.OmsOrderExample;
|
|
||||||
import com.buy507.mall.model.OmsOrderItem;
|
|
||||||
import com.buy507.mall.model.OmsOrderItemExample;
|
|
||||||
import com.buy507.mall.model.OmsOrderOperateHistory;
|
|
||||||
import com.buy507.mall.model.OmsOrderSetting;
|
|
||||||
import com.buy507.mall.model.PmsProduct;
|
|
||||||
import com.buy507.mall.model.PmsSkuStock;
|
|
||||||
import com.buy507.mall.model.UmsMember;
|
|
||||||
import com.buy507.mall.model.UmsMemberReceiveAddress;
|
|
||||||
import com.buy507.mall.portal.component.CancelOrderSender;
|
import com.buy507.mall.portal.component.CancelOrderSender;
|
||||||
import com.buy507.mall.portal.component.DistributeSender;
|
import com.buy507.mall.portal.component.DistributeSender;
|
||||||
import com.buy507.mall.portal.component.RedisLock;
|
import com.buy507.mall.portal.component.RedisLock;
|
||||||
@@ -1267,7 +1252,7 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
|
|||||||
long time = System.currentTimeMillis() + RedisLock.TIMEOUT;
|
long time = System.currentTimeMillis() + RedisLock.TIMEOUT;
|
||||||
if(redisLock.lock(String.valueOf(member.getId()), String.valueOf(time))) {
|
if(redisLock.lock(String.valueOf(member.getId()), String.valueOf(time))) {
|
||||||
member = memberMapper.selectByPrimaryKey(member.getId());
|
member = memberMapper.selectByPrimaryKey(member.getId());
|
||||||
member.setFreeze(member.getFreeze().subtract(order.getIntegrationAmount())); //修改冻结金额
|
member.setFreeze(member.getFreeze().add(order.getIntegrationAmount())); //修改冻结金额,增加冻结资金
|
||||||
memberMapper.updateByPrimaryKey(member);
|
memberMapper.updateByPrimaryKey(member);
|
||||||
redisLock.unlock(String.valueOf(member.getId()), String.valueOf(time));
|
redisLock.unlock(String.valueOf(member.getId()), String.valueOf(time));
|
||||||
break;
|
break;
|
||||||
@@ -1521,50 +1506,51 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
|
|||||||
OmsOrder order = list.get(0);
|
OmsOrder order = list.get(0);
|
||||||
//订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单
|
//订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单
|
||||||
if(order != null && order.getStatus() == 0) {
|
if(order != null && order.getStatus() == 0) {
|
||||||
Date date = new Date();
|
|
||||||
//提货方式:0->自提;1->物流
|
Date date = new Date();
|
||||||
if(order.getDeliveryType() == 0) {
|
//提货方式:0->自提;1->物流
|
||||||
order.setStatus(2); //已发货
|
if(order.getDeliveryType() == 0) {
|
||||||
} else {
|
order.setStatus(2); //已发货
|
||||||
order.setStatus(1); //待发货
|
} else {
|
||||||
}
|
order.setStatus(1); //待发货
|
||||||
//支付方式:0->未支付;1->支付宝;2->微信;3->线下支付
|
}
|
||||||
order.setPayType(2); //微信
|
//支付方式:0->未支付;1->支付宝;2->微信;3->线下支付
|
||||||
order.setModifyTime(date);
|
order.setPayType(2); //微信
|
||||||
order.setPaymentTime(date);
|
order.setModifyTime(date);
|
||||||
orderMapper.updateByPrimaryKey(order);
|
order.setPaymentTime(date);
|
||||||
|
orderMapper.updateByPrimaryKey(order);
|
||||||
BigDecimal zero = new BigDecimal(0);
|
|
||||||
int flag = order.getIntegrationAmount().compareTo(zero);
|
BigDecimal zero = new BigDecimal(0);
|
||||||
UmsMember member = memberMapper.selectByPrimaryKey(order.getMemberId());
|
int flag = order.getIntegrationAmount().compareTo(zero);
|
||||||
|
UmsMember member = memberMapper.selectByPrimaryKey(order.getMemberId());
|
||||||
//flag = -1,表示IntegrationAmount小于zero;flag = 0,表示IntegrationAmount等于zero;flag = 1,表示IntegrationAmount大于zero;
|
|
||||||
if(flag == 1) {
|
//flag = -1,表示IntegrationAmount小于zero;flag = 0,表示IntegrationAmount等于zero;flag = 1,表示IntegrationAmount大于zero;
|
||||||
|
if(flag == 1) {
|
||||||
//写入会员交易记录表
|
|
||||||
DmsMemberTradeRecord tradeRecord = new DmsMemberTradeRecord();
|
//写入会员交易记录表
|
||||||
tradeRecord.setMemberId(member.getId());
|
DmsMemberTradeRecord tradeRecord = new DmsMemberTradeRecord();
|
||||||
tradeRecord.setItemType(ItemType.IntegralShopping); //积分购物
|
tradeRecord.setMemberId(member.getId());
|
||||||
tradeRecord.setNote("积分抵扣");
|
tradeRecord.setItemType(ItemType.IntegralShopping); //积分购物
|
||||||
tradeRecord.setTitle("积分抵扣");
|
tradeRecord.setNote("积分抵扣");
|
||||||
tradeRecord.setValue(order.getIntegrationAmount());
|
tradeRecord.setTitle("积分抵扣");
|
||||||
tradeRecord.setType(1); //收支类型:0->收入;1->支出
|
tradeRecord.setValue(order.getIntegrationAmount());
|
||||||
tradeRecord.setCreateTime(date);
|
tradeRecord.setType(1); //收支类型:0->收入;1->支出
|
||||||
memberTradeRecordMapper.insert(tradeRecord);
|
tradeRecord.setCreateTime(date);
|
||||||
|
memberTradeRecordMapper.insert(tradeRecord);
|
||||||
while(true) {
|
|
||||||
long time = System.currentTimeMillis() + RedisLock.TIMEOUT;
|
while(true) {
|
||||||
if(redisLock.lock(String.valueOf(member.getId()), String.valueOf(time))) {
|
long time = System.currentTimeMillis() + RedisLock.TIMEOUT;
|
||||||
member = memberMapper.selectByPrimaryKey(member.getId());
|
if(redisLock.lock(String.valueOf(member.getId()), String.valueOf(time))) {
|
||||||
member.setFreeze(member.getFreeze().subtract(order.getIntegrationAmount())); //修改冻结值
|
member = memberMapper.selectByPrimaryKey(member.getId());
|
||||||
memberMapper.updateByPrimaryKey(member);
|
member.setFreeze(member.getFreeze().subtract(order.getIntegrationAmount())); //修改冻结值
|
||||||
redisLock.unlock(String.valueOf(member.getId()), String.valueOf(time));
|
memberMapper.updateByPrimaryKey(member);
|
||||||
break;
|
redisLock.unlock(String.valueOf(member.getId()), String.valueOf(time));
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
//修改商品库存信息需要加锁,影响前台响应,所以用线程来处理
|
//修改商品库存信息需要加锁,影响前台响应,所以用线程来处理
|
||||||
executorService.execute(new Runnable() {
|
executorService.execute(new Runnable() {
|
||||||
|
|
||||||
@@ -1644,4 +1630,98 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Value("${alipay.alipayPublicKey}")
|
||||||
|
private String alipayPublicKey;
|
||||||
|
|
||||||
|
@Value("${alipay.charset}")
|
||||||
|
private String charset;
|
||||||
|
|
||||||
|
@Value("${alipay.signType}")
|
||||||
|
private String signType;
|
||||||
|
|
||||||
|
@Value("${becomeVipAmount}")
|
||||||
|
private String becomeVipAmount;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void alipayCallback(Map<String, String> params) {
|
||||||
|
LOGGER.info("============开始处理支付宝的支付异步通知 接收到参数 {}", JSONUtil.toJsonStr(params));
|
||||||
|
// 验证签名
|
||||||
|
boolean verifyResult;
|
||||||
|
try {
|
||||||
|
verifyResult = AlipaySignature.rsaCheckV1(params, alipayPublicKey, charset, signType);
|
||||||
|
|
||||||
|
if (verifyResult) {
|
||||||
|
// 签名验证通过
|
||||||
|
String tradeStatus = params.get("trade_status");
|
||||||
|
String outTradeNo = params.get("out_trade_no");
|
||||||
|
if ("TRADE_SUCCESS".equals(tradeStatus) || "TRADE_FINISHED".equals(tradeStatus)) {
|
||||||
|
// 处理支付成功的业务逻辑
|
||||||
|
OmsOrderExample example = new OmsOrderExample();
|
||||||
|
example.createCriteria().andOrderSnEqualTo(outTradeNo);
|
||||||
|
List<OmsOrder> list = orderMapper.selectByExample(example);
|
||||||
|
if(list != null && list.size() > 0) {
|
||||||
|
OmsOrder order = list.get(0);
|
||||||
|
//订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单
|
||||||
|
if (order != null && order.getStatus() == 0) {
|
||||||
|
// 更新订单状态
|
||||||
|
this.updateOderAndMemberInfo(order);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (AlipayApiException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateOderAndMemberInfo(OmsOrder order) {
|
||||||
|
|
||||||
|
Date date = new Date();
|
||||||
|
//提货方式:0->自提;1->物流
|
||||||
|
if(order.getDeliveryType() == 0) {
|
||||||
|
order.setStatus(2); //已发货
|
||||||
|
} else {
|
||||||
|
order.setStatus(1); //待发货
|
||||||
|
}
|
||||||
|
//支付方式:0->未支付;1->支付宝;2->微信;3->线下支付
|
||||||
|
order.setPayType(1);
|
||||||
|
order.setModifyTime(date);
|
||||||
|
order.setPaymentTime(date);
|
||||||
|
orderMapper.updateByPrimaryKey(order);
|
||||||
|
|
||||||
|
//新增用户位普通用户,订单支付成功后满一定金额,成为vip普通会员
|
||||||
|
|
||||||
|
UmsMember member = memberMapper.selectByPrimaryKey(order.getMemberId());
|
||||||
|
//普通用户
|
||||||
|
if(member.getMemberLevel().equals(MemberLevel.Member) ){
|
||||||
|
/**
|
||||||
|
* 当前订单金额 大于等于 vip门槛金额
|
||||||
|
*/
|
||||||
|
if(order.getPayAmount().compareTo(new BigDecimal(becomeVipAmount)) >= 0 ){
|
||||||
|
member.setMemberLevel(MemberLevel.Consumer);
|
||||||
|
memberMapper.updateByPrimaryKey(member);
|
||||||
|
}
|
||||||
|
// else {
|
||||||
|
// /**
|
||||||
|
// * 订单统计累计
|
||||||
|
// */
|
||||||
|
// OmsOrderExample example = new OmsOrderExample();
|
||||||
|
// example.createCriteria().andMemberIdEqualTo(order.getMemberId()).andStatusEqualTo(3);
|
||||||
|
// List<OmsOrder> list = orderMapper.selectByExample(example);
|
||||||
|
// if(list != null && !list.isEmpty()){
|
||||||
|
// BigDecimal totalAmount = list.stream().map(OmsOrder::getPayAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
// totalAmount = totalAmount.add(order.getPayAmount());
|
||||||
|
// if(totalAmount.compareTo(vipAmount) >= 0 ){
|
||||||
|
// member.setMemberLevel(MemberLevel.Partner);
|
||||||
|
// memberMapper.updateByPrimaryKey(member);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user