Pārlūkot izejas kodu

in方法传参改List

wanghaicheng 5 gadi atpakaļ
vecāks
revīzija
1b77ed405f

+ 5 - 3
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/controller/ScanRecordController.java

@@ -19,6 +19,8 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -60,13 +62,13 @@ public class ScanRecordController {
     //维保项list结构
     @PostMapping("maintenance/option/list")
     public RestResponse<?> listOptions(@RequestBody ScanRecordRequest request) {
-        String sort;
+        List<Integer> sort;
         switch (request.getLiftType()) {
             case 1:
-                sort = "1,2,3,4,5";
+                sort = new ArrayList<>(Arrays.asList(1, 2, 3, 4, 5));
                 break;
             case 2:
-                sort = "-1";
+                sort = new ArrayList<>(Arrays.asList(-1));
                 break;
             default:
                 sort = null;