| @@ -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`; | |||||
| @@ -32,6 +32,10 @@ public class WxPayAccount extends TenantEntity { | |||||
| private String merchantCertPath; | private String merchantCertPath; | ||||
| @io.swagger.annotations.ApiModelProperty(value="商户模式-0:普通商户模式1:服务商模式",name="type") | @io.swagger.annotations.ApiModelProperty(value="商户模式-0:普通商户模式1:服务商模式",name="type") | ||||
| private Integer 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") | @io.swagger.annotations.ApiModelProperty(value="是否开启分账(0:未开启分账1:开启分账)",name="type") | ||||
| private Integer share; | private Integer share; | ||||
| @io.swagger.annotations.ApiModelProperty(value="手续费(万分之几,默认60)",name="rate") | @io.swagger.annotations.ApiModelProperty(value="手续费(万分之几,默认60)",name="rate") | ||||
| @@ -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; | |||||
| } | |||||
| } | |||||
| @@ -148,7 +148,7 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv | |||||
| receiver.setCreateTime(date); | receiver.setCreateTime(date); | ||||
| receiver.setUpdateTime(date); | receiver.setUpdateTime(date); | ||||
| receiver.setStatus(EnumProfitSharingReceiverStatus.PROFIT_SHARING_RECEIVER_STATUS_VALID.getCode()); | receiver.setStatus(EnumProfitSharingReceiverStatus.PROFIT_SHARING_RECEIVER_STATUS_VALID.getCode()); | ||||
| receiver.setIsUse(EnumProfitSharingUse.APPLY.getCode()); | |||||
| // receiver.setIsUse(EnumProfitSharingUse.APPLY.getCode()); | |||||
| receiver.setPlat(payWay.getPlat().getCode()); | receiver.setPlat(payWay.getPlat().getCode()); | ||||
| //passed from uplevel | //passed from uplevel | ||||
| //receiver.setReceiverAccount(receiverParam.getReceiverAccount()); | //receiver.setReceiverAccount(receiverParam.getReceiverAccount()); | ||||
| @@ -320,7 +320,7 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv | |||||
| wxProfitSharingReceiver = oldReceiver; | wxProfitSharingReceiver = oldReceiver; | ||||
| wxProfitSharingReceiver.setReceiverType(EnumProfitSharingReceiverType.PROFIT_SHARING_RECEIVER_MERCHANT_ID.getCode()); | wxProfitSharingReceiver.setReceiverType(EnumProfitSharingReceiverType.PROFIT_SHARING_RECEIVER_MERCHANT_ID.getCode()); | ||||
| wxProfitSharingReceiver.setReceiverAccount("0"); | wxProfitSharingReceiver.setReceiverAccount("0"); | ||||
| wxProfitSharingReceiver.setIsUse(EnumProfitSharingUse.APPLY.getCode()); | |||||
| // wxProfitSharingReceiver.setIsUse(EnumProfitSharingUse.APPLY.getCode()); | |||||
| wxProfitSharingReceiver.setStatus(EnumProfitSharingReceiverStatus.PROFIT_SHARING_RECEIVER_STATUS_VALID.getCode()); | wxProfitSharingReceiver.setStatus(EnumProfitSharingReceiverStatus.PROFIT_SHARING_RECEIVER_STATUS_VALID.getCode()); | ||||
| this.saveOrUpdate(wxProfitSharingReceiver); | this.saveOrUpdate(wxProfitSharingReceiver); | ||||
| } | } | ||||
| @@ -343,13 +343,14 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv | |||||
| } | } | ||||
| QueryMerchantResult queryMerchantResult = DouYinPayHelper.queryMerchantStatus(appId, payAccountKey, wxProfitSharingReceiver.getReceiverAccount(), wxProfitSharingReceiver.getMerchantId().toString(), null); | QueryMerchantResult queryMerchantResult = DouYinPayHelper.queryMerchantStatus(appId, payAccountKey, wxProfitSharingReceiver.getReceiverAccount(), wxProfitSharingReceiver.getMerchantId().toString(), null); | ||||
| if(queryMerchantResult != 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){ | // if(queryMerchantResult.getAlipay().intValue() != 1){ | ||||
| // return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"支付宝渠道未进件成功!"); | // 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); | this.saveOrUpdate(wxProfitSharingReceiver); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| }else{ | }else{ | ||||
| @@ -16,6 +16,8 @@ | |||||
| <result column="cert_path" jdbcType="VARCHAR" property="certPath"/> | <result column="cert_path" jdbcType="VARCHAR" property="certPath"/> | ||||
| <result column="merchant_cert_path" jdbcType="VARCHAR" property="merchantCertPath"/> | <result column="merchant_cert_path" jdbcType="VARCHAR" property="merchantCertPath"/> | ||||
| <result column="type" jdbcType="INTEGER" property="type"/> | <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="share" jdbcType="INTEGER" property="share"/> | ||||
| <result column="rate" jdbcType="INTEGER" property="rate"/> | <result column="rate" jdbcType="INTEGER" property="rate"/> | ||||
| <result column="real_rate" jdbcType="INTEGER" property="realRate"/> | <result column="real_rate" jdbcType="INTEGER" property="realRate"/> | ||||
| @@ -30,7 +32,7 @@ | |||||
| <sql id="allColumns"> | <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`, | `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` | `service_id`,`pay_score_notify_url`,`api_v3_key`,`cert_serial_no`,`private_key_path`,`private_cert_path` | ||||
| </sql> | </sql> | ||||