Sfoglia il codice sorgente

[C端首页][修改][换一换拼团和砍价]

release_toaliyun_real
gongbiao 6 anni fa
parent
commit
29edae4968
1 ha cambiato i file con 11 aggiunte e 7 eliminazioni
  1. +11
    -7
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java

+ 11
- 7
mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java Vedi File

@@ -144,16 +144,20 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
couponId = record.getCouponId();
record.setCouponId(null);
}
List<WxCouponChannelVo> voList = wxCouponChannelMapper.findVoList(record);
if (voList.isEmpty()) {
return null;
}
if (voList.size() == 1) {
return voList.get(0);
}
Long finalCouponId = couponId;
List<WxCouponChannelVo> voList = wxCouponChannelMapper.findVoList(record).stream()
voList = voList.stream()
.filter(wxCouponChannelVo -> !wxCouponChannelVo.getCouponId().equals(finalCouponId))
.collect(Collectors.toList());
if (!voList.isEmpty()) {
int size = voList.size();
Random random = new Random();
return voList.get(random.nextInt(size));
}
return null;
int size = voList.size();
Random random = new Random();
return voList.get(random.nextInt(size));
}

private boolean isCouponMerchantValid(Long couponId) {


Caricamento…
Annulla
Salva