Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
7196848c
Commit
7196848c
authored
Dec 18, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
c83c62e9
e4d0adf2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
CreateCodeServiceImpl.java
...ot/module/ymt/api/service/impl/CreateCodeServiceImpl.java
+3
-3
No files found.
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/service/impl/CreateCodeServiceImpl.java
View file @
7196848c
...
@@ -32,7 +32,7 @@ public class CreateCodeServiceImpl implements ICreateCodeService {
...
@@ -32,7 +32,7 @@ public class CreateCodeServiceImpl implements ICreateCodeService {
private
static
final
String
SEQUENCE_TYPE_UR
=
"%05d"
;
private
static
final
String
SEQUENCE_TYPE_UR
=
"%05d"
;
private
static
final
String
SEQUENCE_TYPE
=
"%07d"
;
private
static
final
String
SEQUENCE_TYPE
=
"%07d"
;
private
final
RedisTemplate
<
String
,
String
>
redisTemplate
;
private
final
RedisTemplate
<
String
,
String
>
redisTemplate
;
private
String
rulePrefix
;
private
String
rulePrefix
=
""
;
public
CreateCodeServiceImpl
(
RedisTemplate
<
String
,
String
>
redisTemplate
)
{
public
CreateCodeServiceImpl
(
RedisTemplate
<
String
,
String
>
redisTemplate
)
{
this
.
redisTemplate
=
redisTemplate
;
this
.
redisTemplate
=
redisTemplate
;
...
@@ -198,14 +198,14 @@ public class CreateCodeServiceImpl implements ICreateCodeService {
...
@@ -198,14 +198,14 @@ public class CreateCodeServiceImpl implements ICreateCodeService {
String
formattedSequence
=
String
.
format
(
sequenceType
,
currentSequence
);
String
formattedSequence
=
String
.
format
(
sequenceType
,
currentSequence
);
log
.
info
(
"===================>更新《{}》顺序码:{}<==================="
,
sequenceKey
,
formattedSequence
);
log
.
info
(
"===================>更新《{}》顺序码:{}<==================="
,
sequenceKey
,
formattedSequence
);
// 更新顺序码
// 更新顺序码
if
(
sequenceType
.
equals
(
LOCK_KEY_DR
))
{
if
(
lockKey
.
equals
(
LOCK_KEY_DR
))
{
setValueWithMonthlyExpiration
(
sequenceKey
,
String
.
valueOf
(
formattedSequence
));
setValueWithMonthlyExpiration
(
sequenceKey
,
String
.
valueOf
(
formattedSequence
));
}
else
{
}
else
{
setValueWithYearlyExpiration
(
sequenceKey
,
String
.
valueOf
(
formattedSequence
));
setValueWithYearlyExpiration
(
sequenceKey
,
String
.
valueOf
(
formattedSequence
));
}
}
String
generatedSequence
=
sequenceKey
+
formattedSequence
;
String
generatedSequence
=
sequenceKey
+
formattedSequence
;
String
result
=
generatedSequence
+
(
sequenceType
.
equals
(
LOCK_KEY_DR
)
?
""
:
rulePrefix
);
String
result
=
generatedSequence
+
(
lockKey
.
equals
(
LOCK_KEY_DR
)
?
""
:
rulePrefix
);
log
.
info
(
"===================>返回《{}》顺序码:{}<==================="
,
sequenceKey
,
result
);
log
.
info
(
"===================>返回《{}》顺序码:{}<==================="
,
sequenceKey
,
result
);
return
result
;
return
result
;
...
...
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