bug
This commit is contained in:
parent
c65a6c6bd9
commit
a96a7f3773
@ -30,6 +30,7 @@ public class ActiveRecommendChild extends Model<ActiveRecommendChild> {
|
|||||||
private String activeGift;
|
private String activeGift;
|
||||||
//礼品对象类型 0:邀请人获得 1:新用户获得
|
//礼品对象类型 0:邀请人获得 1:新用户获得
|
||||||
private String giftUserType;
|
private String giftUserType;
|
||||||
|
private String instruction;
|
||||||
//券id
|
//券id
|
||||||
private Integer vouchersId;
|
private Integer vouchersId;
|
||||||
//赠送卡券名称
|
//赠送卡券名称
|
||||||
|
@ -15,9 +15,13 @@ import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecomm
|
|||||||
import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendService;
|
import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendService;
|
||||||
import com.fuint.business.marketingActivity.activeRecommend.vo.ActiveRecommendAppletVO;
|
import com.fuint.business.marketingActivity.activeRecommend.vo.ActiveRecommendAppletVO;
|
||||||
import com.fuint.business.marketingActivity.activeRecommend.vo.ActiveRecommendVO;
|
import com.fuint.business.marketingActivity.activeRecommend.vo.ActiveRecommendVO;
|
||||||
|
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchange;
|
||||||
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord;
|
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchangeRecord;
|
||||||
|
import com.fuint.business.marketingActivity.cardExchange.mapper.CardExchangeMapper;
|
||||||
import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeRecordService;
|
import com.fuint.business.marketingActivity.cardExchange.service.CardExchangeRecordService;
|
||||||
|
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord;
|
||||||
|
import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableMapper;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService;
|
||||||
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService;
|
import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableService;
|
||||||
import com.fuint.business.store.service.StoreService;
|
import com.fuint.business.store.service.StoreService;
|
||||||
@ -57,6 +61,11 @@ public class ActiveRecommendServiceImpl extends ServiceImpl<ActiveRecommendMappe
|
|||||||
private CardExchangeRecordService cardExchangeRecordService;
|
private CardExchangeRecordService cardExchangeRecordService;
|
||||||
@Resource
|
@Resource
|
||||||
private AccountService accountService;
|
private AccountService accountService;
|
||||||
|
@Resource
|
||||||
|
private CardFavorableMapper cardFavorableMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CardExchangeMapper cardExchangeMapper;
|
||||||
/**
|
/**
|
||||||
* 新增数据
|
* 新增数据
|
||||||
* @param activeRecommendDTO
|
* @param activeRecommendDTO
|
||||||
@ -134,6 +143,22 @@ public class ActiveRecommendServiceImpl extends ServiceImpl<ActiveRecommendMappe
|
|||||||
for (ActiveRecommendChild activeRecommendChild : activeRecommendChildList) {
|
for (ActiveRecommendChild activeRecommendChild : activeRecommendChildList) {
|
||||||
//优惠券
|
//优惠券
|
||||||
if (activeRecommendChild.getActiveGift().equals("1")){
|
if (activeRecommendChild.getActiveGift().equals("1")){
|
||||||
|
CardFavorable cardFavorable = cardFavorableMapper.selectById(activeRecommendChild.getVouchersId());
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorable)){
|
||||||
|
activeRecommendChild.setGiftCardName(cardFavorable.getName());
|
||||||
|
activeRecommendChild.setGiftCardDetail(cardFavorable.getCardDetail());
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityZero())){
|
||||||
|
activeRecommendChild.setValidityZero(cardFavorable.getValidityZero());
|
||||||
|
}
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityOne())){
|
||||||
|
activeRecommendChild.setValidityOne(cardFavorable.getValidityOne());
|
||||||
|
}
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityTwo())){
|
||||||
|
activeRecommendChild.setValidityTwo(cardFavorable.getValidityTwo());
|
||||||
|
}
|
||||||
|
activeRecommendChild.setInstruction(cardFavorable.getInstruction());
|
||||||
|
activeRecommendChildService.updateById(activeRecommendChild);
|
||||||
|
}
|
||||||
LambdaQueryWrapper<CardFavorableRecord> queryWrappers = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CardFavorableRecord> queryWrappers = new LambdaQueryWrapper<>();
|
||||||
queryWrappers.eq(CardFavorableRecord::getActiveId,activeRecommendChild.getActiveRecommendId());
|
queryWrappers.eq(CardFavorableRecord::getActiveId,activeRecommendChild.getActiveRecommendId());
|
||||||
queryWrappers.eq(CardFavorableRecord::getCardFavorableId,activeRecommendChild.getVouchersId());
|
queryWrappers.eq(CardFavorableRecord::getCardFavorableId,activeRecommendChild.getVouchersId());
|
||||||
@ -147,6 +172,15 @@ public class ActiveRecommendServiceImpl extends ServiceImpl<ActiveRecommendMappe
|
|||||||
}
|
}
|
||||||
//兑换券
|
//兑换券
|
||||||
if (activeRecommendChild.getActiveGift().equals("2")){
|
if (activeRecommendChild.getActiveGift().equals("2")){
|
||||||
|
//兑换券
|
||||||
|
CardExchange cardExchange = cardExchangeMapper.selectById(activeRecommendChild.getVouchersId());
|
||||||
|
if (ObjectUtils.isNotEmpty(cardExchange)) {
|
||||||
|
activeRecommendChild.setGiftCardName(cardExchange.getName());
|
||||||
|
activeRecommendChild.setGiftCardDetail(cardExchange.getCardDetail());
|
||||||
|
activeRecommendChild.setGiftCardTime(cardExchange.getValidity());
|
||||||
|
activeRecommendChild.setInstruction(cardExchange.getUseInstructions());
|
||||||
|
activeRecommendChildService.updateById(activeRecommendChild);
|
||||||
|
}
|
||||||
LambdaQueryWrapper<CardExchangeRecord> queryWrapperss = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CardExchangeRecord> queryWrapperss = new LambdaQueryWrapper<>();
|
||||||
queryWrapperss.eq(CardExchangeRecord::getActiveId,activeRecommendChild.getActiveRecommendId());
|
queryWrapperss.eq(CardExchangeRecord::getActiveId,activeRecommendChild.getActiveRecommendId());
|
||||||
queryWrapperss.eq(CardExchangeRecord::getCardExchangeId,activeRecommendChild.getVouchersId());
|
queryWrapperss.eq(CardExchangeRecord::getCardExchangeId,activeRecommendChild.getVouchersId());
|
||||||
|
Loading…
Reference in New Issue
Block a user