| | |
| | | import com.doumee.dao.dto.AreasDto; |
| | | import com.doumee.dao.dto.CalculateLocalPriceDTO; |
| | | import com.doumee.dao.dto.CalculateRemotePriceDTO; |
| | | import com.doumee.dao.dto.DriverCheckRadiusDTO; |
| | | import com.doumee.dao.dto.ShopCheckRadiusDTO; |
| | | import com.doumee.dao.dto.DirectionInfoDTO; |
| | | import com.doumee.dao.dto.SameCityCheckDTO; |
| | | import com.doumee.dao.vo.PriceCalculateVO; |
| | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private ShopInfoService shopInfoService; |
| | | |
| | | @Autowired |
| | | private DriverInfoService driverInfoService; |
| | | |
| | | @ApiOperation("初始化历史门店/司机变更版本数据") |
| | | @PostMapping("/initChangeVersions") |
| | | public ApiResponse<String> initChangeVersions() { |
| | | int shopCount = shopInfoService.initChangeVersions(); |
| | | int driverCount = driverInfoService.initChangeVersions(); |
| | | return ApiResponse.success("门店初始化 " + shopCount + " 条,司机初始化 " + driverCount + " 条"); |
| | | } |
| | | |
| | | @ApiOperation("全部区划树形查询") |
| | | @PostMapping("/treeList") |
| | |
| | | }) |
| | | public ApiResponse<Areas> getCityByName(@RequestParam String cityName) { |
| | | return ApiResponse.success("查询成功", areasService.getOpenedCityByName(cityName)); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据城市编码查询城市信息", notes = "仅返回已开通的城市,未开通返回空") |
| | | @GetMapping("/getCityByCode") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "code", value = "城市编码", required = true) |
| | | }) |
| | | public ApiResponse<Areas> getCityByCode(@RequestParam String code) { |
| | | return ApiResponse.success("查询成功", areasService.getOpenedCityByCode(code)); |
| | | } |
| | | |
| | | @LoginRequired |
| | |
| | | return ApiResponse.success("查询成功", appVersion); |
| | | } |
| | | |
| | | @LoginShopRequired |
| | | @ApiOperation(value = "门店校验操作半径", notes = "校验门店操作人当前位置是否在目标点允许操作半径内") |
| | | @PostMapping("/checkShopOperationRadius") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) |
| | | }) |
| | | public ApiResponse<Boolean> checkShopOperationRadius(@RequestBody @Valid ShopCheckRadiusDTO dto) { |
| | | Boolean result = ordersService.checkOperationRadius(dto.getOrderId(), this.getShopId(), Constants.ZERO, dto.getLng(), dto.getLat()); |
| | | return ApiResponse.success("操作成功", result); |
| | | } |
| | | |
| | | @LoginDriverRequired |
| | | @ApiOperation(value = "司机校验操作半径", notes = "校验司机当前位置是否在目标点允许操作半径内") |
| | | @PostMapping("/checkDriverOperationRadius") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) |
| | | }) |
| | | public ApiResponse<Boolean> checkDriverOperationRadius(@RequestBody @Valid DriverCheckRadiusDTO dto) { |
| | | Boolean result = ordersService.checkOperationRadius(dto.getOrderId(), this.getDriverId(), Constants.ONE, dto.getLng(), dto.getLat()); |
| | | return ApiResponse.success("操作成功", result); |
| | | } |
| | | |
| | | } |