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

// yutijiao

release_toaliyun_real
xhxu 3 лет назад
Родитель
Сommit
6f398b12bb
5 измененных файлов: 52 добавлений и 7 удалений
  1. +3
    -0
      mallinkAdmin/src/main/resources/db/migration/V2022072800001__pay_account.sql
  2. +4
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxPayAccount.java
  3. +35
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumPayMchType.java
  4. +7
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverServiceImpl.java
  5. +3
    -1
      mallinkService/src/main/resources/mapper/WxPayAccountMapper.xml

+ 3
- 0
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`;

+ 4
- 0
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")


+ 35
- 0
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;
}
}

+ 7
- 6
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{


+ 3
- 1
mallinkService/src/main/resources/mapper/WxPayAccountMapper.xml Просмотреть файл

@@ -16,6 +16,8 @@
<result column="cert_path" jdbcType="VARCHAR" property="certPath"/>
<result column="merchant_cert_path" jdbcType="VARCHAR" property="merchantCertPath"/>
<result column="type" jdbcType="INTEGER" property="type"/>
<result column="mch_type" jdbcType="INTEGER" property="mchType"/>
<result column="open_pay" jdbcType="VARCHAR" property="openPay"/>
<result column="share" jdbcType="INTEGER" property="share"/>
<result column="rate" jdbcType="INTEGER" property="rate"/>
<result column="real_rate" jdbcType="INTEGER" property="realRate"/>
@@ -30,7 +32,7 @@

<sql id="allColumns">
`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`
</sql>



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