zoujiajian před 3 roky
rodič
revize
763d0c2d79

+ 3 - 0
netflix-service/src/main/java/com/cyksj/service/coupon/impl/CouponFontServiceImpl.java

@@ -128,6 +128,9 @@ public class CouponFontServiceImpl implements CouponFontService {
 		Long goodsId = null;
 		//实物还是虚物
 		GoodsDonSkuView goodsDonSkuView = beanSearcher.searchFirst(GoodsDonSkuView.class, MapUtils.builder().field(GoodsDonSkuView::getSkuId, skuId).op(Operator.Equal).build());
+		if (goodsDonSkuView == null) {
+			return new Page<>();
+		}
 		BigDecimal skuMoney = goodsDonSkuView.getMoney();
 		if (goodsDonSkuView.getType() == 2) {
 			goodsId = goodsDonSkuView.getGoodsId();

+ 6 - 0
netflix-web/src/main/java/com/cyksj/web/controller/manage/statistics/StatisticsDataController.java

@@ -102,6 +102,9 @@ public class StatisticsDataController {
 	@GetMapping("/export")
 	@SaCheckPermission("statics:export")
 	public void exportStatisticsData(Integer type, Long startTime, Long endTime, HttpServletResponse response) {
+		if (startTime == null || endTime == null) {
+			throw BusinessRuntimeException.getInstance("请选择导出的时间");
+		}
 		List<ExcelSheetAndData> excelSheetDataList = statisticsDataService.exportStatisticsDataByType(type, startTime, endTime);
 		excelSheetDataList = excelSheetDataList.stream().sorted(Comparator.comparing(ExcelSheetAndData::getSort)).collect(Collectors.toList());
 		EasyExcelUtils.createExcelStreamMutilByEasyExcel(response, excelSheetDataList, "订单统计数据", ExcelTypeEnum.XLSX, null);
@@ -112,6 +115,9 @@ public class StatisticsDataController {
 	 */
 	@GetMapping("/export/monthly/data")
 	public void exportMonthlyData(Long startTime, Long endTime, HttpServletResponse response) {
+		if (startTime == null || endTime == null) {
+			throw BusinessRuntimeException.getInstance("请选择导出的时间");
+		}
 		List<ExcelSheetAndData> excelSheetDataList = statisticsDataService.exportMonthlyData(startTime, endTime);
 		excelSheetDataList = excelSheetDataList.stream().sorted(Comparator.comparing(ExcelSheetAndData::getSort)).collect(Collectors.toList());
 		EasyExcelUtils.createExcelStreamMutilByEasyExcel(response, excelSheetDataList, String.format("%s月业务数据", DateUtil.month(DateTime.of(startTime)) + 1), ExcelTypeEnum.XLSX, null);