From 529788397eb97f832f756c698cf8cfe5e3554ae2 Mon Sep 17 00:00:00 2001 From: xhxu Date: Thu, 4 Aug 2022 17:39:04 +0800 Subject: [PATCH] // shar --- .../resources/db/migration/V2022072800001__pay_account.sql | 5 +++++ .../main/java/com/iformall/domain/po/WxMerchantBUser.java | 3 +++ .../service/pay/service/share/douyin/TtPayShareService.java | 4 +++- .../src/main/resources/mapper/WxMerchantBUserMapper.xml | 4 +++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/mallinkAdmin/src/main/resources/db/migration/V2022072800001__pay_account.sql b/mallinkAdmin/src/main/resources/db/migration/V2022072800001__pay_account.sql index e21afda25..3564b2c5c 100644 --- a/mallinkAdmin/src/main/resources/db/migration/V2022072800001__pay_account.sql +++ b/mallinkAdmin/src/main/resources/db/migration/V2022072800001__pay_account.sql @@ -203,3 +203,8 @@ ALTER TABLE `mallink`.`wx_pay_order_98` ADD COLUMN `mch_type` smallint(2) DEFAULT 0 COMMENT '0:总分,1:直连' AFTER `pay_param`; ALTER TABLE `mallink`.`wx_pay_order_99` ADD COLUMN `mch_type` smallint(2) DEFAULT 0 COMMENT '0:总分,1:直连' AFTER `pay_param`; + + + +ALTER TABLE `mallink`.`wx_merchant_b_user` +ADD COLUMN `other_merchant` json COMMENT '可核销其他商户' AFTER `is_admin`; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxMerchantBUser.java b/mallinkService/src/main/java/com/iformall/domain/po/WxMerchantBUser.java index 3d81ccb13..a0362a648 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxMerchantBUser.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxMerchantBUser.java @@ -47,6 +47,9 @@ public class WxMerchantBUser extends TenantEntity { @io.swagger.annotations.ApiModelProperty(value = "是否是管理员", name = "isAdmin") private Integer isAdmin; + @io.swagger.annotations.ApiModelProperty(value = "可核销其他商户", name = "otherMerchant") + private String otherMerchant; + @TableField(exist = false) @io.swagger.annotations.ApiModelProperty(value = "b用户ID", name = "buserId") private transient Long buserId; diff --git a/mallinkService/src/main/java/com/iformall/service/pay/service/share/douyin/TtPayShareService.java b/mallinkService/src/main/java/com/iformall/service/pay/service/share/douyin/TtPayShareService.java index 3dc7045bd..54e9e7f1e 100644 --- a/mallinkService/src/main/java/com/iformall/service/pay/service/share/douyin/TtPayShareService.java +++ b/mallinkService/src/main/java/com/iformall/service/pay/service/share/douyin/TtPayShareService.java @@ -105,7 +105,7 @@ public class TtPayShareService extends PayShareBaseAdapterService{ String before3dayStr = DateUtils.getTimeBefore(2, new Date()); Date before3day = DateUtils.stringToDate(before3dayStr); if(before3day.before(record.getCreateTime())){ - return new PayShareResult(false, EnumProfitSharingOrderStatus.PROFIT_SHARING_READY.getCode(),"未满足结算周期..", null,null); + return new PayShareResult(false, EnumProfitSharingOrderStatus.PROFIT_SHARING_APPLY_FAILED.getCode(),"未满足结算周期..", null,null); } try { TtPayService ttPayService = maUtil.getTtPayService(appInfo, payAccount); @@ -297,6 +297,7 @@ public class TtPayShareService extends PayShareBaseAdapterService{ updSharingOrder.setId(sharingOrder.getId()); updSharingOrder.updateTenantInfo(payOrder); updSharingOrder.setSharingStatus(EnumProfitSharingOrderStatus.PROFIT_SHARING_APPLY_FAILED.getCode()); + updSharingOrder.setErrorMsg("待分账重试"); updSharingOrder.setUpdateTime(new Date()); wxProfitSharingOrderMapper.updateById(updSharingOrder); return new ResultData(); @@ -342,6 +343,7 @@ public class TtPayShareService extends PayShareBaseAdapterService{ updSharingOrder.setId(sharingOrder.getId()); updSharingOrder.updateTenantInfo(payOrder); updSharingOrder.setSharingStatus(EnumProfitSharingOrderStatus.PROFIT_SHARING_APPLY_FAILED.getCode()); + updSharingOrder.setErrorMsg("待分账重试"); updSharingOrder.setReceivers(receivers.toJSONString()); updSharingOrder.setUpdateTime(new Date()); wxProfitSharingOrderMapper.updateById(updSharingOrder); diff --git a/mallinkService/src/main/resources/mapper/WxMerchantBUserMapper.xml b/mallinkService/src/main/resources/mapper/WxMerchantBUserMapper.xml index 51f713ff1..25e992bdd 100644 --- a/mallinkService/src/main/resources/mapper/WxMerchantBUserMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxMerchantBUserMapper.xml @@ -17,10 +17,12 @@ + + - `id`,`tenant_id`,`parent_tenant_id`,`phone`,`user_pwd`,`merchant_id`,`create_date`,`update_date`,`app_id`,`token`,`expire_time`,`name`,`status`,`is_admin` + `id`,`tenant_id`,`parent_tenant_id`,`phone`,`user_pwd`,`merchant_id`,`create_date`,`update_date`,`app_id`,`token`,`expire_time`,`name`,`status`,`is_admin`,`other_merchant`