fix(manager): rename DeviceController.listByDriverId to getCountByDriverId

The endpoint at /list_by_driver_id returned a single count value
(R<String>), not a list, so the verb mismatched the contents. Rename
both the Java method and the HTTP path:

  /list_by_driver_id  -> /get_count_by_driver_id
  listByDriverId(...) -> getCountByDriverId(...)

The deviceService.listByDriverId(driverId) call inside the body still
returns a List<DeviceBO> and is correctly named; only the count is
returned to the caller.

Frontend caller getDeviceCountByDriverId already targets the new path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Copilot
2026-05-18 20:12:26 +08:00
co-authored by Claude Opus 4.7
parent b9cc63165e
commit 87c6a22c6b
@@ -241,8 +241,8 @@ public class DeviceController implements BaseController {
* @param driverId
* @return
*/
@GetMapping("/list_by_driver_id")
public Mono<R<String>> listByDriverId(@NotNull @RequestParam(value = "driver_id") Long driverId) {
@GetMapping("/get_count_by_driver_id")
public Mono<R<String>> getCountByDriverId(@NotNull @RequestParam(value = "driver_id") Long driverId) {
return getTenantId().flatMap(tenantId -> async(() -> {
requireTenant(tenantId, driverService.getById(driverId));
List<DeviceBO> deviceBOList = filterTenant(tenantId, deviceService.listByDriverId(driverId));