支持后台修改打手提现信息
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
getAdminWorkOrderEvents,
|
||||
getAdminWorkOrderSharing,
|
||||
listAdminWorkerFinanceRequests,
|
||||
listAdminWorkerWithdrawalAccounts,
|
||||
listAdminWorkCategories,
|
||||
listAdminWorkProductRules,
|
||||
listAdminWorkerLevels,
|
||||
@@ -30,6 +31,7 @@ import {
|
||||
resolveAdminProblemWorkOrder,
|
||||
reviewAdminWorkerUser,
|
||||
saveAdminWorkerFinanceConfig,
|
||||
saveAdminWorkerWithdrawalAccount,
|
||||
saveAdminWorkCategory,
|
||||
saveAdminWorkProductRule,
|
||||
saveAdminWorkerLevel,
|
||||
@@ -227,6 +229,40 @@ router.post(
|
||||
),
|
||||
)
|
||||
|
||||
router.get(
|
||||
'/worker-platform/workers/:workerId/withdrawal-accounts',
|
||||
requireAdminRoles(['admin', 'operator']),
|
||||
createJsonHandler((req) => listAdminWorkerWithdrawalAccounts(String(req.params.workerId || '')), {
|
||||
successMessage: 'ok',
|
||||
errorMessage: '读取打手提现信息失败',
|
||||
scope: '[admin/worker-platform/workers/:workerId/withdrawal-accounts]',
|
||||
}),
|
||||
)
|
||||
|
||||
router.post(
|
||||
'/worker-platform/workers/:workerId/withdrawal-accounts/:accountChannel',
|
||||
requireAdminRoles(['admin', 'operator']),
|
||||
createJsonHandler(
|
||||
(req) =>
|
||||
saveAdminWorkerWithdrawalAccount(
|
||||
String(req.params.workerId || ''),
|
||||
String(req.params.accountChannel || ''),
|
||||
req.body || {},
|
||||
),
|
||||
{
|
||||
successMessage: '打手提现信息已保存',
|
||||
errorMessage: '保存打手提现信息失败',
|
||||
scope: '[admin/worker-platform/workers/:workerId/withdrawal-accounts/:accountChannel]',
|
||||
audit: (req) => ({
|
||||
action: 'worker_withdrawal_account_saved',
|
||||
targetType: 'worker',
|
||||
targetId: String(req.params.workerId || ''),
|
||||
data: { accountChannel: String(req.params.accountChannel || '') },
|
||||
}),
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
router.get(
|
||||
'/worker-platform/finance-config',
|
||||
requireAdminRoles(['admin', 'operator', 'support']),
|
||||
|
||||
Reference in New Issue
Block a user