This commit is contained in:
2026-08-21 11:43:03 +08:00
parent dceec6cbed
commit 5fd00d3151
25 changed files with 507 additions and 44 deletions
@@ -99,7 +99,8 @@ public class PlatformWarehouseController {
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "403", description = "Platform access required / 需要平台端权限")
})
@GetMapping
@PreAuthorize("hasAuthority('" + OverseasWarehousePermissions.WAREHOUSE_LIST + "')")
@PreAuthorize("hasAnyAuthority('" + OverseasWarehousePermissions.WAREHOUSE_LIST + "', '"
+ OverseasWarehousePermissions.PALLET_LIST + "', '" + OverseasWarehousePermissions.LOCATION_LIST + "')")
public ApiResponse<PageResult<WarehouseEntity>> page(
@AuthenticationPrincipal AuthenticatedUser user,
@Valid WarehouseRequests.QueryRequest request) {
@@ -22,8 +22,14 @@ public final class PalletRequests {
@NotNull @DecimalMin("0.00") BigDecimal unitPrice,
@NotBlank String status,
Long locationId,
@Size(max = 500) String remark
@Size(max = 500) String remark,
@Size(max = 128) String fbaWarehouseCode
) {
public SaveRequest(String palletCode, String palletType, BigDecimal capacityCbm,
BigDecimal unitPrice, String status, Long locationId, String remark) {
this(palletCode, palletType, capacityCbm, unitPrice, status, locationId, remark, null);
}
public SaveRequest {
if (capacityCbm == null) capacityCbm = DEFAULT_CAPACITY;
}
@@ -24,4 +24,5 @@ public class WarehousePalletEntity extends BaseEntity {
private BigDecimal unitPrice;
private String status;
private String remark;
private String fbaWarehouseCode;
}
@@ -276,6 +276,7 @@ public class WarehouseResourceService {
entity.setUnitPrice(request.unitPrice());
entity.setStatus(request.status());
entity.setRemark(request.remark());
entity.setFbaWarehouseCode(request.fbaWarehouseCode());
return entity;
}