Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
d2da8ca3
Commit
d2da8ca3
authored
Jun 05, 2019
by
Junling Bu
Browse files
fix[litemall-db]: 订单号再次生成,需要添加日期
parent
a0fc7d06
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallOrderService.java
View file @
d2da8ca3
...
@@ -64,7 +64,7 @@ public class LitemallOrderService {
...
@@ -64,7 +64,7 @@ public class LitemallOrderService {
String
now
=
df
.
format
(
LocalDate
.
now
());
String
now
=
df
.
format
(
LocalDate
.
now
());
String
orderSn
=
now
+
getRandomNum
(
6
);
String
orderSn
=
now
+
getRandomNum
(
6
);
while
(
countByOrderSn
(
userId
,
orderSn
)
!=
0
)
{
while
(
countByOrderSn
(
userId
,
orderSn
)
!=
0
)
{
orderSn
=
getRandomNum
(
6
);
orderSn
=
now
+
getRandomNum
(
6
);
}
}
return
orderSn
;
return
orderSn
;
}
}
...
...
Write
Preview
Supports
Markdown
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