Commit 0dd7e9df by huluobin

update

parent 9835b5fa
......@@ -249,17 +249,18 @@ public class ChargeOrderServiceImpl extends ServiceImpl<ChargeOrderMapper, Charg
//折扣信息
DiscountConfig discountConfig = discountConfigService.selectByCharge((int) (amount * 100));
//会员卡
CustomerBalance customerBalance = customerBalanceMapper.selectOne(new LambdaQueryWrapper<CustomerBalance>()
.eq(CustomerBalance::getCustomerId, customer.getId()));
//充值类型
int type;
if (customerBalance == null) {
type = 2;
} else if (customerBalance.getBalance() == 0 && customerBalanceRecordMapper.selectCount(
new LambdaQueryWrapper<CustomerBalanceRecord>().eq(CustomerBalanceRecord::getCustomerId, customer.getId())
.in(CustomerBalanceRecord::getType, Lists.newArrayList(CustomerBalanceRecord.TYPE_CHARGE, CustomerBalanceRecord.TYPE_FIRST_CHARGE))
) == 0) {
.in(CustomerBalanceRecord::getType, Lists.newArrayList(CustomerBalanceRecord.TYPE_CHARGE, CustomerBalanceRecord.TYPE_FIRST_CHARGE))) == 0) {
type = 2;
} else {
type = 1;
......
......@@ -35,27 +35,39 @@ public class MallOrder {
public static final Integer CLOSE_OVERTIME = 1;
public static final Integer CLOSE_REFUND = 2;
public static final Integer CLOSE_CUSTOMER_CANCEL = 3;
@TableId(type = IdType.ID_WORKER)
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
@ApiModelProperty("顾客id")
private Integer customerId;
@ApiModelProperty("交易方式 1-线上交易")
private Integer transactionType;
@ApiModelProperty("下单时间")
private Long orderTime;
@ApiModelProperty("支付时间")
private Long paymentTime;
@ApiModelProperty("订单总金额")
private BigDecimal totalAmount;
@ApiModelProperty("运费")
private BigDecimal freight;
@ApiModelProperty("总优惠金额")
private BigDecimal totalDiscountAmount;
@ApiModelProperty("实际支付总金额")
private BigDecimal totalPayAmount;
@ApiModelProperty("配送方式 1-邮寄 2-自取")
private Integer transportMode;
@ApiModelProperty("支付方式 1-微信支付 2-余额支付 3-余额抵扣微信支付")
private Integer paymentType;
......@@ -65,32 +77,45 @@ public class MallOrder {
@ApiModelProperty("付款客户")
private Integer paymentCustomerId;
@ApiModelProperty("订单类型")
private Integer type;
@ApiModelProperty("订单状态 1-订单待付款 2-订单已付款 3-订单已发货 4-订单已签收 5-交易关闭 6-订单退款中")
private Integer status;
@ApiModelProperty("订单关闭原因 1-超时关闭 2-退款关闭 3-用户取消")
private Integer closeReason;
@ApiModelProperty("顾客留言备注")
private String customerRemark;
@ApiModelProperty("自提店铺id")
private Integer selfTakeDepartmentId;
@ApiModelProperty("自提店铺地址")
private String selfTakeDepartmentAddress;
@ApiModelProperty("自提客户手机号")
private String selfTakePhone;
@ApiModelProperty("版本号")
@Version
private Long version;
private Long createTime;
@ApiModelProperty("订单收货地址")
@TableField(exist = false)
private MallOrderAddress mallOrderAddress;
@TableField(exist = false)
@ApiModelProperty("订单详情")
private List<MallOrderDetail> mallOrderDetailList;
@ApiModelProperty("状态机备注")
private String remark;
@ApiModelProperty(value = "配送地址id", required = true)
private Long mallOrderAddressId;
......
......@@ -24,38 +24,51 @@ public class MallOrderDetail implements Serializable {
public static final Integer REFUND_STATUS_REFUNDING = 1;
public static final Integer REFUND_STATUS_NORMAL = 0;
public static final Integer REFUND_STATUS_REFUNDED = 2;
@TableId(type = IdType.ID_WORKER)
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
@ApiModelProperty("订单id")
private Long orderId;
@ApiModelProperty("商定的id")
private Long productId;
@ApiModelProperty("数量")
private Integer num;
/**
* 冗余Product字段
*/
private String productSku;
@ApiModelProperty("商品名称")
private String productName;
@ApiModelProperty("商品封面图")
private String coverImages;
@ApiModelProperty("商品价格")
private BigDecimal price;
@ApiModelProperty("商品规格")
private String specification;
@ApiModelProperty("规格单位")
private String unit;
/**
*
*/
@ApiModelProperty("订单详情总金额")
private BigDecimal amount;
@ApiModelProperty("详情优惠金额")
private BigDecimal discountAmount;
@ApiModelProperty("详情支付总金额")
private BigDecimal payAmount;
@ApiModelProperty("0-正常 1-退款中 2-已退款")
private Integer refundStatus;
......
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