| | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.dao.UserInfoMapper; |
| | | import com.stylefeng.guns.modular.system.dao.UserMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class NewlyAddedController { |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | @Autowired |
| | | private IDriverService driverService; |
| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/newlyAdded/getShowModular") |
| | | @ApiOperation(value = "获取显示模块设置", tags = {"司机端-2.0新增"}, notes = "") |
| | | @ApiOperation(value = "获取显示模块设置(黔云通)", tags = {"司机端-2.0新增"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "当前经度", name = "lon", required = true, dataType = "String"), |
| | | @ApiImplicitParam(value = "当前纬度", name = "lon", required = true, dataType = "String"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<List<TbShowModular>> getShowModular(HttpServletRequest request){ |
| | | public ResultUtil<List<TbShowModular>> getShowModular(String lon, String lat, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = driverService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return ResultUtil.success(showModularService.selectList(null)); |
| | | OpenCity openCity = openCityService.openCity1(lon, lat); |
| | | return ResultUtil.success(showModularService.selectList(new EntityWrapper<TbShowModular>().eq("openCityId",openCity.getId()))); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |