统一前后端代码格式化配置

This commit is contained in:
yml2213
2026-08-16 17:27:12 +08:00
parent 8705f6a6a1
commit 5c7c3e14e3
278 changed files with 6386 additions and 5500 deletions
@@ -57,7 +57,8 @@ router.post(
successMessage: '售后单列表已查询',
errorMessage: '查询快手售后单列表失败',
scope: '[admin/kuaishou-industry/refunds/list]',
audit: (req, data) => buildKuaishouIndustryAudit('kuaishou_industry_refund_list', req.body, data),
audit: (req, data) =>
buildKuaishouIndustryAudit('kuaishou_industry_refund_list', req.body, data),
},
),
)
@@ -72,7 +73,8 @@ router.post(
successMessage: '同意退款接口已执行',
errorMessage: '执行同意退款失败',
scope: '[admin/kuaishou-industry/refunds/approve]',
audit: (req, data) => buildKuaishouIndustryAudit('kuaishou_industry_refund_approve', req.body, data),
audit: (req, data) =>
buildKuaishouIndustryAudit('kuaishou_industry_refund_approve', req.body, data),
},
),
)
@@ -87,7 +89,8 @@ router.post(
successMessage: '不同意退款接口已执行',
errorMessage: '执行不同意退款失败',
scope: '[admin/kuaishou-industry/refunds/disagree]',
audit: (req, data) => buildKuaishouIndustryAudit('kuaishou_industry_refund_disagree', req.body, data),
audit: (req, data) =>
buildKuaishouIndustryAudit('kuaishou_industry_refund_disagree', req.body, data),
},
),
)
@@ -104,7 +107,8 @@ router.post(
successMessage: '电子凭证有效性已检查',
errorMessage: '检查电子凭证有效性失败',
scope: '[admin/kuaishou-industry/vouchers/check-available]',
audit: (req, data) => buildKuaishouIndustryAudit('kuaishou_industry_voucher_check_available', req.body, data),
audit: (req, data) =>
buildKuaishouIndustryAudit('kuaishou_industry_voucher_check_available', req.body, data),
},
),
)
@@ -119,7 +123,8 @@ router.post(
successMessage: '电子凭证冲正回调已执行',
errorMessage: '执行电子凭证冲正失败',
scope: '[admin/kuaishou-industry/vouchers/reverse]',
audit: (req, data) => buildKuaishouIndustryAudit('kuaishou_industry_voucher_reverse', req.body, data),
audit: (req, data) =>
buildKuaishouIndustryAudit('kuaishou_industry_voucher_reverse', req.body, data),
},
),
)
@@ -136,7 +141,8 @@ router.post(
successMessage: '电子凭证已手动核销',
errorMessage: '手动核销电子凭证失败',
scope: '[admin/kuaishou-industry/vouchers/consume]',
audit: (req, data) => buildKuaishouIndustryAudit('kuaishou_industry_voucher_consume', req.body, data),
audit: (req, data) =>
buildKuaishouIndustryAudit('kuaishou_industry_voucher_consume', req.body, data),
},
),
)
@@ -153,7 +159,8 @@ router.post(
successMessage: '电子凭证发码回调已重发',
errorMessage: '重发电子凭证发码回调失败',
scope: '[admin/kuaishou-industry/vouchers/resend-code]',
audit: (req, data) => buildKuaishouIndustryAudit('kuaishou_industry_voucher_resend_code', req.body, data),
audit: (req, data) =>
buildKuaishouIndustryAudit('kuaishou_industry_voucher_resend_code', req.body, data),
},
),
)
@@ -170,14 +177,15 @@ router.post(
successMessage: '电子凭证已手动销毁',
errorMessage: '手动销毁电子凭证失败',
scope: '[admin/kuaishou-industry/vouchers/destroy]',
audit: (req, data) => buildKuaishouIndustryAudit('kuaishou_industry_voucher_destroy', req.body, data),
audit: (req, data) =>
buildKuaishouIndustryAudit('kuaishou_industry_voucher_destroy', req.body, data),
},
),
)
function buildKuaishouIndustryAudit(action: string, body: unknown, data: unknown) {
const payload = body && typeof body === 'object' ? body as Record<string, unknown> : {}
const result = data && typeof data === 'object' ? data as Record<string, unknown> : {}
const payload = body && typeof body === 'object' ? (body as Record<string, unknown>) : {}
const result = data && typeof data === 'object' ? (data as Record<string, unknown>) : {}
return {
action,