Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ufo
/
yohoufo-fore
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
TANLING
5 years ago
Commit
28cfbd7545957f8b3743a4e78ab95e6ef60d9a6e
1 parent
68787ac7
fix
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
common/src/main/java/com/yohoufo/common/helper/ConditionLimitValueProcessor.java
promotion/src/main/java/com/yohoufo/promotion/service/ProductLimitValueFilter.java
promotion/src/main/java/com/yohoufo/promotion/service/impl/CollectiveCouponService.java
common/src/main/java/com/yohoufo/common/helper/ConditionLimitValueProcessor.java
View file @
28cfbd7
...
...
@@ -9,9 +9,7 @@ import com.yohobuy.ufo.model.promotion.constant.CouponProductLimitTypeEnum;
import
org.apache.commons.collections.CollectionUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeansException
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
...
...
promotion/src/main/java/com/yohoufo/promotion/service/ProductLimitValueFilter.java
View file @
28cfbd7
...
...
@@ -7,6 +7,8 @@ import com.yohoufo.common.helper.ConditionLimitValueProcessor;
import
com.yohoufo.dal.promotion.model.Coupon
;
import
com.yohoufo.promotion.helper.ConditionLimitValueBuilder
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
...
...
@@ -27,6 +29,9 @@ public class ProductLimitValueFilter {
ConditionLimitValueProcessor
conditionLimitValueProcessor
;
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ProductLimitValueFilter
.
class
);
/**
* 根据商品过滤可用的优惠券
* @param couponList
...
...
@@ -39,6 +44,8 @@ public class ProductLimitValueFilter {
return
couponList
;
}
logger
.
info
(
"before filter coupon {}"
,
couponList
.
stream
().
map
(
Coupon:
:
getId
).
collect
(
Collectors
.
toList
()));
// 获取商品的品牌、品类、系列信息
ProductInfo
productInfo
=
proxyService
.
getProductInfo
(
productId
);
ShoppingProductInfo
shoppingProductInfo
=
ShoppingProductInfo
.
builder
()
...
...
promotion/src/main/java/com/yohoufo/promotion/service/impl/CollectiveCouponService.java
View file @
28cfbd7
...
...
@@ -84,7 +84,6 @@ public class CollectiveCouponService {
List
<
Coupon
>
datas
=
couponViewMapper
.
selectByAssociatedPrd
(
req
.
getBusinessClient
(),
prdId
,
positionType
,
currentDT
,
offset
,
limit
);
//when user login, show user coupon
// 对商品进行过滤
datas
=
productLimitValueFilter
.
filter
(
datas
,
prdId
);
final
Integer
uid
=
req
.
getUid
();
...
...
Please
register
or
login
to post a comment