|
|
@@ -209,8 +209,11 @@ public class MarketFrontServiceImpl implements MarketFrontService {
|
|
|
} else if (luckyDraw.getType() == LuckyDraw.Type.duration) {
|
|
|
MapBuilder builder = MapUtils.builder()
|
|
|
.field(GroupsRelationView::getUserId, userId)
|
|
|
+ .field(GroupsRelationView::getGoodsType, 1)
|
|
|
+ .field(GroupsRelationView::getGoodsSecondType, 2)
|
|
|
.field(GroupsRelationView::getStatus, "validity")
|
|
|
.field(GroupsRelationView::getExpiryTime).op(Operator.NotNull);
|
|
|
+ //特定奖池不选择时,默认查询所有非邀请制平台车票
|
|
|
if (goodsIdList != null && goodsIdList.size() > 0) {
|
|
|
builder.field(GroupsRelationView::getGoodsId, goodsIdList).op(Operator.InList);
|
|
|
}
|
|
|
@@ -587,7 +590,7 @@ public class MarketFrontServiceImpl implements MarketFrontService {
|
|
|
throw BusinessRuntimeException.getInstance("暂未配置特定奖池平台,请联系客服");
|
|
|
}
|
|
|
String sysValue = lottery_specific_goods.getSysValue();
|
|
|
- if (sysValue == null) {
|
|
|
+ if (StrUtil.isEmpty(sysValue)) {
|
|
|
throw BusinessRuntimeException.getInstance("");
|
|
|
}
|
|
|
List<Long> goodsIdList = Jsons.parseList(sysValue, Long.class);
|
|
|
@@ -623,12 +626,14 @@ public class MarketFrontServiceImpl implements MarketFrontService {
|
|
|
return new ArrayList<>();
|
|
|
}
|
|
|
String sysValue = lottery_specific_goods.getSysValue();
|
|
|
- if (sysValue == null) {
|
|
|
+ if (StrUtil.isEmpty(sysValue)) {
|
|
|
return new ArrayList<>();
|
|
|
}
|
|
|
List<Long> goodsIdList = Jsons.parseList(sysValue, Long.class);
|
|
|
MapBuilder builder = MapUtils.builder()
|
|
|
.field(GroupsRelationView::getUserId, userId)
|
|
|
+ .field(GroupsRelationView::getGoodsType, 1)
|
|
|
+ .field(GroupsRelationView::getGoodsSecondType, 2)
|
|
|
.field(GroupsRelationView::getStatus, "validity")
|
|
|
.field(GroupsRelationView::getExpiryTime).op(Operator.NotNull);
|
|
|
if (goodsIdList != null && goodsIdList.size() > 0) {
|
|
|
@@ -740,6 +745,9 @@ public class MarketFrontServiceImpl implements MarketFrontService {
|
|
|
.eq(LuckyDrawSpecificChanceRecord::getOrderId, orderId)
|
|
|
.eq(LuckyDrawSpecificChanceRecord::getUserId, userId)
|
|
|
.last("limit 1"));
|
|
|
+ if (record == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
record.setRefundTime(refundTime);
|
|
|
luckyDrawSpecificChanceRecordMapper.updateById(record);
|
|
|
luckyDrawSpecificChanceMapper.subChanceNumNoRepeat(userId);
|
|
|
@@ -751,11 +759,15 @@ public class MarketFrontServiceImpl implements MarketFrontService {
|
|
|
return false;
|
|
|
}
|
|
|
String sysValue = lottery_specific_goods.getSysValue();
|
|
|
- if (sysValue == null) {
|
|
|
+ if (StrUtil.isEmpty(sysValue)) {
|
|
|
return false;
|
|
|
}
|
|
|
List<Long> goodsIdList = Jsons.parseList(sysValue, Long.class);
|
|
|
- if (goodsIdList.isEmpty() || goodsIdList.contains(goodsId)) {
|
|
|
+
|
|
|
+ if (goodsIdList.isEmpty() || goodsIdList.contains(null)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (goodsIdList.contains(goodsId)) {
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|