Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
张松
2025-12-01 11:25:47 +08:00
20 changed files with 75 additions and 55 deletions

View File

@@ -49,7 +49,7 @@ public class MkCouponGiftServiceImpl extends ServiceImpl<MkCouponGiftMapper, MkC
public void addCouponGift(Long sourceId, String sourceName, Integer type, List<MkCouponGiftDTO> couponGiftList) {
remove(new QueryWrapper().eq(MkCouponGift::getSourceId, sourceId).eq(MkCouponGift::getType, type));
if (CollUtil.isNotEmpty(couponGiftList)) {
List newCoupons = new ArrayList<>();
List<MkCouponGift> newCoupons = new ArrayList<>();
for (MkCouponGiftDTO giftDTO : couponGiftList) {
ShopCoupon coupon = couponMapper.selectOneByQuery(new QueryWrapper().eq(ShopCoupon::getId, giftDTO.getCouponId()));
if (coupon == null) {
@@ -64,7 +64,7 @@ public class MkCouponGiftServiceImpl extends ServiceImpl<MkCouponGiftMapper, MkC
couponGift.setNum(giftDTO.getNum());
newCoupons.add(couponGift);
}
saveBatch(newCoupons);
mapper.insertBatchSelective(newCoupons, 50);
}
}

View File

@@ -476,7 +476,7 @@ public class MkShopCouponRecordServiceImpl extends ServiceImpl<MkShopCouponRecor
recordList.add(record);
}
}
saveBatch(recordList);
mapper.insertBatchSelective(recordList, 50);
QueryWrapper queryWrapper = new QueryWrapper();
ShopCoupon newCoupon = new ShopCoupon();
newCoupon.setGiftNum(coupon.getGiftNum());