Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
gogirl-miniapp-backend
Commits
a60fad76
Commit
a60fad76
authored
Mar 17, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
4f715c7b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
26 deletions
+7
-26
CouponCustomerRelevanceServiceImpl.java
...ation/market/impl/CouponCustomerRelevanceServiceImpl.java
+2
-8
CouponServiceImpl.java
...com/gogirl/application/market/impl/CouponServiceImpl.java
+1
-8
OrderServe.java
src/main/java/com/gogirl/domain/order/serve/OrderServe.java
+2
-1
ScheduleServe.java
...ain/java/com/gogirl/domain/order/serve/ScheduleServe.java
+1
-1
TimesCardController.java
.../java/com/gogirl/interfaces/user/TimesCardController.java
+1
-8
No files found.
src/main/java/com/gogirl/application/market/impl/CouponCustomerRelevanceServiceImpl.java
View file @
a60fad76
...
...
@@ -86,14 +86,8 @@ public class CouponCustomerRelevanceServiceImpl extends ServiceImpl<CouponCustom
.
filter
(
orderServe
->
{
return
orderServe
.
getBindCoupon
()
==
2
;
})
.
filter
(
orderServe
->
{
if
(
orderServe
.
getProduceId
()
!=
null
)
{
return
orderServe
.
getProduceCurrentPrice
().
compareTo
(
orderServe
.
getProduceBargainPrice
())
>
-
1
;
}
return
true
;
})
.
filter
(
orderServe
->
orderServe
.
getProducePromotionTimeId
()
==
null
)
.
filter
(
orderServe
->
orderServe
.
getLeisureDiscountConfigId
()
==
null
||
orderServe
.
getLeisureDiscountConfigId
()
==
0
)
//不是活动价格
.
filter
(
orderServe
->
!
orderServe
.
isActivity
())
.
map
(
OrderServe:
:
getServeId
)
.
collect
(
Collectors
.
toList
()));
}
...
...
src/main/java/com/gogirl/application/market/impl/CouponServiceImpl.java
View file @
a60fad76
...
...
@@ -225,14 +225,7 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
List
<
Integer
>
canUserServeIds
=
couponCustomerRelevanceMapper
.
queryCouponCustomerServeRelevance
(
coupon
.
getId
());
canUserServeIds
.
retainAll
(
orderServeList
.
stream
()
.
filter
(
orderServe
->
orderServe
.
getBindCoupon
()
==
2
)
.
filter
(
orderServe
->
{
if
(
orderServe
.
getProduceId
()
!=
null
)
{
return
orderServe
.
getProduceCurrentPrice
().
compareTo
(
orderServe
.
getProduceBargainPrice
())
>
-
1
;
}
return
true
;
})
.
filter
(
orderServe
->
orderServe
.
getProducePromotionTimeId
()
==
null
)
.
filter
(
orderServe
->
orderServe
.
getLeisureDiscountConfigId
()
==
null
||
orderServe
.
getLeisureDiscountConfigId
()
==
0
)
.
filter
(
orderServe
->
!
orderServe
.
isActivity
())
.
map
(
OrderServe:
:
getServeId
)
.
collect
(
Collectors
.
toList
()));
coupon
.
setCanBeUse
(
ListUtil
.
isNotEmpty
(
canUserServeIds
));
...
...
src/main/java/com/gogirl/domain/order/serve/OrderServe.java
View file @
a60fad76
...
...
@@ -233,6 +233,6 @@ public class OrderServe implements Serializable {
public
Boolean
isActivity
()
{
return
price
.
equals
(
leisurePrice
)
||
price
.
equals
(
promotionPrice
)
||
(
price
.
equals
(
produceCurrentPrice
)
&&
produceCurrentPrice
.
compareTo
(
produceBargainPrice
)
>
-
1
);
(
price
.
equals
(
produceCurrentPrice
)
&&
produceCurrentPrice
.
compareTo
(
produceBargainPrice
)
<
0
);
}
}
\ No newline at end of file
src/main/java/com/gogirl/domain/order/serve/ScheduleServe.java
View file @
a60fad76
...
...
@@ -210,6 +210,6 @@ public class ScheduleServe implements Serializable {
public
Boolean
isActivity
()
{
return
price
.
equals
(
leisurePrice
)
||
price
.
equals
(
promotionPrice
)
||
(
price
.
equals
(
produceCurrentPrice
)
&&
produceCurrentPrice
.
compareTo
(
produceBargainPrice
)
>
-
1
);
(
price
.
equals
(
produceCurrentPrice
)
&&
produceCurrentPrice
.
compareTo
(
produceBargainPrice
)
<
0
);
}
}
src/main/java/com/gogirl/interfaces/user/TimesCardController.java
View file @
a60fad76
...
...
@@ -183,14 +183,7 @@ public class TimesCardController {
canUserServeIds
.
retainAll
(
orderServeList
.
stream
()
.
filter
(
orderServe
->
orderServe
.
getBindCoupon
()
==
2
)
.
filter
(
orderServe
->
{
if
(
orderServe
.
getProduceId
()
!=
null
)
{
return
orderServe
.
getProduceCurrentPrice
().
compareTo
(
orderServe
.
getProduceBargainPrice
())
>
-
1
;
}
return
true
;
})
.
filter
(
orderServe
->
orderServe
.
getProducePromotionTimeId
()
==
null
)
.
filter
(
orderServe
->
orderServe
.
getLeisureDiscountConfigId
()
==
null
||
orderServe
.
getLeisureDiscountConfigId
()
==
0
)
.
filter
(
orderServe
->
!
orderServe
.
isActivity
())
.
map
(
OrderServe:
:
getServeId
)
.
collect
(
Collectors
.
toList
()));
timesCardCustomerRelevance
.
setCanBeUse
(
ListUtil
.
isNotEmpty
(
canUserServeIds
));
...
...
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