diff --git a/mallinkAdmin/src/main/resources/db/migration/V2022072800001__pay_account.sql b/mallinkAdmin/src/main/resources/db/migration/V2022072800001__pay_account.sql new file mode 100644 index 000000000..42791c312 --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V2022072800001__pay_account.sql @@ -0,0 +1,3 @@ +ALTER TABLE `mallink`.`wx_pay_account` +ADD COLUMN `mch_type` smallint(2) DEFAULT 0 COMMENT '0:总分,1:直连' AFTER `type`, +ADD COLUMN `open_pay` json COMMENT '总分模式开通收款方式状态' AFTER `mch_type`; \ No newline at end of file diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxPayAccount.java b/mallinkService/src/main/java/com/iformall/domain/po/WxPayAccount.java index 5ba30326d..a51db7441 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxPayAccount.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxPayAccount.java @@ -32,6 +32,10 @@ public class WxPayAccount extends TenantEntity { private String merchantCertPath; @io.swagger.annotations.ApiModelProperty(value="商户模式-0:普通商户模式1:服务商模式",name="type") private Integer type; + @io.swagger.annotations.ApiModelProperty(value="EnumPayMchType 0:总分1:直连",name="mchType") + private Integer mchType; + @io.swagger.annotations.ApiModelProperty(value="抖音用 ",name="openPay") + private String openPay; @io.swagger.annotations.ApiModelProperty(value="是否开启分账(0:未开启分账1:开启分账)",name="type") private Integer share; @io.swagger.annotations.ApiModelProperty(value="手续费(万分之几,默认60)",name="rate") diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumPayMchType.java b/mallinkService/src/main/java/com/iformall/enums/EnumPayMchType.java new file mode 100644 index 000000000..76ae87c5d --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumPayMchType.java @@ -0,0 +1,35 @@ +package com.iformall.enums; + +/** + * Created by Stormeye on 2018/08/09. + */ +public enum EnumPayMchType { + + TOTAL(0, "总分"), + DIRECT(1, "直连"); + + public static EnumPayMchType getEnum(Integer code) { + for (EnumPayMchType value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + + private Integer code; + private String message; + + EnumPayMchType(Integer code, String message) { + this.code = code; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getMessage() { + return message; + } +} diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverServiceImpl.java index a36aef080..9ad9c85e3 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverServiceImpl.java @@ -148,7 +148,7 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv receiver.setCreateTime(date); receiver.setUpdateTime(date); receiver.setStatus(EnumProfitSharingReceiverStatus.PROFIT_SHARING_RECEIVER_STATUS_VALID.getCode()); - receiver.setIsUse(EnumProfitSharingUse.APPLY.getCode()); +// receiver.setIsUse(EnumProfitSharingUse.APPLY.getCode()); receiver.setPlat(payWay.getPlat().getCode()); //passed from uplevel //receiver.setReceiverAccount(receiverParam.getReceiverAccount()); @@ -320,7 +320,7 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv wxProfitSharingReceiver = oldReceiver; wxProfitSharingReceiver.setReceiverType(EnumProfitSharingReceiverType.PROFIT_SHARING_RECEIVER_MERCHANT_ID.getCode()); wxProfitSharingReceiver.setReceiverAccount("0"); - wxProfitSharingReceiver.setIsUse(EnumProfitSharingUse.APPLY.getCode()); +// wxProfitSharingReceiver.setIsUse(EnumProfitSharingUse.APPLY.getCode()); wxProfitSharingReceiver.setStatus(EnumProfitSharingReceiverStatus.PROFIT_SHARING_RECEIVER_STATUS_VALID.getCode()); this.saveOrUpdate(wxProfitSharingReceiver); } @@ -343,13 +343,14 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv } QueryMerchantResult queryMerchantResult = DouYinPayHelper.queryMerchantStatus(appId, payAccountKey, wxProfitSharingReceiver.getReceiverAccount(), wxProfitSharingReceiver.getMerchantId().toString(), null); if(queryMerchantResult != null){ - if(queryMerchantResult.getWx().intValue() != 1){ - return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"微信渠道未进件成功!"); - } +// if(queryMerchantResult.getWx().intValue() != 1){ +// return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"微信渠道未进件成功!"); +// } // if(queryMerchantResult.getAlipay().intValue() != 1){ // return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"支付宝渠道未进件成功!"); // } - wxProfitSharingReceiver.setIsUse(EnumProfitSharingUse.YES.getCode()); +// wxProfitSharingReceiver.setIsUse(EnumProfitSharingUse.YES.getCode()); + wxProfitSharingReceiver.setTtImportStatus(JSON.toJSONString(queryMerchantResult)); this.saveOrUpdate(wxProfitSharingReceiver); return new ResultData(); }else{ diff --git a/mallinkService/src/main/resources/mapper/WxPayAccountMapper.xml b/mallinkService/src/main/resources/mapper/WxPayAccountMapper.xml index dc8105d8c..d2fa5049e 100644 --- a/mallinkService/src/main/resources/mapper/WxPayAccountMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxPayAccountMapper.xml @@ -16,6 +16,8 @@ + + @@ -30,7 +32,7 @@ `id`,`tenant_id`,`parent_tenant_id`,`mch_id`,`sub_mch_id`,`sub_app_id`,`api_key`,`merchant_api_key`,`notify_url`,`notify_token`,`cert_path`, - `merchant_cert_path`,`type`,`share`,`rate`,`real_rate`, + `merchant_cert_path`,`type`,`mch_type`,`open_pay`,`share`,`rate`,`real_rate`, `service_id`,`pay_score_notify_url`,`api_v3_key`,`cert_serial_no`,`private_key_path`,`private_cert_path`