From 2e3c12ca3a7241f498c32121cb1572502c998d0d Mon Sep 17 00:00:00 2001 From: 935090232@qq.com <ak473600000> Date: Sat, 09 Jan 2021 00:42:00 +0800 Subject: [PATCH] 公众号模板消息demo --- zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java index 61b165b..d8acf42 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java @@ -438,6 +438,10 @@ return DateUtil.stringToDate("9999-12-31", DateUtil.DATE_FORMAT_DD); } + if (type == 2 && shoppingGoods.getUseDateNum() == null && StringUtils.isNotBlank(shoppingGoods.getBuyDateUnit())) { + return DateUtil.stringToDate("9999-12-31", DateUtil.DATE_FORMAT_DD); + } + if (type == 2 && buyDate == null) { throw new GlobleException("购买日期不能为空"); } @@ -522,7 +526,8 @@ goodsDetailVo.setGoodsType(shoppingGoods.getGoodType()); goodsDetailVo.setDesc(shoppingGoods.getDescription()); goodsDetailVo.setMaxSaleCnt(shoppingGoods.getCarMaxSaleCount()); - goodsDetailVo.setLimitBuyCnt(shoppingGoods.getCarUseCount().toString()); + goodsDetailVo.setLimitBuyCnt("否".equals(shoppingGoods.getIsOnce()) ? null : shoppingGoods.getIsOnce()); + goodsDetailVo.setMaxUseCnt(shoppingGoods.getCarUseCount()); goodsDetailVo.setMeasure(shoppingGoods.getMeasure()); goodsDetailVo.setVolume(shoppingGoods.getVolume()); goodsDetailVo.setSalePrice(BigDecimal.valueOf(shoppingGoods.getSealPice())); -- Gitblit v1.9.1