From f0f6bd6f7499d1fa737f705091337befb98f5112 Mon Sep 17 00:00:00 2001 From: liujie <liujie> Date: 星期四, 28 九月 2023 18:33:31 +0800 Subject: [PATCH] 后台 --- cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TSiteController.java | 43 +++++++++++++++++++++++++++++++++++++++---- 1 files changed, 39 insertions(+), 4 deletions(-) diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TSiteController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TSiteController.java index ecd68dc..c182871 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TSiteController.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TSiteController.java @@ -27,10 +27,12 @@ import com.dsh.guns.core.util.ToolUtil; import com.dsh.guns.modular.system.model.*; import com.dsh.guns.modular.system.service.*; +import com.dsh.guns.modular.system.util.HttpRequestUtil; import com.dsh.guns.modular.system.util.ResultUtil; import net.bytebuddy.asm.Advice; import org.aspectj.weaver.ast.Var; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpRequest; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; @@ -40,10 +42,7 @@ import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashSet; -import java.util.List; +import java.util.*; /** * 车辆管理控制器 @@ -394,8 +393,44 @@ site.setInsertTime(new Date()); site.setState(1); siteClient.addSite(site); + + HashMap<String, String> map = new HashMap<>(); + map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); + map.put("name",site.getName()); + map.put("short_name",site.getName()); + map.put("location",city); + map.put("address",store.getAddress()); + map.put("telephone",store.getPhone()); + map.put("linkman",""); + map.put("business_time","[{\"start_time\":\"00:00\",\"close_time\":\"23:59\"}]"); + map.put("logo",store.getCoverDrawing()); + 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); + return ResultUtil.success("添加成功"); } + + public static void main(String[] args) { + + HashMap<String, String> map = new HashMap<>(); + map.put("sign","0DB011836143EEE2C2E072967C9F4E4B"); + map.put("name","测试场地"); + map.put("short_name","测试场地"); + map.put("location","成都"); + map.put("address","成都地址"); + map.put("telephone","17888888888"); + map.put("linkman","成都"); + map.put("business_time","[{\"start_time\":\"00:00\",\"close_time\":\"23:59\"}]"); + map.put("logo","https://we-park-life.oss-cn-beijing.aliyuncs.com/img/f325d449f2634855ad1fb0cc796465e8.png"); + map.put("remark","场地介绍"); + map.put("lat","30.670124"); + map.put("lng","103.929497"); + String s = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addSpace", map); + System.out.println(s); + } + /** * 编辑场地管理 */ -- Gitblit v1.7.1