订单添加优惠券.sql 9.6 KB


# 在订单表中添加优惠券信息
alter table im_doing_order_00 add user_coupon_id bigint(11) DEFAULT NULL comment '优惠券';
alter table im_doing_order_01 add user_coupon_id bigint(11) DEFAULT NULL comment '优惠券';
alter table im_doing_order_02 add user_coupon_id bigint(11) DEFAULT NULL comment '优惠券';
alter table im_doing_order_03 add user_coupon_id bigint(11) DEFAULT NULL comment '优惠券';
alter table im_doing_order_04 add user_coupon_id bigint(11) DEFAULT NULL comment '优惠券';
alter table im_doing_order_05 add user_coupon_id bigint(11) DEFAULT NULL comment '优惠券';
alter table im_doing_order_06 add user_coupon_id bigint(11) DEFAULT NULL comment '优惠券';
alter table im_doing_order_07 add user_coupon_id bigint(11) DEFAULT NULL comment '优惠券';
alter table im_doing_order_08 add user_coupon_id bigint(11) DEFAULT NULL comment '优惠券';
alter table im_doing_order_09 add user_coupon_id bigint(11) DEFAULT NULL comment '优惠券';
alter table im_doing_order_10 add user_coupon_id bigint(11) DEFAULT NULL comment '优惠券';
alter table im_doing_order_11 add user_coupon_id bigint(11) DEFAULT NULL comment '优惠券';
alter table im_doing_order_12 add user_coupon_id bigint(11) DEFAULT NULL comment '优惠券';
alter table im_doing_order_13 add user_coupon_id bigint(11) DEFAULT NULL comment '优惠券';
alter table im_doing_order_14 add user_coupon_id bigint(11) DEFAULT NULL comment '优惠券';
alter table im_doing_order_15 add user_coupon_id bigint(11) DEFAULT NULL comment '优惠券';

alter table im_doing_order_00 add user_coupon_money decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额';
alter table im_doing_order_01 add user_coupon_money decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额';
alter table im_doing_order_02 add user_coupon_money decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额';
alter table im_doing_order_03 add user_coupon_money decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额';
alter table im_doing_order_04 add user_coupon_money decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额';
alter table im_doing_order_05 add user_coupon_money decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额';
alter table im_doing_order_06 add user_coupon_money decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额';
alter table im_doing_order_07 add user_coupon_money decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额';
alter table im_doing_order_08 add user_coupon_money decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额';
alter table im_doing_order_09 add user_coupon_money decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额';
alter table im_doing_order_10 add user_coupon_money decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额';
alter table im_doing_order_11 add user_coupon_money decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额';
alter table im_doing_order_12 add user_coupon_money decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额';
alter table im_doing_order_13 add user_coupon_money decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额';
alter table im_doing_order_14 add user_coupon_money decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额';
alter table im_doing_order_15 add user_coupon_money decimal(10,2) DEFAULT '0.00' COMMENT '优惠金额';


alter table im_doing_order_00 add deduction_vb int(11) DEFAULT '0' COMMENT '抵扣V币';
alter table im_doing_order_01 add deduction_vb int(11) DEFAULT '0' COMMENT '抵扣V币';
alter table im_doing_order_02 add deduction_vb int(11) DEFAULT '0' COMMENT '抵扣V币';
alter table im_doing_order_03 add deduction_vb int(11) DEFAULT '0' COMMENT '抵扣V币';
alter table im_doing_order_04 add deduction_vb int(11) DEFAULT '0' COMMENT '抵扣V币';
alter table im_doing_order_05 add deduction_vb int(11) DEFAULT '0' COMMENT '抵扣V币';
alter table im_doing_order_06 add deduction_vb int(11) DEFAULT '0' COMMENT '抵扣V币';
alter table im_doing_order_07 add deduction_vb int(11) DEFAULT '0' COMMENT '抵扣V币';
alter table im_doing_order_08 add deduction_vb int(11) DEFAULT '0' COMMENT '抵扣V币';
alter table im_doing_order_09 add deduction_vb int(11) DEFAULT '0' COMMENT '抵扣V币';
alter table im_doing_order_10 add deduction_vb int(11) DEFAULT '0' COMMENT '抵扣V币';
alter table im_doing_order_11 add deduction_vb int(11) DEFAULT '0' COMMENT '抵扣V币';
alter table im_doing_order_12 add deduction_vb int(11) DEFAULT '0' COMMENT '抵扣V币';
alter table im_doing_order_13 add deduction_vb int(11) DEFAULT '0' COMMENT '抵扣V币';
alter table im_doing_order_14 add deduction_vb int(11) DEFAULT '0' COMMENT '抵扣V币';
alter table im_doing_order_15 add deduction_vb int(11) DEFAULT '0' COMMENT '抵扣V币';


