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
e2f4a92a
Commit
e2f4a92a
authored
Sep 14, 2022
by
周晓航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【【老订单聚合、老购物车聚合】购物车、下单新增购物车行加料数量字段】
https://www.tapd.cn/43862731/prong/stories/view/1143862731001052565
parent
c3a9cdde
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
104 additions
and
67 deletions
+104
-67
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/adapter/OrderSdkAdapter.java
+1
-1
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/order/CreateOrderProductRequest.java
+5
-0
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+84
-64
order-application-service/src/test/spock/cn/freemud/service/impl/OrderAdapterServiceImplTest.groovy
+9
-2
ordercenter-sdk/src/main/java/com/freemud/application/sdk/api/ordercenter/request/create/OrderItemCreateReq.java
+5
-0
No files found.
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/adapter/OrderSdkAdapter.java
View file @
e2f4a92a
...
...
@@ -3228,7 +3228,7 @@ public class OrderSdkAdapter {
orderItemCreateReq
.
setPhotoUrl
(
productRequest
.
getPhotoUrl
());
orderItemCreateReq
.
setPackPrice
(
productRequest
.
getPackPrice
());
// 拼单加购人信息 add by miaohui 2020.10.12 end
orderItemCreateReq
.
setProductSpuQuantity
(
product
.
getProductSpuQuantity
());
orderItemList
.
add
(
orderItemCreateReq
);
if
(
product
.
getTotalDiscountAmount
()
!=
null
&&
product
.
getTotalDiscountAmount
()
>
0L
&&
!
isMaterial
)
{
//优惠信息转换
...
...
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/order/CreateOrderProductRequest.java
View file @
e2f4a92a
...
...
@@ -281,4 +281,9 @@ public class CreateOrderProductRequest extends BaseConfig {
* 【订C,“POS编码”让凌顶那边去匹配商品】 https://www.tapd.cn/43862731/prong/stories/view/1143862731001039549
*/
private
String
linkedId
;
/**
* 订单新增商品SPU数量字段 https://cf.freemudvip.com/pages/viewpage.action?pageId=209356052
*/
private
Integer
productSpuQuantity
;
}
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
e2f4a92a
...
...
@@ -32,11 +32,6 @@ import cn.freemud.entities.vo.*;
import
cn.freemud.entities.vo.encircle.CreateReserveOrderVo
;
import
cn.freemud.entities.vo.encircle.PreviewOrderInfoVo
;
import
cn.freemud.entities.vo.order.CreateOrderUnionPayCardVo
;
import
cn.freemud.enums.ActivityTypeEnum
;
import
cn.freemud.enums.OrderChannelType
;
import
cn.freemud.enums.PayStatus
;
import
cn.freemud.enums.QueryOrderStatus
;
import
cn.freemud.enums.RefundStatus
;
import
cn.freemud.enums.ResponseResult
;
import
cn.freemud.enums.*
;
import
cn.freemud.interceptor.ServiceException
;
...
...
@@ -58,7 +53,6 @@ import com.freemud.application.sdk.api.log.LogThreadLocal;
import
com.freemud.application.sdk.api.ordercenter.adapter.OrderCenterSdkAdapter
;
import
com.freemud.application.sdk.api.ordercenter.entities.v1.*
;
import
com.freemud.application.sdk.api.ordercenter.enums.*
;
import
com.freemud.application.sdk.api.ordercenter.enums.OrderType
;
import
com.freemud.application.sdk.api.ordercenter.enums.orderv1.OrderStatusV1
;
import
com.freemud.application.sdk.api.ordercenter.enums.orderv1.OrderTypeV1
;
import
com.freemud.application.sdk.api.ordercenter.request.AfterOrderExtInfoDto
;
...
...
@@ -86,7 +80,6 @@ import com.google.common.collect.Lists;
import
com.google.common.collect.Maps
;
import
com.google.gson.Gson
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.io.ByteOrderMark
;
import
org.apache.commons.lang.ObjectUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.time.FastDateFormat
;
...
...
@@ -244,7 +237,7 @@ public class OrderAdapter {
.
build
();
if
(
mcCafePartnerId
.
equals
(
createOrderDto
.
getCompanyId
()))
{
//购买月享卡2.0并且不当单使用时,过滤掉无意义的0元优惠
if
(
activityDiscountsDto
.
getDiscountAmount
()
==
0
&&
ActivityTypeEnum
.
TYPE_38
.
getCode
().
equals
(
activityDiscountsDto
.
getActivityType
())
if
(
activityDiscountsDto
.
getDiscountAmount
()
==
0
&&
ActivityTypeEnum
.
TYPE_38
.
getCode
().
equals
(
activityDiscountsDto
.
getActivityType
())
&&
activityDiscountsDto
.
getExtendType
()
==
12
//12=月享卡2.0
&&
(
shoppingCartGoodsDto
.
getMonthCardDiscount
()
==
null
||
shoppingCartGoodsDto
.
getMonthCardDiscount
().
getDiscountAmount
()
==
0
))
{
continue
;
...
...
@@ -517,14 +510,14 @@ public class OrderAdapter {
// fisherman -> 爱马哥 orderType落库的类型处理
if
(
Objects
.
equals
(
createOrderVo
.
getOrderType
(),
CreateOrderType
.
TAKE_OUT
.
getCode
()))
{
// orderType = OrderTypeV1.TAKE_OUT.getCode();
newOrderType
=
getNewOrderType
(
OrderTypeV1
.
TAKE_OUT
,
createOrderVo
.
getExpectTime
(),
createOrderVo
.
getBizType
());
newOrderType
=
getNewOrderType
(
OrderTypeV1
.
TAKE_OUT
,
createOrderVo
.
getExpectTime
(),
createOrderVo
.
getBizType
());
receiveAddress
=
(
userDeliveryInfoDto
!=
null
?
userDeliveryInfoDto
.
getReceiveOfficeName
()
+
","
+
userDeliveryInfoDto
.
getReceiveAddress
()
:
""
);
}
else
if
(
Objects
.
equals
(
createOrderVo
.
getOrderType
(),
CreateOrderType
.
COLLECT_GOODS
.
getCode
()))
{
if
(
Objects
.
equals
(
createOrderVo
.
getReachStoreType
(),
OrderTypeV1
.
EAT_IN
.
getCode
()))
{
// orderType = OrderTypeV1.EAT_IN.getCode();
newOrderType
=
getNewOrderType
(
OrderTypeV1
.
EAT_IN
,
createOrderVo
.
getExpectTime
(),
createOrderVo
.
getBizType
());
newOrderType
=
getNewOrderType
(
OrderTypeV1
.
EAT_IN
,
createOrderVo
.
getExpectTime
(),
createOrderVo
.
getBizType
());
}
else
{
newOrderType
=
getNewOrderType
(
OrderTypeV1
.
COLLECT_GOODS
,
createOrderVo
.
getExpectTime
(),
createOrderVo
.
getBizType
());
newOrderType
=
getNewOrderType
(
OrderTypeV1
.
COLLECT_GOODS
,
createOrderVo
.
getExpectTime
(),
createOrderVo
.
getBizType
());
// orderType = OrderTypeV1.COLLECT_GOODS.getCode();
}
}
else
if
(
Objects
.
equals
(
createOrderVo
.
getOrderType
(),
CreateOrderType
.
SAASMALL
.
getCode
()))
{
...
...
@@ -591,10 +584,11 @@ public class OrderAdapter {
/**
* 提取公共方法
*
* @param shoppingCartStocks
* @return
*/
private
List
<
SubtractStockVO
>
getStocks
(
List
<
SubtractStockVO
>
shoppingCartStocks
){
private
List
<
SubtractStockVO
>
getStocks
(
List
<
SubtractStockVO
>
shoppingCartStocks
)
{
List
<
SubtractStockVO
>
stocks
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
shoppingCartStocks
))
{
for
(
SubtractStockVO
stockVO
:
shoppingCartStocks
)
{
...
...
@@ -645,21 +639,21 @@ public class OrderAdapter {
if
(
OrderChannelType
.
IWC
.
getCode
().
equals
(
channelType
))
{
//未定,暂无
}
else
if
(
OrderChannelType
.
SAASMALL
.
getCode
().
equals
(
channelType
))
{
orderClients
=
Arrays
.
asList
(
OrderClientType
.
SAAS
.
getIndex
(),
OrderClientType
.
ALIPAY
.
getIndex
());
orderClients
=
Arrays
.
asList
(
OrderClientType
.
SAAS
.
getIndex
(),
OrderClientType
.
ALIPAY
.
getIndex
());
bizTypes
.
add
(
BizTypeEnum
.
MALL
.
getBizType
());
//新版查微商城订单marketingType 不传
if
(
queryOrderDto
.
getMarketingType
()
==
null
||
Objects
.
equals
(
1
,
queryOrderDto
.
getMarketingType
()))
{
if
(
queryOrderDto
.
getMarketingType
()
==
null
||
Objects
.
equals
(
1
,
queryOrderDto
.
getMarketingType
()))
{
queryOrdersDto
.
setMarketingType
(
MarketTypeEnum
.
ORDER
.
getIndex
());
}
//微商城拼团
if
(
Objects
.
equals
(
MarketTypeEnum
.
GROUPB
.
getIndex
(),
queryOrderDto
.
getMarketingType
()))
{
if
(
Objects
.
equals
(
MarketTypeEnum
.
GROUPB
.
getIndex
(),
queryOrderDto
.
getMarketingType
()))
{
queryOrdersDto
.
setMarketingType
(
MarketTypeEnum
.
GROUPB
.
getIndex
());
}
}
else
if
(
OrderChannelType
.
APP
.
getCode
().
equals
(
channelType
))
{
orderClients
.
add
(
OrderClientType
.
APP
.
getIndex
());
bizTypes
=
Arrays
.
asList
(
BizTypeEnum
.
ORDINARY
.
getBizType
(),
BizTypeEnum
.
SALE_COUPON
.
getBizType
());
}
else
if
(
OrderChannelType
.
CASHIER
.
getCode
().
equals
(
channelType
))
{
orderClients
=
Arrays
.
asList
(
OrderClientType
.
SAAS
.
getIndex
(),
OrderClientType
.
ALIPAY
.
getIndex
());
orderClients
=
Arrays
.
asList
(
OrderClientType
.
SAAS
.
getIndex
(),
OrderClientType
.
ALIPAY
.
getIndex
());
bizTypes
.
add
(
BizTypeEnum
.
ORDINARY
.
getBizType
());
queryOrdersDto
.
setMarketingType
(
MarketTypeEnum
.
CASHIER
.
getIndex
());
}
else
if
(
OrderChannelType
.
TIKTOK
.
getCode
().
equals
(
channelType
))
{
//抖音目前只有卖券,点餐业务已废弃
...
...
@@ -669,7 +663,7 @@ public class OrderAdapter {
orderClients
=
Arrays
.
asList
(
OrderClientType
.
SAAS
.
getIndex
(),
OrderClientType
.
ALIPAY
.
getIndex
(),
OrderClientType
.
APP
.
getIndex
(),
OrderClientType
.
ASSISTANT
.
getIndex
());
bizTypes
=
Arrays
.
asList
(
BizTypeEnum
.
ORDINARY
.
getBizType
(),
BizTypeEnum
.
SALE_COUPON
.
getBizType
(),
BizTypeEnum
.
ADVANCE_ORDER
.
getBizType
());
queryOrdersDto
.
setMarketingTypes
(
Arrays
.
asList
(
MarketTypeEnum
.
ORDER
.
getIndex
(),
MarketTypeEnum
.
COLLAGE
.
getIndex
(),
MarketTypeEnum
.
WE_CHAT_LIVE_SELL
.
getIndex
(),
MarketTypeEnum
.
CASHIER
.
getIndex
(),
MarketTypeEnum
.
TIKTOK_MARKET_ORDER
.
getIndex
()));
MarketTypeEnum
.
WE_CHAT_LIVE_SELL
.
getIndex
(),
MarketTypeEnum
.
CASHIER
.
getIndex
(),
MarketTypeEnum
.
TIKTOK_MARKET_ORDER
.
getIndex
()));
}
List
<
Integer
>
payStatus
=
Arrays
.
asList
(
PayStatus
.
HAVE_PAID
.
getCode
(),
PayStatus
.
HAVE_REFUND
.
getCode
(),
PayStatus
.
COMPLETE
.
getCode
());
queryOrdersDto
.
setPayStatus
((
Integer
[])
payStatus
.
toArray
());
...
...
@@ -1771,8 +1765,8 @@ public class OrderAdapter {
if
(
orderBean
.
getBizType
().
compareTo
(
BizTypeEnum
.
ADVANCE_ORDER
.
getBizType
())
==
0
)
{
return
this
.
checkAdvanceOrder
(
orderBean
.
getGmtExpect
());
}
boolean
isMarketType2Tiktok
=
orderBean
.
getBizType
().
compareTo
(
BizTypeEnum
.
ORDINARY
.
getBizType
())
==
0
&&
orderBean
.
getMarketingType
().
compareTo
(
MarketTypeEnum
.
TIKTOK_MARKET_ORDER
.
getIndex
().
byteValue
())
==
0
;
boolean
isMarketType2Tiktok
=
orderBean
.
getBizType
().
compareTo
(
BizTypeEnum
.
ORDINARY
.
getBizType
())
==
0
&&
orderBean
.
getMarketingType
().
compareTo
(
MarketTypeEnum
.
TIKTOK_MARKET_ORDER
.
getIndex
().
byteValue
())
==
0
;
if
(
isMarketType2Tiktok
)
{
return
false
;
}
...
...
@@ -1780,15 +1774,15 @@ public class OrderAdapter {
// fisherman 虚拟券商品是否可退款配置校验
if
(
orderBean
.
getBizType
().
compareTo
(
BizTypeEnum
.
SALE_COUPON
.
getBizType
())
==
0
)
{
return
this
.
checkRefundButtionBizTypeIs6
(
orderBean
.
getCompanyId
(),
orderBean
.
getBizType
(),
orderBean
.
getStatus
(),
wxAppId
,
new
Date
(
orderBean
.
getGmtCreate
()),
orderBean
.
getOrderType
());
orderBean
.
getStatus
(),
wxAppId
,
new
Date
(
orderBean
.
getGmtCreate
()),
orderBean
.
getOrderType
());
}
// 加价购选择虚拟商品券包,订单完成前可申请退款,完成之后不能申请退款 --> 这里的 bizType应该是 = 1的
if
(
OrderStatusV1
.
COMPLETE
.
equals
(
status
)
&&
CollectionUtils
.
isNotEmpty
(
orderBean
.
getProductList
()))
{
for
(
ProductBeanV1
productBeanV1
:
orderBean
.
getProductList
()){
if
(
StringUtils
.
isNotEmpty
(
productBeanV1
.
getExtInfo
()))
{
for
(
ProductBeanV1
productBeanV1
:
orderBean
.
getProductList
())
{
if
(
StringUtils
.
isNotEmpty
(
productBeanV1
.
getExtInfo
()))
{
OrderProductAddInfoDto
extInfo
=
JSONObject
.
parseObject
(
productBeanV1
.
getExtInfo
(),
OrderProductAddInfoDto
.
class
);
if
(
CollectionUtils
.
isNotEmpty
(
extInfo
.
getProductBindingCoupons
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
extInfo
.
getProductBindingCoupons
()))
{
return
false
;
}
}
...
...
@@ -1799,7 +1793,7 @@ public class OrderAdapter {
// 查询小程序配置的退款设置
String
redisKey
=
MessageFormat
.
format
(
OrderRedisKeyConstant
.
ORDER_REFUND_CONFIG
,
orderBean
.
getCompanyId
(),
wxAppId
);
String
hashKey
;
if
(
MarketTypeEnum
.
CASHIER
.
getIndex
().
byteValue
()
==
orderBean
.
getMarketingType
())
{
if
(
MarketTypeEnum
.
CASHIER
.
getIndex
().
byteValue
()
==
orderBean
.
getMarketingType
())
{
//收银单,使用收银单的退款配置
hashKey
=
OrderRedisKeyConstant
.
HashKeyForOrderRefundConfig
.
CASHIER
;
}
else
{
...
...
@@ -1813,34 +1807,52 @@ public class OrderAdapter {
}
OrderRefundConfigEntity
config
=
JSON
.
parseObject
(
configStr
,
OrderRefundConfigEntity
.
class
);
String
orderRefund
=
null
;
if
(
MarketTypeEnum
.
CASHIER
.
getIndex
().
byteValue
()
==
orderBean
.
getMarketingType
())
{
if
(
MarketTypeEnum
.
CASHIER
.
getIndex
().
byteValue
()
==
orderBean
.
getMarketingType
())
{
//收银单,使用收银单的退款配置 收银单只有完成的订单,直接判断是否可以退款就行
orderRefund
=
config
.
getCashierOrderRefund
();
}
else
if
(
OrderTypeV1
.
TAKE_OUT
.
getCode
().
equals
(
orderBean
.
getOrderType
()))
{
//外卖单,使用外卖单的退款配置
switch
(
status
)
{
// 未接单
case
TAKE_ORDER:
orderRefund
=
config
.
getDeliveryTakeOrderRefund
();
break
;
case
TAKE_ORDER:
orderRefund
=
config
.
getDeliveryTakeOrderRefund
();
break
;
//已接单
case
RECEIPT:
orderRefund
=
config
.
getDeliveryReceiptOrderRefund
();
break
;
case
RECEIPT:
orderRefund
=
config
.
getDeliveryReceiptOrderRefund
();
break
;
//制作完成
case
COMPLETE_MAKE:
orderRefund
=
config
.
getDeliveryCompleteMakeOrderRefund
();
break
;
case
COMPLETE_MAKE:
orderRefund
=
config
.
getDeliveryCompleteMakeOrderRefund
();
break
;
// 订单完成
case
COMPLETE:
orderRefund
=
config
.
getDeliveryOrderRefund
();
break
;
default
:
break
;
case
COMPLETE:
orderRefund
=
config
.
getDeliveryOrderRefund
();
break
;
default
:
break
;
}
}
else
{
//其他,使用堂食的退款配置(必须先判断收银单,因为收银单的类型也是堂食,只是orderClient不一样
switch
(
status
)
{
// 未接单
case
TAKE_ORDER:
orderRefund
=
config
.
getTakeOrderRefund
();
break
;
case
TAKE_ORDER:
orderRefund
=
config
.
getTakeOrderRefund
();
break
;
//已接单
case
RECEIPT:
orderRefund
=
config
.
getReceiptOrderRefund
();
break
;
case
RECEIPT:
orderRefund
=
config
.
getReceiptOrderRefund
();
break
;
//制作完成
case
COMPLETE_MAKE:
orderRefund
=
config
.
getCompleteMakeOrderRefund
();
break
;
case
COMPLETE_MAKE:
orderRefund
=
config
.
getCompleteMakeOrderRefund
();
break
;
// 订单完成
case
COMPLETE:
orderRefund
=
config
.
getOrderRefund
();
break
;
default
:
break
;
case
COMPLETE:
orderRefund
=
config
.
getOrderRefund
();
break
;
default
:
break
;
}
}
canRefund
=
ALLOW_REFUND
.
equals
(
orderRefund
);
...
...
@@ -1903,6 +1915,7 @@ public class OrderAdapter {
/**
* 预约时间
*
* @param gmtExpect
* @return true 可退 false不可操作
*/
...
...
@@ -1934,16 +1947,16 @@ public class OrderAdapter {
accountVo
.
setType
(
type
);
if
(
type
.
compareTo
(
OrderSettlementType
.
PRODUCT_COUPON
.
getIndex
())
==
0
||
type
.
compareTo
(
OrderSettlementType
.
CASH_COUPON
.
getIndex
())
==
0
||
type
.
compareTo
(
OrderSettlementType
.
DISCOUNT_COUPON
.
getIndex
())
==
0
)
{
||
type
.
compareTo
(
OrderSettlementType
.
DISCOUNT_COUPON
.
getIndex
())
==
0
)
{
// fisherman ->修改成券名称
accountVo
.
setTypeName
(
StringUtils
.
isEmpty
(
orderSettlement
.
getNote
())
?
"优惠券"
:
orderSettlement
.
getNote
());
}
else
if
(
type
.
compareTo
(
OrderSettlementType
.
FULL_REDUCTION
.
getIndex
())
==
0
)
{
}
else
if
(
type
.
compareTo
(
OrderSettlementType
.
FULL_REDUCTION
.
getIndex
())
==
0
)
{
accountVo
.
setTypeName
(
"满减"
);
}
else
if
(
type
.
compareTo
(
OrderSettlementType
.
POINTS
.
getIndex
())
==
0
)
{
}
else
if
(
type
.
compareTo
(
OrderSettlementType
.
POINTS
.
getIndex
())
==
0
)
{
accountVo
.
setTypeName
(
"积分抵扣"
);
}
else
if
(
type
.
compareTo
(
OrderSettlementType
.
FREIGHT_COUPON
.
getIndex
())
==
0
)
{
}
else
if
(
type
.
compareTo
(
OrderSettlementType
.
FREIGHT_COUPON
.
getIndex
())
==
0
)
{
accountVo
.
setTypeName
(
"配送券"
);
}
else
{
}
else
{
accountVo
.
setTypeName
(
"参与活动"
);
}
int
value
=
orderSettlement
.
getSettlementAmount
().
intValue
();
...
...
@@ -2375,6 +2388,7 @@ public class OrderAdapter {
public
CreateOrderProductRequest
convent2OrderProduct
(
ShoppingCartGoodsDto
.
CartGoodsDetailDto
cartGoodsDetailDto
)
{
CreateOrderProductRequest
createOrderProductDemoDto
=
convent2OrderProductDemo
(
cartGoodsDetailDto
);
createOrderProductDemoDto
.
setProductSpuQuantity
(
createOrderProductDemoDto
.
getNumber
());
//套餐
if
(
cartGoodsDetailDto
.
getProductType
()
!=
null
&&
(
cartGoodsDetailDto
.
getProductType
()
==
ProductType
.
SETMEALPRODUCT
.
getCode
()
||
cartGoodsDetailDto
.
getProductType
()
==
ProductType
.
SETMEALPRODUCT_UPPRICE
.
getCode
()))
{
List
<
CreateOrderProductRequest
>
comboProducts
=
new
ArrayList
<>();
...
...
@@ -2383,7 +2397,9 @@ public class OrderAdapter {
product
.
setUserName
(
cartGoodsDetailDto
.
getUserName
());
product
.
setOpenId
(
cartGoodsDetailDto
.
getOpenId
());
product
.
setPhotoUrl
(
cartGoodsDetailDto
.
getPhotoUrl
());
comboProducts
.
add
(
convent2OrderProductDemo
(
product
));
CreateOrderProductRequest
comboProduct
=
convent2OrderProductDemo
(
product
);
comboProduct
.
setProductSpuQuantity
(
comboProduct
.
getNumber
()
/
createOrderProductDemoDto
.
getNumber
());
comboProducts
.
add
(
comboProduct
);
});
createOrderProductDemoDto
.
setComboProduct
(
comboProducts
);
}
...
...
@@ -2395,7 +2411,9 @@ public class OrderAdapter {
product
.
setUserName
(
cartGoodsDetailDto
.
getUserName
());
product
.
setOpenId
(
cartGoodsDetailDto
.
getOpenId
());
product
.
setPhotoUrl
(
cartGoodsDetailDto
.
getPhotoUrl
());
materialProducts
.
add
(
convent2OrderProductMaterial
(
product
));
CreateOrderProductRequest
materialProduct
=
convent2OrderProductMaterial
(
product
);
materialProduct
.
setProductSpuQuantity
(
materialProduct
.
getNumber
()
/
createOrderProductDemoDto
.
getNumber
());
materialProducts
.
add
(
materialProduct
);
});
createOrderProductDemoDto
.
setMaterialProduct
(
materialProducts
);
}
...
...
@@ -2485,18 +2503,19 @@ public class OrderAdapter {
}
public
CreateOrderProductRequest
convent2OrderProductDemo
(
ShoppingCartGoodsDto
.
CartGoodsDetailDto
cartGoodsDetailDto
)
{
return
this
.
conventCommonOrderProductDemo
(
cartGoodsDetailDto
,
null
,
0
);
return
this
.
conventCommonOrderProductDemo
(
cartGoodsDetailDto
,
null
,
0
);
}
/**
* 公共转换提取
* 公共转换提取
*
* @param cartGoodsDetailDto
* @param productType
* @param flag 0.平台普通订单 1.麦咖啡
* @param flag
0.平台普通订单 1.麦咖啡
* @return
*/
private
CreateOrderProductRequest
conventCommonOrderProductDemo
(
ShoppingCartGoodsDto
.
CartGoodsDetailDto
cartGoodsDetailDto
,
Integer
productType
,
int
flag
){
private
CreateOrderProductRequest
conventCommonOrderProductDemo
(
ShoppingCartGoodsDto
.
CartGoodsDetailDto
cartGoodsDetailDto
,
Integer
productType
,
int
flag
)
{
CreateOrderProductRequest
createOrderProductDemoDto
=
new
CreateOrderProductRequest
();
createOrderProductDemoDto
.
setProductId
(
StringUtils
.
isNotBlank
(
cartGoodsDetailDto
.
getSpuId
())
?
cartGoodsDetailDto
.
getSpuId
()
:
cartGoodsDetailDto
.
getSkuId
());
createOrderProductDemoDto
.
setProductName
(
cartGoodsDetailDto
.
getSpuName
());
...
...
@@ -2542,7 +2561,7 @@ public class OrderAdapter {
createOrderProductDemoDto
.
getSpecialAttrs
().
add
(
new
OrderSpecialExtraAttrRequest
(
o
.
getAttributeId
(),
o
.
getAttributeName
(),
o
.
getAttributeForeignName
(),
o
.
getSpecialCode
()));
});
}
}
else
{
}
else
{
createOrderProductDemoDto
.
setProductForeignName
(
cartGoodsDetailDto
.
getSpuForeignName
());
createOrderProductDemoDto
.
setOriginalProductType
(
cartGoodsDetailDto
.
getOriginalProductType
());
createOrderProductDemoDto
.
setSpecificationForeignName
(
cartGoodsDetailDto
.
getSkuForeignName
());
...
...
@@ -2562,7 +2581,7 @@ public class OrderAdapter {
}
public
CreateOrderProductRequest
convent2MCCafeOrderProductDemo
(
ShoppingCartGoodsDto
.
CartGoodsDetailDto
cartGoodsDetailDto
,
Integer
productType
)
{
return
this
.
conventCommonOrderProductDemo
(
cartGoodsDetailDto
,
productType
,
1
);
return
this
.
conventCommonOrderProductDemo
(
cartGoodsDetailDto
,
productType
,
1
);
}
public
CreateOrderProductRequest
getMcCafeWithOrderVirtualProduct
(
ShoppingCartGoodsDto
shoppingCartGoodsDto
,
CreateOrderVo
createOrderVo
)
{
...
...
@@ -2712,7 +2731,6 @@ public class OrderAdapter {
}
public
UnifiedOrderRequest
convent2UnifiedOrderRequest
(
OrderBeanV1
orderBean
,
PaymentRequest
paymentRequest
,
Long
amount
,
Integer
cardAmount
,
String
transId
)
{
return
convent2UnifiedOrderRequest
(
new
UnifiedOrderCom
(
orderBean
,
paymentRequest
,
amount
,
cardAmount
,
transId
,
null
));
}
...
...
@@ -2722,10 +2740,10 @@ public class OrderAdapter {
*/
public
UnifiedOrderRequest
convent2UnifiedOrderRequest
(
UnifiedOrderCom
com
)
{
OrderBeanV1
orderBean
=
com
.
getOrderBean
();
PaymentRequest
paymentRequest
=
com
.
getPaymentRequest
();
PaymentRequest
paymentRequest
=
com
.
getPaymentRequest
();
Long
amount
=
com
.
getAmount
();
Integer
cardAmount
=
com
.
getCardAmount
();
String
transId
=
com
.
getTransId
();
String
transId
=
com
.
getTransId
();
String
partnerPayOvertime
=
com
.
getPartnerPayOvertime
();
...
...
@@ -3352,16 +3370,16 @@ public class OrderAdapter {
return
requestDto
;
}
public
CreatePrepayRequestDto
convertToCreatePrepayRequestDto
(
CreateOrderBONew
createOrderBO
,
CreateOrderOperateDto
createOrderOperateDto
)
{
public
CreatePrepayRequestDto
convertToCreatePrepayRequestDto
(
CreateOrderBONew
createOrderBO
,
CreateOrderOperateDto
createOrderOperateDto
)
{
AssortmentCustomerInfoVo
userLoginInfoDto
=
createOrderBO
.
getUserLoginInfoDto
();
CreateOrderVo
createOrderVo
=
createOrderBO
.
getCreateOrderVo
();
CreateOrderVo
createOrderVo
=
createOrderBO
.
getCreateOrderVo
();
OrderExtInfoDto
orderExtInfoDTO
=
createOrderBO
.
getExtInfo
();
CreatePrepayRequestDto
requestDto
=
new
CreatePrepayRequestDto
();
requestDto
.
setPartnerId
(
createOrderVo
.
getPartnerId
());
requestDto
.
setWxAppId
(
userLoginInfoDto
.
getWxAppId
());
requestDto
.
setOpenId
(
userLoginInfoDto
.
getOpenId
());
requestDto
.
setOpenId
(
userLoginInfoDto
.
getOpenId
());
requestDto
.
setFaceCode
(
createOrderVo
.
getFaceCode
());
requestDto
.
setCardCode
(
createOrderVo
.
getCardCode
());
requestDto
.
setCardCodes
(
createOrderVo
.
getCardCodes
());
...
...
@@ -3749,7 +3767,7 @@ public class OrderAdapter {
payTurnoffRefund
=
assortmentOpenPlatformPartnerConfig
.
getPartnerValue
();
}
}
catch
(
Exception
e
)
{
AppLogUtil
.
errorLog
(
"getPayTurnoffRefund"
,
null
,
null
,
e
);
AppLogUtil
.
errorLog
(
"getPayTurnoffRefund"
,
null
,
null
,
e
);
}
return
payTurnoffRefund
;
}
...
...
@@ -3908,10 +3926,11 @@ public class OrderAdapter {
/**
* 设置创建订单的 extInfo字段
*
* @return
*/
public
OrderExtInfoDto
setOrderExtInfo
(
AssortmentCustomerInfoVo
userLoginInfoDto
,
StoreResponseDto
storeResponseDto
,
CreateOrderVo
createOrderVo
,
ShoppingCartGoodsDto
shoppingCartGoodsDto
)
{
CreateOrderVo
createOrderVo
,
ShoppingCartGoodsDto
shoppingCartGoodsDto
)
{
Integer
serviceTime
=
storeResponseDto
.
getServiceTime
();
String
sessionId
=
createOrderVo
.
getSessionId
();
...
...
@@ -3975,17 +3994,18 @@ public class OrderAdapter {
/**
* 查询订单商品详情中是否有称重菜未称重
*
* @return
*/
public
boolean
queryExistWeightNoNum
(
OrderBeanV1
orderBean
){
for
(
ProductBeanV1
productBean
:
orderBean
.
getProductList
())
{
if
(
ProductTypeEnum
.
WEIGHT_PRODUCT
.
getCode
().
equals
(
productBean
.
getProductType
())
&&
(
productBean
.
getWeight
()
==
null
||
new
BigDecimal
(
"0.00"
).
compareTo
(
productBean
.
getWeight
())
>=
0
))
{
public
boolean
queryExistWeightNoNum
(
OrderBeanV1
orderBean
)
{
for
(
ProductBeanV1
productBean
:
orderBean
.
getProductList
())
{
if
(
ProductTypeEnum
.
WEIGHT_PRODUCT
.
getCode
().
equals
(
productBean
.
getProductType
())
&&
(
productBean
.
getWeight
()
==
null
||
new
BigDecimal
(
"0.00"
).
compareTo
(
productBean
.
getWeight
())
>=
0
))
{
return
false
;
}
if
(
ProductTypeEnum
.
SETMEAL_PRODUCT
.
getCode
().
equals
(
productBean
.
getProductType
())
||
ProductTypeEnum
.
SETMEAL_UPPRICE_PRODUCT
.
getCode
().
equals
(
productBean
.
getProductType
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
productBean
.
getComboProduct
()))
{
for
(
ProductBeanV1
productBeanSon
:
productBean
.
getComboProduct
())
{
if
(
ProductTypeEnum
.
WEIGHT_PRODUCT
.
getCode
().
equals
(
productBeanSon
.
getProductType
())
&&
(
productBeanSon
.
getWeight
()
==
null
||
new
BigDecimal
(
"0.00"
).
compareTo
(
productBeanSon
.
getWeight
())
>=
0
))
{
if
(
ProductTypeEnum
.
SETMEAL_PRODUCT
.
getCode
().
equals
(
productBean
.
getProductType
())
||
ProductTypeEnum
.
SETMEAL_UPPRICE_PRODUCT
.
getCode
().
equals
(
productBean
.
getProductType
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
productBean
.
getComboProduct
()))
{
for
(
ProductBeanV1
productBeanSon
:
productBean
.
getComboProduct
())
{
if
(
ProductTypeEnum
.
WEIGHT_PRODUCT
.
getCode
().
equals
(
productBeanSon
.
getProductType
())
&&
(
productBeanSon
.
getWeight
()
==
null
||
new
BigDecimal
(
"0.00"
).
compareTo
(
productBeanSon
.
getWeight
())
>=
0
))
{
return
false
;
}
}
...
...
@@ -4048,7 +4068,7 @@ public class OrderAdapter {
return
type
;
}
public
List
<
SvcPayItem
>
convertSvcPayItem
(
UnifiedPayResponseDto
codePayResponse
,
String
cardCode
)
{
public
List
<
SvcPayItem
>
convertSvcPayItem
(
UnifiedPayResponseDto
codePayResponse
,
String
cardCode
)
{
List
<
SvcPayItem
>
payItems
=
new
ArrayList
<>();
SvcPayItem
payItem
=
new
SvcPayItem
();
payItem
.
setCardCode
(
cardCode
);
...
...
order-application-service/src/test/spock/cn/freemud/service/impl/OrderAdapterServiceImplTest.groovy
View file @
e2f4a92a
...
...
@@ -5,6 +5,7 @@ import cn.freemud.entities.bo.CreateOrderBONew
import
cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto
import
cn.freemud.entities.dto.store.StoreMixResponseDto
import
cn.freemud.entities.vo.CreateOrderVo
import
cn.freemud.handler.MemberBlacklistHandler
import
cn.freemud.service.business.impl.OrderBusinessServiceImpl
import
com.alibaba.fastjson.JSON
import
com.freemud.api.assortment.datamanager.entity.vo.AssortmentCustomerInfoVo
...
...
@@ -30,11 +31,14 @@ class OrderAdapterServiceImplTest extends Specification {
def
orderSdkAdapter
=
new
OrderSdkAdapter
()
def
memberBlacklistHandler
=
Mock
(
MemberBlacklistHandler
.
class
)
void
setup
()
{
orderServiceImpl
.
orderAdapter
=
orderAdapter
orderServiceImpl
.
itemService
=
itemService
orderBusinessService
.
orderSdkAdapter
=
orderSdkAdapter
orderServiceImpl
.
orderBusinessService
=
orderBusinessService
orderServiceImpl
.
memberBlacklistHandler
=
memberBlacklistHandler
}
...
...
@@ -42,7 +46,7 @@ class OrderAdapterServiceImplTest extends Specification {
given:
"参数设置"
def
createOrderBO
=
new
CreateOrderBONew
()
// 接口请求信息
String
createVOStr
=
"{\"
buyType\":0,\"channel\":\"1\",\"channelType\":\"saas\",\"couponCode\":\"88709227085491207040\",\"couponCodes\":[{\"couponCode\":\"88709227085491207040\",\"couponType\":7}],\"expectTime\":\"\",\"latitude\":\"31.293401421440972\",\"longitude\":\"121.30461995442708\",\"menuType\":\"saas\",\"mobile\":\"17327190802\",\"orderRemark\":\"测试单,请勿制作出餐,谢谢!\",\"orderType\":1,\"partnerId\":\"2581\",\"payChannelType\":1,\"reachStoreType\":5,\"sessionId\":\"cef46527f632a961af7a84209bdb8fcd0997c936\",\"sessionKey\":\"hZtQ1Usx/NhEUyoyduF+FQ==\",\"shopId\":\"229830\",\"storeAddress\":\"河南省驻马店市西平县经贸路步行街西段小广场华莱士\",\"storeName\":\"华莱士(西平步行街店)\",\"storeNameEn\":\"\",\"tableNumber\":\"\",\"takeMealFlag\":\"0\",\"takeMealTime\":\"\",\"thirdShopId\":\"EA23\",\"useCustomerScore\":2,\"userId\":\"3614319825989629832\",\"userName\":\"SWEET SUGA\",\"version\":\"2.0.60.6\"
}"
;
String
createVOStr
=
"{\"
channelType\":\"saas\",\"channel\":1,\"partnerId\":\"2690\",\"appId\":\"wxa1f272347828dae8\",\"version\":\"3.0.16.2\",\"sessionId\":\"c45e150aa83a17d9c036efa6aafba52af199b6d6\",\"orderType\":1,\"menuType\":\"saas\",\"shopId\":\"QAJIALE001\",\"takeMealFlag\":0,\"takeMealTime\":\"\",\"expectTime\":\"\",\"couponCode\":\"\",\"couponCodes\":[],\"tableNumber\":\"\",\"latitude\":31.37482,\"longitude\":121.26621,\"orderRemark\":\"\",\"useCustomerScore\":2,\"buyMemberCard\":null,\"premiumExchangeActivity\":null,\"cardCode\":null,\"cardCodes\":null,\"payChannelType\":1,\"reachStoreType\":4
}"
;
def
createOrderVo
=
JSON
.
parseObject
(
createVOStr
,
CreateOrderVo
.
class
)
createOrderBO
.
setCreateOrderVo
(
createOrderVo
)
// 登录信息
...
...
@@ -50,7 +54,7 @@ class OrderAdapterServiceImplTest extends Specification {
,
AssortmentCustomerInfoVo
.
class
)
createOrderBO
.
setUserLoginInfoDto
(
userLoginInfoDto
)
// 购物车信息
def
shoppingCartGoodsDto
=
JSON
.
parseObject
(
"{\"activityDiscountsDtos\":[
{\"activityCode\":\"88709227085491207040\",\"activityName\":\"鸡米花买一送一券\",\"activityType\":32,\"discountAmount\":-800,\"priority\":0}],\"isDiscountDelivery\":false,\"originalTotalAmount\":2400,\"products\":[{\"activityDiscountsDtos\":[{\"activityCode\":\"88709227085491207040\",\"activityName\":\"鸡米花买一送一券\",\"activityType\":32,\"actualActivityGoodsNumber\":1,\"cartGoodsUid\":\"09b125d6-603d-4783-ba01-287073d08e2b\",\"discountAmount\":800}],\"cartGoodsUid\":\"09b125d6-603d-4783-ba01-287073d08e2b\",\"couponCode\":\"88709227085491207040\",\"extraList\":[],\"hasProductCoupon\":false,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isMonthCard\":0,\"isSendGoods\":false,\"isTableware\":0,\"linkedId\":\"\",\"materialList\":[],\"originalPrice\":800,\"originalProductType\":1,\"packPrice\":0,\"picture\":\"https://picture.sandload.cn/1619081297921.jpg\",\"qty\":2,\"salePrice\":800,\"skuId\":\"201889966261817090\",\"skuName\":\"鸡米花T\",\"spuId\":\"201889966261817090\",\"spuName\":\"鸡米花T\",\"stockLimit\":false,\"totalDiscountAmount\":-800,\"unit\":\"\",\"weight\":0.0},{\"activityDiscountsDtos\":[],\"cartGoodsUid\":\"02537906-b09d-4a76-b5b7-2a5842a31a6c\",\"categoryName\":\"缤纷小食\",\"classificationId\":\"0102\",\"classificationName\":\"正价单品\",\"customerCode\":\"hn80017\",\"extraList\":[],\"hasProductCoupon\":false,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isMonthCard\":0,\"isSendGoods\":false,\"isTableware\":0,\"linkedId\":\"\",\"materialList\":[],\"originalPrice\":800,\"originalProductType\":1,\"packPrice\":0,\"picture\":\"https://picture.sandload.cn/1619080995048.jpg\",\"productCode\":\"hn80017\",\"qty\":1,\"salePrice\":800,\"skuForeignName\":\"\",\"skuId\":\"201889966070976307\",\"skuName\":\"薯条(大)T\",\"spuForeignName\":\"\",\"spuId\":\"201889966070976307\",\"spuName\":\"薯条(大)T\",\"stockLimit\":false,\"tax\":0.01,\"taxId\":\"\",\"totalDiscountAmount\":0,\"unit\":\"\",\"weight\":0.0}],\"reduceScore\":0,\"scoreReduceAmount\":0,\"shareDiscountActivityDtos\":[],\"totalAmount\":1600,\"totalDiscountAmount\":800,\"totalScore
\":0}"
def
shoppingCartGoodsDto
=
JSON
.
parseObject
(
"{\"activityDiscountsDtos\":[
],\"isDiscountDelivery\":false,\"originalTotalAmount\":910,\"packageAmount\":0,\"packageAmountCollectType\":1,\"products\":[{\"activityDiscountsDtos\":[],\"cartGoodsUid\":\"450a069d-cebb-4620-8365-5e6c633a1aa3\",\"categoryName\":\"套餐\",\"classificationId\":\"\",\"classificationName\":\"\",\"comboProducts\":[{\"customerCode\":\"gl\",\"extraList\":[],\"hasProductCoupon\":false,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isFixedProduct\":true,\"isMonthCard\":0,\"isTableware\":0,\"linkedId\":\"\",\"materialList\":[],\"originalPrice\":40,\"originalProductType\":1,\"parentProductId\":\"251946878491615276\",\"picture\":\"https://picture.sandload.cn/1628587383665.jpg\",\"productType\":6,\"qty\":6,\"skuForeignName\":\"\",\"skuId\":\"215810517496862722\",\"skuName\":\"柚子的果篮\",\"specialExtra\":[],\"spuForeignName\":\"\",\"spuId\":\"215810517496862722\",\"spuName\":\"柚子的果篮\",\"stockLimit\":false,\"tax\":0.0,\"unit\":\"\",\"weight\":0.0},{\"customerCode\":\"lizhi\",\"extraList\":[],\"hasProductCoupon\":false,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isFixedProduct\":true,\"isMonthCard\":0,\"isTableware\":0,\"linkedId\":\"\",\"materialList\":[],\"originalPrice\":10,\"originalProductType\":1,\"parentProductId\":\"251946878491615276\",\"picture\":\"https://picture.sandload.cn/1628586884766.jpg\",\"productType\":6,\"qty\":4,\"skuForeignName\":\"\",\"skuId\":\"215809970724247591\",\"skuName\":\"柚子的荔枝\",\"specialExtra\":[],\"spuForeignName\":\"\",\"spuId\":\"215809970724247591\",\"spuName\":\"柚子的荔枝\",\"stockLimit\":false,\"tax\":0.0,\"unit\":\"\",\"weight\":0.0},{\"customerCode\":\"li\",\"extraList\":[],\"hasProductCoupon\":false,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isFixedProduct\":true,\"isMonthCard\":0,\"isTableware\":0,\"linkedId\":\"\",\"materialList\":[],\"originalPrice\":11,\"originalProductType\":1,\"parentProductId\":\"251946878491615276\",\"picture\":\"https://picture.sandload.cn/1628586848599.jpg\",\"productType\":6,\"qty\":2,\"skuForeignName\":\"\",\"skuId\":\"215809930343585821\",\"skuName\":\"柚子的梨\",\"specialExtra\":[],\"spuForeignName\":\"\",\"spuId\":\"215809930343585821\",\"spuName\":\"柚子的梨\",\"stockLimit\":false,\"tax\":0.0,\"unit\":\"\",\"weight\":0.0},{\"customerCode\":\"jrb\",\"extraList\":[],\"hasProductCoupon\":false,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isFixedProduct\":false,\"isMonthCard\":0,\"isTableware\":0,\"linkedId\":\"\",\"materialList\":[],\"originalPrice\":33,\"originalProductType\":1,\"parentProductId\":\"251946878491615276\",\"picture\":\"https://picture.sandload.cn/1628583566754.jpg\",\"productType\":6,\"qty\":4,\"skuForeignName\":\"\",\"skuId\":\"215806490097850416\",\"skuName\":\"柚子的鸡肉棒\",\"specialExtra\":[],\"spuForeignName\":\"\",\"spuId\":\"215806490097850416\",\"spuName\":\"柚子的鸡肉棒\",\"stockLimit\":false,\"tax\":0.0,\"totalDiscountAmount\":0,\"unit\":\"\",\"weight\":0.0},{\"customerCode\":\"hb\",\"extraList\":[],\"hasProductCoupon\":false,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isFixedProduct\":false,\"isMonthCard\":0,\"isTableware\":0,\"linkedId\":\"\",\"materialList\":[],\"originalPrice\":2,\"originalProductType\":1,\"parentProductId\":\"251946878491615276\",\"picture\":\"https://picture.sandload.cn/1628583887266.png\",\"productType\":6,\"qty\":2,\"skuForeignName\":\"\",\"skuId\":\"215806824348227645\",\"skuName\":\"柚子的汉堡\",\"specialExtra\":[],\"spuForeignName\":\"\",\"spuId\":\"215806824348227645\",\"spuName\":\"柚子的汉堡\",\"stockLimit\":false,\"tax\":0.0,\"totalDiscountAmount\":0,\"unit\":\"\",\"weight\":0.0}],\"customerCode\":\"jialetaocan\",\"extraList\":[],\"hasProductCoupon\":false,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isMonthCard\":0,\"isSendGoods\":false,\"isTableware\":0,\"linkedId\":\"\",\"materialList\":[],\"originalPrice\":168,\"originalProductType\":7,\"picture\":\"https://picture.sandload.cn/1663060775658.jpg\",\"productCode\":\"jialetaocan\",\"productType\":6,\"qty\":2,\"skuForeignName\":\"\",\"skuId\":\"251946878491615276\",\"skuName\":\"迦勒套餐002\",\"specialExtra\":[],\"spuForeignName\":\"\",\"spuId\":\"251946878491615276\",\"spuName\":\"迦勒套餐002\",\"stockLimit\":false,\"tax\":0.0,\"totalDiscountAmount\":0,\"unit\":\"\",\"weight\":0.0},{\"activityDiscountsDtos\":[],\"cartGoodsUid\":\"015b7e93-f194-46d5-8503-577a237593f5\",\"classificationId\":\"\",\"classificationName\":\"\",\"comboProducts\":[],\"customerCode\":\"mg\",\"extraList\":[],\"hasProductCoupon\":false,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isMonthCard\":0,\"isSendGoods\":false,\"isTableware\":0,\"linkedId\":\"\",\"materialList\":[{\"activityDiscountsDtos\":[],\"customerCode\":\"H00301\",\"extraList\":[],\"hasProductCoupon\":false,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isMonthCard\":0,\"isTableware\":0,\"originalPrice\":11,\"originalProductType\":2,\"qty\":2,\"specialExtra\":[],\"spuForeignName\":\"\",\"spuId\":\"215806159829964858\",\"spuName\":\"加珍珠\",\"stockLimit\":false,\"tax\":0.0,\"totalDiscountAmount\":0},{\"activityDiscountsDtos\":[],\"customerCode\":\"H00302\",\"extraList\":[],\"hasProductCoupon\":false,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isMonthCard\":0,\"isTableware\":0,\"originalPrice\":23,\"originalProductType\":2,\"qty\":4,\"specialExtra\":[],\"spuForeignName\":\"\",\"spuId\":\"215806175661365253\",\"spuName\":\"加布丁\",\"stockLimit\":false,\"tax\":0.0,\"totalDiscountAmount\":0},{\"activityDiscountsDtos\":[],\"customerCode\":\"H00303\",\"extraList\":[],\"hasProductCoupon\":false,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isMonthCard\":0,\"isTableware\":0,\"originalPrice\":14,\"originalProductType\":2,\"qty\":6,\"specialExtra\":[],\"spuForeignName\":\"\",\"spuId\":\"215806191862913039\",\"spuName\":\"加芋圆\",\"stockLimit\":false,\"tax\":0.0,\"totalDiscountAmount\":0},{\"activityDiscountsDtos\":[],\"customerCode\":\"H00304\",\"extraList\":[],\"hasProductCoupon\":false,\"isB3S1Coupon\":0,\"isB3S1CouponGoods\":0,\"isMonthCard\":0,\"isTableware\":0,\"originalPrice\":22,\"originalProductType\":2,\"qty\":8,\"specialExtra\":[],\"spuForeignName\":\"\",\"spuId\":\"215806207417489433\",\"spuName\":\"加椰果\",\"stockLimit\":false,\"tax\":0.0,\"totalDiscountAmount\":0}],\"originalPrice\":287,\"originalProductType\":1,\"picture\":\"https://picture.sandload.cn/1628587294259.jpg\",\"productCode\":\"mg\",\"productType\":88,\"qty\":2,\"skuForeignName\":\"\",\"skuId\":\"215810396282525751\",\"skuName\":\"柚子的芒果\",\"specialExtra\":[],\"spuForeignName\":\"\",\"spuId\":\"215810396282525751\",\"spuName\":\"柚子的芒果\",\"stockLimit\":false,\"tax\":0.0,\"totalDiscountAmount\":0,\"unit\":\"\",\"weight\":0.0}],\"reduceScore\":90,\"scoreReduceAmount\":900,\"totalAmount\":910,\"totalDiscountAmount
\":0}"
,
ShoppingCartGoodsDto
.
class
)
createOrderBO
.
setShoppingCartGoodsDto
(
shoppingCartGoodsDto
)
...
...
@@ -179,6 +183,9 @@ class OrderAdapterServiceImplTest extends Specification {
,
StoreMixResponseDto
.
class
)
createOrderBO
.
setStoreMixResponseDto
(
storeMixResponseDto
)
and:
"默认值设置"
memberBlacklistHandler
.
checkisTrueBlacklist
(
_
)
>>
null
when:
"调用方法"
def
order
=
orderServiceImpl
.
sdkCreateOrder
(
createOrderBO
)
...
...
ordercenter-sdk/src/main/java/com/freemud/application/sdk/api/ordercenter/request/create/OrderItemCreateReq.java
View file @
e2f4a92a
...
...
@@ -163,4 +163,9 @@ public class OrderItemCreateReq {
*/
private
Long
packPrice
;
/**
* 订单新增商品SPU数量字段 https://cf.freemudvip.com/pages/viewpage.action?pageId=209356052
*/
private
Integer
productSpuQuantity
;
}
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