Commit 16d481a6 by konghaorui

补充wx支付type 配置参数

parent 4833c4ef
......@@ -42,17 +42,17 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.48.6",
"m-confide" : "0.0.48.8",
"m-consultant" : "0.0.58.3",
"m-fm" : "0.0.29.2",
"m-user" : "0.0.59.5",
"m-user" : "0.0.59.8",
"m-home" : "0.0.20.3",
"m-im" : "0.0.15.9",
"m-dynamic" : "0.0.7.3",
"m-dynamic" : "0.0.7.4",
"m-muse" : "0.0.28.8",
"m-tests" : "0.0.23.9",
"m-course" : "0.0.41.9",
"m-course" : "0.0.41.10",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6",
......@@ -69,12 +69,12 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.39.5",
"ydl-platform" : "0.0.39.8",
//第二步 若干
"ydl-webview" : "0.0.38.8",
"ydl-media" : "0.0.21.3",
"ydl-pay" : "0.0.18.3",
"ydl-pay" : "0.0.18.4",
"m-audioim" : "0.0.48.0",
"ydl-flutter-base": "0.0.10.8",
......@@ -115,12 +115,12 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.39.5",
"ydl-platform" : "0.0.39.7",
//第二步 若干
"ydl-webview" : "0.0.38.4",
"ydl-media" : "0.0.21.3",
"ydl-pay" : "0.0.18.3",
"ydl-pay" : "0.0.18.4",
"m-audioim" : "0.0.48.0",
"ydl-flutter-base": "0.0.10.8",
......
package com.yidianling.ydl_pay.common.bean.params;
import android.text.TextUtils;
import com.ydl.ydlcommon.base.BaseApp;
import com.ydl.ydlcommon.base.config.YDLConstants;
......@@ -12,13 +14,16 @@ import com.ydl.ydlcommon.base.config.YDLConstants;
*/
public class WxPayParam extends CommonPayParam {
public WxPayParam(String payId, int isThreePay) {
super(payId, "wxapp_hz", isThreePay);
if (BaseApp.instance.getGlobalConfig().getAppFrom() == YDLConstants.FROM_XLZX) {
type = "wxapp_consult";
} else {
type = "wxapp_hz";
if(!TextUtils.isEmpty(BaseApp.instance.getGlobalConfig().getAppWxPayType())) {
type =BaseApp.instance.getGlobalConfig().getAppWxPayType();
}else {
if (YDLConstants.FROM_XLZX.equals(BaseApp.instance.getGlobalConfig().getAppFrom())) {
type = "wxapp_consult";
} else if(YDLConstants.FROM_YDL.equals(BaseApp.instance.getGlobalConfig().getAppFrom())) {
type = "wxapp_hz";
}
}
}
}
......@@ -16,6 +16,7 @@ class GlobalConfig private constructor(var builder: Builder) {
var appDebug: Boolean = false
var appName: String = ""
var appID: String = ""
var appWxPayType: String = ""
init {
this.appFrom = builder.appFrom
......@@ -23,6 +24,7 @@ class GlobalConfig private constructor(var builder: Builder) {
this.appDebug = builder.appDebug
this.appName = builder.appName
this.appID = builder.appID
this.appWxPayType = builder.appWxPayType
}
fun initEnv() {
......@@ -39,25 +41,36 @@ class GlobalConfig private constructor(var builder: Builder) {
var appDebug: Boolean = false
var appID: String = ""
var appName: String = ""
var appWxPayType: String = ""
fun setOkHttpClient(okHttpClient: OkHttpClient) {
fun setOkHttpClient(okHttpClient: OkHttpClient): Builder {
this.okHttpClient = okHttpClient
return this
}
fun setBaseURL(baseURL: String) {
fun setBaseURL(baseURL: String): Builder {
this.appBaseURL = baseURL
return this
}
fun setName(appName: String) {
fun setName(appName: String): Builder {
this.appName = appName
return this
}
fun setId(appID: String) {
fun setId(appID: String): Builder {
this.appID = appID
return this
}
fun setDebug(isDebug: Boolean) {
fun setWxPayType(wxPayType: String): Builder {
this.appWxPayType = wxPayType
return this
}
fun setDebug(isDebug: Boolean): Builder {
this.appDebug = isDebug
return this
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment