Bläddra i källkod

fix 修改查询条件

Administrator 3 år sedan
förälder
incheckning
45442ebed1

+ 8 - 6
boman-web-core/src/main/java/com/boman/web/core/service/vaccineInfo/impl/VaccineInfoServiceImpl.java

@@ -75,12 +75,14 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
     public List<VaccineInfoOperation> selectVaccineInfoList(VaccineInfoOperation vaccineInfoOperation) {
         Map<String, Object> params = vaccineInfoOperation.getParams();
         if (params != null){
-            String age = params.get("age").toString();
-            if (StringUtils.isNotBlank(age)) {
-                String[] split = age.split("-");
-                params.put("startAge", split[0]);
-                if (split.length == 2) {
-                    params.put("endAge", split[1]);
+            Object age = params.get("age");
+            if (age != null){
+                if (StringUtils.isNotBlank(age.toString())) {
+                    String[] split = age.toString().split("-");
+                    params.put("startAge", split[0]);
+                    if (split.length == 2) {
+                        params.put("endAge", split[1]);
+                    }
                 }
             }
         }