Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-financial
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit da4fa819
authored
Mar 31, 2026
by
潘诗林
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
宁波财资接入优加:添加主体枚举类
1 parent
d27e6185
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
0 deletions
rpc-dj-financial-api/src/main/java/cn/com/glsx/dj/financial/enums/NbCbCustEnum.java
rpc-dj-financial-api/src/main/java/cn/com/glsx/dj/financial/enums/NbCbCustEnum.java
0 → 100644
View file @
da4fa81
package
cn
.
com
.
glsx
.
dj
.
financial
.
enums
;
import
io.swagger.models.auth.In
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Objects
;
/**
* 宁波银行主体信息枚举
* @author pansl
*/
@Getter
@AllArgsConstructor
public
enum
NbCbCustEnum
{
/**
* 广联主体
*/
GL_CUST
(
1
,
"9000919969"
,
"9865fe2c-1ba3-4e9c-af8a-24d2a8e0eafc"
,
"嘀加主账户"
),
/**
* 优加主体
*/
YJ_CUST
(
2
,
"9002368118"
,
"3b37996d-cdad-4448-b595-74ac5c3c965d"
,
"优加"
);
/**
* 客户类型
*/
private
final
Integer
custType
;
/**
* 客户 ID
*/
private
final
String
custId
;
/**
* AppKey
*/
private
final
String
appKey
;
/**
* 描述
*/
private
final
String
description
;
private
static
final
Map
<
String
,
NbCbCustEnum
>
CUST_MAP
=
new
HashMap
<>();
static
{
for
(
NbCbCustEnum
item
:
values
())
{
CUST_MAP
.
put
(
item
.
getCustId
(),
item
);
}
}
/**
* 根据客户类型获取枚举
* @param custType 客户类型
* @return NbCbCustEnum
*/
public
static
NbCbCustEnum
getByCustType
(
Integer
custType
)
{
if
(
custType
==
null
)
{
return
null
;
}
for
(
NbCbCustEnum
item
:
values
())
{
if
(
item
.
custType
.
equals
(
custType
))
{
return
item
;
}
}
return
null
;
}
/**
* 根据客户 ID 获取枚举
* @param custId 客户 ID
* @return NbCbCustEnum
*/
public
static
String
getAppKeyByCustId
(
String
custId
)
{
if
(
custId
==
null
||
custId
.
isEmpty
())
{
return
null
;
}
NbCbCustEnum
nbCbCustEnum
=
CUST_MAP
.
get
(
custId
);
if
(
Objects
.
nonNull
(
nbCbCustEnum
)){
return
nbCbCustEnum
.
getAppKey
()
;
}
return
null
;
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment