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
b7387336
Commit
b7387336
authored
Aug 20, 2020
by
徐康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
创建订单时间check修改
parent
2b2e8d88
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
order-application-service/src/main/java/cn/freemud/entities/vo/CreateOrderVo.java
+1
-0
order-application-service/src/main/java/cn/freemud/service/impl/CheckMCCafeOrder.java
+7
-2
No files found.
order-application-service/src/main/java/cn/freemud/entities/vo/CreateOrderVo.java
View file @
b7387336
...
@@ -98,6 +98,7 @@ public class CreateOrderVo {
...
@@ -98,6 +98,7 @@ public class CreateOrderVo {
/**
/**
* 预约时间 格式yyyy-MM-dd HH:mm:ss
* 预约时间 格式yyyy-MM-dd HH:mm:ss
* 麦咖啡返回的是yyyy-MM-dd HH:mm
*/
*/
private
String
expectTime
;
private
String
expectTime
;
...
...
order-application-service/src/main/java/cn/freemud/service/impl/CheckMCCafeOrder.java
View file @
b7387336
...
@@ -230,6 +230,7 @@ public class CheckMCCafeOrder {
...
@@ -230,6 +230,7 @@ public class CheckMCCafeOrder {
if
(!
StoreConstant
.
BUSINESS
.
equals
(
storeResponseDto
.
getState
()))
{
if
(!
StoreConstant
.
BUSINESS
.
equals
(
storeResponseDto
.
getState
()))
{
throw
new
ServiceException
(
ResponseResult
.
STORE_ITEM_CHECK_CLOSE
);
throw
new
ServiceException
(
ResponseResult
.
STORE_ITEM_CHECK_CLOSE
);
}
}
createOrderVo
.
setExpectTime
(
null
);
// 校验下单时间是否在营业时间内
// 校验下单时间是否在营业时间内
checkOrderExpectTime
(
storeResponseDto
,
now
);
checkOrderExpectTime
(
storeResponseDto
,
now
);
// 外卖单选择立即送达的话,下单时间必须在店铺外卖时间内
// 外卖单选择立即送达的话,下单时间必须在店铺外卖时间内
...
@@ -273,9 +274,13 @@ public class CheckMCCafeOrder {
...
@@ -273,9 +274,13 @@ public class CheckMCCafeOrder {
else
if
(
CreateOrderType
.
TAKE_OUT
.
getCode
().
equals
(
createOrderVo
.
getOrderType
())
&&
StringUtils
.
isNotBlank
(
expectTime
))
{
else
if
(
CreateOrderType
.
TAKE_OUT
.
getCode
().
equals
(
createOrderVo
.
getOrderType
())
&&
StringUtils
.
isNotBlank
(
expectTime
))
{
Date
takeOutDateTime
=
null
;
Date
takeOutDateTime
=
null
;
try
{
try
{
takeOutDateTime
=
sdf
.
parse
(
createOrderVo
.
getExpectTime
());
takeOutDateTime
=
sdf
.
parse
(
createOrderVo
.
getExpectTime
()
+
":00"
);
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
throw
new
ServiceException
(
ResponseResult
.
ORDER_TAKE_OUT_TIME_ERROR
);
try
{
takeOutDateTime
=
sdf
.
parse
(
createOrderVo
.
getExpectTime
());
}
catch
(
ParseException
parseException
)
{
throw
new
ServiceException
(
ResponseResult
.
ORDER_TAKE_OUT_TIME_ERROR
);
}
}
}
//当顾客指定送达时间小于当前时间,订单记录类型为即时单
//当顾客指定送达时间小于当前时间,订单记录类型为即时单
...
...
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