| @@ -0,0 +1,402 @@ | |||
| ALTER TABLE `mallink`.`wx_order_0` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_1` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_2` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_3` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_4` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_5` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_6` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_7` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_8` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_9` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_10` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_11` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_12` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_13` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_14` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_15` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_16` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_17` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_18` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_19` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_20` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_21` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_22` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_23` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_24` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_25` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_26` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_27` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_28` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_29` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_30` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_31` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_32` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_33` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_34` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_35` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_36` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_37` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_38` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_39` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_40` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_41` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_42` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_43` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_44` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_45` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_46` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_47` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_48` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_49` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_50` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_51` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_52` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_53` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_54` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_55` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_56` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_57` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_58` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_59` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_60` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_61` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_62` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_63` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_64` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_65` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_66` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_67` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_68` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_69` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_70` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_71` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_72` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_73` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_74` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_75` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_76` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_77` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_78` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_79` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_80` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_81` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_82` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_83` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_84` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_85` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_86` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_87` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_88` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_89` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_90` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_91` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_92` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_93` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_94` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_95` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_96` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_97` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_98` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_order_99` | |||
| ADD COLUMN `credit_price` int(11) NOT NULL DEFAULT 0 AFTER `payment`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_0` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_1` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_2` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_3` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_4` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_5` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_6` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_7` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_8` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_9` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_10` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_11` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_12` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_13` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_14` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_15` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_16` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_17` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_18` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_19` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_20` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_21` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_22` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_23` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_24` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_25` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_26` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_27` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_28` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_29` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_30` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_31` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_32` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_33` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_34` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_35` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_36` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_37` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_38` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_39` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_40` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_41` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_42` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_43` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_44` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_45` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_46` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_47` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_48` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_49` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_50` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_51` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_52` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_53` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_54` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_55` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_56` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_57` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_58` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_59` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_60` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_61` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_62` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_63` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_64` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_65` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_66` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_67` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_68` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_69` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_70` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_71` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_72` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_73` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_74` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_75` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_76` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_77` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_78` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_79` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_80` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_81` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_82` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_83` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_84` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_85` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_86` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_87` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_88` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_89` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_90` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_91` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_92` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_93` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_94` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_95` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_96` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_97` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_98` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| ALTER TABLE `mallink`.`wx_coupon_order_99` | |||
| ADD COLUMN `coupon_credit_price` int(11) NOT NULL DEFAULT 0 AFTER `coupon_price`; | |||
| @@ -166,6 +166,9 @@ public class CouponOrderExpiringSchedule { | |||
| //券包子券没有库存 | |||
| if(order != null && order.getParentOrderId() == 0l) { | |||
| wxOrderService.stockBack(order); | |||
| //积分退回 | |||
| wxOrderService.creditPayRefund(order); | |||
| } | |||
| } | |||
| } | |||
| @@ -239,6 +242,9 @@ public class CouponOrderExpiringSchedule { | |||
| WxOrder order = wxOrderMapper.selectById(co.getOrderId(),co.getTenantId()); | |||
| if(order != null) { | |||
| wxOrderService.stockBack(order); | |||
| //积分退回 | |||
| wxOrderService.creditPayRefund(order); | |||
| } | |||
| } | |||
| } | |||
| @@ -348,6 +348,9 @@ public class OrderExpiringSchedule { | |||
| // 库存退回 | |||
| wxOrderService.stockBack(order); | |||
| //积分退回 | |||
| wxOrderService.creditPayRefund(order); | |||
| // 微信 关单,批量的订单关单有问题 | |||
| //wxOrderService.orderClose(order,payWay); | |||
| @@ -488,6 +488,13 @@ public class WxCoupon extends TenantEntity { | |||
| return false; | |||
| } | |||
| public boolean checkIsNeedCredit() { | |||
| if(creditPrice != null && creditPrice > 0) { | |||
| return true; | |||
| } | |||
| return false; | |||
| } | |||
| public boolean checkIsCard() { | |||
| if(type == null) { | |||
| return false; | |||
| @@ -64,6 +64,8 @@ public class WxCouponOrder extends TenantEntity { | |||
| private Date updateDate; | |||
| @io.swagger.annotations.ApiModelProperty(value = "单券实际购买价格", name = "couponPrice") | |||
| private Integer couponPrice; | |||
| @io.swagger.annotations.ApiModelProperty(value = "单券实际购买积分价格", name = "couponCreditPrice") | |||
| private Integer couponCreditPrice; | |||
| @io.swagger.annotations.ApiModelProperty(value = "支付渠道EnumPayWay", name = "payVendor") | |||
| private Integer payVendor; | |||
| @io.swagger.annotations.ApiModelProperty(value = "支付渠道版本EnumPayVersion", name = "payVersion") | |||
| @@ -69,6 +69,9 @@ public class WxOrder extends TenantEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="支付金额(分):允许有负数,退款时为负值。",name="payment") | |||
| private Integer payment; | |||
| @io.swagger.annotations.ApiModelProperty(value="支付积分。",name="creditPrice") | |||
| private Integer creditPrice; | |||
| @io.swagger.annotations.ApiModelProperty(value="支付时间",name="paymentTime") | |||
| private Date paymentTime; | |||
| @@ -49,6 +49,8 @@ public class WxOrderCouponVo extends TenantEntity { | |||
| private Integer paymentType; | |||
| @io.swagger.annotations.ApiModelProperty(value="支付金额(分):允许有负数,退款时为负值。",name="payment") | |||
| private Integer payment; | |||
| @io.swagger.annotations.ApiModelProperty(value="支付积分。",name="creditPrice") | |||
| private Integer creditPrice; | |||
| @io.swagger.annotations.ApiModelProperty(value="支付时间",name="paymentTime") | |||
| private Date paymentTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="订单状态:-1全部;正向交易:0-已下单/待付款;1-已支付;2-已取消(限定时间内未付款)反向交易:3-已退款;4-退款失败",name="orderStatus") | |||
| @@ -233,6 +235,7 @@ public class WxOrderCouponVo extends TenantEntity { | |||
| this.productId = o.getProductId(); | |||
| this.paymentType = o.getPaymentType(); | |||
| this.payment = o.getPayment(); | |||
| this.creditPrice = o.getCreditPrice(); | |||
| this.paymentTime = o.getPaymentTime(); | |||
| this.orderStatus = o.getOrderStatus(); | |||
| this.createDate = o.getCreateDate(); | |||
| @@ -93,6 +93,7 @@ public class WxOrderPayExpVo extends WxOrder { | |||
| this.setPaymentType(o.getPaymentType()); | |||
| this.setMakeMerchantId(o.getMakeMerchantId()); | |||
| this.setPayment(o.getPayment()); | |||
| this.setCreditPrice(o.getCreditPrice()); | |||
| this.setPaymentTime(o.getPaymentTime()); | |||
| this.setFreightPrice(o.getFreightPrice()); | |||
| this.setOrderStatus(o.getOrderStatus()); | |||
| @@ -115,6 +115,7 @@ public class WxOrderPayVo extends WxOrder { | |||
| this.setPaymentType(o.getPaymentType()); | |||
| this.setMakeMerchantId(o.getMakeMerchantId()); | |||
| this.setPayment(o.getPayment()); | |||
| this.setCreditPrice(o.getCreditPrice()); | |||
| this.setPaymentTime(o.getPaymentTime()); | |||
| this.setFreightPrice(o.getFreightPrice()); | |||
| this.setOrderStatus(o.getOrderStatus()); | |||
| @@ -233,6 +233,8 @@ public interface WxOrderService { | |||
| boolean isPressOrder,Long orderGroupId,String formId,Integer shippinType,UserBasicInfoAddress address,String extParam,WxCouponChannel couponChannel, | |||
| EnumPayWay payWay,EnumPayVersion payVersion); | |||
| void creditPayRefund(WxOrder order); | |||
| /** | |||
| * 下订单成功后处理 | |||
| * @param updateOrder | |||
| @@ -1502,6 +1502,7 @@ public class WxOrderServiceImpl implements WxOrderService { | |||
| couponOrder.setCreateDateTimes(curr.getTime()); | |||
| couponOrder.setUpdateDate(curr); | |||
| couponOrder.setCouponPrice(order.getPayment()); | |||
| couponOrder.setCouponCreditPrice(order.getCreditPrice()); | |||
| wxCouponOrderMapper.insert(couponOrder); | |||
| } | |||
| @@ -1674,6 +1675,7 @@ public class WxOrderServiceImpl implements WxOrderService { | |||
| couponOrder.setCreateDateTimes(curr.getTime()); | |||
| couponOrder.setUpdateDate(curr); | |||
| couponOrder.setCouponPrice(order.getPayment()); | |||
| couponOrder.setCouponCreditPrice(order.getCreditPrice()); | |||
| couponOrder.setComposeOrderType(order.getComposeOrderType()); | |||
| couponOrder.setComposeOrderId(order.getComposeOrderId()); | |||
| @@ -3191,12 +3193,14 @@ public class WxOrderServiceImpl implements WxOrderService { | |||
| // 当积分券或者积分停车券时 则进行积分支付 | |||
| Integer orderType; | |||
| if (coupon.checkIsCreditCoupon()) { | |||
| proxy.creditPay(user, coupon); | |||
| orderType = EnumOrderType.CREDIT.getCode(); | |||
| } else { | |||
| orderType = EnumOrderType.COUPON.getCode(); | |||
| } | |||
| //扣除积分 | |||
| if(coupon.checkIsNeedCredit()){ | |||
| proxy.creditPay(user, coupon); | |||
| } | |||
| // 4. 保存Order | |||
| WxOrder record = new WxOrder(); | |||
| @@ -3209,6 +3213,7 @@ public class WxOrderServiceImpl implements WxOrderService { | |||
| record.setOrderStatus(EnumOrderStatus.ORDER_STATUS_PAYMENT_SUCCESS.getCode()); | |||
| record.setPaymentType(EnumPayType.PAY_PAYMENT.getCode()); | |||
| record.setPayment(0); | |||
| record.setCreditPrice(coupon.getCreditPrice()); | |||
| record.setFormId(formId); | |||
| record.setOrderGroupId(0L); | |||
| record.setExtParam(extParam); | |||
| @@ -3250,11 +3255,13 @@ public class WxOrderServiceImpl implements WxOrderService { | |||
| // 3. 当积分券或者积分停车券时 则进行积分支付 | |||
| Integer orderType; | |||
| if (coupon.checkIsCreditCoupon()) { | |||
| proxy.creditPay(user, coupon); | |||
| orderType = EnumOrderType.CREDIT.getCode(); | |||
| } else { | |||
| orderType = EnumOrderType.COUPON.getCode(); | |||
| } | |||
| if(coupon.checkIsNeedCredit()){ | |||
| proxy.creditPay(user, coupon); | |||
| } | |||
| //扣库存的时候价格是什么样的,如果此时有变化,则不让继续。渠道的库存和价格可以随时修改。这里需要校验一下 | |||
| if (stockReduceResult.isChannelStockReduce()) { | |||
| @@ -3289,6 +3296,7 @@ public class WxOrderServiceImpl implements WxOrderService { | |||
| record.setOrderGroupId(orderGroupId); | |||
| record.setFormId(formId); | |||
| record.setPayment(price.getRealPayMent()); | |||
| record.setCreditPrice(coupon.getCreditPrice()); | |||
| record.setShippingType(shippinType); | |||
| if(EnumOrderShopingType.DISTRIBUTION.getCode().equals(shippinType)){ | |||
| record.setFreightPrice(coupon.getFreightPrice()); | |||
| @@ -3324,7 +3332,7 @@ public class WxOrderServiceImpl implements WxOrderService { | |||
| } | |||
| return record; | |||
| } | |||
| @Override | |||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | |||
| public Long saveOuterOrderForCoupon(WxCUserBasicInfo user, WxCoupon coupon, Long couponChannelId, String formId, Long couponPasswordId) { | |||
| @@ -3335,7 +3343,7 @@ public class WxOrderServiceImpl implements WxOrderService { | |||
| throw new MallinkException(ErrorCode.COUPON_CHANNEL_IS_TAKE_OFF.getCode(),"投放渠道不存在"); | |||
| } | |||
| userCouponMerchantCheck(user, coupon,wxCouponChannel,"此券"); | |||
| if (coupon.checkIsCreditCoupon()) { | |||
| if (coupon.checkIsNeedCredit()) { | |||
| //若用户剩余积分比积分售价低则不能支付 | |||
| if (user.getCredit() == null || user.getCredit() < coupon.getCreditPrice()) { | |||
| throw new MallinkException(ErrorCode.CREDIT_NOT_ENOUGH); | |||
| @@ -3347,11 +3355,13 @@ public class WxOrderServiceImpl implements WxOrderService { | |||
| // 3. 当积分券或者积分停车券时 则进行积分支付 | |||
| Integer orderType; | |||
| if (coupon.checkIsCreditCoupon()) { | |||
| creditPay(user, coupon); | |||
| orderType = EnumOrderType.CREDIT.getCode(); | |||
| } else { | |||
| orderType = EnumOrderType.COUPON.getCode(); | |||
| } | |||
| if(coupon.checkIsNeedCredit()){ | |||
| creditPay(user, coupon); | |||
| } | |||
| // 4. 保存Order | |||
| WxOrder record = new WxOrder(); | |||
| @@ -3362,6 +3372,7 @@ public class WxOrderServiceImpl implements WxOrderService { | |||
| record.setOrderStatus(EnumOrderStatus.ORDER_STATUS_PAYMENT_SUCCESS.getCode()); | |||
| record.setPaymentType(EnumPayType.PAY_PAYMENT.getCode()); | |||
| record.setPayment(0); | |||
| record.setCreditPrice(coupon.getCreditPrice()); | |||
| record.setFormId(formId); | |||
| record.setOrderGroupId(0L); | |||
| record.setComposeOrderId(0L); | |||
| @@ -3470,6 +3481,28 @@ public class WxOrderServiceImpl implements WxOrderService { | |||
| wxCreditHistoryService.saveOrUpdate(creditHistory,coupon); | |||
| } | |||
| @Override | |||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | |||
| public void creditPayRefund(WxOrder order) { | |||
| if(order.getCreditPrice() == null || order.getCreditPrice() == 0){ | |||
| return; | |||
| } | |||
| //-------此处为【积分支付】退款记录增加积分操作------- | |||
| WxCreditHistory creditHistory = new WxCreditHistory(); | |||
| creditHistory.setCreditNum(order.getCreditPrice()); | |||
| creditHistory.setCUserId(order.getCUserId()); | |||
| // creditHistory.updateTenantInfo(coupon); | |||
| creditHistory.setTenantId(order.getFinalTenantId()); | |||
| creditHistory.setFinalTenantId(order.getFinalTenantId()); | |||
| creditHistory.setCreditType(EnumScoreType.REFUND_REDUCE_CREDIT.getCode()); | |||
| //记录操作人类型 操作人id | |||
| creditHistory.setOperatorType(EnumUserType.CUSERBASIC.getCode()); | |||
| creditHistory.setOperatorId(order.getCUserId()); | |||
| creditHistory.setChangePurpose("积分兑换退款"+"[订单号:"+order.getId()+"]"); | |||
| wxCreditHistoryService.saveOrUpdate(creditHistory,order); | |||
| } | |||
| /** | |||
| @@ -4029,7 +4062,7 @@ public class WxOrderServiceImpl implements WxOrderService { | |||
| couponUserCheck(wxCUserBasicInfo, coupon,premsg); | |||
| userCouponMerchantCheck(wxCUserBasicInfo, coupon,wxCouponChannel,premsg); | |||
| if (coupon.checkIsCreditCoupon()) { | |||
| if (coupon.checkIsNeedCredit()) { | |||
| //若用户剩余积分比积分售价低则不能支付 | |||
| if (wxCUserBasicInfo.getCredit() == null || wxCUserBasicInfo.getCredit() < coupon.getCreditPrice()) { | |||
| throw new MallinkException(ErrorCode.CREDIT_NOT_ENOUGH.getCode(), premsg+"积分不够扣减值"); | |||
| @@ -307,7 +307,6 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService { | |||
| wxCUserBasicInfo.setPoins(newScore); | |||
| wxCUserBasicInfoMapper.updateScore(wxCUserBasicInfo); | |||
| } | |||
| @@ -20,6 +20,7 @@ | |||
| <result column="create_date_times" jdbcType="BIGINT" property="createDateTimes" /> | |||
| <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" /> | |||
| <result column="coupon_price" jdbcType="INTEGER" property="couponPrice" /> | |||
| <result column="coupon_credit_price" jdbcType="INTEGER" property="couponCreditPrice" /> | |||
| <result column="auto_refund" jdbcType="INTEGER" property="autoRefund" /> | |||
| <result column="verify_type" jdbcType="INTEGER" property="verifyType" /> | |||
| <result column="verify_remark" jdbcType="VARCHAR" property="verifyRemark" /> | |||
| @@ -41,7 +42,7 @@ | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`tenant_id`,`parent_tenant_id`,`coupon_id`,`coupon_type`,`c_user_id`,`owner_id`,`b_user_id`,`b_merchant_id`,`b_tenant_id`,`order_id`,`expired_time`,`coupon_order_status`,`create_date`,`update_date`,`coupon_price`, `auto_refund`, | |||
| `id`,`tenant_id`,`parent_tenant_id`,`coupon_id`,`coupon_type`,`c_user_id`,`owner_id`,`b_user_id`,`b_merchant_id`,`b_tenant_id`,`order_id`,`expired_time`,`coupon_order_status`,`create_date`,`update_date`,`coupon_price`,`coupon_credit_price`, `auto_refund`, | |||
| `verify_type`,`verify_remark`,`pay_vendor`,`pay_version`,`send_merchant_id`,`send_merchant_user_id`,`compose_order_type`,`compose_order_id`,`parent_coupon_order_id`,`coupon_number`, | |||
| `freight_price`,`shipping_type`,`shipping_address`,`shipping_status`,`delivery_info`,`subsidy`,`ext_param` | |||
| </sql> | |||
| @@ -183,7 +184,7 @@ | |||
| <select id="findListOfVerifiedByDateForBUser" parameterType="map" resultMap="BaseResultMap"> | |||
| select co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.b_merchant_id,co.b_tenant_id,co.order_id,co.expired_time, | |||
| co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor,co.pay_version, | |||
| co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.coupon_credit_price,co.verify_type,co.verify_remark,co.pay_vendor,co.pay_version, | |||
| co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`,co.ext_param | |||
| from wx_coupon_order co | |||
| where co.tenant_id = #{tenantId} | |||
| @@ -202,7 +203,7 @@ | |||
| <select id="findListOfOrderedByDateForBUser" parameterType="map" resultMap="BaseResultMap"> | |||
| select co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.b_merchant_id,co.b_tenant_id,co.order_id,co.expired_time, | |||
| co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor,co.pay_version, | |||
| co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.coupon_credit_price,co.verify_type,co.verify_remark,co.pay_vendor,co.pay_version, | |||
| co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`,co.ext_param | |||
| from wx_coupon_order co | |||
| where co.tenant_id = #{tenantId} | |||
| @@ -736,7 +737,7 @@ | |||
| <select id="findListOfAdmin" parameterType="com.iformall.domain.vo.WxCouponOrderBVo" resultMap="BaseResultMap"> | |||
| select co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.b_merchant_id,co.b_tenant_id,co.expired_time,co.coupon_order_status,co.order_id, | |||
| co.create_date,co.update_date,co.coupon_price, co.verify_type, co.verify_remark,co.pay_vendor,co.pay_version, | |||
| co.create_date,co.update_date,co.coupon_price,co.coupon_credit_price, co.verify_type, co.verify_remark,co.pay_vendor,co.pay_version, | |||
| co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`,co.send_merchant_id,co.subsidy,co.ext_param | |||
| FROM wx_coupon_order co where co.`tenant_id` = #{tenantId} | |||
| <if test=" null != id "> | |||
| @@ -824,7 +825,7 @@ | |||
| <select id="findDetailOfAdmin" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.b_merchant_id,co.b_tenant_id, | |||
| co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark, co.pay_vendor,co.pay_version, | |||
| co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.coupon_credit_price,co.verify_type,co.verify_remark, co.pay_vendor,co.pay_version, | |||
| co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`,co.subsidy,co.ext_param | |||
| FROM wx_coupon_order co | |||
| where co.id = #{id} and co.tenant_id = #{tenantId} | |||
| @@ -834,7 +835,7 @@ | |||
| <select id="findGoodsList" parameterType="com.iformall.domain.vo.WxCouponOrderBVo" resultMap="BaseResultMap"> | |||
| select | |||
| co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.b_merchant_id,co.b_tenant_id, | |||
| co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark, co.pay_vendor,co.pay_version, | |||
| co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.coupon_credit_price,co.verify_type,co.verify_remark, co.pay_vendor,co.pay_version, | |||
| co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`,co.ext_param | |||
| FROM wx_coupon_order co | |||
| where co.`tenant_id` = #{tenantId} | |||
| @@ -899,7 +900,7 @@ | |||
| <select id="findListOfOrderedByDate" parameterType="map" resultMap="BaseResultMap"> | |||
| select co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.b_merchant_id,co.b_tenant_id, | |||
| co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor,co.pay_version, | |||
| co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.coupon_credit_price,co.verify_type,co.verify_remark,co.pay_vendor,co.pay_version, | |||
| co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`,co.ext_param | |||
| from wx_coupon_order co | |||
| where co.tenant_id = #{tenantId} | |||
| @@ -920,7 +921,7 @@ | |||
| <select id="findListOfVerifiedByDate" parameterType="map" resultMap="BaseResultMap"> | |||
| select co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.b_merchant_id,co.b_tenant_id, | |||
| co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor,co.pay_version, | |||
| co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.coupon_credit_price,co.verify_type,co.verify_remark,co.pay_vendor,co.pay_version, | |||
| co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`,co.ext_param | |||
| from wx_coupon_order co | |||
| where co.coupon_order_status = '1' | |||
| @@ -938,7 +939,7 @@ | |||
| <select id="findListOfCUserOptimize" parameterType="com.iformall.domain.vo.WxCouponOrderCVo" resultMap="BaseResultMap"> | |||
| select | |||
| co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor, | |||
| co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.coupon_credit_price,co.verify_type,co.verify_remark,co.pay_vendor, | |||
| co.pay_version,co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`,co.ext_param | |||
| from wx_coupon_order co | |||
| where co.c_user_id = #{cUserId} and co.`tenant_id` = #{tenantId} | |||
| @@ -978,7 +979,7 @@ | |||
| <select id="findDetailOfCUser" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | |||
| select | |||
| co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.b_merchant_id,co.b_tenant_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor, | |||
| co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.b_merchant_id,co.b_tenant_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.coupon_credit_price,co.verify_type,co.verify_remark,co.pay_vendor, | |||
| co.pay_version,co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`,co.ext_param | |||
| from wx_coupon_order co | |||
| where co.id = #{id} and co.tenant_id = #{tenantId} | |||
| @@ -986,7 +987,7 @@ | |||
| <select id="findCouponOrderForPos" parameterType="java.util.Map" resultMap="BaseResultMap"> | |||
| select | |||
| co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.b_merchant_id,co.b_tenant_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor, | |||
| co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.b_merchant_id,co.b_tenant_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.coupon_credit_price,co.verify_type,co.verify_remark,co.pay_vendor, | |||
| co.pay_version,co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`,co.ext_param | |||
| from wx_coupon_order co | |||
| where co.c_user_id = #{cUserId} | |||
| @@ -1014,7 +1015,7 @@ | |||
| <select id="findCarListOfCUser" parameterType="com.iformall.domain.vo.WxCouponOrderCarCVo" resultMap="BaseResultMap"> | |||
| select | |||
| co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor, | |||
| co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.coupon_credit_price,co.verify_type,co.verify_remark,co.pay_vendor, | |||
| co.pay_version from wx_coupon_order co | |||
| where co.c_user_id = #{cUserId} | |||
| <if test="id != null"> | |||
| @@ -16,6 +16,7 @@ | |||
| <result column="payment_type" jdbcType="INTEGER" property="paymentType"/> | |||
| <result column="make_merchant_id" jdbcType="BIGINT" property="makeMerchantId"/> | |||
| <result column="payment" jdbcType="INTEGER" property="payment"/> | |||
| <result column="credit_price" jdbcType="INTEGER" property="creditPrice"/> | |||
| <result column="payment_time" jdbcType="TIMESTAMP" property="paymentTime"/> | |||
| <result column="freight_price" jdbcType="INTEGER" property="freightPrice"/> | |||
| <result column="order_status" jdbcType="INTEGER" property="orderStatus"/> | |||
| @@ -41,7 +42,7 @@ | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`order_number`,`tenant_id`,`parent_tenant_id`,`c_user_id`,`coupon_channel_id`,`product_id`,`product_name`,`type`,`pay_vendor`,`pay_version`,`make_merchant_id`,`payment_type`,`payment`,`payment_time`,`freight_price`,`order_status`,`cps_status`,`create_date`,`update_date`,`detail`,`ref_detail`, | |||
| `id`,`order_number`,`tenant_id`,`parent_tenant_id`,`c_user_id`,`coupon_channel_id`,`product_id`,`product_name`,`type`,`pay_vendor`,`pay_version`,`make_merchant_id`,`payment_type`,`payment`,`credit_price`,`payment_time`,`freight_price`,`order_status`,`cps_status`,`create_date`,`update_date`,`detail`,`ref_detail`, | |||
| `press_end_date`,`press_current_num`,`press_current_value`,`order_group_id`,`form_id`,`total_payment`,`compose_order_id`,`coupon_number`,`compose_order_type`,`shipping_type`,`shipping_address`,`parent_order_id`,`ext_param`,`from_id` | |||
| </sql> | |||
| @@ -340,7 +341,7 @@ | |||
| <select id="findListOfCUser" parameterType="com.iformall.domain.po.WxOrder" resultMap="BaseResultMap"> | |||
| select | |||
| o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.product_name,o.payment_type,o.payment,o.payment_time,o.order_status,o.create_date,o.update_date, | |||
| o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.product_name,o.payment_type,o.payment,o.credit_price,o.payment_time,o.order_status,o.create_date,o.update_date, | |||
| o.compose_order_type,o.compose_order_id,o.`coupon_number`,o.`freight_price`,o.`shipping_type`,o.`shipping_address`,o.parent_order_id,o.ext_param,o.from_id | |||
| from wx_order o | |||
| @@ -377,7 +378,7 @@ | |||
| <select id="selectDetailOfCUser" parameterType="com.iformall.domain.po.WxOrder" resultMap="BaseResultMap"> | |||
| select | |||
| o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.product_name,o.payment_type,o.payment,o.payment_time,o.order_status,o.create_date,o.update_date, | |||
| o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.product_name,o.payment_type,o.payment,o.credit_price,o.payment_time,o.order_status,o.create_date,o.update_date, | |||
| o.compose_order_type,o.compose_order_id,o.parent_order_id,o.`coupon_number`,o.`freight_price`,o.`shipping_type`,o.`shipping_address`,o.ext_param,o.from_id | |||
| FROM wx_order o where o.`tenant_id` = #{tenantId} | |||
| <if test="cUserId != null"> | |||
| @@ -414,6 +415,7 @@ | |||
| <result column="product_id" jdbcType="BIGINT" property="productId"/> | |||
| <result column="payment_type" jdbcType="INTEGER" property="paymentType"/> | |||
| <result column="payment" jdbcType="INTEGER" property="payment"/> | |||
| <result column="credit_price" jdbcType="INTEGER" property="creditPrice"/> | |||
| <result column="payment_time" jdbcType="TIMESTAMP" property="paymentTime"/> | |||
| <result column="freight_price" jdbcType="INTEGER" property="freightPrice"/> | |||
| <result column="order_status" jdbcType="INTEGER" property="orderStatus"/> | |||
| @@ -773,6 +775,7 @@ | |||
| <result column="pay_vendor" jdbcType="TINYINT" property="payVendor"/> | |||
| <result column="payment_type" jdbcType="INTEGER" property="paymentType"/> | |||
| <result column="payment" jdbcType="INTEGER" property="payment"/> | |||
| <result column="credit_price" jdbcType="INTEGER" property="creditPrice"/> | |||
| <result column="payment_time" jdbcType="TIMESTAMP" property="paymentTime"/> | |||
| <result column="freight_price" jdbcType="INTEGER" property="freightPrice"/> | |||
| <result column="order_status" jdbcType="INTEGER" property="orderStatus"/> | |||