bug
This commit is contained in:
parent
a97c077ee8
commit
81e69b6e0b
@ -84,8 +84,6 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
|
|||||||
@Resource
|
@Resource
|
||||||
private CardExchangeMapper cardExchangeMapper;
|
private CardExchangeMapper cardExchangeMapper;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ILJStaffService ljStaffService;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -255,8 +253,8 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
|
|||||||
activeConsumptionChild.setGiftCardName(cardExchange.getName());
|
activeConsumptionChild.setGiftCardName(cardExchange.getName());
|
||||||
activeConsumptionChild.setGiftCardDetail(cardExchange.getCardDetail());
|
activeConsumptionChild.setGiftCardDetail(cardExchange.getCardDetail());
|
||||||
activeConsumptionChild.setGiftCardTime(cardExchange.getValidity());
|
activeConsumptionChild.setGiftCardTime(cardExchange.getValidity());
|
||||||
activeConsumptionChildService.updateById(activeConsumptionChild);
|
|
||||||
activeConsumptionChild.setInstruction(cardExchange.getUseInstructions());
|
activeConsumptionChild.setInstruction(cardExchange.getUseInstructions());
|
||||||
|
activeConsumptionChildService.updateById(activeConsumptionChild);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ public class CardValueChild extends Model<CardValueChild> {
|
|||||||
private String activeGift;
|
private String activeGift;
|
||||||
//赠送卡券名称
|
//赠送卡券名称
|
||||||
private String giftCardName;
|
private String giftCardName;
|
||||||
|
private String instruction;
|
||||||
//生效日期类型 0 ,1,2
|
//生效日期类型 0 ,1,2
|
||||||
private String timeType;
|
private String timeType;
|
||||||
//券类型
|
//券类型
|
||||||
|
@ -11,6 +11,10 @@ import com.fuint.business.marketingActivity.activeConsumption.vo.ActiveConsumpti
|
|||||||
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscount;
|
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscount;
|
||||||
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild;
|
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild;
|
||||||
import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountVO;
|
import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountVO;
|
||||||
|
import com.fuint.business.marketingActivity.cardExchange.entity.CardExchange;
|
||||||
|
import com.fuint.business.marketingActivity.cardExchange.mapper.CardExchangeMapper;
|
||||||
|
import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorable;
|
||||||
|
import com.fuint.business.marketingActivity.cardFavorable.mapper.CardFavorableMapper;
|
||||||
import com.fuint.business.marketingActivity.cardValue.dto.CardValueDTO;
|
import com.fuint.business.marketingActivity.cardValue.dto.CardValueDTO;
|
||||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild;
|
import com.fuint.business.marketingActivity.cardValue.entity.CardValueChild;
|
||||||
import com.fuint.business.marketingActivity.cardValue.mapper.CardValueMapper;
|
import com.fuint.business.marketingActivity.cardValue.mapper.CardValueMapper;
|
||||||
@ -52,6 +56,11 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
|
|||||||
private StoreService storeService;
|
private StoreService storeService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private LJUserGradeService userGradeService;
|
private LJUserGradeService userGradeService;
|
||||||
|
@Resource
|
||||||
|
private CardFavorableMapper cardFavorableMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CardExchangeMapper cardExchangeMapper;
|
||||||
/**
|
/**
|
||||||
* 分页查询所有数据
|
* 分页查询所有数据
|
||||||
* @param page
|
* @param page
|
||||||
@ -208,6 +217,38 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
|
|||||||
queryWrapper.eq(CardValueChild::getCardValueId,id);
|
queryWrapper.eq(CardValueChild::getCardValueId,id);
|
||||||
queryWrapper.orderByDesc(CardValueChild::getCreateTime);
|
queryWrapper.orderByDesc(CardValueChild::getCreateTime);
|
||||||
List<CardValueChild> activeNewlywedsChildList = cardValueChildService.list(queryWrapper);
|
List<CardValueChild> activeNewlywedsChildList = cardValueChildService.list(queryWrapper);
|
||||||
|
for (CardValueChild cardValueChild : activeNewlywedsChildList) {
|
||||||
|
//优惠券
|
||||||
|
if (cardValueChild.getActiveGift().equals("1")){
|
||||||
|
CardFavorable cardFavorable = cardFavorableMapper.selectById(cardValueChild.getVouchersId());
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorable)){
|
||||||
|
cardValueChild.setGiftCardName(cardFavorable.getName());
|
||||||
|
cardValueChild.setGiftCardDetail(cardFavorable.getCardDetail());
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityZero())){
|
||||||
|
cardValueChild.setValidityZero(cardFavorable.getValidityZero());
|
||||||
|
}
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityOne())){
|
||||||
|
cardValueChild.setValidityOne(cardFavorable.getValidityOne());
|
||||||
|
}
|
||||||
|
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityTwo())){
|
||||||
|
cardValueChild.setValidityTwo(cardFavorable.getValidityTwo());
|
||||||
|
}
|
||||||
|
cardValueChild.setInstruction(cardFavorable.getInstruction());
|
||||||
|
cardValueChildService.updateById(cardValueChild);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (cardValueChild.getActiveGift().equals("2")){
|
||||||
|
//兑换券
|
||||||
|
CardExchange cardExchange = cardExchangeMapper.selectById(cardValueChild.getVouchersId());
|
||||||
|
if (ObjectUtils.isNotEmpty(cardExchange)) {
|
||||||
|
cardValueChild.setGiftCardName(cardExchange.getName());
|
||||||
|
cardValueChild.setGiftCardDetail(cardExchange.getCardDetail());
|
||||||
|
cardValueChild.setGiftCardTime(cardExchange.getValidity());
|
||||||
|
cardValueChild.setInstruction(cardExchange.getUseInstructions());
|
||||||
|
cardValueChildService.updateById(cardValueChild);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BeanUtils.copyProperties(cardValue,cardValueVO);
|
BeanUtils.copyProperties(cardValue,cardValueVO);
|
||||||
cardValueVO.setMembershipLevel(cardValue.getMembershipLevel().split(","));
|
cardValueVO.setMembershipLevel(cardValue.getMembershipLevel().split(","));
|
||||||
if (CollectionUtils.isNotEmpty(activeNewlywedsChildList)){
|
if (CollectionUtils.isNotEmpty(activeNewlywedsChildList)){
|
||||||
|
Loading…
Reference in New Issue
Block a user