1.优化管理员提现记录审核为一个操作

This commit is contained in:
2026-05-30 18:40:27 +08:00
parent 75e91fee13
commit d336831fad
3 changed files with 32 additions and 11 deletions

View File

@@ -59,19 +59,15 @@ class AdminWithdrawOrder extends Backend
->order($order)
->paginate($limit);
$list = $res->items();
foreach ($list as $idx => $item) {
$listArr = [];
foreach ($res->items() as $item) {
$row = is_array($item) ? $item : $item->toArray();
$canReview = $this->canReviewOrder($row) ? 1 : 0;
if (is_array($item)) {
$list[$idx]['can_review'] = $canReview;
} else {
$item->setAttr('can_review', $canReview);
}
$row['can_review'] = $this->canReviewOrder($row) ? 1 : 0;
$listArr[] = $row;
}
return $this->success('', [
'list' => $list,
'list' => $listArr,
'total' => $res->total(),
'remark' => get_route_remark(),
]);
@@ -229,6 +225,9 @@ class AdminWithdrawOrder extends Backend
if (!$this->auth) {
return false;
}
if ($this->auth->isSuperAdmin()) {
return true;
}
foreach ($this->buildPermissionRoutePaths('order/adminWithdrawOrder', 'review') as $routePath) {
if ($this->auth->check($routePath)) {
return true;