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
83b633af
Commit
83b633af
authored
Oct 28, 2020
by
ping.wu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
5b48edef
4f5eca05
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
16 deletions
+50
-16
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/adapter/OrderSdkAdapter.java
+2
-0
order-application-service/src/main/java/cn/freemud/adapter/DeliveryAdapter.java
+17
-4
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+19
-12
order-application-service/src/main/java/cn/freemud/entities/vo/ProductVo.java
+2
-0
order-application-service/src/main/java/cn/freemud/entities/vo/QueryOrderResponseVo.java
+8
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/SetMealCalculation.java
+2
-0
No files found.
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/adapter/OrderSdkAdapter.java
View file @
83b633af
...
...
@@ -1924,6 +1924,8 @@ public class OrderSdkAdapter {
newOrderAccountType
=
OldOrderAccountType
.
TOTAL_DISCOUNT
.
getCode
();
case
220
:
newOrderAccountType
=
OldOrderAccountType
.
MEMBER_PRICE_DISCOUNT
.
getCode
();
case
99
:
newOrderAccountType
=
OldOrderAccountType
.
FREIGHT_COUPON
.
getCode
();
default
:
break
;
}
...
...
order-application-service/src/main/java/cn/freemud/adapter/DeliveryAdapter.java
View file @
83b633af
...
...
@@ -18,6 +18,7 @@ import com.freemud.sdk.api.assortment.order.enums.QueryOrderAccountType;
import
com.freemud.sdk.api.assortment.order.request.order.CreateOrderProductRequest
;
import
com.freemud.sdk.api.assortment.order.request.order.OrderProductAddInfoDto
;
import
com.freemud.sdk.api.assortment.order.request.order.OrderSpecialExtraAttrRequest
;
import
com.freemud.sdk.api.assortment.order.response.order.QueryOrdersResponse
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.stereotype.Component
;
...
...
@@ -191,14 +192,20 @@ public class DeliveryAdapter {
String
attr
=
""
;
for
(
OrderSpecialExtraAttrRequest
special
:
extInfo
.
getSpecialAttrs
())
{
if
(
special
.
getAttributeName
().
indexOf
(
"冰"
)
>=
0
)
{
attr
+=
special
.
getAttributeName
()+
","
;
attr
=
special
.
getAttributeName
();
break
;
}
}
if
(
attr
.
length
()
>
0
)
{
attr
=
attr
.
substring
(
0
,
attr
.
length
()-
1
);
productName
+=
"("
+
attr
+
")"
;
}
}
if
(
CollectionUtils
.
isNotEmpty
(
productList
.
getMaterialProduct
()))
{
for
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
ProductBean
material
:
productList
.
getMaterialProduct
())
{
productName
+=
"/"
+
material
.
getSpecificationName
();
}
}
deliveryProductInfo
.
setProductName
(
productName
);
deliveryProductInfo
.
setProductNumber
(
productList
.
getNumber
());
deliveryProductInfo
.
setProductPrice
(
productList
.
getSalePrice
().
intValue
());
...
...
@@ -221,14 +228,20 @@ public class DeliveryAdapter {
String
attr
=
""
;
for
(
OrderSpecialExtraAttrRequest
special
:
extInfoCombo
.
getSpecialAttrs
())
{
if
(
special
.
getAttributeName
().
indexOf
(
"冰"
)
>=
0
)
{
attr
+=
special
.
getAttributeName
()+
","
;
attr
=
special
.
getAttributeName
();
break
;
}
}
if
(
attr
.
length
()
>
0
)
{
attr
=
attr
.
substring
(
0
,
attr
.
length
()-
1
);
productNameCombo
+=
"("
+
attr
+
")"
;
}
}
if
(
CollectionUtils
.
isNotEmpty
(
comboProduct
.
getMaterialProduct
()))
{
for
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
ProductBean
material
:
comboProduct
.
getMaterialProduct
())
{
productNameCombo
+=
"/"
+
material
.
getSpecificationName
();
}
}
deliveryComboProductInfo
.
setProductName
(
productNameCombo
);
deliveryComboProductInfo
.
setProductNumber
(
comboProduct
.
getNumber
()/
productList
.
getNumber
());
deliveryComboProductInfo
.
setProductPrice
(
comboProduct
.
getSalePrice
().
intValue
());
...
...
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
83b633af
...
...
@@ -1210,7 +1210,6 @@ public class OrderAdapter {
responseVo
.
setModifiedTime
(
DateUtil
.
convert2String
(
new
Date
(
ordersBean
.
getGmtModified
()),
"yyyy-MM-dd HH:mm:ss"
));
}
if
(
ordersBean
.
getHasRefund
()
!=
null
&&
ordersBean
.
getHasRefund
()
&&
CollectionUtils
.
isNotEmpty
(
ordersBean
.
getRefundList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
ordersBean
.
getRefundList
()))
{
if
(
mcCafePartnerId
.
equals
(
ordersBean
.
getCompanyId
()))
{
responseVo
.
setRefundIntervalTime
(
Long
.
valueOf
(
mccafeRefundInterval
));
...
...
@@ -1234,14 +1233,7 @@ public class OrderAdapter {
}
}
if
(
StringUtils
.
isNotBlank
(
responseVo
.
getRid
()))
{
responseVo
.
setRid
(
latestRefundBean
.
getRid
());
responseVo
.
setRefundStatus
(
latestRefundBean
.
getStatus
());
responseVo
.
setRefundStatusDesc
(
Optional
.
ofNullable
(
RefundStatus
.
getByCode
(
latestRefundBean
.
getStatus
()))
.
map
(
RefundStatus:
:
getDesc
).
orElse
(
""
));
responseVo
.
setRefundReason
(
latestRefundBean
.
getReason
());
String
refundCreateTime
=
DateUtil
.
convert2String
(
new
Date
(
Long
.
parseLong
(
latestRefundBean
.
getCreateTime
())),
DateUtil
.
FORMAT_YYYY_MM_DD_HHMMSS
);
responseVo
.
setRefundCreateTime
(
refundCreateTime
);
if
(
StringUtils
.
isBlank
(
responseVo
.
getRid
()))
{
if
(
new
Date
().
getTime
()
-
Long
.
parseLong
(
latestRefundBean
.
getCreateTime
())
>
Long
.
valueOf
(
mccafeRefundInterval
))
{
responseVo
.
setAfterRefundInterval
(
true
);
}
...
...
@@ -1257,7 +1249,14 @@ public class OrderAdapter {
String
refundCreateTime
=
DateUtil
.
convert2String
(
new
Date
(
Long
.
parseLong
(
refundBean
.
getCreateTime
())),
DateUtil
.
FORMAT_YYYY_MM_DD_HHMMSS
);
responseVo
.
setRefundCreateTime
(
refundCreateTime
);
}
}
else
{
responseVo
.
setAfterRefundInterval
(
true
);
}
//如果是已取消、拒单、已完成的订单,则设置不能申请取消订单
if
(
OrderStatus
.
REFUSE
.
getCode
().
equals
(
ordersBean
.
getStatus
())
||
OrderStatus
.
CALCEL
.
getCode
().
equals
(
ordersBean
.
getStatus
())
||
OrderStatus
.
COMPLETE
.
getCode
().
equals
(
ordersBean
.
getStatus
()))
{
responseVo
.
setAfterRefundInterval
(
false
);
}
//商品信息转换
convent2ProductVos
(
ordersBean
.
getProductList
(),
responseVo
);
...
...
@@ -1277,6 +1276,7 @@ public class OrderAdapter {
Long
promotionAmount
=
0L
;
Long
deliveryAmount
=
0L
;
Long
packageAmount
=
0L
;
Long
originalDeliveryAmount
=
0L
;
//限时特价优惠金额
Long
discountLimitAmount
=
0L
;
Long
couponAmount
=
0L
;
...
...
@@ -1303,6 +1303,7 @@ public class OrderAdapter {
if
(
OrderAccountType
.
DELIVERY_AMOUNT
.
getCode
().
equals
(
accountBean
.
getType
()))
{
//deliveryAmount = accountBean.getPrice();
deliveryAmount
=
null
!=
accountBean
.
getActualCostAmount
()
?
accountBean
.
getActualCostAmount
()
:
accountBean
.
getPrice
();
originalDeliveryAmount
=
accountBean
.
getPrice
();
}
if
(
OrderAccountType
.
PACK_AMOUNT
.
getCode
().
equals
(
accountBean
.
getType
()))
{
packageAmount
=
accountBean
.
getPrice
();
...
...
@@ -1325,9 +1326,13 @@ public class OrderAdapter {
customerScorePrompt
=
decimalFormat
.
format
(
customerScoreAmount
/
100.0
);
// customerScorePrompt = "积分抵扣-¥" + customerScoreAmountStr;
}
if
(
Integer
.
valueOf
(
99
).
equals
(
accountBean
.
getType
()))
{
responseVo
.
setFreightCouponName
(
accountBean
.
getName
());
}
}
}
responseVo
.
setDeliveryAmount
(
deliveryAmount
);
responseVo
.
setOriginalDeliveryAmount
(
originalDeliveryAmount
);
responseVo
.
setPackageAmount
(
packageAmount
);
responseVo
.
setDiscountLimitAmount
(
discountLimitAmount
);
responseVo
.
setFullDiscountAmount
(
fullDiscountAmount
);
...
...
@@ -2052,7 +2057,8 @@ public class OrderAdapter {
discountTotalAmount
=
discountTotalAmount
+
productDiscount
.
getDiscountAmount
()*
productDiscount
.
getDiscountQty
();
if
(
OrderAccountType
.
PRODUCT_COUPON
.
getCode
().
equals
(
productDiscount
.
getDiscountType
()))
{
hasProductCoupon
=
true
;
if
(
"啡常月享卡"
.
equals
(
productDiscount
.
getDiscountDesc
()))
{
Integer
extendType
=
StringUtils
.
isBlank
(
productDiscount
.
getAddInfo
())?
null
:
JSON
.
parseObject
(
productDiscount
.
getAddInfo
()).
getInteger
(
"extendType"
);
if
(
null
!=
extendType
&&
(
4
==
extendType
||
5
==
extendType
))
{
productVo
.
setCouponName
(
productDiscount
.
getDiscountDesc
());
}
else
{
productVo
.
setName
(
productDiscount
.
getDiscountDesc
());
...
...
@@ -2302,7 +2308,9 @@ public class OrderAdapter {
}
});
createOrderProductDemoDto
.
setComboProduct
(
comboProducts
);
}
else
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsDetailDto
.
getMaterialList
()))
{
}
}
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsDetailDto
.
getMaterialList
()))
{
//加料商品
createOrderProductDemoDto
.
setProductType
(
ProductType
.
MATERIALPRODUCT_UPPRICE
.
getCode
());
List
<
CreateOrderProductRequest
>
materialProducts
=
new
ArrayList
<>();
...
...
@@ -2311,7 +2319,6 @@ public class OrderAdapter {
});
createOrderProductDemoDto
.
setMaterialProduct
(
materialProducts
);
}
}
return
createOrderProductDemoDto
;
}
...
...
order-application-service/src/main/java/cn/freemud/entities/vo/ProductVo.java
View file @
83b633af
...
...
@@ -42,6 +42,8 @@ public class ProductVo {
* 商品spu名称
*/
private
String
spuName
;
private
String
couponName
;
/**
* 商品的规格信息加属性信息
*/
...
...
order-application-service/src/main/java/cn/freemud/entities/vo/QueryOrderResponseVo.java
View file @
83b633af
...
...
@@ -99,6 +99,14 @@ public class QueryOrderResponseVo {
*/
private
Long
deliveryAmount
;
/**
* 配送费原价
*/
private
Long
originalDeliveryAmount
;
/**
* 运费券名称
*/
private
String
freightCouponName
;
/**
* 限时折扣优惠金额
*/
private
Long
discountLimitAmount
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/SetMealCalculation.java
View file @
83b633af
...
...
@@ -74,9 +74,11 @@ public class SetMealCalculation {
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductComboList
())){
for
(
CartGoods
.
ComboxGoods
comboxGoods
:
cartGoods
.
getProductComboList
()){
Long
comboxmaterialPrice
=
0L
;
if
(
CollectionUtils
.
isNotEmpty
(
comboxGoods
.
getProductMaterialList
())){
for
(
CartGoods
.
MaterialGoods
materialGoods
:
comboxGoods
.
getProductMaterialList
()){
comboxmaterialPrice
+=
materialGoods
.
getFinalPrice
()
*
cartGoods
.
getQty
();
}
}
comboxGoods
.
setAmount
(
comboxGoods
.
getAmount
()+
comboxmaterialPrice
);
materialPrice
=
materialPrice
+
comboxmaterialPrice
;
}
...
...
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