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
e919ca1a
Commit
e919ca1a
authored
May 18, 2020
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下单判断修改
parent
290a5919
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
order-application-service/src/main/java/cn/freemud/service/impl/CheckOrder.java
+10
-5
order-management/src/main/java/cn/freemud/management/adapter/DeliverySdkAdapter.java
+2
-1
No files found.
order-application-service/src/main/java/cn/freemud/service/impl/CheckOrder.java
View file @
e919ca1a
...
...
@@ -212,15 +212,20 @@ public class CheckOrder {
||
takeMealDateTime
.
after
(
storeResponseDto
.
getBusinessHoursDayEndTime
())))
{
throw
new
ServiceException
(
ResponseResult
.
ORDER_TAKEMEALTIME_INVAILD
);
}
//当顾客指定送达时间小于当前时间+提前预约时间时,订单记录类型为即时单
if
(
takeMealDateTime
!=
null
&&
storeResponseDto
.
getServiceTime
()
!=
null
&&
takeMealDateTime
.
before
(
DateUtil
.
addMinutes
(
date
,
storeResponseDto
.
getServiceTime
())))
{
takeMealDateTime
=
null
;
}
//0=到店单我已到店、外卖单尽快送出
if
(
StringUtils
.
isNotBlank
(
createOrderVo
.
getTakeMealFlag
())
&&
"0"
.
equals
(
createOrderVo
.
getTakeMealFlag
()))
{
takeMealDateTime
=
null
;
}
//当顾客指定送达时间小于当前时间,订单记录类型为即时单
if
(
takeMealDateTime
!=
null
&&
takeMealDateTime
.
before
(
date
))
{
takeMealDateTime
=
null
;
}
//当顾客指定送达时间小于当前时间+提前预约时间时,订单记录类型为即时单
if
(
CreateOrderType
.
TAKE_OUT
.
getCode
().
equals
(
createOrderVo
.
getOrderType
())
&&
takeMealDateTime
!=
null
&&
storeResponseDto
.
getServiceTime
()
!=
null
&&
takeMealDateTime
.
before
(
DateUtil
.
addMinutes
(
date
,
storeResponseDto
.
getServiceTime
())))
{
takeMealDateTime
=
null
;
}
String
appId
=
userLoginInfoDto
.
getWxAppId
();
// 校验小程序是否支持到店或者外卖
OpenPlatformIappWxappConfig
config
=
openPlatformIappWxappConfigManager
.
selectIappWxappConfigByWxAppId
(
appId
);
...
...
order-management/src/main/java/cn/freemud/management/adapter/DeliverySdkAdapter.java
View file @
e919ca1a
package
cn
.
freemud
.
management
.
adapter
;
import
com.freemud.application.sdk.api.deliverycenter.dto.CreateDeliveryOrderRequestDto
;
import
com.freemud.application.sdk.api.ordercenter.enums.OrderType
;
import
com.freemud.application.sdk.api.storecenter.response.StoreResponse
;
import
com.freemud.sdk.api.assortment.order.response.order.QueryOrdersResponse
;
import
org.springframework.stereotype.Component
;
...
...
@@ -55,7 +56,7 @@ public class DeliverySdkAdapter {
if
(
order
.
getGmtExpect
()
!=
null
&&
order
.
getGmtExpect
()
!=
0
)
{
deliveryOrderRequestDto
.
setExpectTime
(
new
Date
(
order
.
getGmtExpect
()));
}
deliveryOrderRequestDto
.
setIsPre
(
order
.
get
GmtExpect
()
!=
null
?
1
:
0
);
deliveryOrderRequestDto
.
setIsPre
(
order
.
get
NewOrderType
()
==
OrderType
.
RESERVED_EXPRESS
.
getIndex
()
?
1
:
0
);
List
<
CreateDeliveryOrderRequestDto
.
DeliveryProductInfo
>
productInfos
=
new
ArrayList
<>();
order
.
getProductList
().
forEach
(
productList
->
{
if
(
productList
.
getPrice
()
>
0
)
{
...
...
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