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
79a6d6cd
Commit
79a6d6cd
authored
Jul 29, 2021
by
周晓航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预订单, 创建订单新增bizType=7
Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent
31244ba1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
3 deletions
+39
-3
order-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartInfoRequestVo.java
+7
-0
order-application-service/src/main/java/cn/freemud/enums/BizTypeEnum.java
+5
-0
order-application-service/src/main/java/cn/freemud/service/adapter/OrderCheckAdapter.java
+8
-0
order-application-service/src/main/java/cn/freemud/service/impl/CheckOrder.java
+19
-3
No files found.
order-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartInfoRequestVo.java
View file @
79a6d6cd
...
...
@@ -27,6 +27,13 @@ import java.util.List;
@Builder
public
class
ShoppingCartInfoRequestVo
{
/**
* 爱马哥蛋糕预定
* 预定单需求, bizType= 7 其他的场景默认传递null
*/
private
Integer
bizType
;
private
String
version
;
/**
...
...
order-application-service/src/main/java/cn/freemud/enums/BizTypeEnum.java
View file @
79a6d6cd
...
...
@@ -19,6 +19,11 @@ public enum BizTypeEnum {
MEMBERS
(
3
,
"会员订单"
),
INTEGRAL_MALL
(
4
,
"积分商城订单"
),
SVC
(
5
,
"储值卡订单"
),
SALE_COUPON
(
6
,
"卖券订单"
),
/**
* 增对 爱马哥的蛋糕预定出的需求,
*/
ADVANCE_ORDER
(
7
,
"预订单"
),
LGS_SELF_HELP_PARKING
(
97
,
"农工商停车自助积分订单"
),
LGS_MANUAL_RECORD_PARKING
(
98
,
"农工商停车手工录单"
),
LGS_PARKING
(
99
,
"农工商停车订单"
);
...
...
order-application-service/src/main/java/cn/freemud/service/adapter/OrderCheckAdapter.java
View file @
79a6d6cd
...
...
@@ -3,6 +3,7 @@ package cn.freemud.service.adapter;
import
cn.freemud.entities.vo.CreateOrderBaseVo
;
import
cn.freemud.entities.vo.CreateOrderVo
;
import
cn.freemud.enums.BizTypeEnum
;
import
cn.freemud.interceptor.ServiceException
;
import
cn.freemud.utils.AppLogUtil
;
import
com.freemud.application.sdk.api.storecenter.response.StoreResponse
;
...
...
@@ -25,6 +26,13 @@ public class OrderCheckAdapter {
* @throws ServiceException 抛出异常校验异常数据
*/
public
static
void
check
(
CreateOrderVo
vo
,
StoreResponse
storeResponse
)
throws
ServiceException
{
// fisherman-ka 预定单的校验 未完成
if
(
Objects
.
nonNull
(
vo
.
getBizType
())
&&
BizTypeEnum
.
ADVANCE_ORDER
.
getBizType
().
compareTo
(
vo
.
getBizType
())
==
0
)
{
// 伪代码 判断 门店是否开启了 预定单服务
// 开启了预定单服务, 不走下面的检验
// 没开启 抛出异常
}
//非预约单的过滤
if
(
Objects
.
isNull
(
vo
.
getOrderType
())
||
(!
Objects
.
equals
(
vo
.
getTakeMealFlag
(),
"1"
)))
{
...
...
order-application-service/src/main/java/cn/freemud/service/impl/CheckOrder.java
View file @
79a6d6cd
...
...
@@ -223,7 +223,7 @@ public class CheckOrder {
if
(
storeResponse
==
null
||
storeResponse
.
getBizVO
()
==
null
)
{
throw
new
ServiceException
(
ResponseResult
.
STORE_NOT_FOUND
);
}
//订单预约单检查
//订单预约单检查
&预定单检查
OrderCheckAdapter
.
check
(
createOrderVo
,
storeResponse
);
StoreResponse
.
BizVO
storeResponseDto
=
storeResponse
.
getBizVO
();
...
...
@@ -265,15 +265,27 @@ public class CheckOrder {
// 下单时间校验
OrderRelationService
orderRelationService
=
orderRelationFactory
.
getCreateOrderTimeCheckService
(
createOrderVo
.
getPartnerId
());
orderRelationService
.
createOrderTimeCheck
(
storeResponseDto
,
createOrderVo
);
Integer
pushOrderTime
=
0
;
//非到店或者外卖,类型错误
if
(!(
CreateOrderType
.
COLLECT_GOODS
.
getCode
().
equals
(
createOrderVo
.
getOrderType
())
||
CreateOrderType
.
TAKE_OUT
.
getCode
().
equals
(
createOrderVo
.
getOrderType
())))
{
throw
new
ServiceException
(
ResponseResult
.
PARAMETER_MISSING
);
}
// fisherman-ka 预定单-> 预订时间 校验
if
(
Objects
.
nonNull
(
createOrderVo
.
getBizType
())
&&
BizTypeEnum
.
ADVANCE_ORDER
.
getBizType
().
compareTo
(
createOrderVo
.
getBizType
())
==
0
)
{
// 取餐时间
String
takeMealTimes
=
createOrderVo
.
getTakeMealTime
();
if
(
Objects
.
isNull
(
takeMealTimes
))
{
throw
new
ServiceException
(
ResponseResult
.
PARAMETER_MISSING
);
}
}
// TODO: 2020/6/16 门店校验处理
// 取餐标识 -> 0 我已到店 1预约单
String
takeMealFlag
=
createOrderVo
.
getTakeMealFlag
();
// 取餐时间
String
takeMealTimes
=
createOrderVo
.
getTakeMealTime
();
//立即送达
...
...
@@ -368,7 +380,9 @@ public class CheckOrder {
}
}
//订单金额小于起送费提示
else
if
((
2
==
storeDeliveryInfoDto
.
getDeliveryCondition
()
&&
storeDeliveryInfoDto
.
getDeliveryLimitAmount
()
>
shoppingCartGoodsDto
.
getTotalAmount
())
&&
!
cocoPartnerId
.
contains
(
createOrderVo
.
getPartnerId
()))
{
else
if
((
2
==
storeDeliveryInfoDto
.
getDeliveryCondition
()
&&
storeDeliveryInfoDto
.
getDeliveryLimitAmount
()
>
shoppingCartGoodsDto
.
getTotalAmount
())
&&
!
cocoPartnerId
.
contains
(
createOrderVo
.
getPartnerId
()))
{
throw
new
ServiceException
(
ResponseResult
.
STORE_DISCONTENT_DELIVERY_FEE
);
}
...
...
@@ -607,6 +621,8 @@ public class CheckOrder {
.
useCustomerScore
(
createOrderVo
.
getUseCustomerScore
())
.
buyMemberCard
(
buyMemberCard
)
.
menuType
(
createOrderVo
.
getMenuType
())
// 预定单类型传递 购物车中进行查询
.
bizType
(
createOrderVo
.
getBizType
())
.
build
();
// 如果使用优惠券或者商品券,校验 couponCode
if
(
StringUtils
.
isNotBlank
(
createOrderVo
.
getCouponCode
()))
{
...
...
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