|
@@ -30,6 +30,7 @@ import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -63,6 +64,7 @@ public class TicketBoxServiceImpl extends ServiceImpl<TicketBoxMapper, TicketBox
|
|
|
private ICouponService couponService;
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional
|
|
|
public boolean createTicketBox(TicketBoxCreateParam param) {
|
|
|
// 创建盲票组
|
|
|
TicketBox ticketBox = mapperFacade.map(param, TicketBox.class);
|
|
@@ -90,6 +92,7 @@ public class TicketBoxServiceImpl extends ServiceImpl<TicketBoxMapper, TicketBox
|
|
|
awardsPrize.setBoxId(ticketBox.getBoxId());
|
|
|
awardsPrize.setAwardsId(ticketAwards.getAwardsId());
|
|
|
awardsPrize.setRemainQty(awardsPrize.getQuantity());
|
|
|
+ awardsPrize.setCashedQty(0);
|
|
|
if (prizeParam.getPrizeType() == TicketPrizeTypeEnum.GOODS) {
|
|
|
Goods goods = goodsService.getById(awardsPrize.getRefId());
|
|
|
awardsPrize.setTitle(goods.getTitle());
|