alter table im_doing_order_00 add deduction_money decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额';
alter table im_doing_order_01 add deduction_money decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额';
alter table im_doing_order_02 add deduction_money decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额';
alter table im_doing_order_03 add deduction_money decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额';
alter table im_doing_order_04 add deduction_money decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额';
alter table im_doing_order_05 add deduction_money decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额';
alter table im_doing_order_06 add deduction_money decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额';
alter table im_doing_order_07 add deduction_money decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额';
alter table im_doing_order_08 add deduction_money decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额';
alter table im_doing_order_09 add deduction_money decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额';
alter table im_doing_order_10 add deduction_money decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额';
alter table im_doing_order_11 add deduction_money decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额';
alter table im_doing_order_12 add deduction_money decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额';
alter table im_doing_order_13 add deduction_money decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额';
alter table im_doing_order_14 add deduction_money decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额';
alter table im_doing_order_15 add deduction_money decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额';


# 在子订单添加折后商品金额
alter table im_doing_order1_00 add  discount_price decimal(16,6) DEFAULT NULL COMMENT '折后商品单价';
alter table im_doing_order1_01 add  discount_price decimal(16,6) DEFAULT NULL COMMENT '折后商品单价';
alter table im_doing_order1_02 add  discount_price decimal(16,6) DEFAULT NULL COMMENT '折后商品单价';
alter table im_doing_order1_03 add  discount_price decimal(16,6) DEFAULT NULL COMMENT '折后商品单价';
alter table im_doing_order1_04 add  discount_price decimal(16,6) DEFAULT NULL COMMENT '折后商品单价';
alter table im_doing_order1_05 add  discount_price decimal(16,6) DEFAULT NULL COMMENT '折后商品单价';
alter table im_doing_order1_06 add  discount_price decimal(16,6) DEFAULT NULL COMMENT '折后商品单价';
alter table im_doing_order1_07 add  discount_price decimal(16,6) DEFAULT NULL COMMENT '折后商品单价';
alter table im_doing_order1_08 add  discount_price decimal(16,6) DEFAULT NULL COMMENT '折后商品单价';
alter table im_doing_order1_09 add  discount_price decimal(16,6) DEFAULT NULL COMMENT '折后商品单价';
alter table im_doing_order1_10 add  discount_price decimal(16,6) DEFAULT NULL COMMENT '折后商品单价';
alter table im_doing_order1_11 add  discount_price decimal(16,6) DEFAULT NULL COMMENT '折后商品单价';
alter table im_doing_order1_12 add  discount_price decimal(16,6) DEFAULT NULL COMMENT '折后商品单价';
alter table im_doing_order1_13 add  discount_price decimal(16,6) DEFAULT NULL COMMENT '折后商品单价';
alter table im_doing_order1_14 add  discount_price decimal(16,6) DEFAULT NULL COMMENT '折后商品单价';
alter table im_doing_order1_15 add  discount_price decimal(16,6) DEFAULT NULL COMMENT '折后商品单价';


# 在子订单添加折后行金额
alter table im_doing_order1_00 add  discount_line_price decimal(10,2) DEFAULT NULL COMMENT '折后行金额';
alter table im_doing_order1_01 add  discount_line_price decimal(10,2) DEFAULT NULL COMMENT '折后行金额';
alter table im_doing_order1_02 add  discount_line_price decimal(10,2) DEFAULT NULL COMMENT '折后行金额';
alter table im_doing_order1_03 add  discount_line_price decimal(10,2) DEFAULT NULL COMMENT '折后行金额';
alter table im_doing_order1_04 add  discount_line_price decimal(10,2) DEFAULT NULL COMMENT '折后行金额';
alter table im_doing_order1_05 add  discount_line_price decimal(10,2) DEFAULT NULL COMMENT '折后行金额';
alter table im_doing_order1_06 add  discount_line_price decimal(10,2) DEFAULT NULL COMMENT '折后行金额';
alter table im_doing_order1_07 add  discount_line_price decimal(10,2) DEFAULT NULL COMMENT '折后行金额';
alter table im_doing_order1_08 add  discount_line_price decimal(10,2) DEFAULT NULL COMMENT '折后行金额';
alter table im_doing_order1_09 add  discount_line_price decimal(10,2) DEFAULT NULL COMMENT '折后行金额';
alter table im_doing_order1_10 add  discount_line_price decimal(10,2) DEFAULT NULL COMMENT '折后行金额';
alter table im_doing_order1_11 add  discount_line_price decimal(10,2) DEFAULT NULL COMMENT '折后行金额';
alter table im_doing_order1_12 add  discount_line_price decimal(10,2) DEFAULT NULL COMMENT '折后行金额';
alter table im_doing_order1_13 add  discount_line_price decimal(10,2) DEFAULT NULL COMMENT '折后行金额';
alter table im_doing_order1_14 add  discount_line_price decimal(10,2) DEFAULT NULL COMMENT '折后行金额';
alter table im_doing_order1_15 add  discount_line_price decimal(10,2) DEFAULT NULL COMMENT '折后行金额';