|
@@ -104,7 +104,7 @@ public class CouponServiceImpl implements CouponService {
|
|
// 会员机构类型:1医美,2生美
|
|
// 会员机构类型:1医美,2生美
|
|
if (null != identity && identity == 2) {
|
|
if (null != identity && identity == 2) {
|
|
Integer clubType = priceMapper.getClubTypeById(userId);
|
|
Integer clubType = priceMapper.getClubTypeById(userId);
|
|
- if (null != clubType && clubType == 1){
|
|
|
|
|
|
+ if (null != clubType && clubType == 1) {
|
|
identity = 5;
|
|
identity = 5;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -227,6 +227,7 @@ public class CouponServiceImpl implements CouponService {
|
|
//未领取
|
|
//未领取
|
|
List<CouponVo> notCouponList = couponMapper.findCouponList(userId, registerTime);
|
|
List<CouponVo> notCouponList = couponMapper.findCouponList(userId, registerTime);
|
|
filterCoupon(source, product, notCouponList);
|
|
filterCoupon(source, product, notCouponList);
|
|
|
|
+ notCouponList.forEach(n->n.setCouponBtnType(0));
|
|
//超级会员优惠券移除
|
|
//超级会员优惠券移除
|
|
if (notCouponList != null && notCouponList.size() > 0) {
|
|
if (notCouponList != null && notCouponList.size() > 0) {
|
|
notCouponList.removeIf(couponVo -> vipCoupon.contains(couponVo.getCouponId()));
|
|
notCouponList.removeIf(couponVo -> vipCoupon.contains(couponVo.getCouponId()));
|
|
@@ -234,6 +235,7 @@ public class CouponServiceImpl implements CouponService {
|
|
map.put("notCouponNum", notCouponList == null ? 0 : notCouponList.size());
|
|
map.put("notCouponNum", notCouponList == null ? 0 : notCouponList.size());
|
|
//已领取
|
|
//已领取
|
|
List<CouponVo> couponList = couponMapper.findCouponClub(userId, 1);
|
|
List<CouponVo> couponList = couponMapper.findCouponClub(userId, 1);
|
|
|
|
+ couponList.forEach(c->c.setCouponBtnType(1));
|
|
//超级会员优惠券移除
|
|
//超级会员优惠券移除
|
|
if (couponList != null && couponList.size() > 0) {
|
|
if (couponList != null && couponList.size() > 0) {
|
|
couponList.removeIf(couponVo -> vipCoupon.contains(couponVo.getCouponId()));
|
|
couponList.removeIf(couponVo -> vipCoupon.contains(couponVo.getCouponId()));
|
|
@@ -259,6 +261,20 @@ public class CouponServiceImpl implements CouponService {
|
|
return ResponseJson.success(map);
|
|
return ResponseJson.success(map);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public ResponseJson<PageInfo<CouponVo>> findMoneyCoupons(int pageNum, int pageSize) {
|
|
|
|
+ PageHelper.startPage(pageNum, pageSize);
|
|
|
|
+ List<CouponVo> cop = couponMapper.findMoneyCoupons();
|
|
|
|
+ PageInfo<CouponVo> pageInfo = new PageInfo<>(cop);
|
|
|
|
+ return ResponseJson.success(pageInfo);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public ResponseJson<CouponVo> findCouponDetail(Integer couponId) {
|
|
|
|
+ CouponVo couponVo=couponMapper.findCouponDetail(couponId);
|
|
|
|
+ return ResponseJson.success(couponVo);
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 过滤与商品无关的优惠券
|
|
* 过滤与商品无关的优惠券
|
|
*
|
|
*
|