diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/service/impl/CardGiftServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/service/impl/CardGiftServiceImpl.java index 8d253dccc..976fc4b4f 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/service/impl/CardGiftServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardGift/service/impl/CardGiftServiceImpl.java @@ -45,6 +45,7 @@ public class CardGiftServiceImpl extends ServiceImpl i SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); cardGift.setBatchNumber(dateFormat.format(new Date()) + String.format("%05d", new Random().nextInt(100000))); //生成数量 + if (ObjectUtils.isNotEmpty(cardGift.getQuantity())) { for (int i = 0; i < cardGift.getQuantity(); i++) { //礼品卡编号 cardGift.setNumber(String.format("%08d", new Random().nextInt(100000000))); @@ -52,6 +53,7 @@ public class CardGiftServiceImpl extends ServiceImpl i cardGift.setCardPassword(String.format("%09d", new Random().nextInt(1000000000)) + "-LjZhYz"); save = save(cardGift); } + } return save; }