循环依赖
This commit is contained in:
parent
3b53b460fd
commit
f2007bb881
|
|
@ -7,6 +7,7 @@ import com.czg.market.entity.ShopCoupon;
|
|||
import com.czg.market.service.MkCouponGiftService;
|
||||
import com.czg.market.service.ShopCouponService;
|
||||
import com.czg.service.market.mapper.MkCouponGiftMapper;
|
||||
import com.czg.service.market.mapper.ShopCouponMapper;
|
||||
import com.czg.utils.PageUtil;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
|
|
@ -27,7 +28,7 @@ import java.util.List;
|
|||
public class MkCouponGiftServiceImpl extends ServiceImpl<MkCouponGiftMapper, MkCouponGift> implements MkCouponGiftService {
|
||||
|
||||
@Resource
|
||||
private ShopCouponService shopCouponService;
|
||||
private ShopCouponMapper couponMapper;
|
||||
|
||||
@Override
|
||||
public Page<MkCouponGiftDTO> getCouponGiftPage(Long couponId) {
|
||||
|
|
@ -47,9 +48,7 @@ public class MkCouponGiftServiceImpl extends ServiceImpl<MkCouponGiftMapper, MkC
|
|||
if (CollUtil.isNotEmpty(couponGiftList)) {
|
||||
List newCoupons = new ArrayList<>();
|
||||
for (MkCouponGiftDTO giftDTO : couponGiftList) {
|
||||
ShopCoupon coupon = shopCouponService.queryChain().select(ShopCoupon::getTitle)
|
||||
.where(ShopCoupon::getId).eq(giftDTO.getCouponId())
|
||||
.one();
|
||||
ShopCoupon coupon = couponMapper.selectOneByQuery(new QueryWrapper().eq(ShopCoupon::getId, giftDTO.getCouponId()));
|
||||
if (coupon == null) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue