nickchange
2023-10-16 ea2e322e4564a177b49ad38fda2d42780632ea0d
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TSiteController.java
@@ -2,6 +2,7 @@
import java.math.BigDecimal;
import cn.hutool.crypto.SecureUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -421,7 +422,19 @@
        map.put("remark",site.getIntroduce());
        map.put("lat",store.getLat());
        map.put("lng",store.getLon());
        HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpace", map);
        // 添加门禁
        String s = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpace", map);
        JSONObject jsonObject = JSONObject.parseObject(s);
        JSONObject data = jsonObject.getJSONObject("data");
        String spaceId = data.getString("space_id");
        Integer integer = Integer.valueOf(spaceId);
        HashMap<String, String> map1 = new HashMap<>();
        map1.put("sign","0DB011836143EEE2C2E072967C9F4E4B");
        map1.put("space_id",integer+"");
        map1.put("device_id",site.getIds()+"");
        map1.put("region_id","");
        String s1 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map1);
        return ResultUtil.success("添加成功");
    }
@@ -453,6 +466,8 @@
        site.setInsertTime(new Date());
        site.setState(1);
        siteClient.addSite(site);
        Integer id = site.getId();
        return ResultUtil.success();
    }
    /**