Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
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
order-group-application
order-group
Commits
fb78df23
Commit
fb78df23
authored
Jul 07, 2021
by
周晓航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加一个 发版日开关
Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent
32ab7162
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/service/order/OrderCenterSdkServiceImpl.java
+20
-7
No files found.
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/service/order/OrderCenterSdkServiceImpl.java
View file @
fb78df23
...
...
@@ -131,6 +131,8 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService {
@Value
(
"${avoid.version.upgrade.config:}"
)
private
String
avoidVersionUpgradeConfig
;
@Value
(
"${version.upgrade.weekDay:}"
)
private
List
<
Integer
>
weekDay
;
@Override
public
CreateOrderResponse
createOrderFlow
(
CreateOrderRequest
config
)
{
...
...
@@ -671,14 +673,25 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService {
}
cal
.
setTime
(
datet
);
int
w
=
cal
.
get
(
Calendar
.
DAY_OF_WEEK
)
-
1
;
if
(
CommonConstant
.
weekDay
.
contains
(
w
))
{
// 校验时间 是否是 23:00 之后
int
hourOfDay
=
cal
.
get
(
Calendar
.
HOUR_OF_DAY
);
if
(
hourOfDay
>=
23
){
// 表示 设置时间为23点之后
return
true
;
// 增加一个发版开关
if
(
CollectionUtils
.
isNotEmpty
(
weekDay
))
{
if
(
weekDay
.
contains
(
w
))
{
// 校验时间 是否是 23:00 之后
int
hourOfDay
=
cal
.
get
(
Calendar
.
HOUR_OF_DAY
);
if
(
hourOfDay
>=
23
){
// 表示 设置时间为23点之后
return
true
;
}
}
}
else
{
if
(
CommonConstant
.
weekDay
.
contains
(
w
))
{
// 校验时间 是否是 23:00 之后
int
hourOfDay
=
cal
.
get
(
Calendar
.
HOUR_OF_DAY
);
if
(
hourOfDay
>=
23
){
// 表示 设置时间为23点之后
return
true
;
}
}
}
return
false
;
}
...
...
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