|
|
@ -5,19 +5,24 @@ |
|
|
|
*/ |
|
|
|
package com.shop.cereshop.app.service.coupon.impl; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.shop.cereshop.app.dao.coupon.CereShopCouponDAO; |
|
|
|
import com.shop.cereshop.app.dao.shop.CerePlatformShopDAO; |
|
|
|
import com.shop.cereshop.app.page.coupon.CommonCoupon; |
|
|
|
import com.shop.cereshop.app.page.product.ProductCoupon; |
|
|
|
import com.shop.cereshop.app.page.shop.PlatformShop; |
|
|
|
import com.shop.cereshop.app.param.canvas.CanvasCouponParam; |
|
|
|
import com.shop.cereshop.app.param.coupon.ShopCouponParam; |
|
|
|
import com.shop.cereshop.app.service.buyer.CereBuyerShopCouponService; |
|
|
|
import com.shop.cereshop.app.service.coupon.CereShopCouponService; |
|
|
|
import com.shop.cereshop.app.service.shop.CerePlatformShopService; |
|
|
|
import com.shop.cereshop.commons.constant.IntegerEnum; |
|
|
|
import com.shop.cereshop.commons.domain.buyer.CereBuyerShopCoupon; |
|
|
|
import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; |
|
|
|
import com.shop.cereshop.commons.domain.common.Page; |
|
|
|
import com.shop.cereshop.commons.domain.shop.CerePlatformShop; |
|
|
|
import com.shop.cereshop.commons.domain.tool.CereShopCoupon; |
|
|
|
import com.shop.cereshop.commons.exception.CoBusinessException; |
|
|
|
import com.shop.cereshop.commons.utils.EmptyUtils; |
|
|
@ -42,9 +47,13 @@ public class CereShopCouponServiceImpl implements CereShopCouponService { |
|
|
|
@Autowired |
|
|
|
private CereBuyerShopCouponService cereBuyerShopCouponService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private CerePlatformShopDAO cerePlatformShopDAO; |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<ProductCoupon> findByProductId(Long shopId, Long productId) { |
|
|
|
return cereShopCouponDAO.findProductCanUseCoupon(shopId, productId); |
|
|
|
CerePlatformShop platformShop = cerePlatformShopDAO.selectByPrimaryKey(shopId); |
|
|
|
return cereShopCouponDAO.findProductCanUseCoupon(platformShop.getBusinessId(), productId); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|