fix: 接口变更/请求方法为大写

This commit is contained in:
TsMask
2025-02-20 10:42:34 +08:00
parent 8bfa73a67a
commit 7322759545
83 changed files with 568 additions and 1388 deletions

View File

@@ -46,7 +46,7 @@ export async function listgoldData(query: Record<string, any>) {
// 发起请求
const result = await request({
url: `/api/rest/databaseManagement/v1/select/omc_db/gold_kpi`,
method: 'get',
method: 'GET',
params: {
totalSQL: totalSQL + querySQL,
rowsSQL: rowsSQL + querySQL + sortSql + limtSql,
@@ -56,9 +56,8 @@ export async function listgoldData(query: Record<string, any>) {
// 解析数据
if (result.code === RESULT_CODE_SUCCESS) {
const data: DataList = {
total: 0,
rows: [],
const data = {
data: { total: 0, rows: [] as any },
code: result.code,
msg: result.msg,
};
@@ -66,9 +65,9 @@ export async function listgoldData(query: Record<string, any>) {
const itemData = item['gold_kpi'];
if (Array.isArray(itemData)) {
if (itemData.length === 1 && itemData[0]['total'] >= 0) {
data.total = itemData[0]['total'];
data.data.total = itemData[0]['total'];
} else {
data.rows = itemData.map(v => parseObjLineToHump(v));
data.data.rows = itemData.map(v => parseObjLineToHump(v));
}
}
});
@@ -85,7 +84,7 @@ export async function listgoldData(query: Record<string, any>) {
export async function listKPIData(query: Record<string, any>) {
const result = await request({
url: `/neData/kpi/data`,
method: 'get',
method: 'GET',
params: query,
timeout: 60_000,
});
@@ -102,7 +101,7 @@ export async function getKPITitle(neType: string) {
// 发起请求
const result = await request({
url: `/neData/kpi/title`,
method: 'get',
method: 'GET',
params: { neType },
});
// 解析数据//
@@ -125,7 +124,7 @@ export async function listUPFData(timeArr: any) {
// 获取参数规则
request({
url: `/api/rest/databaseManagement/v1/select/omc_db/gold_kpi`,
method: 'get',
method: 'GET',
params: {
SQL: `SELECT gold_kpi.*,kpi_title.en_title FROM gold_kpi LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id where 1=1 and gold_kpi.kpi_id ='UPF.03' AND timestamp BETWEEN DATE_SUB(NOW(), INTERVAL 10 MINUTE) AND NOW()`,
},
@@ -134,7 +133,7 @@ export async function listUPFData(timeArr: any) {
// 获取对应信息
request({
url: `/api/rest/databaseManagement/v1/select/omc_db/gold_kpi`,
method: 'get',
method: 'GET',
params: {
SQL: `SELECT gold_kpi.*,kpi_title.en_title FROM gold_kpi LEFT JOIN kpi_title on gold_kpi.kpi_id=kpi_title.kpi_id where 1=1 and gold_kpi.kpi_id ='UPF.06' AND timestamp BETWEEN DATE_SUB(NOW(), INTERVAL 10 MINUTE) AND NOW()`,
},