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
142c8683
Commit
142c8683
authored
Nov 08, 2021
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新算价配置修改,未配置默认走新算价
parent
bb34d77f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
13 deletions
+16
-13
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
+16
-13
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
View file @
142c8683
...
@@ -198,6 +198,9 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -198,6 +198,9 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
@Value
(
"${saas.cart.sharing}"
)
@Value
(
"${saas.cart.sharing}"
)
private
String
sharing
;
private
String
sharing
;
@Value
(
"${saas.cart.sharing.new}"
)
private
String
newSharing
;
@Value
(
"${saas.cart.new.shopping.cart}"
)
@Value
(
"${saas.cart.new.shopping.cart}"
)
private
String
newShoppingCart
;
private
String
newShoppingCart
;
...
@@ -2680,33 +2683,33 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -2680,33 +2683,33 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
*
*
* @param partnerId
* @param partnerId
* @param storeId
* @param storeId
* @return
* @return
返回是否是新算价
*/
*/
public
boolean
grayPush
(
String
partnerId
,
String
storeId
,
String
version
)
{
public
boolean
grayPush
(
String
partnerId
,
String
storeId
,
String
version
)
{
if
(
StringUtils
.
isBlank
(
sharing
))
return
fals
e
;
if
(
StringUtils
.
isBlank
(
newSharing
))
return
tru
e
;
CalculateCenter
center
=
JSON
.
parseObject
(
s
haring
,
CalculateCenter
.
class
);
CalculateCenter
center
=
JSON
.
parseObject
(
newS
haring
,
CalculateCenter
.
class
);
Boolean
enable
=
fals
e
;
Boolean
enable
=
tru
e
;
if
(!
center
.
getEnable
())
return
false
;
//
if (!center.getEnable()) return false;
switch
(
center
.
getType
())
{
switch
(
center
.
getType
())
{
case
2
:
case
2
:
enable
=
true
;
enable
=
true
;
break
;
break
;
case
1
:
{
case
1
:
{
//商户+门店级别
//商户+门店级别
(新算价)
String
real
=
partnerId
.
concat
(
storeId
);
String
partnerId_storeId
=
partnerId
.
concat
(
storeId
);
if
(
Arrays
.
asList
(
center
.
getGrayList
().
split
(
","
)).
contains
(
real
))
{
if
(
Arrays
.
asList
(
center
.
getGrayList
().
split
(
","
)).
contains
(
partnerId_storeId
))
{
enable
=
true
;
enable
=
true
;
}
}
//商户级别
//商户级别
(老算价)
else
if
(
Arrays
.
asList
(
center
.
getGrayList
().
split
(
","
)).
contains
(
partnerId
))
{
else
if
(
Arrays
.
asList
(
center
.
getGrayList
().
split
(
","
)).
contains
(
partnerId
))
{
enable
=
true
;
enable
=
false
;
}
}
}
}
}
if
(
center
.
getEnable
()
&&
enable
)
{
enable
=
true
;
}
}
// if (center.getEnable() && enable) {
// enable = true;
// }
return
enable
;
return
enable
;
}
}
...
...
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