2026-04-10 05:33:17 +00:00
|
|
|
import http from "@/api/http";
|
2026-05-27 05:35:50 +00:00
|
|
|
import type {
|
|
|
|
|
BusinessCalendarSyncResult,
|
|
|
|
|
BusinessCalendarStatus,
|
|
|
|
|
ReportReminderConfig,
|
|
|
|
|
ReportReminderTestPayload,
|
|
|
|
|
WecomAppConfig,
|
|
|
|
|
WecomConfigStatus
|
|
|
|
|
} from "./types";
|
2026-04-10 05:33:17 +00:00
|
|
|
|
|
|
|
|
export async function getWecomAppConfig(tenantId?: number) {
|
|
|
|
|
const resp = await http.get("/sys/api/admin/wecom-app-config", { params: { tenantId } });
|
|
|
|
|
return resp.data.data as WecomAppConfig;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function updateWecomAppConfig(payload: WecomAppConfig) {
|
|
|
|
|
const resp = await http.put("/sys/api/admin/wecom-app-config", payload);
|
|
|
|
|
return resp.data.data as boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getReportReminderConfig(tenantId?: number) {
|
|
|
|
|
const resp = await http.get("/sys/api/admin/report-reminder-config", { params: { tenantId } });
|
|
|
|
|
return resp.data.data as ReportReminderConfig;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function updateReportReminderConfig(payload: ReportReminderConfig) {
|
|
|
|
|
const resp = await http.put("/sys/api/admin/report-reminder-config", payload);
|
|
|
|
|
return resp.data.data as boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function testReportReminderConfig(payload: ReportReminderTestPayload) {
|
|
|
|
|
const resp = await http.post("/sys/api/admin/report-reminder-config/test", payload);
|
|
|
|
|
return resp.data.data as boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function getWecomConfigStatus(tenantId?: number) {
|
|
|
|
|
const resp = await http.get("/sys/api/admin/wecom-config-status", { params: { tenantId } });
|
|
|
|
|
return resp.data.data as WecomConfigStatus;
|
|
|
|
|
}
|
2026-05-27 05:35:50 +00:00
|
|
|
|
|
|
|
|
export async function getReportReminderCalendarStatus(tenantId?: number) {
|
|
|
|
|
const resp = await http.get("/sys/api/admin/report-reminder-calendar-status", { params: { tenantId } });
|
|
|
|
|
return resp.data.data as BusinessCalendarStatus;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function syncReportReminderCalendar(tenantId?: number) {
|
|
|
|
|
const resp = await http.post("/sys/api/admin/report-reminder-calendar/sync-current-year", null, { params: { tenantId } });
|
|
|
|
|
return resp.data.data as BusinessCalendarSyncResult;
|
|
|
|
|
}
|