| | |
| | | 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 groovyjarjarpicocli.CommandLine; |
| | | 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.*; |
| | |
| | | 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.*; |
| | | |
| | | /** |
| | | * 车辆管理控制器 |
| | |
| | | private SiteLockClient siteLockClient; |
| | | |
| | | |
| | | /** |
| | | * 选择市 返回场地列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/getSiteByCity") |
| | | public List<TSite> getSiteByCity(String oneId) { |
| | | if (oneId.equals("")){ |
| | | return siteService.list(new QueryWrapper<TSite>()); |
| | | } |
| | | return siteService.list(new QueryWrapper<TSite>().eq("cityCode",oneId)); |
| | | } |
| | | /** |
| | | * 跳转到场地管理首页 |
| | | */ |
| | |
| | | Region name = regionService.getOne(new QueryWrapper<Region>().eq("name", province)); |
| | | return regionService.list(new QueryWrapper<Region>().eq("parent_id", name.getId())); |
| | | } |
| | | |
| | | /** |
| | | * 添加场地管理 |
| | | */ |
| | |
| | | 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("添加成功"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑场地管理 |
| | | */ |