This commit is contained in:
张成
2026-04-01 10:13:22 +08:00
parent 14f5d75d9d
commit 494555a6e1
11 changed files with 52 additions and 90 deletions

View File

@@ -1,19 +1,11 @@
const logic = require("../service/biz_subscription_logic");
const audit = require("../service/biz_audit_service");
function getRequestBody(ctx) {
if (ctx.request && ctx.request.body && Object.keys(ctx.request.body).length > 0) {
return ctx.request.body;
}
if (typeof ctx.getBody === "function") {
return ctx.getBody() || {};
}
return {};
}
module.exports = {
"POST /biz_payment/confirm-offline": async (ctx) => {
const body = getRequestBody(ctx);
const body = ctx.getBody();
const row = await logic.confirmOfflinePayment(body);
await audit.logAudit({
admin_user_id: audit.pickAdminId(ctx),
@@ -25,7 +17,7 @@ module.exports = {
ctx.success(row);
},
"POST /biz_payment/confirm-link": async (ctx) => {
const body = getRequestBody(ctx);
const body = ctx.getBody();
const row = await logic.confirmLinkPayment(body);
await audit.logAudit({
admin_user_id: audit.pickAdminId(ctx),