|  |  |  | 
|---|
|  |  |  | throw new FebsException("今日任务完成,明天再来"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | DataDictionaryCustom allBuyTimesDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( | 
|---|
|  |  |  | DataDictionaryEnum.ALL_BUY_TIMES.getType(), DataDictionaryEnum.ALL_BUY_TIMES.getCode()); | 
|---|
|  |  |  | Integer allBuyTimes = Integer.parseInt(allBuyTimesDic.getValue()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Integer allBuyTimesNow = this.baseMapper.selectCountByCreateTime(yyyyMMdd); | 
|---|
|  |  |  | if(allBuyTimes <= allBuyTimesNow){ | 
|---|
|  |  |  | throw new FebsException("今日任务完成,明天再来"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String orderNo = MallUtils.getOrderNum(); | 
|---|
|  |  |  | MallOrderInfo orderInfo = new MallOrderInfo(); | 
|---|
|  |  |  | orderInfo.setOrderNo(orderNo); | 
|---|
|  |  |  | 
|---|
|  |  |  | orderInfo.setOrderType(addOrderDto.getOrderType()); | 
|---|
|  |  |  | //补贴金额 | 
|---|
|  |  |  | orderInfo.setSubsidyAmount(goods.getSubsidyAmount()); | 
|---|
|  |  |  | orderInfo.setCommentState(MallOrderInfo.COMMENT_STATE_NO); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | this.baseMapper.insert(orderInfo); | 
|---|
|  |  |  | List<MallGoodsSku> mallGoodsSkus = mallGoodsSkuMapper.selectSkuByGoodsId(goods.getId()); | 
|---|
|  |  |  | 
|---|
|  |  |  | if(CollUtil.isNotEmpty(apiAddCommentDtos)){ | 
|---|
|  |  |  | for(ApiAddCommentDto apiAddCommentDto : apiAddCommentDtos){ | 
|---|
|  |  |  | Long skuId = apiAddCommentDto.getSkuId(); | 
|---|
|  |  |  | MallGoodsSku mallGoodsSku = mallGoodsSkuMapper.selectById(skuId); | 
|---|
|  |  |  | Long goodsId = apiAddCommentDto.getGoodsId(); | 
|---|
|  |  |  | List<MallGoodsSku> mallGoodsSkus = mallGoodsSkuMapper.selectSkuByGoodsId(goodsId); | 
|---|
|  |  |  | MallGoodsSku mallGoodsSku = mallGoodsSkus.get(0); | 
|---|
|  |  |  | MallGoods mallGoods = mallGoodsMapper.selectById(goodsId); | 
|---|
|  |  |  | MallGoodsComment mallGoodsComment = MallGoodsCommentConversion.INSTANCE.dtoToEntity(apiAddCommentDto); | 
|---|
|  |  |  | mallGoodsComment.setMemberId(member.getId()); | 
|---|