Просмотр исходного кода

fix pay share

release_toaliyun_real
zhengfangyuan 3 лет назад
Родитель
Сommit
65b56a584f
12 измененных файлов: 286 добавлений и 24 удалений
  1. +200
    -0
      mallinkAdmin/src/main/resources/db/migration/V2022090300001_seller.sql
  2. +3
    -2
      mallinkSchedule/src/main/java/com/iformall/schedule/CouponOrderExpiringSchedule.java
  3. +5
    -1
      mallinkService/src/main/java/com/iformall/domain/dto/WxSharingOrderDto.java
  4. +5
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxProfitSharingOrder.java
  5. +1
    -1
      mallinkService/src/main/java/com/iformall/service/WxProfitSharingOrderService.java
  6. +3
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java
  7. +3
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java
  8. +25
    -9
      mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingOrderServiceImpl.java
  9. +21
    -1
      mallinkService/src/main/java/com/iformall/service/pay/service/share/douyin/TtPayShareService.java
  10. +3
    -0
      mallinkService/src/main/java/com/iformall/service/pay/service/share/wx/v2/WxPayShareService.java
  11. +3
    -0
      mallinkService/src/main/java/com/iformall/service/pay/service/share/wx/v3/WxPayShareV3Service.java
  12. +14
    -7
      mallinkService/src/main/resources/mapper/WxProfitSharingOrderMapper.xml

+ 200
- 0
mallinkAdmin/src/main/resources/db/migration/V2022090300001_seller.sql Просмотреть файл

@@ -227,6 +227,206 @@ ALTER TABLE wx_pay_order_98 ADD COLUMN `commission_amount` INT(11) NOT NULL
ALTER TABLE wx_pay_order_99 ADD COLUMN `commission_amount` INT(11) NOT NULL DEFAULT 0 COMMENT '平台(微信,抖音)扣点' AFTER `system_amount`;


alter table wx_profit_sharing_order_0 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_1 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_2 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_3 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_4 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_5 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_6 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_7 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_8 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_9 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_10 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_11 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_12 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_13 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_14 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_15 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_16 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_17 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_18 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_19 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_20 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_21 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_22 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_23 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_24 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_25 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_26 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_27 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_28 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_29 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_30 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_31 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_32 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_33 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_34 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_35 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_36 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_37 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_38 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_39 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_40 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_41 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_42 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_43 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_44 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_45 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_46 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_47 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_48 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_49 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_50 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_51 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_52 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_53 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_54 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_55 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_56 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_57 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_58 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_59 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_60 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_61 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_62 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_63 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_64 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_65 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_66 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_67 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_68 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_69 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_70 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_71 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_72 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_73 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_74 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_75 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_76 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_77 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_78 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_79 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_80 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_81 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_82 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_83 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_84 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_85 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_86 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_87 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_88 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_89 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_90 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_91 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_92 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_93 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_94 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_95 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_96 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_97 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_98 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;
alter table wx_profit_sharing_order_99 add column `single_order_amount` int(11) NOT NULL DEFAULT 0 COMMENT '单个订单金额' AFTER `pay_amount`;

alter table wx_profit_sharing_order_0 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_1 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_2 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_3 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_4 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_5 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_6 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_7 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_8 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_9 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_10 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_11 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_12 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_13 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_14 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_15 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_16 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_17 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_18 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_19 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_20 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_21 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_22 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_23 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_24 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_25 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_26 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_27 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_28 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_29 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_30 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_31 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_32 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_33 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_34 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_35 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_36 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_37 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_38 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_39 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_40 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_41 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_42 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_43 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_44 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_45 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_46 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_47 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_48 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_49 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_50 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_51 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_52 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_53 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_54 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_55 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_56 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_57 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_58 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_59 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_60 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_61 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_62 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_63 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_64 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_65 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_66 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_67 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_68 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_69 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_70 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_71 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_72 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_73 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_74 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_75 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_76 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_77 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_78 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_79 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_80 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_81 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_82 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_83 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_84 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_85 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_86 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_87 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_88 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_89 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_90 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_91 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_92 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_93 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_94 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_95 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_96 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_97 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_98 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;
alter table wx_profit_sharing_order_99 add column `single_order_id` bigint(20) COMMENT '订单编号' AFTER `single_order_amount`;



