1.2
luo
2024-01-02 372713d9d50c73871d51fd98b655d8bd9e24df46
guns-management/src/main/java/com/stylefeng/guns/modular/code/controller/UserController.java
@@ -1,5 +1,7 @@
package com.stylefeng.guns.modular.code.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
@@ -17,6 +19,7 @@
import com.stylefeng.guns.core.shiro.ShiroKit;
import com.stylefeng.guns.core.shiro.ShiroUser;
import com.stylefeng.guns.core.support.HttpKit;
import com.stylefeng.guns.core.util.HttpUtils;
import com.stylefeng.guns.core.util.JwtTokenUtil;
import com.stylefeng.guns.core.util.ToolUtil;
import com.stylefeng.guns.modular.system.dao.UserMapper;
@@ -88,6 +91,23 @@
//    @ApiOperation(value = "拿token", tags = {"登录"})
    /**
     *地图查询
     */
    @ResponseBody
    @ApiOperation(value = "地图查询", tags = {"地图查询"})
    @GetMapping("/base/appUser/queryMap")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "位置", required = true)
    })
    public ResultUtil queryMap(String name)
    {
        String url ="https://apis.map.qq.com/ws/place/v1/suggestion/?keyword="+name+"&key=AAIBZ-NO7AQ-RKQ5G-2YSBL-3MEJH-VTFH4";
        String result = HttpUtils.sendGet(url);
        JSONArray data = JSONObject.parseObject(result).getJSONArray("data");
        return ResultUtil.success(data);
    }
    @ResponseBody
    @GetMapping("/base/region/getDistrict")
    @ApiOperation(value = "获取区域数据", tags = {"区域下拉框"})