Commit 08b6357e authored by 赵鹏翔's avatar 赵鹏翔

支付类型kotlin化初六

parent 231cba09
......@@ -52,7 +52,7 @@ class PayResultActivity : BaseActivity() {
tvOrderNo.text = payServiceResponse.shopTradeNo
tvPayWay.text = MiYaPayPlantformPayWayEnum.MiyaPayType.find(
payServiceResponse.chanelTag
).desc
)?.desc
tvTradeNo.text = payServiceResponse.chanelSerialNumber
tvTradeTime.text = payServiceResponse.miyaResponseTime
......
package com.fastcashier.lib_common.function.account
import android.text.TextUtils
import com.fastcashier.lib_common.base.BaseBean
import com.fastcashier.lib_common.function.account.SelfCashierTerminalConfig.*
import com.google.gson.annotations.SerializedName
import com.fastcashier.lib_common.function.account.SelfCashierAccountInfo.ShopInfo
import com.fastcashier.lib_common.function.account.SelfCashierAccountInfo.AccessToken
import com.fastcashier.lib_common.function.account.SelfCashierAccountInfo.ShopExtInfo
import com.fastcashier.lib_common.function.account.SelfCashierTerminalConfig
import com.fastcashier.lib_common.function.account.SelfCashierTerminalConfig.ShopConfig
import com.fastcashier.lib_common.function.account.SelfCashierTerminalConfig.ScoRuntimeConfig
import com.fastcashier.lib_common.function.account.SelfCashierTerminalConfig.ScoFunctionConfig
import com.fastcashier.lib_common.function.account.SelfCashierTerminalConfig.LogoAndVideoConfig
import com.fastcashier.lib_common.function.account.SelfCashierTerminalConfig.ScoUrlParams
import android.text.TextUtils
import com.fastcashier.lib_common.function.account.SelfCashierTerminalConfig.AlipayConfig
import com.fastcashier.lib_common.function.account.SelfCashierTerminalConfig.MiYaPayPlatformConfig
import com.fastcashier.lib_common.function.account.SelfCashierTerminalConfig.WeiXinConfig
import com.fastcashier.lib_common.function.account.SelfCashierTerminalConfig.PrintConfig
import com.fastcashier.lib_common.function.account.SelfCashierTerminalConfig.HuihuaConfig
import java.util.ArrayList
import java.util.*
/**
* 类描述:基础信息类
......
package com.fastcashier.lib_common.function.pay;
package com.fastcashier.lib_common.function.pay
public class MiYaPayPlantformPayWayEnum {
public enum MiyaPayType {
class MiYaPayPlantformPayWayEnum {
enum class MiyaPayType(
/**
* code
*/
var code: String,
/**
* 支付类型名称
*/
var desc: String
) {
WEIXIN("1", "微信"),
MIAOJIE("2", "喵街"),
ALIPAY("3", "支付宝"),
......@@ -28,46 +36,22 @@ public class MiYaPayPlantformPayWayEnum {
YIDONG("U", "移动钱包"),
MINSHENG("S", "民生银行"),
YINLIANSHANGWU("Q", "银联商务"),
TONGLIANZHIFU("N", "通联支付");//N实际上是银联钱包,但是匡威平台银联支付走的是通联支付的渠道,app内默认处理成通联支付的形式
// YINLIANQIANBAO("N", "银联钱包");
TONGLIANZHIFU("N", "通联支付"); //N实际上是银联钱包,但是匡威平台银联支付走的是通联支付的渠道,app内默认处理成通联支付的形式
// YINLIANQIANBAO("N", "银联钱包");
/**
* 资源id
*/
int resId;
/**
* code
*/
String code;
/**
* 支付类型名称
*/
String desc;
MiyaPayType(String code, String desc) {
this.code = code;
this.desc = desc;
}
public String getCode() {
return code;
}
public String getDesc() {
return desc;
}
public static MiyaPayType find(String code) {
for (MiyaPayType ec : MiyaPayType.values()) {
if (ec.code.equals(code)) {
return ec;
var resId = 0
companion object {
fun find(code: String): MiyaPayType? {
for (ec in values()) {
if (ec.code == code) {
return ec
}
}
return null
}
return null;
}
}
}
}
\ No newline at end of file
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