Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
fb0a5656
Commit
fb0a5656
authored
Nov 07, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-tiande' into dev-tiande
parents
0d4c3a9f
208e4939
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
OrderUtil.java
...va/com/github/wxiaoqi/security/common/util/OrderUtil.java
+13
-10
MemberLevelController.java
...ub/wxiaoqi/security/admin/rest/MemberLevelController.java
+0
-1
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/util/OrderUtil.java
View file @
fb0a5656
...
@@ -6,14 +6,16 @@ import cn.hutool.core.util.StrUtil;
...
@@ -6,14 +6,16 @@ import cn.hutool.core.util.StrUtil;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Random
;
import
java.util.Random
;
import
java.util.concurrent.atomic.AtomicInteger
;
public
class
OrderUtil
{
public
class
OrderUtil
{
public
static
final
String
DEFAULT_MID
=
"00"
;
public
static
final
String
DEFAULT_MID
=
"00"
;
public
static
final
String
APP_MID
=
"01"
;
public
static
final
String
APP_MID
=
"01"
;
public
static
final
String
COMPANY_MID
=
"05"
;
static
Date
today
=
new
Date
();
static
Date
today
=
new
Date
();
static
int
orderIndex
=
0
;
static
AtomicInteger
orderIndex
=
new
AtomicInteger
(
0
)
;
@SuppressWarnings
(
"deprecation"
)
@SuppressWarnings
(
"deprecation"
)
private
static
String
getIndex
(
String
midFix
)
{
private
static
String
getIndex
(
String
midFix
)
{
...
@@ -24,19 +26,19 @@ public class OrderUtil {
...
@@ -24,19 +26,19 @@ public class OrderUtil {
SimpleDateFormat
outFormat
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
SimpleDateFormat
outFormat
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
String
currTime
=
outFormat
.
format
(
n
);
String
currTime
=
outFormat
.
format
(
n
);
if
(
orderIndex
>
0
)
{
if
(
orderIndex
.
intValue
()
>
0
)
{
if
(
n
.
getYear
()
==
today
.
getYear
()
&&
n
.
getMonth
()
==
today
.
getMonth
()
&&
n
.
getDay
()
==
today
.
getDay
())
{
if
(
n
.
getYear
()
==
today
.
getYear
()
&&
n
.
getMonth
()
==
today
.
getMonth
()
&&
n
.
getDay
()
==
today
.
getDay
())
{
orderIndex
+=
1
;
orderIndex
.
getAndIncrement
()
;
}
else
{
}
else
{
today
=
n
;
today
=
n
;
orderIndex
=
1
;
orderIndex
=
new
AtomicInteger
(
1
)
;
}
}
}
else
{
}
else
{
today
=
n
;
today
=
n
;
orderIndex
=
1
;
orderIndex
=
new
AtomicInteger
(
1
)
;
}
}
if
(
orderIndex
>
9999
)
{
if
(
orderIndex
.
intValue
()
>
9999
)
{
orderIndex
=
1
;
orderIndex
=
new
AtomicInteger
(
1
)
;
}
}
String
indexString
=
String
.
format
(
"%s%s%04d"
,
currTime
,
midFix
,
orderIndex
);
String
indexString
=
String
.
format
(
"%s%s%04d"
,
currTime
,
midFix
,
orderIndex
);
return
indexString
;
return
indexString
;
...
@@ -44,7 +46,7 @@ public class OrderUtil {
...
@@ -44,7 +46,7 @@ public class OrderUtil {
/**
/**
* 生成订单号
* 生成订单号
*
*
* @param preFixString
* @param preFixString
* @return
* @return
*/
*/
...
@@ -66,7 +68,7 @@ public class OrderUtil {
...
@@ -66,7 +68,7 @@ public class OrderUtil {
/**
/**
* 获取时间戳
* 获取时间戳
*
*
* @return
* @return
*/
*/
public
static
String
GetTimestamp
()
{
public
static
String
GetTimestamp
()
{
...
@@ -75,7 +77,7 @@ public class OrderUtil {
...
@@ -75,7 +77,7 @@ public class OrderUtil {
/**
/**
* 生成随机数
* 生成随机数
*
*
* @return
* @return
*/
*/
public
static
String
CreateNoncestr
()
{
public
static
String
CreateNoncestr
()
{
...
@@ -83,3 +85,4 @@ public class OrderUtil {
...
@@ -83,3 +85,4 @@ public class OrderUtil {
return
MD5
.
GetMD5String
(
String
.
valueOf
(
random
.
nextInt
(
10000
)));
return
MD5
.
GetMD5String
(
String
.
valueOf
(
random
.
nextInt
(
10000
)));
}
}
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/MemberLevelController.java
View file @
fb0a5656
...
@@ -34,7 +34,6 @@ public class MemberLevelController extends BaseController<UserMemberLevelBiz, Ba
...
@@ -34,7 +34,6 @@ public class MemberLevelController extends BaseController<UserMemberLevelBiz, Ba
@RequestMapping
(
value
=
"/app/unauth/level/list"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/app/unauth/level/list"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
List
<
BaseUserMemberLevel
>>
list
(
BaseUserMemberLevel
baseUserMemberLevel
)
throws
Exception
{
public
ObjectRestResponse
<
List
<
BaseUserMemberLevel
>>
list
(
BaseUserMemberLevel
baseUserMemberLevel
)
throws
Exception
{
baseUserMemberLevel
.
setIsShow
(
1
);
return
ObjectRestResponse
.
succ
(
memberBiz
.
getList
(
baseUserMemberLevel
));
return
ObjectRestResponse
.
succ
(
memberBiz
.
getList
(
baseUserMemberLevel
));
}
}
...
...
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