44323
2023-10-24 9e8ce689c89c4b03bfc67a60d7da13a7d593725a
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TSiteController.java
@@ -40,6 +40,7 @@
import org.springframework.http.HttpRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.resource.HttpResource;
@@ -482,7 +483,7 @@
        JSONObject data = jsonObject.getJSONObject("data");
        String spaceId = data.getString("space_id");
//        Integer integer = Integer.valueOf(spaceId);
        if(StringUtils.hasLength( site.getIds())) {
        for (String s1 : site.getIds().split(",")) {
            HashMap<String, String> map1 = new HashMap<>();
            map1.put("sign","0DB011836143EEE2C2E072967C9F4E4B");
@@ -491,6 +492,7 @@
            map1.put("region_id",integer1+"");
            String s2 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map1);
            System.out.println("添加闸机:"+s2);
            }
        }
@@ -531,11 +533,13 @@
        String ids = byId.getIds();
        HashMap<String, String> map = new HashMap<>();
        map.put("sign","0DB011836143EEE2C2E072967C9F4E4B");
        if(StringUtils.hasLength(ids)) {
        for (String s : ids.split(",")) {
            String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/deleteDevice/ids/" + s,map);
            System.out.println(s1);
        }
        }
        if(StringUtils.hasLength( site.getIds())) {
        for (String s : site.getIds().split(",")) {
            HashMap<String, String> map1 = new HashMap<>();
            map1.put("sign","0DB011836143EEE2C2E072967C9F4E4B");
@@ -546,6 +550,7 @@
            String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map1);
            System.out.println(s1);
        }
        }