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
6f457559
Commit
6f457559
authored
Nov 24, 2020
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/new-fixbig'
parents
7df864c8
8ce0a122
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
18 deletions
+14
-18
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
+5
-12
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculateCenter.java
+1
-6
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationSharingDiscountService.java
+8
-0
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
View file @
6f457559
...
@@ -1859,7 +1859,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -1859,7 +1859,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
public
boolean
grayPush
(
String
partnerId
,
String
storeId
,
String
version
)
{
public
boolean
grayPush
(
String
partnerId
,
String
storeId
,
String
version
)
{
if
(
StringUtils
.
isBlank
(
sharing
))
return
false
;
if
(
StringUtils
.
isBlank
(
sharing
))
return
false
;
CalculateCenter
center
=
JSON
.
parseObject
(
sharing
,
CalculateCenter
.
class
);
CalculateCenter
center
=
JSON
.
parseObject
(
sharing
,
CalculateCenter
.
class
);
Boolean
enable
=
false
;
Boolean
enable
=
false
;
if
(!
center
.
getEnable
())
return
false
;
if
(!
center
.
getEnable
())
return
false
;
...
@@ -1868,21 +1867,15 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -1868,21 +1867,15 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
enable
=
true
;
enable
=
true
;
break
;
break
;
case
1
:
{
case
1
:
{
if
(
StringUtils
.
isBlank
(
center
.
getPartnerId
()))
{
//商户+门店级别
enable
=
false
;
String
real
=
partnerId
.
concat
(
storeId
);
}
else
{
if
(
Arrays
.
asList
(
center
.
getGrayList
().
split
(
","
)).
contains
(
real
))
{
if
(
Arrays
.
asList
(
center
.
getPartnerId
().
split
(
","
)).
contains
(
partnerId
))
{
enable
=
true
;
enable
=
true
;
}
else
{
enable
=
false
;
}
}
if
(
Arrays
.
asList
(
center
.
getStoreId
().
split
(
","
)).
contains
(
storeId
))
{
//商户级别
else
if
(
Arrays
.
asList
(
center
.
getGrayList
().
split
(
","
)).
contains
(
partnerId
))
{
enable
=
true
;
enable
=
true
;
}
else
{
enable
=
false
;
}
}
}
break
;
}
}
}
}
if
(
center
.
getEnable
()
&&
enable
)
{
if
(
center
.
getEnable
()
&&
enable
)
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculateCenter.java
View file @
6f457559
...
@@ -22,12 +22,7 @@ public class CalculateCenter {
...
@@ -22,12 +22,7 @@ public class CalculateCenter {
/**
/**
* 商户
* 商户
*/
*/
private
String
partnerId
;
private
String
grayList
;
/**
* 门店
*/
private
String
storeId
;
/**
/**
* 是否启用新的算价中心
* 是否启用新的算价中心
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationSharingDiscountService.java
View file @
6f457559
...
@@ -202,6 +202,7 @@ public class CalculationSharingDiscountService {
...
@@ -202,6 +202,7 @@ public class CalculationSharingDiscountService {
}
}
}
}
/**
/**
* 实物商品
* 实物商品
* @param calculationDiscountGoodsList
* @param calculationDiscountGoodsList
...
@@ -209,11 +210,18 @@ public class CalculationSharingDiscountService {
...
@@ -209,11 +210,18 @@ public class CalculationSharingDiscountService {
*/
*/
private
void
setCommonDiscountGoods
(
List
<
CalculationSharingDiscountRequestDto
.
CalculationDiscountGoods
>
calculationDiscountGoodsList
private
void
setCommonDiscountGoods
(
List
<
CalculationSharingDiscountRequestDto
.
CalculationDiscountGoods
>
calculationDiscountGoodsList
,
CartGoods
cartGoods
)
{
,
CartGoods
cartGoods
)
{
CalculationSharingDiscountRequestDto
.
CalculationDiscountGoods
calculationDiscountGoods
=
new
CalculationSharingDiscountRequestDto
.
CalculationDiscountGoods
();
CalculationSharingDiscountRequestDto
.
CalculationDiscountGoods
calculationDiscountGoods
=
new
CalculationSharingDiscountRequestDto
.
CalculationDiscountGoods
();
calculationDiscountGoods
.
setGoodsId
(
cartGoods
.
getGoodsId
());
calculationDiscountGoods
.
setGoodsId
(
cartGoods
.
getGoodsId
());
calculationDiscountGoods
.
setCartGoodsUid
(
cartGoods
.
getCartGoodsUid
());
calculationDiscountGoods
.
setCartGoodsUid
(
cartGoods
.
getCartGoodsUid
());
calculationDiscountGoods
.
setGoodsQuantity
(
cartGoods
.
getQty
());
calculationDiscountGoods
.
setGoodsQuantity
(
cartGoods
.
getQty
());
//if (cartGoods.getGoodsType().equals(GoodsTypeEnum.SET_MEAL_GOODS))
if
(
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductGroupList
())
||
CollectionUtils
.
isNotEmpty
(
cartGoods
.
getProductComboList
()))
{
calculationDiscountGoods
.
setOriginalPrice
(
cartGoods
.
getFinalPrice
()!=
null
?
cartGoods
.
getFinalPrice
()
:
cartGoods
.
getOriginalPrice
());
}
else
{
calculationDiscountGoods
.
setOriginalPrice
(
cartGoods
.
getOriginalPrice
());
calculationDiscountGoods
.
setOriginalPrice
(
cartGoods
.
getOriginalPrice
());
}
calculationDiscountGoods
.
setMemberDiscount
(
cartGoods
.
getMemberDiscount
());
calculationDiscountGoods
.
setMemberDiscount
(
cartGoods
.
getMemberDiscount
());
calculationDiscountGoods
.
setSpuId
(
cartGoods
.
getSpuId
());
calculationDiscountGoods
.
setSpuId
(
cartGoods
.
getSpuId
());
//商品加料
//商品加料
...
...
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