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
8a61b7f0
Commit
8a61b7f0
authored
Dec 02, 2020
by
chongfu.liang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/2.0.9-购物车检查券是否可用' into qa
parents
07e3299a
ba17d4fe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
order-application-service/src/main/resources/logback.xml
+1
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
+6
-3
No files found.
order-application-service/src/main/resources/logback.xml
View file @
8a61b7f0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<configuration>
<configuration>
<property
resource=
"application.properties"
/>
<property
resource=
"application.properties"
/>
<property
name=
"PROJECT_NAME"
value=
"${spring.application.name}"
/>
<property
name=
"PROJECT_NAME"
value=
"${spring.application.name}"
/>
<property
name=
"LOG_HOME"
value=
"/data/logs"
/>
<property
name=
"LOG_HOME"
value=
"/
media/freemud/_dde_data/
data/logs"
/>
<!-- %m输出的信息,%p日志级别,%t线程名,%d日期,%c类的全名,,,, -->
<!-- %m输出的信息,%p日志级别,%t线程名,%d日期,%c类的全名,,,, -->
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder
class=
"ch.qos.logback.core.encoder.LayoutWrappingEncoder"
>
<encoder
class=
"ch.qos.logback.core.encoder.LayoutWrappingEncoder"
>
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
View file @
8a61b7f0
...
@@ -2135,15 +2135,18 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -2135,15 +2135,18 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
}
}
private
boolean
checkAvailableCoupon
(
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
,
String
couponCode
)
{
private
boolean
checkAvailableCoupon
(
ShoppingCartGoodsResponseVo
shoppingCartGoodsResponseVo
,
String
couponCode
)
{
if
(
StringUtils
.
isBlank
(
couponCode
)){
return
true
;
}
if
(
shoppingCartGoodsResponseVo
==
null
||
shoppingCartGoodsResponseVo
.
getAvailableCoupon
()
==
null
||
shoppingCartGoodsResponseVo
.
getAvailableCoupon
().
getDisableCoupons
()
==
null
){
if
(
shoppingCartGoodsResponseVo
==
null
||
shoppingCartGoodsResponseVo
.
getAvailableCoupon
()
==
null
||
shoppingCartGoodsResponseVo
.
getAvailableCoupon
().
getDisableCoupons
()
==
null
){
return
fals
e
;
return
tru
e
;
}
}
List
<
ActivityCouponBean
>
disableCoupons
=
shoppingCartGoodsResponseVo
.
getAvailableCoupon
().
getDisableCoupons
();
List
<
ActivityCouponBean
>
disableCoupons
=
shoppingCartGoodsResponseVo
.
getAvailableCoupon
().
getDisableCoupons
();
ActivityCouponBean
activityCouponBean
=
disableCoupons
.
stream
().
filter
(
p
->
p
.
getCouponCode
().
equals
(
couponCode
)).
findFirst
().
orElse
(
null
);
ActivityCouponBean
activityCouponBean
=
disableCoupons
.
stream
().
filter
(
p
->
p
.
getCouponCode
().
equals
(
couponCode
)).
findFirst
().
orElse
(
null
);
if
(
activityCouponBean
==
null
){
if
(
activityCouponBean
==
null
){
return
false
;
}
else
{
return
true
;
return
true
;
}
else
{
return
false
;
}
}
}
}
}
}
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