Commit cf5608e4 by 吕明尚

新增领取记录表的默认时间

parent c64b4680
...@@ -91,17 +91,26 @@ public class QPServiceImpl implements QPService { ...@@ -91,17 +91,26 @@ public class QPServiceImpl implements QPService {
sConsumerCoupon.setCouponType(CouponTypeEnum.CASH.getCode()); sConsumerCoupon.setCouponType(CouponTypeEnum.CASH.getCode());
sConsumerCoupon.setStoreType(StoreType.getCodeList()); sConsumerCoupon.setStoreType(StoreType.getCodeList());
sConsumerCoupon.setRoomType(RoomType.getCodeList()); sConsumerCoupon.setRoomType(RoomType.getCodeList());
sConsumerCoupon.setEndDate(prepare.getReceiptEndDate());
sConsumerCoupon.setCreateBy(String.valueOf(user.getId())); sConsumerCoupon.setCreateBy(String.valueOf(user.getId()));
//根据门店id查询门店信息 //根据门店id查询门店信息
List<TuangouDealQueryShopDealResponseEntity> queryshopdeal = queryshopdeal(openShopUuid); List<TuangouDealQueryShopDealResponseEntity> queryshopdeal = queryshopdeal(openShopUuid);
queryshopdeal.stream().forEach(o -> { queryshopdeal.stream().forEach(o -> {
//套餐名称相同并且在售卖中 //套餐名称相同并且在售卖中
if (prepare.getDeal_title().equals(o.getTitle()) && o.getSale_status().equals(saleStatusEnum.SELLING.getCode())) { if (prepare.getDeal_title().equals(o.getTitle()) && o.getSale_status().equals(saleStatusEnum.SELLING.getCode())) {
sConsumerCoupon.setCouponTimeStart(o.getReceipt_begin_date()); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
sConsumerCoupon.setCouponTimeEnd(o.getReceipt_end_date()); try {
Date receiptEndDate = sdf.parse(o.getReceipt_end_date());
Date receiptBeginDate = sdf.parse(o.getReceipt_begin_date());
sConsumerCoupon.setStartDate(receiptBeginDate);
sConsumerCoupon.setEndDate(receiptEndDate);
} catch (Exception e) {
e.printStackTrace();
}
} }
}); });
sConsumerCoupon.setCouponTimeStart("00:00");
sConsumerCoupon.setCouponTimeEnd("24:00");
sConsumerCoupon.setCreateTime(new Date()); sConsumerCoupon.setCreateTime(new Date());
sConsumerCoupon.setConsumerId(user.getId()); sConsumerCoupon.setConsumerId(user.getId());
isConsumerCouponService.insertSConsumerCoupon(sConsumerCoupon); isConsumerCouponService.insertSConsumerCoupon(sConsumerCoupon);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment