...
|
...
|
@@ -69,14 +69,14 @@ public class CollectiveCouponService { |
|
|
final int currentDT = DateUtil.getCurrentTimeSecond();
|
|
|
final int positionType = PositionType.PRD_DETAIL.getCode();
|
|
|
|
|
|
int total = couponViewMapper.selectCntByAssociatedPrd(prdId,positionType,currentDT);
|
|
|
int total = couponViewMapper.selectCntByAssociatedPrd(req.getBusinessClient(),prdId,positionType,currentDT);
|
|
|
if(total == 0){
|
|
|
logger.warn("queryCouponListOfPrdDetail find total number zero, {}", req);
|
|
|
return couponInfoListBuilder.build();
|
|
|
}
|
|
|
int totalPage = PageHelper.getPageTotal(total, limit);
|
|
|
final int offset = PageHelper.getOffsetOfMysql(pageNum, limit);
|
|
|
List<Coupon> datas= couponViewMapper.selectByAssociatedPrd(prdId, positionType,currentDT,offset,limit);
|
|
|
List<Coupon> datas= couponViewMapper.selectByAssociatedPrd(req.getBusinessClient(),prdId, positionType,currentDT,offset,limit);
|
|
|
//when user login, show user coupon
|
|
|
|
|
|
final Integer uid = req.getUid();
|
...
|
...
|
@@ -179,6 +179,7 @@ public class CollectiveCouponService { |
|
|
.productId(req.getProductId())
|
|
|
.positionType(positionType)
|
|
|
.currentTime(currentDT)
|
|
|
.businessClient(req.getBusinessClient())
|
|
|
.offset(offset)
|
|
|
.limit(1)
|
|
|
.build();
|
...
|
...
|
|