+ 3
- 2
mallinkSchedule/src/main/java/com/iformall/schedule/CouponOrderExpiringSchedule.java Просмотреть файл

@@ -212,6 +212,8 @@ public class CouponOrderExpiringSchedule {
wxSharingOrderDto.setType(EnumProfitSharingOrderType.PROFIT_SHARING_SINGLE_FINISH.getCode());
wxSharingOrderDto.setPayAmount(wxPayOrder.getPayAmount());
wxSharingOrderDto.setOrderId(wxPayOrder.getId());
wxSharingOrderDto.setSingleOrderId(co.getOrderId());
wxSharingOrderDto.setSingleOrderAmount(co.getCouponPrice());
wxSharingOrderDto.setPayTimeStart(wxPayOrder.getPayTimeStart());
wxSharingOrderDto.setPayTimeEnd(wxPayOrder.getPayTimeEnd());
wxSharingOrderDto.updateTenantInfo(wxPayOrder);
@@ -224,8 +226,7 @@ public class CouponOrderExpiringSchedule {
// 未设置通道费差
wxSharingOrderDto.setMerchantShareAmount(share.getShareAmount());
}
wxProfitSharingOrderService.createSharingOrder(wxSharingOrderDto,wxPayOrder,co.getOrderId());
// wxProfitSharingOrderService.finishSharingOrder(wxPayOrder,wxSharingOrderDto,wxPayOrder.getPayVendor(),wxPayOrder.getShare());
wxProfitSharingOrderService.createSharingOrder(wxSharingOrderDto,wxPayOrder);
}

} catch (MallinkException e) {


+ 5
- 1
mallinkService/src/main/java/com/iformall/domain/dto/WxSharingOrderDto.java Просмотреть файл

@@ -10,8 +10,12 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = true)
public class WxSharingOrderDto extends TenantEntity {

@io.swagger.annotations.ApiModelProperty(value="订单ID",name="orderId")
@io.swagger.annotations.ApiModelProperty(value="支付订单ID",name="wxPayOrderId")
private Long orderId;
@io.swagger.annotations.ApiModelProperty(value="订单ID",name="singleOrderId")
private Long singleOrderId;
@io.swagger.annotations.ApiModelProperty(value="单个订单支付金额(分)",name="singleOrderAmount")
private Integer singleOrderAmount;
@io.swagger.annotations.ApiModelProperty(value="c用户ID",name="cUserId")
private Long cUserId;
@io.swagger.annotations.ApiModelProperty(value="微信生成的订单号",name="transactionId")


+ 5
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxProfitSharingOrder.java Просмотреть файл

@@ -22,12 +22,16 @@ public class WxProfitSharingOrder extends TenantEntity {
private Long payMerchantId;
@io.swagger.annotations.ApiModelProperty(value="支付时收款商户平台账号,直连模式必须有",name="payMerchantMchId")
private String payMerchantMchId;
@io.swagger.annotations.ApiModelProperty(value="订单ID",name="orderId")
@io.swagger.annotations.ApiModelProperty(value="支付订单ID",name="wxPayOrderId")
private Long orderId;
@io.swagger.annotations.ApiModelProperty(value="支付渠道: (抖音分账用)",name="payVendor")
private Integer payVendor;
@io.swagger.annotations.ApiModelProperty(value="分账总金额(分)",name="payAmount")
private Integer payAmount;
@io.swagger.annotations.ApiModelProperty(value="订单ID",name="singleOrderId")
private Long singleOrderId;
@io.swagger.annotations.ApiModelProperty(value="单个订单分账总金额(分)",name="singleOrderAmount")
private Integer singleOrderAmount;
@io.swagger.annotations.ApiModelProperty(value="分账结束时间(秒)",name="payTimeEnd")
private Date payTimeEnd;
@io.swagger.annotations.ApiModelProperty(value="分账发起时间(秒)",name="payTimeStart")


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/WxProfitSharingOrderService.java Просмотреть файл

@@ -21,7 +21,7 @@ public interface WxProfitSharingOrderService {
/**
* 创建分账订单
*/
ResultData createSharingOrder(WxSharingOrderDto wxSharingOrderDto,WxPayOrder payOrder,Long orderId);
ResultData createSharingOrder(WxSharingOrderDto wxSharingOrderDto,WxPayOrder payOrder);

/**
* 分账重试


+ 3
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java Просмотреть файл

@@ -1761,11 +1761,13 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService {
wxSharingOrderDto.setCommissionAmount(childShare.getCommissionAmount());
wxSharingOrderDto.setSystemAmount(childShare.getSystemAmount());
wxSharingOrderDto.setOrderId(wxPayOrder.getId());
wxSharingOrderDto.setSingleOrderId(childShare.getOrderId());
wxSharingOrderDto.setSingleOrderAmount(childShare.getRealPayMent());
wxSharingOrderDto.setPayTimeStart(wxPayOrder.getPayTimeStart());
wxSharingOrderDto.setPayTimeEnd(wxPayOrder.getPayTimeEnd());
wxSharingOrderDto.updateTenantInfo(wxPayOrder);
wxSharingOrderDto.setTransactionId(wxPayOrder.getTransactionId());
wxProfitSharingOrderService.createSharingOrder(wxSharingOrderDto,wxPayOrder,order.getId());
wxProfitSharingOrderService.createSharingOrder(wxSharingOrderDto,wxPayOrder);
} catch (Exception e) {
logger.error("微信分账: " + e.getMessage());
}


+ 3
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java Просмотреть файл

@@ -2594,11 +2594,13 @@ public class WxOrderServiceImpl implements WxOrderService {
sharingOrder.setRealRateAmount(share.getRealRateAmount());
sharingOrder.setCommissionAmount(share.getCommissionAmount());
sharingOrder.setOrderId(wxPayOrder.getId());
sharingOrder.setSingleOrderId(share.getOrderId());
sharingOrder.setSingleOrderAmount(share.getRealPayMent());
sharingOrder.setPayTimeStart(wxPayOrder.getPayTimeStart());
sharingOrder.setPayTimeEnd(wxPayOrder.getPayTimeEnd());
sharingOrder.updateTenantInfo(wxPayOrder);
sharingOrder.setTransactionId(wxPayOrder.getTransactionId());
wxProfitSharingOrderService.createSharingOrder(sharingOrder,wxPayOrder,orderId);
wxProfitSharingOrderService.createSharingOrder(sharingOrder,wxPayOrder);
} else {


+ 25
- 9
mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingOrderServiceImpl.java Просмотреть файл

@@ -166,6 +166,23 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ
recordJsonArray = JSONArray.parseArray(sharingOrder.getReceivers());
}
//添加分账账号: 系统抽点,销售提成,商场扣点,平台(微信,抖音)抽佣
int systemAmount = 0;//系统抽点
int sellerAmount = 0;//销售抽点
int mallAmount = 0;//商场抽点
int commissionAmount = 0;//平台(微信,抖音)抽佣
int realRateAmount = 0;//支付通道费用
wxPayOrder.getCommissionAmount();
Long singleOrderId = sharingOrder.getSingleOrderId();
if (null != singleOrderId) {
WxComposeChildOrderShare share = wxPayOrder.getChildOrderShare(singleOrderId);
share.getCommissionAmount();
share.getSystemAmount();
share.getShareAmount();
}
//直连模式
if (EnumPayMchType.DIRECT.getCode() == wxPayOrder.getMchType()) {
//当前商户的收款账号,为了加上收款记录
@@ -173,7 +190,13 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ
if (null == receiver) {
return new ResultData(ErrorCode.PROFIT_SHARING_REQUEST_FAILED.getCode(),"当前商户未配置收款账号");
}
StringBuffer sb = new StringBuffer("{").append("\"description\":").append(receiver.getId()).append(",\"amount\":").append(0).append("}");
StringBuffer sb = new StringBuffer("{").append("\"description\":").append(receiver.getId()).append(",\"amount\":").append(mallAmount).append("}");
//TODO ########################### 给用户看到的只有商场包干抽点(实际包括系统抽点,销售抽点,商场抽点)
//要获取商管商户
if (null == recordJsonArray) {
recordJsonArray = JSONArray.parseArray("["+sb.toString()+"]");
}else {
@@ -241,19 +264,12 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ

@Override
// @Transactional(isolation=Isolation.SERIALIZABLE, propagation = Propagation.REQUIRED, rollbackFor = {Exception.class})
public ResultData createSharingOrder(WxSharingOrderDto sharingOrderDto,WxPayOrder payOrder,Long orderId) {
public ResultData createSharingOrder(WxSharingOrderDto sharingOrderDto,WxPayOrder payOrder) {

PayShareAdapterService payShareAdapterService = payServiceFactory.getPayShareAdapterService(payOrder.getPayVendor(),payOrder.getPayVersion());

WxProfitSharingOrder record = payShareAdapterService.createSharingOrder(sharingOrderDto,payOrder);

//抖音模式涉及到佣金,无法实时分账
if(EnumPayWay.PAY_WAY_TT.getCode().equals(payOrder.getPayVendor())){
return new ResultData();
}
//分账账号:系统扣点账号,销售提成账号,商场扣点账号
WxComposeChildOrderShare share = payOrder.getChildOrderShare(orderId);
ResultData resultData = redoSharingOrder(record,payOrder);
return resultData;
}


+ 21
- 1
mallinkService/src/main/java/com/iformall/service/pay/service/share/douyin/TtPayShareService.java Просмотреть файл

@@ -154,6 +154,24 @@ public class TtPayShareService extends PayShareBaseAdapterService{

@Override
public PayShareResult haveReciversShare(WxAppinfo appInfo,WxPayAccount payAccount,WxProfitSharingOrder record,JSONArray receivers,Integer mchType) throws MallinkException {
//判断佣金是否已经出来了,没出来返回错误
WxOrder order = wxOrderMapper.selectById(record.getSingleOrderId(), appInfo.getTenantId());
if(EnumOrderCpsStatus.ORDER_DEF_CPS.getCode().equals(order.getCpsStatus())){
//如果没有查询到佣金
return new PayShareResult(false, EnumProfitSharingOrderStatus.PROFIT_SHARING_APPLY_FAILED.getCode(),"订单未同步cps", null,null);
}
//TODO 购物车逻辑待处理。抖音只能所有订单都核销了才能核销
//TODO 总分要算佣金。
if(EnumPayMchType.TOTAL.getCode().equals(mchType)){
}

if(EnumProfitSharingOrderStatus.PROFIT_SHARING_UNKNOWN.getCode().equals(record.getSharingStatus())){
return new PayShareResult(false, EnumProfitSharingOrderStatus.PROFIT_SHARING_UNKNOWN.getCode(),"分账准备中", null,null);
}
@@ -366,6 +384,7 @@ public class TtPayShareService extends PayShareBaseAdapterService{
WxProfitSharingOrder record = new WxProfitSharingOrder();
record.updateTenantInfo(sharingOrderDto);
record.setOrderId(sharingOrderDto.getOrderId());
record.setSingleOrderId(sharingOrderDto.getSingleOrderId());
record = wxProfitSharingOrderMapper.selectOne(new QueryWrapper(record));
if (record == null) {
//创建分账订单
@@ -376,6 +395,8 @@ public class TtPayShareService extends PayShareBaseAdapterService{
record.updateTenantInfo(sharingOrderDto);
record.setTransactionId(sharingOrderDto.getTransactionId());
record.setOrderId(sharingOrderDto.getOrderId());
record.setSingleOrderId(sharingOrderDto.getSingleOrderId());
record.setSingleOrderAmount(sharingOrderDto.getSingleOrderAmount());
record.setPayAmount(sharingOrderDto.getPayAmount());
record.setMerchantId(sharingOrderDto.getMerchantId());
record.setPayMerchantId(sharingOrderDto.getPayMerchantId());
@@ -388,7 +409,6 @@ public class TtPayShareService extends PayShareBaseAdapterService{
record.setType(sharingOrderDto.getType());
wxProfitSharingOrderMapper.insert(record);
}

return record;
}



+ 3
- 0
mallinkService/src/main/java/com/iformall/service/pay/service/share/wx/v2/WxPayShareService.java Просмотреть файл

@@ -356,6 +356,7 @@ public class WxPayShareService extends PayShareBaseAdapterService{
WxProfitSharingOrder record = new WxProfitSharingOrder();
record.updateTenantInfo(sharingOrderDto);
record.setOrderId(sharingOrderDto.getOrderId());
record.setSingleOrderId(sharingOrderDto.getSingleOrderId());
record = wxProfitSharingOrderMapper.selectOne(new QueryWrapper(record));
if (record == null) {
//创建分账订单
@@ -366,6 +367,8 @@ public class WxPayShareService extends PayShareBaseAdapterService{
record.updateTenantInfo(sharingOrderDto);
record.setTransactionId(sharingOrderDto.getTransactionId());
record.setOrderId(sharingOrderDto.getOrderId());
record.setSingleOrderId(sharingOrderDto.getSingleOrderId());
record.setSingleOrderAmount(sharingOrderDto.getSingleOrderAmount());
record.setPayAmount(sharingOrderDto.getPayAmount());
record.setMerchantId(sharingOrderDto.getMerchantId());
record.setSharingStatus(this.getSharingOrderInitialStatus());


+ 3
- 0
mallinkService/src/main/java/com/iformall/service/pay/service/share/wx/v3/WxPayShareV3Service.java Просмотреть файл

@@ -85,6 +85,7 @@ public class WxPayShareV3Service extends PayShareBaseAdapterService{
WxProfitSharingOrder record = new WxProfitSharingOrder();
record.updateTenantInfo(sharingOrderDto);
record.setOrderId(sharingOrderDto.getOrderId());
record.setSingleOrderId(sharingOrderDto.getSingleOrderId());
record = wxProfitSharingOrderMapper.selectOne(new QueryWrapper(record));
if (record == null) {
//创建分账订单
@@ -95,6 +96,8 @@ public class WxPayShareV3Service extends PayShareBaseAdapterService{
record.updateTenantInfo(sharingOrderDto);
record.setTransactionId(sharingOrderDto.getTransactionId());
record.setOrderId(sharingOrderDto.getOrderId());
record.setSingleOrderId(sharingOrderDto.getSingleOrderId());
record.setSingleOrderAmount(sharingOrderDto.getSingleOrderAmount());
record.setPayAmount(sharingOrderDto.getPayAmount());
record.setMerchantId(sharingOrderDto.getMerchantId());
//直连模式,


+ 14
- 7
mallinkService/src/main/resources/mapper/WxProfitSharingOrderMapper.xml Просмотреть файл

@@ -12,6 +12,8 @@
<result column="order_id" jdbcType="BIGINT" property="orderId" />
<result column="pay_vendor" jdbcType="INTEGER" property="payVendor"/>
<result column="pay_amount" jdbcType="INTEGER" property="payAmount" />
<result column="single_order_amount" jdbcType="INTEGER" property="singleOrderAmount" />
<result column="single_order_id" jdbcType="BIGINT" property="singleOrderId" />
<result column="pay_time_end" jdbcType="TIMESTAMP" property="payTimeEnd" />
<result column="pay_time_start" jdbcType="TIMESTAMP" property="payTimeStart" />
<result column="transaction_id" jdbcType="VARCHAR" property="transactionId" />
@@ -25,20 +27,18 @@
</resultMap>
<sql id="allColumns">
`id`,`tenant_id`,`parent_tenant_id`,`out_settle_no`,`merchant_id`,`pay_merchant_id`,`pay_merchant_mch_id`,`order_id`,`pay_vendor`,`pay_amount`,`pay_time_end`,`pay_time_start`,`transaction_id`,`sharing_order_no`,`type`,`receivers`,`error_msg`,`sharing_status`,`update_time`,`create_time`
`id`,`tenant_id`,`parent_tenant_id`,`out_settle_no`,`merchant_id`,`pay_merchant_id`,`pay_merchant_mch_id`,`order_id`,`pay_vendor`,`pay_amount`,
`single_order_amount`,`single_order_id`,`pay_time_end`,`pay_time_start`,`transaction_id`,`sharing_order_no`,`type`,`receivers`,`error_msg`,`sharing_status`,`update_time`,`create_time`
</sql>

<sql id="dynamicWhereConditions">
where 1 = 1
where `tenant_id` = #{tenantId}
<if test=" null != id ">
and `id` = #{id}
</if>

<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
@@ -61,7 +61,10 @@
<if test=" null != orderId ">
and `order_id` = #{orderId}
</if>
<if test=" null != singleOrderId ">
and `single_order_id` = #{singleOrderId}
</if>

<if test=" null != payVendor ">
@@ -147,6 +150,8 @@
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName" />
<result column="order_id" jdbcType="BIGINT" property="orderId" />
<result column="pay_amount" jdbcType="INTEGER" property="payAmount" />
<result column="single_order_amount" jdbcType="INTEGER" property="singleOrderAmount" />
<result column="single_order_id" jdbcType="BIGINT" property="singleOrderId" />
<result column="pay_time_end" jdbcType="TIMESTAMP" property="payTimeEnd" />
<result column="pay_time_start" jdbcType="TIMESTAMP" property="payTimeStart" />
<result column="transaction_id" jdbcType="VARCHAR" property="transactionId" />
@@ -234,6 +239,8 @@
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
<result column="pay_amount" jdbcType="INTEGER" property="payAmount" />
<result column="single_order_amount" jdbcType="INTEGER" property="singleOrderAmount" />
<result column="single_order_id" jdbcType="BIGINT" property="singleOrderId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="sharing_status" jdbcType="INTEGER" property="sharingStatus" />
<result column="finish_time" jdbcType="VARCHAR" property="finishTime" />
@@ -248,7 +255,7 @@
</resultMap>
<select id="findOrderDetails" parameterType="java.util.HashMap" resultMap="orderDetailsMap">
select psr.id,psr.tenant_id,psr.parent_tenant_id,psr.pay_amount,psr.create_time,sharing_status,finish_time,failed_reason,description,
select psr.id,psr.tenant_id,psr.parent_tenant_id,psr.pay_amount,psr.single_order_amount,psr.single_order_id,psr.create_time,sharing_status,finish_time,failed_reason,description,
psre.receiver_type,psre.receiver_account,psre.receiver_comments,psre.sharing_type,psre.`status`
from wx_profit_sharing_result psr left join wx_profit_sharing_receiver psre on psr.sharing_receiver_id=psre.id
where psr.sharing_order_id=#{id} and psr.tenant_id=#{tenantId} and psr.sharing_receiver_id!=0


Загрузка…
Отмена
Сохранить