Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-csf
Commits
c91d495d
Commit
c91d495d
authored
May 13, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出账检核-增加币种47
parent
a139ccd6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletions
+19
-1
yd-csf-service/src/main/java/com/yd/csf/service/enums/FortuneTypeEnum.java
+18
-0
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/ExpectedFortuneServiceImpl.java
+1
-1
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/enums/FortuneTypeEnum.java
View file @
c91d495d
...
@@ -39,4 +39,22 @@ public enum FortuneTypeEnum {
...
@@ -39,4 +39,22 @@ public enum FortuneTypeEnum {
public
String
getItemValue
()
{
public
String
getItemValue
()
{
return
itemValue
;
return
itemValue
;
}
}
/**
* 根据业务值(itemValue)获取枚举实例
*
* @param itemValue 业务值,如 "2"
* @return 对应的枚举实例
*/
public
static
FortuneTypeEnum
getByItemValue
(
String
itemValue
)
{
if
(
itemValue
==
null
)
{
return
null
;
}
for
(
FortuneTypeEnum
type
:
FortuneTypeEnum
.
values
())
{
if
(
type
.
getItemValue
().
equals
(
itemValue
))
{
return
type
;
}
}
throw
new
IllegalArgumentException
(
"No enum constant for itemValue: "
+
itemValue
);
}
}
}
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/ExpectedFortuneServiceImpl.java
View file @
c91d495d
...
@@ -304,7 +304,7 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
...
@@ -304,7 +304,7 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
String
formattedPolicySuffix
=
String
.
format
(
"%6s"
,
last6Chars
).
replace
(
' '
,
'0'
);
String
formattedPolicySuffix
=
String
.
format
(
"%6s"
,
last6Chars
).
replace
(
' '
,
'0'
);
// 3. 项目类型枚举转换为字符串
// 3. 项目类型枚举转换为字符串
String
fortuneTypeCode
=
FortuneTypeEnum
.
valueOf
(
fortuneType
).
getItemLabel
();
String
fortuneTypeCode
=
FortuneTypeEnum
.
getByItemValue
(
fortuneType
).
getItemLabel
();
// 4. 组装最终字符串
// 4. 组装最终字符串
return
String
.
format
(
"%s-%s-%d"
,
return
String
.
format
(
"%s-%s-%d"
,
...
...
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