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
79dcf745
Commit
79dcf745
authored
Jul 22, 2021
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化建议
parent
0c99d23b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
1 deletions
+9
-1
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+2
-1
order-application-service/src/main/java/cn/freemud/service/impl/CheckOrder.java
+3
-0
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
+2
-0
order-application-service/src/main/java/cn/freemud/service/impl/StoreServiceImpl.java
+2
-0
No files found.
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
79dcf745
...
...
@@ -188,7 +188,8 @@ public class OrderAdapter {
boolean
isUseFreightCoupon
=
false
;
List
<
ActivityDiscountsDto
>
activityDiscountsDtos
=
shoppingCartGoodsDto
.
getActivityDiscountsDtos
();
if
(
CollectionUtils
.
isNotEmpty
(
activityDiscountsDtos
))
{
ActivityDiscountsDto
activityDiscountsDto
=
activityDiscountsDtos
.
stream
().
filter
(
a
->
a
.
getActivityType
()
!=
null
&&
a
.
getActivityType
().
equals
(
ActivityTypeEnum
.
TYPE_34
.
getCode
())).
findFirst
().
orElse
(
null
);
ActivityDiscountsDto
activityDiscountsDto
=
activityDiscountsDtos
.
stream
().
filter
(
a
->
a
.
getActivityType
()
!=
null
&&
a
.
getActivityType
().
equals
(
ActivityTypeEnum
.
TYPE_34
.
getCode
())).
findFirst
().
orElse
(
null
);
if
(
activityDiscountsDto
!=
null
)
{
isUseFreightCoupon
=
true
;
}
...
...
order-application-service/src/main/java/cn/freemud/service/impl/CheckOrder.java
View file @
79dcf745
...
...
@@ -288,6 +288,7 @@ public class CheckOrder {
//获取门店配送信息
StoreDeliveryInfoDto
storeDeliveryInfoDto
=
null
;
if
(
storeDeliveryUseOld
)
{
//todo storeDeliveryUseOld 配置删除,老逻辑删除
storeDeliveryInfoDto
=
getStoreDeliveryInfo
(
storeResponseDto
,
config
,
appId
);
}
else
{
storeDeliveryInfoDto
=
getNewStoreDeliveryInfo
(
storeResponseDto
,
config
,
appId
,
trackingNo
);
...
...
@@ -821,6 +822,7 @@ public class CheckOrder {
storeDeliveryInfoDto
.
setDeliveryRadius
(
0
);
}
// 只有小程序设置了外卖,并且开通了第三方配送账户,才是第三方配送单
//todo 判断多余
if
(
openPlatformIappWxappConfig
==
null
)
{
openPlatformIappWxappConfig
=
openPlatformIappWxappConfigManager
.
selectIappWxappConfigByWxAppId
(
wxAppid
);
}
...
...
@@ -931,6 +933,7 @@ public class CheckOrder {
* @param storeCode 门店号
* @return
*/
//todo 预计送达时间购物车接口返回,免去多调用一次接口
private
Date
getEstimateDeliveryCompleteTime
(
String
userLat
,
String
userLong
,
String
partnerId
,
...
...
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
View file @
79dcf745
...
...
@@ -2956,6 +2956,7 @@ public class OrderServiceImpl implements Orderservice {
orderExtInfoDto
.
setDeliveryHoursDayStart
(
deliveryHoursDayStart
);
orderExtInfoDto
.
setDeliveryHoursDayEnd
(
deliveryHoursDayEnd
);
orderExtInfoDto
.
setOpenid
(
userLoginInfoDto
.
getOpenId
());
//todo 字段多余,订单对象已有该字段
orderExtInfoDto
.
setAppid
(
userLoginInfoDto
.
getWxAppId
());
orderExtInfoDto
.
setSessionId
(
sessionId
);
if
(
Objects
.
equals
(
serviceTime
,
null
))
{
...
...
@@ -2970,6 +2971,7 @@ public class OrderServiceImpl implements Orderservice {
// 扩展字段中存储 sessionKey
orderExtInfoDto
.
setSessionKey
(
createOrderVo
.
getSessionKey
());
orderExtInfoDto
.
setFormId
(
createOrderVo
.
getFormId
());
//todo 多余字段
orderExtInfoDto
.
setFromAppId
(
userLoginInfoDto
.
getWxAppId
());
if
(
StringUtils
.
isNotBlank
(
createOrderVo
.
getScene
()))
{
orderExtInfoDto
.
setScene
(
createOrderVo
.
getScene
());
...
...
order-application-service/src/main/java/cn/freemud/service/impl/StoreServiceImpl.java
View file @
79dcf745
...
...
@@ -83,6 +83,7 @@ public class StoreServiceImpl implements StoreService {
* @param userLatitude 用户配送地址维度
* @return
*/
// TODO: 21-7-22 可去掉
public
UserDeliveryInfoDto
getUserDeliveryInfo
(
StoreDeliveryInfoDto
storeDeliveryInfoDto
,
String
userLongitude
,
String
userLatitude
)
{
UserDeliveryInfoDto
userDeliveryInfoDto
=
UserDeliveryInfoDto
.
builder
()
.
userLongitude
(
userLongitude
)
...
...
@@ -105,6 +106,7 @@ public class StoreServiceImpl implements StoreService {
* @param userLatitude 用户维度
* @return
*/
//todo 可去掉
public
boolean
checkUserEnableDelivery
(
StoreDeliveryInfoDto
storeDeliveryInfoDto
,
String
userLongitude
,
String
userLatitude
)
{
if
(!
storeDeliveryInfoDto
.
getEnableTakeaway
())
{
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