This commit is contained in:
张成
2026-04-01 10:53:26 +08:00
parent c2205188d1
commit 03c5579c86
11 changed files with 211 additions and 580 deletions

View File

@@ -1,13 +1,13 @@
const crud = require("../service/biz_admin_crud");
const baseModel = require("../../middleware/baseModel");
const { find_page, find_for_export } = require("../service/biz_query_helpers");
const tokenLogic = require("../service/biz_token_logic");
const audit = require("../service/biz_audit_service");
module.exports = {
"POST /biz_token/page": async (ctx) => {
const body = ctx.getBody();
const data = await crud.page("biz_api_token", body);
ctx.success({ rows: data.rows, count: data.count });
const { count, rows } = await find_page(baseModel.biz_api_token, "biz_api_token", body);
ctx.success({ rows, count });
},
"POST /biz_token/create": async (ctx) => {
const body = ctx.getBody();
@@ -44,7 +44,7 @@ module.exports = {
},
"POST /biz_token/export": async (ctx) => {
const body = ctx.getBody();
const res = await crud.exportCsv("biz_api_token", body);
const res = await find_for_export(baseModel.biz_api_token, "biz_api_token", body);
ctx.success(res);
},
};