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
8f5c5e47
Commit
8f5c5e47
authored
Dec 14, 2020
by
张洪旺
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/qa' into qa
parents
6fa35f93
241e9d35
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
91 additions
and
11 deletions
+91
-11
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/service/order/OrderCenterSdkServiceImpl.java
+4
-0
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+1
-1
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
+1
-0
order-application-service/src/main/java/cn/freemud/service/order/OrderRelationService.java
+1
-1
order-application-service/src/main/java/cn/freemud/service/order/impl/CocoOrderRelationServiceImpl.java
+36
-3
order-management/pom.xml
+1
-1
ordercenter-sdk/src/main/java/com/freemud/application/sdk/api/ordercenter/service/OrderSdkService.java
+1
-0
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
+3
-2
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartClearRequestVo.java
+6
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
+5
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+4
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/ShoppingCartRelationFactory.java
+7
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/ShoppingCartRelationService.java
+6
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/impl/CocoShoppingCartRelationServiceImpl.java
+0
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/impl/PlatformShoppingCartRelationServiceImpl.java
+6
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/impl/ShoppingCartRelationFactoryImpl.java
+9
-0
No files found.
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/service/order/OrderCenterSdkServiceImpl.java
View file @
8f5c5e47
...
@@ -323,12 +323,14 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService {
...
@@ -323,12 +323,14 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService {
BaseResponse
<
GetMemberExtendInfoResponse
>
extendInfo
=
new
BaseResponse
();
BaseResponse
<
GetMemberExtendInfoResponse
>
extendInfo
=
new
BaseResponse
();
try
{
try
{
QueryByCodeResponse
codeResponse
=
orderSdkService
.
getOrderInfo
(
confirmOrderRequest
.
getProductOrderCode
(),
0
,
confirmOrderRequest
.
getTrackingNo
());
QueryByCodeResponse
codeResponse
=
orderSdkService
.
getOrderInfo
(
confirmOrderRequest
.
getProductOrderCode
(),
0
,
confirmOrderRequest
.
getTrackingNo
());
orderByIdResponse
=
orderSdkAdapter
.
convent2QueryOrderByIdResponse
(
codeResponse
);
orderByIdResponse
=
orderSdkAdapter
.
convent2QueryOrderByIdResponse
(
codeResponse
);
GetMemberExtendInfoRequest
extendInfoRequest
=
new
GetMemberExtendInfoRequest
();
GetMemberExtendInfoRequest
extendInfoRequest
=
new
GetMemberExtendInfoRequest
();
extendInfoRequest
.
setMemberId
(
orderByIdResponse
.
getData
().
getUserId
());
extendInfoRequest
.
setMemberId
(
orderByIdResponse
.
getData
().
getUserId
());
extendInfoRequest
.
setPartnerId
(
orderByIdResponse
.
getData
().
getCompanyId
());
extendInfoRequest
.
setPartnerId
(
orderByIdResponse
.
getData
().
getCompanyId
());
extendInfo
=
memberCenterService
.
getMemberExtendInfo
(
extendInfoRequest
,
confirmOrderRequest
.
getTrackingNo
());
extendInfo
=
memberCenterService
.
getMemberExtendInfo
(
extendInfoRequest
,
confirmOrderRequest
.
getTrackingNo
());
OrderExtInfoDto
extInfoDTO
=
JSONObject
.
parseObject
(
orderByIdResponse
.
getData
().
getExtInfo
(),
OrderExtInfoDto
.
class
);
OrderExtInfoDto
extInfoDTO
=
JSONObject
.
parseObject
(
orderByIdResponse
.
getData
().
getExtInfo
(),
OrderExtInfoDto
.
class
);
extInfoDTO
.
setMemberLevel
(
extendInfo
.
getData
().
getMemberGrade
()!=
null
?
extendInfo
.
getData
().
getMemberGrade
().
getRuleName
():
""
);
extInfoDTO
.
setMemberLevel
(
extendInfo
.
getData
().
getMemberGrade
()!=
null
?
extendInfo
.
getData
().
getMemberGrade
().
getRuleName
():
""
);
extInfoDTO
.
setPaidMember
(
CollectionUtils
.
isNotEmpty
(
extendInfo
.
getData
().
getMemberPaids
()));
extInfoDTO
.
setPaidMember
(
CollectionUtils
.
isNotEmpty
(
extendInfo
.
getData
().
getMemberPaids
()));
...
@@ -341,8 +343,10 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService {
...
@@ -341,8 +343,10 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService {
ErrorLog
.
printErrorLog
(
"getMemberExtendInfoError"
,
MEMBER_EXTEND_INFO
,
confirmOrderRequest
,
e
);
ErrorLog
.
printErrorLog
(
"getMemberExtendInfoError"
,
MEMBER_EXTEND_INFO
,
confirmOrderRequest
,
e
);
}
}
com
.
freemud
.
application
.
sdk
.
api
.
ordercenter
.
response
.
BaseResponse
<
PaySuccessResp
>
response
=
orderSdkService
.
paySuccess
(
request
,
confirmOrderRequest
.
getTrackingNo
());
com
.
freemud
.
application
.
sdk
.
api
.
ordercenter
.
response
.
BaseResponse
<
PaySuccessResp
>
response
=
orderSdkService
.
paySuccess
(
request
,
confirmOrderRequest
.
getTrackingNo
());
//获取会员信息失败直接返回,非空判断
//获取会员信息失败直接返回,非空判断
if
(
extendInfo
.
getData
()
==
null
){
if
(
extendInfo
.
getData
()
==
null
){
return
orderSdkAdapter
.
convent2PayAccessResponse
(
response
);
return
orderSdkAdapter
.
convent2PayAccessResponse
(
response
);
}
}
...
...
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
8f5c5e47
...
@@ -1220,7 +1220,7 @@ public class OrderAdapter {
...
@@ -1220,7 +1220,7 @@ public class OrderAdapter {
responseVo
.
setOidBase64Image
(
oidBase64Image
);
responseVo
.
setOidBase64Image
(
oidBase64Image
);
}
}
//设置是否是第三方配送单
//设置是否是第三方配送单
if
(
ordersBean
.
getAddInfo
()
!=
null
&&
StringUtils
.
isNotEmpty
(
ordersBean
.
getAddInfo
().
getDeliveryId
())&&
"0"
.
equals
(
ordersBean
.
getAddInfo
().
getDeliveryId
()))
{
if
(
ordersBean
.
getAddInfo
()
!=
null
&&
StringUtils
.
isNotEmpty
(
ordersBean
.
getAddInfo
().
getDeliveryId
())&&
!
"0"
.
equals
(
ordersBean
.
getAddInfo
().
getDeliveryId
()))
{
responseVo
.
setHasThirdDelivery
(
true
);
responseVo
.
setHasThirdDelivery
(
true
);
responseVo
.
setDeliveryId
(
ordersBean
.
getAddInfo
().
getDeliveryId
());
responseVo
.
setDeliveryId
(
ordersBean
.
getAddInfo
().
getDeliveryId
());
}
}
...
...
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
View file @
8f5c5e47
...
@@ -471,6 +471,7 @@ public class OrderServiceImpl implements Orderservice {
...
@@ -471,6 +471,7 @@ public class OrderServiceImpl implements Orderservice {
}
}
// 如果订单状态不是未支付,返回信息
// 如果订单状态不是未支付,返回信息
if
(!
PayStatus
.
NOT_PAY
.
getCode
().
equals
(
orderBean
.
getPayStatus
())
||
!
OrderStatus
.
WAIT_PAY
.
getCode
().
equals
(
orderBean
.
getStatus
()))
{
if
(!
PayStatus
.
NOT_PAY
.
getCode
().
equals
(
orderBean
.
getPayStatus
())
||
!
OrderStatus
.
WAIT_PAY
.
getCode
().
equals
(
orderBean
.
getStatus
()))
{
return
sendPaySuccessNoticeMessage
();
return
sendPaySuccessNoticeMessage
();
}
}
//若该订单使用了优惠券,则移除卡包,移除失败也不退款,现在支付成功个调用核销,无需调用此功能
//若该订单使用了优惠券,则移除卡包,移除失败也不退款,现在支付成功个调用核销,无需调用此功能
...
...
order-application-service/src/main/java/cn/freemud/service/order/OrderRelationService.java
View file @
8f5c5e47
...
@@ -27,7 +27,7 @@ public interface OrderRelationService {
...
@@ -27,7 +27,7 @@ public interface OrderRelationService {
/**
/**
*
创建订单的时间检查
*
订单详情编辑
* @param
* @param
*/
*/
void
queryOrdrBuild
(
QueryOrderResponseVo
queryOrderResponseVo
,
QueryOrderByIdResponse
response
);
void
queryOrdrBuild
(
QueryOrderResponseVo
queryOrderResponseVo
,
QueryOrderByIdResponse
response
);
...
...
order-application-service/src/main/java/cn/freemud/service/order/impl/CocoOrderRelationServiceImpl.java
View file @
8f5c5e47
...
@@ -17,17 +17,22 @@ import cn.freemud.entities.dto.order.BusinessDate;
...
@@ -17,17 +17,22 @@ import cn.freemud.entities.dto.order.BusinessDate;
import
cn.freemud.entities.vo.CreateOrderVo
;
import
cn.freemud.entities.vo.CreateOrderVo
;
import
cn.freemud.entities.vo.ProductVo
;
import
cn.freemud.entities.vo.ProductVo
;
import
cn.freemud.entities.vo.QueryOrderResponseVo
;
import
cn.freemud.entities.vo.QueryOrderResponseVo
;
import
cn.freemud.enums.ActivityTypeEnum
;
import
cn.freemud.enums.CreateOrderType
;
import
cn.freemud.enums.CreateOrderType
;
import
cn.freemud.enums.ResponseResult
;
import
cn.freemud.enums.ResponseResult
;
import
cn.freemud.interceptor.ServiceException
;
import
cn.freemud.interceptor.ServiceException
;
import
cn.freemud.service.impl.CheckOrder
;
import
cn.freemud.service.impl.CheckOrder
;
import
cn.freemud.service.order.OrderRelationService
;
import
cn.freemud.service.order.OrderRelationService
;
import
com.alibaba.fastjson.JSONObject
;
import
com.freemud.application.sdk.api.ordercenter.response.orderInfo.OrderSendCouponResp
;
import
com.freemud.application.sdk.api.ordercenter.response.orderInfo.OrderSendCouponResp
;
import
com.freemud.application.sdk.api.storecenter.response.StoreResponse
;
import
com.freemud.application.sdk.api.storecenter.response.StoreResponse
;
import
com.freemud.application.sdk.api.storecenter.service.StoreCenterService
;
import
com.freemud.application.sdk.api.storecenter.service.StoreCenterService
;
import
com.freemud.sdk.api.assortment.order.enums.OldOrderAccountType
;
import
com.freemud.sdk.api.assortment.order.response.order.QueryOrderByIdResponse
;
import
com.freemud.sdk.api.assortment.order.response.order.QueryOrderByIdResponse
;
import
com.freemud.sdk.api.assortment.order.response.order.QueryOrdersResponse
;
import
io.swagger.models.auth.In
;
import
io.swagger.models.auth.In
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang.ObjectUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -101,6 +106,12 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService {
...
@@ -101,6 +106,12 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService {
queryOrderResponseVo
.
setChooseGoods
(
chooseGoods
);
queryOrderResponseVo
.
setChooseGoods
(
chooseGoods
);
}
}
Map
<
String
,
QueryOrdersResponse
.
DataBean
.
OrderBean
.
ProductBean
>
productMap
=
new
HashMap
<>();
List
<
QueryOrdersResponse
.
DataBean
.
OrderBean
.
ProductBean
>
productList
=
response
.
getData
().
getProductList
();
if
(
productList
!=
null
&&
!
productList
.
isEmpty
()){
productMap
=
productList
.
stream
().
collect
(
Collectors
.
toMap
(
QueryOrdersResponse
.
DataBean
.
OrderBean
.
ProductBean
::
getCartGoodsUid
,
g
->
g
,(
k1
,
k2
)->
k1
));
}
// 赠品合并到主商品
// 赠品合并到主商品
List
<
ProductVo
>
products
=
queryOrderResponseVo
.
getProducts
();
List
<
ProductVo
>
products
=
queryOrderResponseVo
.
getProducts
();
...
@@ -119,13 +130,35 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService {
...
@@ -119,13 +130,35 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService {
}
}
if
(
null
!=
masterProducts
&&
!
masterProducts
.
isEmpty
()){
if
(
null
!=
masterProducts
&&
!
masterProducts
.
isEmpty
()){
masterProducts
.
forEach
(
product
->
{
for
(
ProductVo
product
:
masterProducts
)
{
Integer
giftQty
=
giftMap
.
get
(
product
.
getCid
())
==
null
?
0
:
giftMap
.
get
(
product
.
getCid
());
Integer
giftQty
=
giftMap
.
get
(
product
.
getCid
())
==
null
?
0
:
giftMap
.
get
(
product
.
getCid
());
product
.
setQty
(
product
.
getQty
()
+
giftQty
);
product
.
setQty
(
product
.
getQty
()
+
giftQty
);
});
// 如果商品参加了第二件半价活动,要把该行拆成数量为1的多行
QueryOrdersResponse
.
DataBean
.
OrderBean
.
ProductBean
productBean
=
productMap
.
get
(
product
.
getCid
());
if
(
productBean
==
null
||
productBean
.
getDiscountList
()
==
null
||
productBean
.
getDiscountList
().
isEmpty
()){
continue
;
}
boolean
halfFlag
=
false
;
List
<
QueryOrdersResponse
.
DataBean
.
OrderBean
.
ProductBean
.
ProductDiscount
>
discountList
=
productBean
.
getDiscountList
();
for
(
QueryOrdersResponse
.
DataBean
.
OrderBean
.
ProductBean
.
ProductDiscount
productDiscount
:
discountList
){
if
(
ObjectUtils
.
equals
(
productDiscount
.
getDiscountType
(),
20
)){
halfFlag
=
true
;
break
;
}
}
if
(
halfFlag
){
Integer
num
=
product
.
getQty
();
for
(
int
i
=
0
;
i
<
num
-
1
;
i
++){
ProductVo
newProduct
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
product
),
ProductVo
.
class
);
newProduct
.
setQty
(
1
);
}
product
.
setQty
(
1
);
}
}
}
}
queryOrderResponseVo
.
setProducts
(
masterProducts
);
queryOrderResponseVo
.
setProducts
(
masterProducts
);
}
}
}
}
order-management/pom.xml
View file @
8f5c5e47
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
<dependency>
<dependency>
<groupId>
cn.freemud
</groupId>
<groupId>
cn.freemud
</groupId>
<artifactId>
assortment-ordercenter-sdk
</artifactId>
<artifactId>
assortment-ordercenter-sdk
</artifactId>
<version>
2.2.
15
-SNAPSHOT
</version>
<version>
2.2.
20
-SNAPSHOT
</version>
<scope>
provided
</scope>
<scope>
provided
</scope>
</dependency>
</dependency>
<dependency>
<dependency>
...
...
ordercenter-sdk/src/main/java/com/freemud/application/sdk/api/ordercenter/service/OrderSdkService.java
View file @
8f5c5e47
...
@@ -3,6 +3,7 @@ package com.freemud.application.sdk.api.ordercenter.service;
...
@@ -3,6 +3,7 @@ package com.freemud.application.sdk.api.ordercenter.service;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.freemud.application.sdk.api.base.BaseRequest
;
import
com.freemud.application.sdk.api.base.BaseRequest
;
import
com.freemud.application.sdk.api.log.ApiLog
;
import
com.freemud.application.sdk.api.ordercenter.config.OrderCenterProperties
;
import
com.freemud.application.sdk.api.ordercenter.config.OrderCenterProperties
;
import
com.freemud.application.sdk.api.ordercenter.constant.InterfaceAddressConstant
;
import
com.freemud.application.sdk.api.ordercenter.constant.InterfaceAddressConstant
;
import
com.freemud.application.sdk.api.ordercenter.constant.ResponseConstant
;
import
com.freemud.application.sdk.api.ordercenter.constant.ResponseConstant
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
View file @
8f5c5e47
...
@@ -871,14 +871,15 @@ public class ShoppingCartConvertAdapter {
...
@@ -871,14 +871,15 @@ public class ShoppingCartConvertAdapter {
//套餐可选商品
//套餐可选商品
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductGroupList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductGroupList
()))
{
for
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
ComboxGoods
comboxGoods
:
cartGoods
.
getProductGroupList
()){
for
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
ComboxGoods
comboxGoods
:
cartGoods
.
getProductGroupList
()){
ProductTypeBeanDTO
productBeanDTO
=
subProductTypeMap
.
get
(
comboxGoods
.
getSpuId
());
//套餐子商品多规格商品
//套餐子商品多规格商品
if
(
comboxGoods
.
getSpuId
()
!=
null
&&
!
comboxGoods
.
getSkuId
().
equals
(
comboxGoods
.
getSpuId
())
){
if
(
comboxGoods
.
getSpuId
()
!=
null
&&
!
comboxGoods
.
getSkuId
().
equals
(
comboxGoods
.
getSpuId
())
){
for
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
ComboxGoods
productGroup
:
cartGoods
.
getProductGroupList
())
{
for
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
ComboxGoods
productGroup
:
cartGoods
.
getProductGroupList
())
{
updateComboxGoodsInfoForMCoffee
(
productGroup
,
spuProduct
,
false
);
updateComboxGoodsInfoForMCoffee
(
productGroup
,
productBeanDTO
,
false
);
}
}
}
else
{
}
else
{
for
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
ComboxGoods
productGroup
:
cartGoods
.
getProductGroupList
())
{
for
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
ComboxGoods
productGroup
:
cartGoods
.
getProductGroupList
())
{
updateComboxGoodsInfoForMCoffee
(
productGroup
,
spuProduct
,
false
);
updateComboxGoodsInfoForMCoffee
(
productGroup
,
productBeanDTO
,
false
);
}
}
}
}
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartClearRequestVo.java
View file @
8f5c5e47
...
@@ -36,4 +36,10 @@ public class ShoppingCartClearRequestVo extends BaseRequestVo {
...
@@ -36,4 +36,10 @@ public class ShoppingCartClearRequestVo extends BaseRequestVo {
* 拼单发起人userId(拼单)
* 拼单发起人userId(拼单)
*/
*/
private
String
createCollageUserId
;
private
String
createCollageUserId
;
/**
* 收货地址ID、svc卡支付外卖订单必传
*/
private
String
receiveId
;
}
}
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
View file @
8f5c5e47
...
@@ -745,6 +745,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -745,6 +745,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
shoppingCartGoodsResponseVo
.
setActivityTip
(
activityTip
);
shoppingCartGoodsResponseVo
.
setActivityTip
(
activityTip
);
shoppingCartGoodsResponseVo
.
setProducts
(
new
ArrayList
<>());
shoppingCartGoodsResponseVo
.
setProducts
(
new
ArrayList
<>());
shoppingCartGoodsResponseVo
.
setProductsCount
(
0
);
shoppingCartGoodsResponseVo
.
setProductsCount
(
0
);
ShoppingCartRelationService
shoppingCartRelationService
=
shoppingCartRelationFactory
.
cleanAfter
(
shoppingCartClearRequestVo
.
getPartnerId
());
shoppingCartRelationService
.
cleanAfter
(
shoppingCartGoodsResponseVo
,
shoppingCartClearRequestVo
);
return
ResponseUtil
.
success
(
shoppingCartGoodsResponseVo
);
return
ResponseUtil
.
success
(
shoppingCartGoodsResponseVo
);
}
}
...
@@ -1890,7 +1894,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -1890,7 +1894,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
return
calculationDiscountResult
;
return
calculationDiscountResult
;
}
}
p
rivate
Long
calculateDeliveryAmount
(
String
receiveId
,
String
partnerId
,
String
storeId
,
String
wxappid
,
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
,
Integer
orderType
)
{
p
ublic
Long
calculateDeliveryAmount
(
String
receiveId
,
String
partnerId
,
String
storeId
,
String
wxappid
,
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
,
Integer
orderType
)
{
Long
deliveryAmount
=
0L
;
Long
deliveryAmount
=
0L
;
// 如果订单的收获地址为空,且订单是外卖单,返回运费
// 如果订单的收获地址为空,且订单是外卖单,返回运费
// 主要是为了兼容coco不传收获地址,需要获取固定运费的情况
// 主要是为了兼容coco不传收获地址,需要获取固定运费的情况
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
8f5c5e47
...
@@ -270,8 +270,10 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -270,8 +270,10 @@ public class ShoppingCartMCoffeeServiceImpl {
isContinue
=
false
;
isContinue
=
false
;
}
}
if
(
StringUtils
.
isNotEmpty
(
goodsId
)
&&
StringUtils
.
isNotEmpty
(
couponCode
)
&&
isContinue
if
(
StringUtils
.
isNotEmpty
(
goodsId
)
&&
StringUtils
.
isNotEmpty
(
couponCode
)
&&
isContinue
&&
cartGoods
.
getName
().
equals
(
"啡常搭"
)
&&
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductComboList
())
&&
cartGoods
.
getProductComboList
().
size
()
==
1
&&
(
cartGoods
.
getName
().
equals
(
"拿铁"
)
||
cartGoods
.
getName
().
equals
(
"美式"
))
&&
cartGoods
.
getGoodsType
().
equals
(
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
())
&&
CollectionUtils
.
isEmpty
(
cartGoods
.
getProductGroupList
())
&&
cartGoods
.
getProductComboList
().
get
(
0
).
getSkuId
().
equals
(
goodsId
))
{
&&
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductComboList
())
&&
cartGoods
.
getProductComboList
().
size
()
==
1
&&
cartGoods
.
getProductComboList
().
get
(
0
).
getSkuId
().
equals
(
goodsId
)
&&
CollectionUtils
.
isEmpty
(
cartGoods
.
getProductGroupList
()))
{
// 如果购物车商品存在商品规格,替换时复制规格信息
// 如果购物车商品存在商品规格,替换时复制规格信息
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductComboList
().
get
(
0
).
getSpecialExtra
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductComboList
().
get
(
0
).
getSpecialExtra
()))
{
addShoppingCartGoodsRequestVo
.
setSpecialExtra
(
cartGoods
.
getProductComboList
().
get
(
0
).
getSpecialExtra
());
addShoppingCartGoodsRequestVo
.
setSpecialExtra
(
cartGoods
.
getProductComboList
().
get
(
0
).
getSpecialExtra
());
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/ShoppingCartRelationFactory.java
View file @
8f5c5e47
...
@@ -20,4 +20,11 @@ public interface ShoppingCartRelationFactory {
...
@@ -20,4 +20,11 @@ public interface ShoppingCartRelationFactory {
*/
*/
ShoppingCartRelationService
getBuildShoppingCartGoodsResponseService
(
String
partnerId
);
ShoppingCartRelationService
getBuildShoppingCartGoodsResponseService
(
String
partnerId
);
/**
* 获取购物车清空后的操作实现
* @param partnerId
* @return
*/
ShoppingCartRelationService
cleanAfter
(
String
partnerId
);
}
}
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/ShoppingCartRelationService.java
View file @
8f5c5e47
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
package
cn
.
freemud
.
service
.
shoppingCart
;
package
cn
.
freemud
.
service
.
shoppingCart
;
import
cn.freemud.entities.dto.calculate.CalculationSharingDiscountResponseDto
;
import
cn.freemud.entities.dto.calculate.CalculationSharingDiscountResponseDto
;
import
cn.freemud.entities.vo.ShoppingCartClearRequestVo
;
import
cn.freemud.entities.vo.ShoppingCartGoodsResponseVo
;
import
cn.freemud.entities.vo.ShoppingCartGoodsResponseVo
;
public
interface
ShoppingCartRelationService
{
public
interface
ShoppingCartRelationService
{
...
@@ -24,5 +25,10 @@ public interface ShoppingCartRelationService {
...
@@ -24,5 +25,10 @@ public interface ShoppingCartRelationService {
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
discountResult
,
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
discountResult
,
Integer
flag
);
Integer
flag
);
/**
* 购物车清空后的扩展操作
*/
void
cleanAfter
(
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
,
ShoppingCartClearRequestVo
shoppingCartClearRequestVo
);
}
}
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/impl/CocoShoppingCartRelationServiceImpl.java
View file @
8f5c5e47
This diff is collapsed.
Click to expand it.
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/impl/PlatformShoppingCartRelationServiceImpl.java
View file @
8f5c5e47
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
package
cn
.
freemud
.
service
.
shoppingCart
.
impl
;
package
cn
.
freemud
.
service
.
shoppingCart
.
impl
;
import
cn.freemud.entities.dto.calculate.CalculationSharingDiscountResponseDto
;
import
cn.freemud.entities.dto.calculate.CalculationSharingDiscountResponseDto
;
import
cn.freemud.entities.vo.ShoppingCartClearRequestVo
;
import
cn.freemud.entities.vo.ShoppingCartGoodsResponseVo
;
import
cn.freemud.entities.vo.ShoppingCartGoodsResponseVo
;
import
cn.freemud.service.shoppingCart.ShoppingCartRelationService
;
import
cn.freemud.service.shoppingCart.ShoppingCartRelationService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -26,4 +27,9 @@ public class PlatformShoppingCartRelationServiceImpl implements ShoppingCartRela
...
@@ -26,4 +27,9 @@ public class PlatformShoppingCartRelationServiceImpl implements ShoppingCartRela
Integer
flag
)
{
Integer
flag
)
{
}
}
@Override
public
void
cleanAfter
(
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
,
ShoppingCartClearRequestVo
shoppingCartClearRequestVo
)
{
}
}
}
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/impl/ShoppingCartRelationFactoryImpl.java
View file @
8f5c5e47
...
@@ -54,4 +54,13 @@ public class ShoppingCartRelationFactoryImpl implements ShoppingCartRelationFact
...
@@ -54,4 +54,13 @@ public class ShoppingCartRelationFactoryImpl implements ShoppingCartRelationFact
}
}
}
}
@Override
public
ShoppingCartRelationService
cleanAfter
(
String
partnerId
)
{
if
(
cocoPartnerId
.
contains
(
partnerId
)){
return
cocoShoppingCartRelationService
;
}
else
{
return
platformShoppingCartRelationService
;
}
}
}
}
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