Browse Source

添加查询时防止参数为空

DESKTOP-2K9OVK9\siwei 1 week ago
parent
commit
75654779b3

+ 4 - 0
siwei-modules/siwei-rsmonitoring/src/main/java/com/siwei/rsmonitoring/controller/TDkGeomDbController.java

@@ -1,5 +1,6 @@
 package com.siwei.rsmonitoring.controller;
 
+import com.siwei.common.core.exception.ServiceException;
 import com.siwei.common.core.utils.StringUtils;
 import com.siwei.common.core.utils.file.UnPackageUtils;
 import com.siwei.common.core.utils.poi.ExcelUtil;
@@ -83,6 +84,9 @@ public class TDkGeomDbController extends BaseController {
 //    @RequiresPermissions("rsmonitoring:dkgeomdb:list:details")
     @GetMapping("/details/list")
     public TableDataInfo list(TDkGeomDbDetails tDkGeomDbDetails) {
+        if (tDkGeomDbDetails == null || StringUtils.isEmpty(tDkGeomDbDetails.getUploadId())) {
+            throw new ServiceException("参数为空");
+        }
         startPage();
         List<TDkGeomDbDetails> list = tDkGeomDbDetailsService.selectTDkGeomDbDetailsList(tDkGeomDbDetails);
         return getDataTable(list);