This commit is contained in:
张成
2026-03-24 16:07:02 +08:00
commit aa8eaa6ccd
121 changed files with 34042 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
const crud = require("../service/biz_admin_crud");
const { getRequestBody } = crud;
module.exports = {
"POST /biz_usage/page": async (ctx) => {
const body = getRequestBody(ctx);
const data = await crud.page("biz_usage_monthly", body);
ctx.success({ rows: data.rows, count: data.count });
},
"POST /biz_usage/add": async (ctx) => {
const body = getRequestBody(ctx);
const row = await crud.add("biz_usage_monthly", body);
ctx.success(row);
},
"POST /biz_usage/edit": async (ctx) => {
const body = getRequestBody(ctx);
await crud.edit("biz_usage_monthly", body);
ctx.success({});
},
"POST /biz_usage/del": async (ctx) => {
const body = getRequestBody(ctx);
await crud.del("biz_usage_monthly", body);
ctx.success({});
},
"GET /biz_usage/detail": async (ctx) => {
const q = ctx.query || {};
const row = await crud.detail("biz_usage_monthly", { id: q.id || q.ID });
ctx.success(row);
},
"POST /biz_usage/export": async (ctx) => {
const body = getRequestBody(ctx);
const res = await crud.exportCsv("biz_usage_monthly", body);
ctx.success(res);
},
};