feat(订单): 添加订单运行模式字段

在订单表和订单商品表中添加mode字段,支持多种运行模式(支付/审批/借还/会员/耗材模式)
同时更新DTO和查询条件以支持新模式字段
This commit is contained in:
dzq 2025-06-27 16:22:02 +08:00
parent eacf28be6f
commit c83e7a7041
5 changed files with 22 additions and 0 deletions

View File

@ -77,6 +77,10 @@ public class ShopOrderEntity extends BaseEntity<ShopOrderEntity> {
@TableField("`status`") @TableField("`status`")
private Integer status; private Integer status;
@ApiModelProperty("运行模式0-支付模式 1-审批模式 2-借还模式 3-会员模式 4-耗材模式)")
@TableField("mode")
private Integer mode;
@ApiModelProperty("支付状态1未支付 2已支付 3退款中 4已退款") @ApiModelProperty("支付状态1未支付 2已支付 3退款中 4已退款")
@TableField("pay_status") @TableField("pay_status")
private Integer payStatus; private Integer payStatus;

View File

@ -72,6 +72,10 @@ public class ShopOrderGoodsEntity extends BaseEntity<ShopOrderGoodsEntity> {
@TableField("`status`") @TableField("`status`")
private Integer status; private Integer status;
@ApiModelProperty("运行模式0-支付模式 1-审批模式 2-借还模式 3-会员模式 4-耗材模式)")
@TableField("mode")
private Integer mode;
@ApiModelProperty("企业微信id") @ApiModelProperty("企业微信id")
@TableField("corpid") @TableField("corpid")
private String corpid; private String corpid;

View File

@ -39,6 +39,10 @@ public class ShopOrderDTO {
private BigDecimal totalAmount; private BigDecimal totalAmount;
@ApiModelProperty("订单状态1待付款 2已付款 3已发货 4已完成 5已取消") @ApiModelProperty("订单状态1待付款 2已付款 3已发货 4已完成 5已取消")
private Integer status; private Integer status;
@ApiModelProperty("运行模式0-支付模式 1-审批模式 2-借还模式 3-会员模式 4-耗材模式)")
private Integer mode;
@ApiModelProperty("支付状态1未支付 2已支付 3退款中 4已退款") @ApiModelProperty("支付状态1未支付 2已支付 3退款中 4已退款")
private Integer payStatus; private Integer payStatus;
@ApiModelProperty("已扣减库存0否 1是") @ApiModelProperty("已扣减库存0否 1是")

View File

@ -27,6 +27,7 @@ public class SearchShopOrderQuery<T> extends AbstractPageQuery<T> {
private String paymentMethod; private String paymentMethod;
private String corpid; private String corpid;
private Integer returnStatus; private Integer returnStatus;
private Integer mode;
@Override @Override
public QueryWrapper<T> addQueryCondition() { public QueryWrapper<T> addQueryCondition() {
@ -53,6 +54,7 @@ public class SearchShopOrderQuery<T> extends AbstractPageQuery<T> {
.eq(cabinetId != null, "cc.cabinet_id", cabinetId) .eq(cabinetId != null, "cc.cabinet_id", cabinetId)
.eq(goodsId!= null, "og.goods_id", goodsId) .eq(goodsId!= null, "og.goods_id", goodsId)
.eq(status != null, "o.status", status) .eq(status != null, "o.status", status)
.eq(mode != null, "o.mode", mode)
.eq(payStatus != null, "o.pay_status", payStatus) .eq(payStatus != null, "o.pay_status", payStatus)
.eq(StrUtil.isNotEmpty(paymentMethod), "o.payment_method", paymentMethod) .eq(StrUtil.isNotEmpty(paymentMethod), "o.payment_method", paymentMethod)
.eq(StrUtil.isNotBlank(corpid), "o.corpid", corpid) .eq(StrUtil.isNotBlank(corpid), "o.corpid", corpid)

View File

@ -7,3 +7,11 @@ ALTER TABLE `cabinet_cell`
ADD COLUMN `is_rented` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否已租用0-未租用1-已租用' ADD COLUMN `is_rented` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否已租用0-未租用1-已租用'
AFTER `cell_price`; AFTER `cell_price`;
ALTER TABLE `shop_order`
ADD COLUMN `mode` tinyint NOT NULL DEFAULT '0' COMMENT '运行模式0-支付模式 1-审批模式 2-借还模式 3-会员模式 4-耗材模式)'
AFTER `status`;
ALTER TABLE `shop_order_goods`
ADD COLUMN `mode` tinyint NOT NULL DEFAULT '0' COMMENT '运行模式0-支付模式 1-审批模式 2-借还模式 3-会员模式 4-耗材模式)'
AFTER `status`;