|
|
|
@ -126,27 +126,27 @@ public class CashRefundController { |
|
|
|
return Result.error("页大小为空!"); |
|
|
|
} |
|
|
|
|
|
|
|
// 获取传入的市场列表 |
|
|
|
List<String> requestedMarkets = page.getCashRecordDTO() != null ? page.getCashRecordDTO().getMarkets() : null; |
|
|
|
|
|
|
|
// 权限校验逻辑 |
|
|
|
if (markets.contains("9") || markets.contains("9999")) { |
|
|
|
// 特权市场:9 或 9999,跳过权限校验,直接放行传入的 markets |
|
|
|
// 如果业务需要,也可以在这里做空值处理 |
|
|
|
if (page.getCashRecordDTO() != null) { |
|
|
|
// 保持 requestedMarkets 不变,原样接受 |
|
|
|
// 可选:如果 requestedMarkets 为 null,可设为默认值或保持 null |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 普通用户:必须校验权限 |
|
|
|
if (requestedMarkets == null || requestedMarkets.isEmpty()) { |
|
|
|
page.getCashRecordDTO().setMarkets(markets); |
|
|
|
} |
|
|
|
if (!markets.containsAll(requestedMarkets)) { |
|
|
|
return Result.error("无权限!请求的市场不在授权范围内。"); |
|
|
|
} |
|
|
|
// 校验通过,保持 requestedMarkets 不变 |
|
|
|
} |
|
|
|
//// 获取传入的市场列表 |
|
|
|
// List<String> requestedMarkets = page.getCashRecordDTO() != null ? page.getCashRecordDTO().getMarkets() : null; |
|
|
|
// |
|
|
|
//// 权限校验逻辑 |
|
|
|
// if (markets.contains("9") || markets.contains("9999")) { |
|
|
|
// // 特权市场:9 或 9999,跳过权限校验,直接放行传入的 markets |
|
|
|
// // 如果业务需要,也可以在这里做空值处理 |
|
|
|
// if (page.getCashRecordDTO() != null) { |
|
|
|
// // 保持 requestedMarkets 不变,原样接受 |
|
|
|
// // 可选:如果 requestedMarkets 为 null,可设为默认值或保持 null |
|
|
|
// } |
|
|
|
// } else { |
|
|
|
// // 普通用户:必须校验权限 |
|
|
|
// if (requestedMarkets == null || requestedMarkets.isEmpty()) { |
|
|
|
// page.getCashRecordDTO().setMarkets(markets); |
|
|
|
// } |
|
|
|
// if (!markets.containsAll(requestedMarkets)) { |
|
|
|
// return Result.error("无权限!请求的市场不在授权范围内。"); |
|
|
|
// } |
|
|
|
// // 校验通过,保持 requestedMarkets 不变 |
|
|
|
// } |
|
|
|
return Result.success(refundService.exSelect(page.getPageNum(), page.getPageSize(), page.getCashRecordDTO())); |
|
|
|
} |
|
|
|
/** |
|
|
|
|