Commit 1b65b5ac by huluobin

order pay

parent 4c480d01
...@@ -213,7 +213,9 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme ...@@ -213,7 +213,9 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
OrderManage orderManage = orderManageMapper.selectById(orderId); OrderManage orderManage = orderManageMapper.selectById(orderId);
List<OrderServe> orderServeList = orderServeMapper.selectList(new LambdaQueryWrapper<OrderServe>().eq(OrderServe::getOrderId, orderId)); List<OrderServe> orderServeList = orderServeMapper.selectList(new LambdaQueryWrapper<OrderServe>().eq(OrderServe::getOrderId, orderId));
return couponMapper return couponMapper
.selectList(new LambdaQueryWrapper<Coupon>().eq(Coupon::getSourceType, 1)) .selectList(new LambdaQueryWrapper<Coupon>()
.eq(Coupon::getSourceType, 1)
.eq(Coupon::getState, 1))
.stream() .stream()
//过滤所有可用在服务上的 //过滤所有可用在服务上的
.filter(coupon -> { .filter(coupon -> {
......
...@@ -8,7 +8,6 @@ import com.fasterxml.jackson.annotation.JsonFormat; ...@@ -8,7 +8,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
...@@ -21,56 +20,76 @@ public class Coupon { ...@@ -21,56 +20,76 @@ public class Coupon {
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
@ApiModelProperty("券名称")
private String name; private String name;
@ApiModelProperty("优惠金额")
private BigDecimal discountAmount; private BigDecimal discountAmount;
@ApiModelProperty("满这个金额才能减")
private BigDecimal reachingAmount; private BigDecimal reachingAmount;
@ApiModelProperty("优惠折扣")
private BigDecimal discountPercent; private BigDecimal discountPercent;
@ApiModelProperty("优惠券类型:1.现金抵扣券;2.免单券;3满减券;4卸甲券;5 = 折扣券")
private Integer type; private Integer type;
@ApiModelProperty("使用条件:1.重叠使用")
private String condition1; private String condition1;
@ApiModelProperty("优惠券说明")
private String note; private String note;
@ApiModelProperty("有效期类型:1.开始和结束时间;2.有效天数")
private Integer validType; private Integer validType;
@ApiModelProperty("有效天数")
private Integer validDate; private Integer validDate;
@ApiModelProperty("0 = 内部券 1 = 外部券")
private Integer sourceType; private Integer sourceType;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("有效期,开始时间")
private Date validStartTime; private Date validStartTime;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("有效期,截止时间")
private Date validEndTime; private Date validEndTime;
@ApiModelProperty("总数量")
private Integer allQuantity; private Integer allQuantity;
@ApiModelProperty("发放数量")
private Integer receiveQuantity; private Integer receiveQuantity;
@ApiModelProperty("使用次数")
private Integer useQuantity; private Integer useQuantity;
@ApiModelProperty("每人最多领取次数")
private Integer limitQuantity; private Integer limitQuantity;
@ApiModelProperty("状态:1.启用;2.停止")
private Integer state; private Integer state;
@ApiModelProperty("最近更新时间,用于排序")
private Date updateTime; private Date updateTime;
@ApiModelProperty("备注")
private String remark; private String remark;
@ApiModelProperty("客户购买该券时,实际支付的金额(用该金额算业绩)")
private BigDecimal payAmount; private BigDecimal payAmount;
@ApiModelProperty("7:大众点评收款,10:免单(外部券购买时钱去到哪里了和customer_balance_record表的source字段保持一致)")
private String paySource; private String paySource;
@ApiModelProperty("1-计算 2-不计算") @ApiModelProperty("是否计算业绩 1-计算 2-不计算")
private Integer isCalcAchievement; private Integer isCalcAchievement;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty("是否可以使用")
private Boolean canBeUse; private Boolean canBeUse;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment