记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
9d74e9f2
Commit
9d74e9f2
authored
Aug 27, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ID generator;
parent
61db9a3a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
GenSnowFlowerUtil.java
...va/com/liquidnet/commons/lang/util/GenSnowFlowerUtil.java
+3
-1
IDGenerator.java
...ain/java/com/liquidnet/commons/lang/util/IDGenerator.java
+6
-2
db_ln_adam_initialdata.sql
...quidnet-service-adam-impl/docu/db_ln_adam_initialdata.sql
+1
-1
No files found.
liquidnet-bus-common/liquidnet-common-base/src/main/java/com/liquidnet/commons/lang/util/GenSnowFlowerUtil.java
View file @
9d74e9f2
...
...
@@ -70,7 +70,9 @@ public class GenSnowFlowerUtil {
long
l
=
(
timestamp
-
twepoch
)
<<
timestampLeftShift
|
dataCenterId
<<
dataCenterIdShift
|
workerId
<<
workerIdShift
|
sequence
;
// return l;
return
l
+
String
.
valueOf
(
System
.
nanoTime
()).
substring
(
9
);
// return l + String.valueOf(System.nanoTime()).substring(9);
String
s
=
String
.
valueOf
(
System
.
nanoTime
());
return
l
+
s
.
substring
(
s
.
length
()
-
7
);
}
private
static
long
genTime
()
{
...
...
liquidnet-bus-common/liquidnet-common-base/src/main/java/com/liquidnet/commons/lang/util/IDGenerator.java
View file @
9d74e9f2
package
com
.
liquidnet
.
commons
.
lang
.
util
;
import
org.apache.commons.lang3.StringUtils
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.UUID
;
...
...
@@ -16,11 +18,13 @@ public class IDGenerator {
}
public
static
String
nextTimeId
()
{
return
nextMilliId
()
+
String
.
valueOf
(
System
.
nanoTime
()).
substring
(
9
);
String
s
=
String
.
valueOf
(
System
.
nanoTime
());
return
nextMilliId
().
concat
(
s
.
substring
(
s
.
length
()
-
7
));
}
public
static
String
nextTimeId2
()
{
return
nextMilliId2
()
+
String
.
valueOf
(
System
.
nanoTime
()).
substring
(
8
);
String
s
=
String
.
valueOf
(
System
.
nanoTime
());
return
nextMilliId2
().
concat
(
s
.
substring
(
s
.
length
()
-
7
));
}
public
static
String
nextMilliId
()
{
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/docu/db_ln_adam_initialdata.sql
View file @
9d74e9f2
...
...
@@ -363,7 +363,7 @@ alter table adam_member_code add expire_at datetime(3) null comment '过期时
#
订单
alter
table
adam_member_order
modify
state
tinyint
null
comment
'订单状态:0-未支付,1-已支付,2-已关闭,3-超时付,4-退款中,5-已退款'
;
alter
table
adam_member_order
modify
pay_no
varchar
(
64
)
null
comment
'支付中心支付CODE'
;
alter
table
adam_member_order
add
payment_id
varchar
(
64
)
null
comment
'支付中心三方支付
®
ID'
after
pay_no
;
alter
table
adam_member_order
add
payment_id
varchar
(
64
)
null
comment
'支付中心三方支付ID'
after
pay_no
;
#
会员退款
...
...
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