2026-10-09 17:36:24 +08:00
|
|
|
package com.baiyue.lastleg.controller;
|
|
|
|
|
|
|
|
|
|
import com.baiyue.common.core.api.ApiResponse;
|
|
|
|
|
import com.baiyue.lastleg.dto.CustomerOrderProgress;
|
|
|
|
|
import com.baiyue.lastleg.security.InternalServiceTokenGuard;
|
|
|
|
|
import com.baiyue.lastleg.service.CustomerOrderProgressService;
|
|
|
|
|
import jakarta.validation.Valid;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("/internal/lastleg/v1/customer-order-progress")
|
|
|
|
|
public class InternalCustomerOrderProgressController {
|
|
|
|
|
private final InternalServiceTokenGuard guard;
|
|
|
|
|
private final CustomerOrderProgressService service;
|
|
|
|
|
public InternalCustomerOrderProgressController(InternalServiceTokenGuard guard, CustomerOrderProgressService service) {
|
|
|
|
|
this.guard = guard; this.service = service;
|
|
|
|
|
}
|
|
|
|
|
@PostMapping
|
|
|
|
|
public ApiResponse<CustomerOrderProgress.Response> read(
|
|
|
|
|
@RequestHeader(value="X-Internal-Service-Token", required=false) String token,
|
|
|
|
|
@Valid @RequestBody CustomerOrderProgress.Request request) {
|
|
|
|
|
guard.verify(token);
|
2026-10-15 19:46:34 +08:00
|
|
|
return ApiResponse.success(service.read(request.customerId(), request.orderIds()));
|
2026-10-09 17:36:24 +08:00
|
|
|
}
|
|
|
|
|
}
|