```
feat(split): 添加批量查询手动分账覆盖和变更历史功能 - 新增 SplitManualService::orderIdsWithOverride 方法用于批量查询存在手动覆盖的订单 - 新增 SplitManualService::orderIdsWithLog 方法用于批量查询存在变更历史的订单 - 在订单列表页面优化性能,批量查询订单的手动覆盖和变更历史状态 - 添加 can_view_manual_history 权限控制,允许成功/失败后查看变更历史 - 更新前端界面显示逻辑,优化变更历史查看权限判断 - 增强操作提示文案,说明变更历史查看功能 ```
这个提交包含在:
@@ -26,6 +26,34 @@ class SplitManualService
|
||||
return (bool) SplitManual::where('order_id', intval($orderId))->find();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量:存在手动覆盖的 order_id
|
||||
* @param int[] $orderIds
|
||||
* @return int[]
|
||||
*/
|
||||
public function orderIdsWithOverride(array $orderIds)
|
||||
{
|
||||
$orderIds = array_values(array_unique(array_filter(array_map('intval', $orderIds))));
|
||||
if (!$orderIds) {
|
||||
return [];
|
||||
}
|
||||
return array_map('intval', SplitManual::where('order_id', 'in', $orderIds)->column('order_id'));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量:存在变更历史的 order_id
|
||||
* @param int[] $orderIds
|
||||
* @return int[]
|
||||
*/
|
||||
public function orderIdsWithLog(array $orderIds)
|
||||
{
|
||||
$orderIds = array_values(array_unique(array_filter(array_map('intval', $orderIds))));
|
||||
if (!$orderIds) {
|
||||
return [];
|
||||
}
|
||||
return array_map('intval', SplitManualLog::where('order_id', 'in', $orderIds)->group('order_id')->column('order_id'));
|
||||
}
|
||||
|
||||
/**
|
||||
* 供 SplitCalculator 使用的明细
|
||||
* @return array
|
||||
|
||||
在新工单中引用
屏蔽一个用户