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
b20411ef
Commit
b20411ef
authored
Aug 19, 2020
by
徐康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保存优惠数量
parent
a094f7b7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
3 deletions
+31
-3
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+29
-2
order-application-service/src/main/java/cn/freemud/entities/dto/shoppingCart/ActivityDiscountsDto.java
+1
-0
order-application-service/src/main/java/cn/freemud/entities/dto/shoppingCart/ShoppingCartGoodsDto.java
+1
-1
No files found.
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
b20411ef
...
@@ -96,6 +96,9 @@ public class OrderAdapter {
...
@@ -96,6 +96,9 @@ public class OrderAdapter {
public
static
final
String
PAY_CODE_10102
=
"10102"
;
// svc储值卡支付,可用于判断订单是否用储值卡支付
public
static
final
String
PAY_CODE_10102
=
"10102"
;
// svc储值卡支付,可用于判断订单是否用储值卡支付
@Value
(
"${mccafe.partner.id}"
)
private
String
mcCafePartnerId
;
@Value
(
"${saas.reverseNotifyiDcUrl}"
)
@Value
(
"${saas.reverseNotifyiDcUrl}"
)
private
String
reverseNotifyiDcUrl
;
private
String
reverseNotifyiDcUrl
;
@Value
(
"${saas.refund.notify.callback}"
)
@Value
(
"${saas.refund.notify.callback}"
)
...
@@ -149,7 +152,13 @@ public class OrderAdapter {
...
@@ -149,7 +152,13 @@ public class OrderAdapter {
createOrderProductDto
.
setIgnoreProductPrice
(
1
);
createOrderProductDto
.
setIgnoreProductPrice
(
1
);
products
.
add
(
createOrderProductDto
);
products
.
add
(
createOrderProductDto
);
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsDetailDto
.
getActivityDiscountsDtos
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
cartGoodsDetailDto
.
getActivityDiscountsDtos
()))
{
createOrderProductDto
.
setAccounts
(
getAccounts
(
createOrderProductDto
,
cartGoodsDetailDto
.
getActivityDiscountsDtos
()));
List
<
CreateOrderAccountRequest
>
accounts
=
null
;
if
(
mcCafePartnerId
.
equals
(
createOrderDto
.
getCompanyId
()))
{
accounts
=
getMCCafeAccounts
(
createOrderProductDto
,
cartGoodsDetailDto
.
getActivityDiscountsDtos
());
}
else
{
accounts
=
getAccounts
(
createOrderProductDto
,
cartGoodsDetailDto
.
getActivityDiscountsDtos
());
}
createOrderProductDto
.
setAccounts
(
accounts
);
}
}
}
}
}
}
...
@@ -290,6 +299,24 @@ public class OrderAdapter {
...
@@ -290,6 +299,24 @@ public class OrderAdapter {
return
orderAccountDtos
;
return
orderAccountDtos
;
}
}
public
List
<
CreateOrderAccountRequest
>
getMCCafeAccounts
(
CreateOrderProductRequest
createOrderProductDto
,
List
<
ActivityDiscountsDto
>
activityDiscountsDtos
)
{
List
<
CreateOrderAccountRequest
>
orderAccountDtos
=
new
ArrayList
<>();
for
(
ActivityDiscountsDto
activityDiscountsDto
:
activityDiscountsDtos
)
{
CreateOrderAccountRequest
createOrderAccountDto
=
CreateOrderAccountRequest
.
builder
()
.
accountId
(
activityDiscountsDto
.
getActivityCode
())
.
name
(
activityDiscountsDto
.
getActivityName
())
.
price
(
activityDiscountsDto
.
getDiscountAmount
().
longValue
())
.
accountType
(
getQueryOrderAccountType
(
getOrderAccountType
(
activityDiscountsDto
.
getActivityType
())))
.
sequence
(
createOrderProductDto
.
getSequence
())
.
productId
(
createOrderProductDto
.
getSpecification
())
.
discountQty
((
activityDiscountsDto
.
getActualActivityGoodsNumber
()==
null
||
activityDiscountsDto
.
getActualActivityGoodsNumber
()==
0
)
?
createOrderProductDto
.
getNumber
():
activityDiscountsDto
.
getActualActivityGoodsNumber
())
.
build
();
orderAccountDtos
.
add
(
createOrderAccountDto
);
}
return
orderAccountDtos
;
}
/**
/**
* 计算用户收货地址实际配送费
* 计算用户收货地址实际配送费
...
@@ -1913,7 +1940,7 @@ public class OrderAdapter {
...
@@ -1913,7 +1940,7 @@ public class OrderAdapter {
createOrderProductDemoDto
.
setParentProductId
(
cartGoodsDetailDto
.
getParentProductId
());
createOrderProductDemoDto
.
setParentProductId
(
cartGoodsDetailDto
.
getParentProductId
());
createOrderProductDemoDto
.
setIsFixedProduct
(
cartGoodsDetailDto
.
getIsFixedProduct
());
createOrderProductDemoDto
.
setIsFixedProduct
(
cartGoodsDetailDto
.
getIsFixedProduct
());
createOrderProductDemoDto
.
setCustomerCode
(
cartGoodsDetailDto
.
getCustomerCode
());
createOrderProductDemoDto
.
setCustomerCode
(
cartGoodsDetailDto
.
getCustomerCode
());
//
createOrderProductDemoDto.setProductCode(cartGoodsDetailDto.getProductCode());
createOrderProductDemoDto
.
setProductCode
(
cartGoodsDetailDto
.
getProductCode
());
createOrderProductDemoDto
.
setHasStockProudct
(
cartGoodsDetailDto
.
isStockLimit
());
createOrderProductDemoDto
.
setHasStockProudct
(
cartGoodsDetailDto
.
isStockLimit
());
createOrderProductDemoDto
.
setWeight
(
cartGoodsDetailDto
.
getWeight
());
createOrderProductDemoDto
.
setWeight
(
cartGoodsDetailDto
.
getWeight
());
createOrderProductDemoDto
.
setUnit
(
cartGoodsDetailDto
.
getUnit
());
createOrderProductDemoDto
.
setUnit
(
cartGoodsDetailDto
.
getUnit
());
...
...
order-application-service/src/main/java/cn/freemud/entities/dto/shoppingCart/ActivityDiscountsDto.java
View file @
b20411ef
...
@@ -21,4 +21,5 @@ public class ActivityDiscountsDto {
...
@@ -21,4 +21,5 @@ public class ActivityDiscountsDto {
private
String
activityName
;
private
String
activityName
;
private
Integer
discountAmount
;
private
Integer
discountAmount
;
private
Integer
activityType
;
private
Integer
activityType
;
private
Integer
actualActivityGoodsNumber
;
}
}
order-application-service/src/main/java/cn/freemud/entities/dto/shoppingCart/ShoppingCartGoodsDto.java
View file @
b20411ef
...
@@ -173,7 +173,7 @@ public class ShoppingCartGoodsDto {
...
@@ -173,7 +173,7 @@ public class ShoppingCartGoodsDto {
private
String
customerCode
;
private
String
customerCode
;
/**商品货号**/
/**商品货号**/
//
private String productCode;
private
String
productCode
;
/** 商品统计分类编号**/
/** 商品统计分类编号**/
private
String
classificationId
;
private
String
classificationId
;
...
...
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