mirror of
https://gitee.com/pnoker/iot-dc3.git
synced 2026-09-19 10:11:36 +08:00
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:
co-authored by
Claude Opus 4.7
parent
b9cc63165e
commit
87c6a22c6b
+2
-2
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user