| | |
| | | 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; |
| | |
| | | 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("添加成功"); |
| | | } |
| | |
| | | site.setInsertTime(new Date()); |
| | | site.setState(1); |
| | | siteClient.addSite(site); |
| | | Integer id = site.getId(); |
| | | |
| | | return ResultUtil.success(); |
| | | } |
| | | /** |