Explorar el Código

修改——
1-修改后端返回的分页的count总数

zhouhaijun hace 3 días
padre
commit
40ace3a977

+ 36 - 4
src/main/java/com/bootdo/datas/service/impl/GyDataServiceImpl.java

@@ -185,9 +185,25 @@ public class GyDataServiceImpl implements GyDataService {
             map.put("unitId", gyUnitId);
             if (!ObjectUtils.isEmpty(city)) {
                 map.put("unitCity", city);
-                map.put("auditStage", "1");
+                if(!map.containsKey("auditStage")){
+                    map.put("auditStage", "1");
+                }else{
+                    // 包含auditStage时检查值
+                    String value = (String) map.get("auditStage");
+                    if (value == null || value.trim().isEmpty()) {
+                        map.put("auditStage", "1");
+                    }
+                }
             } else {
-                map.put("auditStage", "2");
+                if(!map.containsKey("auditStage")){
+                    map.put("auditStage", "2");
+                }else{
+                    // 包含auditStage时检查值
+                    String value = (String) map.get("auditStage");
+                    if (value == null || value.trim().isEmpty()) {
+                        map.put("auditStage", "2");
+                    }
+                }
             }
         }
 
@@ -957,9 +973,25 @@ public class GyDataServiceImpl implements GyDataService {
             map.put("unitId", gyUnitId);
             if (!ObjectUtils.isEmpty(city)) {
                 map.put("unitCity", city);
-                map.put("auditStage", "1");
+                if(!map.containsKey("auditStage")){
+                    map.put("auditStage", "1");
+                }else{
+                    // 包含auditStage时检查值
+                    String value = (String) map.get("auditStage");
+                    if (value == null || value.trim().isEmpty()) {
+                        map.put("auditStage", "1");
+                    }
+                }
             } else {
-                map.put("auditStage", "2");
+                if(!map.containsKey("auditStage")){
+                    map.put("auditStage", "2");
+                }else{
+                    // 包含auditStage时检查值
+                    String value = (String) map.get("auditStage");
+                    if (value == null || value.trim().isEmpty()) {
+                        map.put("auditStage", "2");
+                    }
+                }
             }
         }
         return gyDataDao.countTotal(map);