Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MiYaFastCashier
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangjiantao
MiYaFastCashier
Commits
08b6357e
Commit
08b6357e
authored
Feb 24, 2023
by
赵鹏翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付类型kotlin化初六
parent
231cba09
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
57 deletions
+28
-57
PayResultActivity.kt
...rc/main/java/com/miya/fastcashier/ui/PayResultActivity.kt
+1
-1
SelfCashierAccountInfo.kt
...ier/lib_common/function/account/SelfCashierAccountInfo.kt
+3
-16
MiYaPayPlantformPayWayEnum.kt
...ier/lib_common/function/pay/MiYaPayPlantformPayWayEnum.kt
+24
-40
No files found.
app/src/main/java/com/miya/fastcashier/ui/PayResultActivity.kt
View file @
08b6357e
...
...
@@ -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
...
...
lib_common/src/main/java/com/fastcashier/lib_common/function/account/SelfCashierAccountInfo.kt
View file @
08b6357e
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.*
/**
* 类描述:基础信息类
...
...
lib_common/src/main/java/com/fastcashier/lib_common/function/pay/MiYaPayPlantformPayWayEnum.
java
→
lib_common/src/main/java/com/fastcashier/lib_common/function/pay/MiYaPayPlantformPayWayEnum.
kt
View file @
08b6357e
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment