更新10.11

This commit is contained in:
许允枞 2024-10-11 09:30:11 +08:00
parent 4ec385d97f
commit 248ad2bb95
2 changed files with 16 additions and 5 deletions

View File

@ -325,7 +325,8 @@ public class ActiveRecommendRecordsServiceImpl extends ServiceImpl<ActiveRecomme
if (!"0".equals(activeUserRecharge.getFrequencyLimit())) {
//查询推荐人的领取次数
Integer count = activeUserRechargeRecordsMapper.selectCount(new LambdaQueryWrapper<ActiveUserRechargeRecords>()
.eq(ActiveUserRechargeRecords::getUserId, activeRecommendRecords.getUserId()));
.eq(ActiveUserRechargeRecords::getUserId, activeRecommendRecords.getUserId())
.eq(ActiveUserRechargeRecords::getStoreId, storeId));
if (count >= activeUserRecharge.getFrequencyLimit()) {
return;
}
@ -359,6 +360,7 @@ public class ActiveRecommendRecordsServiceImpl extends ServiceImpl<ActiveRecomme
//查询优惠券详细信息
CardCoupon cardCoupon = cardCouponMapper.selectById(vouchersId);
Integer validityDay = 0;
//优惠券的有效期
Date effectiveDateStart = new Date();
Date effectiveDateEnd = new Date();
if (cardCoupon.getTimeType().equals("1")) {

View File

@ -13,6 +13,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.generator.config.IFileCreate;
import com.fuint.business.marketingActivity.cardCoupon.entity.CardCouponUser;
import com.fuint.business.marketingActivity.cardCoupon.mapper.CardCouponUserMapper;
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableRecordMapper;
import com.fuint.business.marketingActivity.cardGift.entity.CardGift;
@ -104,6 +106,8 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
private GrowthValueChangeMapper growthValueChangeMapper;
@Autowired
private MtUserGradeMapper mtUserGradeMapper;
@Autowired
private CardCouponUserMapper cardCouponUserMapper;
@ -469,10 +473,15 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
Double giveAmount = ObjectUtil.isNotEmpty(balance.getGiveAmount()) ? balance.getGiveAmount() : 0;
userBlanceUniVo.setAllBalance(balance.getCardBalance() + giveAmount);
//查询优惠券数量
Integer count = cardFavorableRecordMapper.selectCount(new LambdaQueryWrapper<CardFavorableRecord>()
.eq(CardFavorableRecord::getMtUserId, nowAccountInfo.getId())
.eq(CardFavorableRecord::getStatus, 0)
.eq(CardFavorableRecord::getStoreId, balance.getStoreId()));
//新表
Integer count = cardCouponUserMapper.selectCount(new LambdaQueryWrapper<CardCouponUser>()
.eq(CardCouponUser::getMtUserId, nowAccountInfo.getId())
.eq(CardCouponUser::getStoreId, balance.getStoreId())
.eq(CardCouponUser::getStatus, "0"));
// Integer count = cardFavorableRecordMapper.selectCount(new LambdaQueryWrapper<CardFavorableRecord>()
// .eq(CardFavorableRecord::getMtUserId, nowAccountInfo.getId())
// .eq(CardFavorableRecord::getStatus, "0")
// .eq(CardFavorableRecord::getStoreId, balance.getStoreId()));
userBlanceUniVo.setCardFavorableCount(count);
//查询礼品卡已兑换数量和金额
List<CardGift> cardGifts = cardGiftMapper.selectList(new LambdaQueryWrapper<CardGift>()