|
@@ -189,8 +189,8 @@ public class TicketBoxServiceImpl extends ServiceImpl<TicketBoxMapper, TicketBox
|
|
|
awardsPrize.setPrizeId(bizIdGenerator.newId());
|
|
|
awardsPrize.setBoxId(ticketBox.getBoxId());
|
|
|
awardsPrize.setAwardsId(ticketAwardsParam.getAwardsId());
|
|
|
- if (null == awardsPrize.getQuantity() || 0 == awardsPrize.getQuantity()) {
|
|
|
- // 页面没设置奖品的具体数量,则默认为整个奖项的数量
|
|
|
+ if (TicketTypeEnum.OFFLINE.equals(ticketBox.getType())) {
|
|
|
+ // 线下票的则默认为整个奖项的数量
|
|
|
awardsPrize.setQuantity(ticketAwardsParam.getQuantity());
|
|
|
}
|
|
|
awardsPrize.setRemainQty(awardsPrize.getQuantity());
|
|
@@ -366,8 +366,8 @@ public class TicketBoxServiceImpl extends ServiceImpl<TicketBoxMapper, TicketBox
|
|
|
awardsPrize.setPrizeId(bizIdGenerator.newId());
|
|
|
awardsPrize.setBoxId(ticketBox.getBoxId());
|
|
|
awardsPrize.setAwardsId(ticketAwards.getAwardsId());
|
|
|
- if (null == awardsPrize.getQuantity() || 0 == awardsPrize.getQuantity()) {
|
|
|
- // 页面没设置奖品的具体数量,则默认为整个奖项的数量
|
|
|
+ if (TicketTypeEnum.OFFLINE.equals(ticketBox.getType())) {
|
|
|
+ // 线下票的则默认为整个奖项的数量
|
|
|
awardsPrize.setQuantity(ticketAwards.getQuantity());
|
|
|
}
|
|
|
awardsPrize.setRemainQty(awardsPrize.getQuantity());
|