运营区边缘计算:基础支持
This commit is contained in:
parent
8385b592f8
commit
a3bcb04f5b
@ -278,4 +278,16 @@ public class EbikeRegionController {
|
|||||||
FeignEbikeRegionVo region = ebikeRegionService.getRegionByLocation(location, radius);
|
FeignEbikeRegionVo region = ebikeRegionService.getRegionByLocation(location, radius);
|
||||||
return JsonResult.success(region);
|
return JsonResult.success(region);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据SN编号查询运营区
|
||||||
|
*
|
||||||
|
* @param ecuSn 车辆编号
|
||||||
|
* @return 当前运营区信息
|
||||||
|
*/
|
||||||
|
@GetMapping("/api/getRegionByBikeCode")
|
||||||
|
public JsonResult<EbikeRegion> getRegionByEcuSn(@RequestParam("ecuSn") String ecuSn) {
|
||||||
|
EbikeRegion region = ebikeRegionService.getRegionByEcuSn(ecuSn);
|
||||||
|
return JsonResult.success(region);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,4 +46,11 @@ public interface EbikeRegionService extends IService<EbikeRegion> {
|
|||||||
* @return 运营区信息
|
* @return 运营区信息
|
||||||
*/
|
*/
|
||||||
FeignEbikeRegionVo getRegionByLocation(Point point,double radius);
|
FeignEbikeRegionVo getRegionByLocation(Point point,double radius);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据车辆编号查询运营区
|
||||||
|
* @param ecuSn 车辆编号
|
||||||
|
* @return 运营区信息
|
||||||
|
*/
|
||||||
|
EbikeRegion getRegionByEcuSn(String ecuSn);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,6 +31,7 @@ import static com.cdzy.operations.model.entity.table.EbikeOperationLockConfigTab
|
|||||||
import static com.cdzy.operations.model.entity.table.EbikeOperationReturnConfigTableDef.EBIKE_OPERATION_RETURN_CONFIG;
|
import static com.cdzy.operations.model.entity.table.EbikeOperationReturnConfigTableDef.EBIKE_OPERATION_RETURN_CONFIG;
|
||||||
import static com.cdzy.operations.model.entity.table.EbikeOperationUseConfigTableDef.EBIKE_OPERATION_USE_CONFIG;
|
import static com.cdzy.operations.model.entity.table.EbikeOperationUseConfigTableDef.EBIKE_OPERATION_USE_CONFIG;
|
||||||
import static com.cdzy.operations.model.entity.table.EbikeRegionTableDef.EBIKE_REGION;
|
import static com.cdzy.operations.model.entity.table.EbikeRegionTableDef.EBIKE_REGION;
|
||||||
|
import static com.cdzy.operations.model.entity.table.EbikeEcuInfoTableDef.EBIKE_ECU_INFO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 运营区域表 服务层实现。
|
* 运营区域表 服务层实现。
|
||||||
@ -163,4 +164,12 @@ public class EbikeRegionServiceImpl extends ServiceImpl<EbikeRegionMapper, Ebike
|
|||||||
}
|
}
|
||||||
return currentRegion;
|
return currentRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EbikeRegion getRegionByEcuSn(String ecuSn) {
|
||||||
|
QueryWrapper queryWrapper = QueryWrapper.create()
|
||||||
|
.where(EBIKE_ECU_INFO.ECU_SN.eq(ecuSn))
|
||||||
|
.leftJoin(EBIKE_ECU_INFO).on(EBIKE_ECU_INFO.OPERATOR_ID.eq(EBIKE_REGION.OPERATOR_ID));
|
||||||
|
return this.mapper.selectOneByQuery(queryWrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user