Forráskód Böngészése

后台基础库 基础库参数校验全部去掉

limingming 1 éve
szülő
commit
f4ae141122

+ 24 - 25
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/BasicLibraryController.java

@@ -10,7 +10,6 @@ import com.ruoyi.common.core.domain.PageInfo;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.system.domain.BaseParam;
 import com.ruoyi.system.domain.BasicLibrary;
 import com.ruoyi.system.service.BasicLibraryService;
@@ -86,13 +85,13 @@ public class BasicLibraryController extends BaseController {
     @PostMapping("addOrUpdate")
     public R<Boolean> add(@RequestBody BasicLibrary param) {
         //参数校验
-        String[] bootCode = param.getBootCode().split(",");
-        if (bootCode.length != 2){
-            return R.fail("引导码参数格式有误");
-        }
-        if (param.getBootCodeSend() < 0){
-            return R.fail("引导码发送次数参数有误");
-        }
+//        String[] bootCode = param.getBootCode().split(",");
+//        if (bootCode.length != 2){
+//            return R.fail("引导码参数格式有误");
+//        }
+//        if (param.getBootCodeSend() < 0){
+//            return R.fail("引导码发送次数参数有误");
+//        }
 //        String[] synchronizeCode = param.getSynchronizeCode().split(",");
 //        if (synchronizeCode.length != 2){
 //            return R.fail("同步码参数格式有误");
@@ -105,23 +104,23 @@ public class BasicLibraryController extends BaseController {
 //        if (dateCode.length % 2 != 0){
 //            return R.fail("数据码参数有误");
 //        }
-        if (StringUtils.isEmpty(param.getDateCode())){
-            return R.fail("数据码参数不能为空");
-        }
-
-        String[] dateBinary0 = param.getDateBinary0().split(",");
-        if (dateBinary0.length != 2){
-            return R.fail("数据码二进制0参数格式有误");
-        }
-        String[] dateBinary1 = param.getDateBinary1().split(",");
-        if (dateBinary1.length != 2){
-            return R.fail("数据码二进制1参数格式有误");
-        }
-
-        String[] overCode = param.getOverCode().split(",");
-        if (overCode.length != 2){
-            return R.fail("结束码参数有误");
-        }
+//        if (StringUtils.isEmpty(param.getDateCode())){
+//            return R.fail("数据码参数不能为空");
+//        }
+//
+//        String[] dateBinary0 = param.getDateBinary0().split(",");
+//        if (dateBinary0.length != 2){
+//            return R.fail("数据码二进制0参数格式有误");
+//        }
+//        String[] dateBinary1 = param.getDateBinary1().split(",");
+//        if (dateBinary1.length != 2){
+//            return R.fail("数据码二进制1参数格式有误");
+//        }
+//
+//        String[] overCode = param.getOverCode().split(",");
+//        if (overCode.length != 2){
+//            return R.fail("结束码参数有误");
+//        }
         if (param.getId() != null) {
             param.setUpdateTime(DateUtils.getNowDate());
         }else {