bug
This commit is contained in:
parent
b89782be6f
commit
9edf510ca1
@ -36,6 +36,7 @@ public class ActiveNewlywedsChild extends Model<ActiveNewlywedsChild> {
|
|||||||
private String giftCardType;
|
private String giftCardType;
|
||||||
//券详情
|
//券详情
|
||||||
private String giftCardDetail;
|
private String giftCardDetail;
|
||||||
|
private String instruction;
|
||||||
//生效日期类型 0 ,1,2
|
//生效日期类型 0 ,1,2
|
||||||
private String timeType;
|
private String timeType;
|
||||||
//券有效期
|
//券有效期
|
||||||
|
@ -19,9 +19,13 @@ import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecomme
|
|||||||
import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendChild;
|
import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendChild;
|
||||||
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.store.service.StoreService;
|
import com.fuint.business.store.service.StoreService;
|
||||||
import com.fuint.common.service.AccountService;
|
import com.fuint.common.service.AccountService;
|
||||||
@ -57,6 +61,11 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
|
|||||||
private CardExchangeRecordService cardExchangeRecordService;
|
private CardExchangeRecordService cardExchangeRecordService;
|
||||||
@Resource
|
@Resource
|
||||||
private AccountService accountService;
|
private AccountService accountService;
|
||||||
|
@Resource
|
||||||
|
private CardFavorableMapper cardFavorableMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CardExchangeMapper cardExchangeMapper;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param activeNewlywedsDTO
|
* @param activeNewlywedsDTO
|
||||||
@ -267,6 +276,23 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
|
|||||||
for (ActiveNewlywedsChild activeNewlywedsChild : activeNewlywedsChildList) {
|
for (ActiveNewlywedsChild activeNewlywedsChild : activeNewlywedsChildList) {
|
||||||
//优惠券
|
//优惠券
|
||||||
if (activeNewlywedsChild.getActiveGift().equals("1")){
|
if (activeNewlywedsChild.getActiveGift().equals("1")){
|
||||||
|
CardFavorable cardFavorable = cardFavorableMapper.selectById(activeNewlywedsChild.getVouchersId());
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorable)){
|
||||||
|
activeNewlywedsChild.setGiftCardName(cardFavorable.getName());
|
||||||
|
activeNewlywedsChild.setGiftCardDetail(cardFavorable.getCardDetail());
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityZero())){
|
||||||
|
activeNewlywedsChild.setValidityZero(cardFavorable.getValidityZero());
|
||||||
|
}
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityOne())){
|
||||||
|
activeNewlywedsChild.setValidityOne(cardFavorable.getValidityOne());
|
||||||
|
}
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityTwo())){
|
||||||
|
activeNewlywedsChild.setValidityTwo(cardFavorable.getValidityTwo());
|
||||||
|
}
|
||||||
|
activeNewlywedsChild.setInstruction(cardFavorable.getInstruction());
|
||||||
|
activeNewlywedsChildService.updateById(activeNewlywedsChild);
|
||||||
|
}
|
||||||
|
|
||||||
LambdaQueryWrapper<CardFavorableRecord> queryWrappers = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CardFavorableRecord> queryWrappers = new LambdaQueryWrapper<>();
|
||||||
queryWrappers.eq(CardFavorableRecord::getActiveId,activeNewlywedsChild.getActiveNewlywedsId());
|
queryWrappers.eq(CardFavorableRecord::getActiveId,activeNewlywedsChild.getActiveNewlywedsId());
|
||||||
queryWrappers.eq(CardFavorableRecord::getCardFavorableId,activeNewlywedsChild.getVouchersId());
|
queryWrappers.eq(CardFavorableRecord::getCardFavorableId,activeNewlywedsChild.getVouchersId());
|
||||||
@ -280,6 +306,15 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
|
|||||||
}
|
}
|
||||||
//兑换券
|
//兑换券
|
||||||
if (activeNewlywedsChild.getActiveGift().equals("2")){
|
if (activeNewlywedsChild.getActiveGift().equals("2")){
|
||||||
|
//兑换券
|
||||||
|
CardExchange cardExchange = cardExchangeMapper.selectById(activeNewlywedsChild.getVouchersId());
|
||||||
|
if (ObjectUtils.isNotEmpty(cardExchange)) {
|
||||||
|
activeNewlywedsChild.setGiftCardName(cardExchange.getName());
|
||||||
|
activeNewlywedsChild.setGiftCardDetail(cardExchange.getCardDetail());
|
||||||
|
activeNewlywedsChild.setGiftCardTime(cardExchange.getValidity());
|
||||||
|
activeNewlywedsChild.setInstruction(cardExchange.getUseInstructions());
|
||||||
|
activeNewlywedsChildService.updateById(activeNewlywedsChild);
|
||||||
|
}
|
||||||
LambdaQueryWrapper<CardExchangeRecord> queryWrapperss = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CardExchangeRecord> queryWrapperss = new LambdaQueryWrapper<>();
|
||||||
queryWrapperss.eq(CardExchangeRecord::getActiveId,activeNewlywedsChild.getActiveNewlywedsId());
|
queryWrapperss.eq(CardExchangeRecord::getActiveId,activeNewlywedsChild.getActiveNewlywedsId());
|
||||||
queryWrapperss.eq(CardExchangeRecord::getCardExchangeId,activeNewlywedsChild.getVouchersId());
|
queryWrapperss.eq(CardExchangeRecord::getCardExchangeId,activeNewlywedsChild.getVouchersId());
|
||||||
|
Loading…
Reference in New Issue
Block a user