|
|
@@ -676,7 +676,7 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
|
|
|
for (LifeDiscountCouponUser lifeDiscountCouponUser : lifeDiscountCouponUserIPage.getRecords()) {
|
|
|
LifeDiscountCoupon lifeDiscountCouponOne = lifeDiscountCoupons.stream().filter(lifeDiscountCoupon -> lifeDiscountCoupon.getId().equals(lifeDiscountCouponUser.getCouponId())).collect(Collectors.toList()).get(0);
|
|
|
StoreInfo storeInfoOne = null;
|
|
|
- if (!storeInfoList.isEmpty()) {
|
|
|
+ if (!storeInfoList.isEmpty() && !StringUtils.isEmpty(lifeDiscountCouponOne.getStoreId())) {
|
|
|
storeInfoOne = storeInfoList.stream().filter(storeInfo -> storeInfo.getId().toString().equals(lifeDiscountCouponOne.getStoreId())).collect(Collectors.toList()).get(0);
|
|
|
}
|
|
|
LifeDiscountCouponVo lifeDiscountCouponVo = new LifeDiscountCouponVo();
|
|
|
@@ -770,7 +770,7 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
|
|
|
lifeDiscountCouponVo.setStatus(Integer.parseInt(DiscountCouponEnum.HAVE_NOT_STARTED.getValue()));
|
|
|
} else if (lifeDiscountCoupon.getGetStatus() == null || lifeDiscountCoupon.getGetStatus().toString().equals(DiscountCouponEnum.NO_GET.getValue())) {
|
|
|
lifeDiscountCouponVo.setStatus(Integer.parseInt(DiscountCouponEnum.SUSPEND_GET.getValue()));
|
|
|
- } else if (endResult > 0) {
|
|
|
+ } else if (endResult > 0) {
|
|
|
lifeDiscountCouponVo.setStatus(Integer.parseInt(DiscountCouponEnum.FINISHED.getValue()));
|
|
|
} else if (startResult >= 0 && endResult <= 0) {
|
|
|
lifeDiscountCouponVo.setStatus(Integer.parseInt(DiscountCouponEnum.UNDER_WAY.getValue()));
|
|
|
@@ -1190,14 +1190,14 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
|
|
|
@Override
|
|
|
public List<LifeDiscountCoupon> getPlatformCoupon(Integer couponId, Integer couponType) {
|
|
|
LambdaQueryWrapper<LifeDiscountCoupon> lifeDiscountCouponLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
- if(couponId != null){
|
|
|
+ if (couponId != null) {
|
|
|
lifeDiscountCouponLambdaQueryWrapper.eq(LifeDiscountCoupon::getId, couponId);
|
|
|
}
|
|
|
- if(couponType != null){
|
|
|
+ if (couponType != null) {
|
|
|
lifeDiscountCouponLambdaQueryWrapper.eq(LifeDiscountCoupon::getType, couponType);
|
|
|
}
|
|
|
lifeDiscountCouponLambdaQueryWrapper.eq(LifeDiscountCoupon::getDeleteFlag, 0);
|
|
|
- lifeDiscountCouponLambdaQueryWrapper.eq(LifeDiscountCoupon::getGetStatus,1);
|
|
|
+ lifeDiscountCouponLambdaQueryWrapper.eq(LifeDiscountCoupon::getGetStatus, 1);
|
|
|
return lifeDiscountCouponMapper.selectList(lifeDiscountCouponLambdaQueryWrapper);
|
|
|
}
|
|
|
}
|