refactor(api): api code style

pull/1/MERGE
xingyu 2023-03-22 23:17:05 +08:00
parent f822c5ddaa
commit 0216cce5c2
68 changed files with 415 additions and 415 deletions

View File

@ -14,36 +14,36 @@ enum Api {
} }
// 刷新访问令牌 // 刷新访问令牌
export const refreshToken = () => { export function refreshToken() {
return defHttp.post({ url: Api.RefreshToken + getRefreshToken() }) return defHttp.post({ url: Api.RefreshToken + getRefreshToken() })
} }
// 使用租户名,获得租户编号 // 使用租户名,获得租户编号
export const getTenantIdByName = (name: string) => { export function getTenantIdByName(name: string) {
return defHttp.get<TentantNameVO>({ url: Api.GetTenantIdByName + name }) return defHttp.get<TentantNameVO>({ url: Api.GetTenantIdByName + name })
} }
// 登出 // 登出
export const loginOut = () => { export function loginOut() {
return defHttp.delete({ url: Api.LoginOut }) return defHttp.delete({ url: Api.LoginOut })
} }
// 获取用户权限信息 // 获取用户权限信息
export const getUserInfo = () => { export function getUserInfo() {
return defHttp.get({ url: Api.GetUserInfo }) return defHttp.get({ url: Api.GetUserInfo })
} }
// 路由 // 路由
export const getAsyncRoutes = () => { export function getAsyncRoutes() {
return defHttp.get({ url: Api.GetAsyncRoutes }) return defHttp.get({ url: Api.GetAsyncRoutes })
} }
// 获取验证图片 以及token // 获取验证图片 以及token
export const getCaptcha = (data) => { export function getCaptcha(data) {
return defHttp.post({ url: Api.GetCaptcha, data }, { isReturnNativeResponse: true }) return defHttp.post({ url: Api.GetCaptcha, data }, { isReturnNativeResponse: true })
} }
// 滑动或者点选验证 // 滑动或者点选验证
export const checkCaptcha = (data) => { export function checkCaptcha(data) {
return defHttp.post({ url: Api.CheckCaptcha, data }, { isReturnNativeResponse: true }) return defHttp.post({ url: Api.CheckCaptcha, data }, { isReturnNativeResponse: true })
} }

View File

@ -9,6 +9,6 @@ enum Api {
* @description: Get user menu based on id * @description: Get user menu based on id
*/ */
export const getMenuList = () => { export function getMenuList() {
return defHttp.get<getMenuListResultModel>({ url: Api.GetMenuList }) return defHttp.get<getMenuListResultModel>({ url: Api.GetMenuList })
} }

View File

@ -75,7 +75,7 @@ export function updateUserProfileApi(data: UserProfileUpdateReqVO) {
} }
// 用户密码重置 // 用户密码重置
export const updateUserPwdApi = (oldPassword: string, newPassword: string) => { export function updateUserPwdApi(oldPassword: string, newPassword: string) {
return defHttp.put({ return defHttp.put({
url: Api.updateUserPwdApi, url: Api.updateUserPwdApi,
data: { data: {
@ -86,7 +86,7 @@ export const updateUserPwdApi = (oldPassword: string, newPassword: string) => {
} }
// 用户头像上传 // 用户头像上传
export const uploadAvatarApi = (data) => { export function uploadAvatarApi(data) {
const params: UploadFileParams = { const params: UploadFileParams = {
file: data file: data
} }
@ -94,7 +94,7 @@ export const uploadAvatarApi = (data) => {
} }
// 社交绑定,使用 code 授权码 // 社交绑定,使用 code 授权码
export const socialBind = (type, code, state) => { export function socialBind(type, code, state) {
return defHttp.post({ return defHttp.post({
url: Api.socialBindApi, url: Api.socialBindApi,
data: { data: {
@ -106,7 +106,7 @@ export const socialBind = (type, code, state) => {
} }
// 取消社交绑定 // 取消社交绑定
export const socialUnbind = (type, openid) => { export function socialUnbind(type, openid) {
return defHttp.delete({ return defHttp.delete({
url: Api.socialUnbindApi, url: Api.socialUnbindApi,
data: { data: {
@ -117,7 +117,7 @@ export const socialUnbind = (type, openid) => {
} }
// 社交授权的跳转 // 社交授权的跳转
export const socialAuthRedirect = (type, redirectUri) => { export function socialAuthRedirect(type, redirectUri) {
return defHttp.get({ return defHttp.get({
url: '/system/auth/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri url: '/system/auth/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri
}) })

View File

@ -1,32 +1,41 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
import { FormVO } from './types'
export type FormVO = {
id: number
name: string
conf: string
fields: string[]
status: number
remark: string
createTime: string
}
// 创建工作流的表单定义 // 创建工作流的表单定义
export const createFormApi = (data: FormVO) => { export function createForm(data: FormVO) {
return defHttp.post({ url: '/bpm/form/create', data }) return defHttp.post({ url: '/bpm/form/create', data })
} }
// 更新工作流的表单定义 // 更新工作流的表单定义
export const updateFormApi = (data: FormVO) => { export function updateForm(data: FormVO) {
return defHttp.put({ url: '/bpm/form/update', data }) return defHttp.put({ url: '/bpm/form/update', data })
} }
// 删除工作流的表单定义 // 删除工作流的表单定义
export const deleteFormApi = (id: number) => { export function deleteForm(id: number) {
return defHttp.delete({ url: '/bpm/form/delete?id=' + id }) return defHttp.delete({ url: '/bpm/form/delete?id=' + id })
} }
// 获得工作流的表单定义 // 获得工作流的表单定义
export const getFormApi = (id: number) => { export function getForm(id: number) {
return defHttp.get({ url: '/bpm/form/get?id=' + id }) return defHttp.get({ url: '/bpm/form/get?id=' + id })
} }
// 获得工作流的表单定义分页 // 获得工作流的表单定义分页
export const getFormPageApi = (params) => { export function getFormPage(params) {
return defHttp.get({ url: '/bpm/form/page', params }) return defHttp.get({ url: '/bpm/form/page', params })
} }
// 获得动态表单的精简列表 // 获得动态表单的精简列表
export const getSimpleFormsApi = async () => { export function getSimpleForms() {
return await defHttp.get({ url: '/bpm/form/list-all-simple' }) return defHttp.get({ url: '/bpm/form/list-all-simple' })
} }

View File

@ -1,9 +0,0 @@
export type FormVO = {
id: number
name: string
conf: string
fields: string[]
status: number
remark: string
createTime: string
}

View File

@ -1,17 +1,27 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
import { LeaveVO } from './types'
export type LeaveVO = {
id: number
result: number
type: number
reason: string
processInstanceId: string
startTime: string
endTime: string
createTime: string
}
// 创建请假申请 // 创建请假申请
export const createLeaveApi = (data: LeaveVO) => { export function createLeave(data: LeaveVO) {
return defHttp.post({ url: '/bpm/oa/leave/create', data }) return defHttp.post({ url: '/bpm/oa/leave/create', data })
} }
// 获得请假申请 // 获得请假申请
export const getLeaveApi = (id: number) => { export function getLeave(id: number) {
return defHttp.get({ url: '/bpm/oa/leave/get?id=' + id }) return defHttp.get({ url: '/bpm/oa/leave/get?id=' + id })
} }
// 获得请假申请分页 // 获得请假申请分页
export const getLeavePageApi = (params) => { export function getLeavePage(params) {
return defHttp.get({ url: '/bpm/oa/leave/page', params }) return defHttp.get({ url: '/bpm/oa/leave/page', params })
} }

View File

@ -1,10 +0,0 @@
export type LeaveVO = {
id: number
result: number
type: number
reason: string
processInstanceId: string
startTime: string
endTime: string
createTime: string
}

View File

@ -1,20 +1,43 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
import { ModelVO } from './types'
export const getModelPageApi = (params) => { export type ProcessDefinitionVO = {
id: string
version: number
deploymentTIme: string
suspensionState: number
}
export type ModelVO = {
id: number
formName: string
key: string
name: string
description: string
category: string
formType: number
formId: number
formCustomCreatePath: string
formCustomViewPath: string
processDefinition: ProcessDefinitionVO
status: number
remark: string
createTime: string
}
export function getModelPage(params) {
return defHttp.get({ url: '/bpm/model/page', params }) return defHttp.get({ url: '/bpm/model/page', params })
} }
export const getModelApi = (id: number) => { export function getModel(id: number) {
return defHttp.get({ url: '/bpm/model/get?id=' + id }) return defHttp.get({ url: '/bpm/model/get?id=' + id })
} }
export const updateModelApi = (data: ModelVO) => { export function updateModel(data: ModelVO) {
return defHttp.put({ url: '/bpm/model/update', data }) return defHttp.put({ url: '/bpm/model/update', data })
} }
// 任务状态修改 // 任务状态修改
export const updateModelStateApi = (id: number, state: number) => { export function updateModelState(id: number, state: number) {
const data = { const data = {
id: id, id: id,
state: state state: state
@ -22,14 +45,14 @@ export const updateModelStateApi = (id: number, state: number) => {
return defHttp.put({ url: '/bpm/model/update-state', data }) return defHttp.put({ url: '/bpm/model/update-state', data })
} }
export const createModelApi = (data: ModelVO) => { export function createModel(data: ModelVO) {
return defHttp.post({ url: '/bpm/model/create', data }) return defHttp.post({ url: '/bpm/model/create', data })
} }
export const deleteModelApi = (id: number) => { export function deleteModel(id: number) {
return defHttp.delete({ url: '/bpm/model/delete?id=' + id }) return defHttp.delete({ url: '/bpm/model/delete?id=' + id })
} }
export const deployModelApi = (id: number) => { export function deployModel(id: number) {
return defHttp.post({ url: '/bpm/model/deploy?id=' + id }) return defHttp.post({ url: '/bpm/model/deploy?id=' + id })
} }

View File

@ -1,23 +0,0 @@
export type ProcessDefinitionVO = {
id: string
version: number
deploymentTIme: string
suspensionState: number
}
export type ModelVO = {
id: number
formName: string
key: string
name: string
description: string
category: string
formType: number
formId: number
formCustomCreatePath: string
formCustomViewPath: string
processDefinition: ProcessDefinitionVO
status: number
remark: string
createTime: string
}

View File

@ -1,15 +1,33 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
import { ProcessInstanceVO } from './types'
export const getMyProcessInstancePageApi = (params) => { export type task = {
id: string
name: string
}
export type ProcessInstanceVO = {
id: number
name: string
processDefinitionId: string
category: string
result: number
tasks: task[]
fields: string[]
status: number
remark: string
businessKey: string
createTime: string
endTime: string
}
export function getMyProcessInstancePage(params) {
return defHttp.get({ url: '/bpm/process-instance/my-page', params }) return defHttp.get({ url: '/bpm/process-instance/my-page', params })
} }
export const createProcessInstanceApi = (data: ProcessInstanceVO) => { export function createProcessInstance(data: ProcessInstanceVO) {
return defHttp.post({ url: '/bpm/process-instance/create', data }) return defHttp.post({ url: '/bpm/process-instance/create', data })
} }
export const cancelProcessInstanceApi = (id: number, reason: string) => { export function cancelProcessInstance(id: number, reason: string) {
const data = { const data = {
id: id, id: id,
reason: reason reason: reason
@ -17,6 +35,6 @@ export const cancelProcessInstanceApi = (id: number, reason: string) => {
return defHttp.delete({ url: '/bpm/process-instance/cancel', data }) return defHttp.delete({ url: '/bpm/process-instance/cancel', data })
} }
export const getProcessInstanceApi = (id: number) => { export function getProcessInstance(id: number) {
return defHttp.get({ url: '/bpm/process-instance/get?id=' + id }) return defHttp.get({ url: '/bpm/process-instance/get?id=' + id })
} }

View File

@ -1,18 +0,0 @@
export type task = {
id: string
name: string
}
export type ProcessInstanceVO = {
id: number
name: string
processDefinitionId: string
category: string
result: number
tasks: task[]
fields: string[]
status: number
remark: string
businessKey: string
createTime: string
endTime: string
}

View File

@ -1,33 +1,33 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
export const getTodoTaskPage = (params) => { export function getTodoTaskPage(params) {
return defHttp.get({ url: '/bpm/task/todo-page', params }) return defHttp.get({ url: '/bpm/task/todo-page', params })
} }
export const getDoneTaskPage = (params) => { export function getDoneTaskPage(params) {
return defHttp.get({ url: '/bpm/task/done-page', params }) return defHttp.get({ url: '/bpm/task/done-page', params })
} }
export const completeTask = (data) => { export function completeTask(data) {
return defHttp.put({ url: '/bpm/task/complete', data }) return defHttp.put({ url: '/bpm/task/complete', data })
} }
export const approveTask = (data) => { export function approveTask(data) {
return defHttp.put({ url: '/bpm/task/approve', data }) return defHttp.put({ url: '/bpm/task/approve', data })
} }
export const rejectTask = (data) => { export function rejectTask(data) {
return defHttp.put({ url: '/bpm/task/reject', data }) return defHttp.put({ url: '/bpm/task/reject', data })
} }
export const backTask = (data) => { export function backTask(data) {
return defHttp.put({ url: '/bpm/task/back', data }) return defHttp.put({ url: '/bpm/task/back', data })
} }
export const updateTaskAssignee = (data) => { export function updateTaskAssignee(data) {
return defHttp.put({ url: '/bpm/task/update-assignee', data }) return defHttp.put({ url: '/bpm/task/update-assignee', data })
} }
export const getTaskListByProcessInstanceId = (processInstanceId) => { export function getTaskListByProcessInstanceId(processInstanceId) {
return defHttp.get({ return defHttp.get({
url: '/bpm/task/list-by-process-instance-id?processInstanceId=' + processInstanceId url: '/bpm/task/list-by-process-instance-id?processInstanceId=' + processInstanceId
}) })

View File

@ -1,14 +1,23 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
import { TaskAssignVO } from './types'
export const getTaskAssignRuleList = (params) => { export type TaskAssignVO = {
id: number
modelId: string
processDefinitionId: string
taskDefinitionKey: string
taskDefinitionName: string
options: string[]
type: number
}
export function getTaskAssignRuleList(params) {
return defHttp.get({ url: '/bpm/task-assign-rule/list', params }) return defHttp.get({ url: '/bpm/task-assign-rule/list', params })
} }
export const createTaskAssignRule = (data: TaskAssignVO) => { export function createTaskAssignRule(data: TaskAssignVO) {
return defHttp.post({ url: '/bpm/task-assign-rule/create', data }) return defHttp.post({ url: '/bpm/task-assign-rule/create', data })
} }
export const updateTaskAssignRule = (data: TaskAssignVO) => { export function updateTaskAssignRule(data: TaskAssignVO) {
return defHttp.put({ url: '/bpm/task-assign-rule/update', data }) return defHttp.put({ url: '/bpm/task-assign-rule/update', data })
} }

View File

@ -1,9 +0,0 @@
export type TaskAssignVO = {
id: number
modelId: string
processDefinitionId: string
taskDefinitionKey: string
taskDefinitionName: string
options: string[]
type: number
}

View File

@ -1,32 +1,41 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
import { UserGroupVO } from './types'
export type UserGroupVO = {
id: number
name: string
description: string
memberUserIds: number[]
status: number
remark: string
createTime: string
}
// 创建用户组 // 创建用户组
export const createUserGroupApi = (data: UserGroupVO) => { export function createUserGroup(data: UserGroupVO) {
return defHttp.post({ url: '/bpm/user-group/create', data }) return defHttp.post({ url: '/bpm/user-group/create', data })
} }
// 更新用户组 // 更新用户组
export const updateUserGroupApi = (data: UserGroupVO) => { export function updateUserGroup(data: UserGroupVO) {
return defHttp.put({ url: '/bpm/user-group/update', data }) return defHttp.put({ url: '/bpm/user-group/update', data })
} }
// 删除用户组 // 删除用户组
export const deleteUserGroupApi = (id: number) => { export function deleteUserGroup(id: number) {
return defHttp.delete({ url: '/bpm/user-group/delete?id=' + id }) return defHttp.delete({ url: '/bpm/user-group/delete?id=' + id })
} }
// 获得用户组 // 获得用户组
export const getUserGroupApi = (id: number) => { export function getUserGroup(id: number) {
return defHttp.get({ url: '/bpm/user-group/get?id=' + id }) return defHttp.get({ url: '/bpm/user-group/get?id=' + id })
} }
// 获得用户组分页 // 获得用户组分页
export const getUserGroupPageApi = (params) => { export function getUserGroupPage(params) {
return defHttp.get({ url: '/bpm/user-group/page', params }) return defHttp.get({ url: '/bpm/user-group/page', params })
} }
// 获取用户组精简信息列表 // 获取用户组精简信息列表
export const listSimpleUserGroupsApi = () => { export function listSimpleUserGroups() {
return defHttp.get({ url: '/bpm/user-group/list-all-simple' }) return defHttp.get({ url: '/bpm/user-group/list-all-simple' })
} }

View File

@ -1,9 +0,0 @@
export type UserGroupVO = {
id: number
name: string
description: string
memberUserIds: number[]
status: number
remark: string
createTime: string
}

View File

@ -40,11 +40,11 @@ export interface ApiAccessLogExportReqVO {
} }
// 查询列表API 访问日志 // 查询列表API 访问日志
export const getApiAccessLogPageApi = (params: ApiAccessLogPageReqVO) => { export function getApiAccessLogPageApi(params: ApiAccessLogPageReqVO) {
return defHttp.get({ url: '/infra/api-access-log/page', params }) return defHttp.get({ url: '/infra/api-access-log/page', params })
} }
// 导出API 访问日志 // 导出API 访问日志
export const exportApiAccessLogApi = (params: ApiAccessLogExportReqVO) => { export function exportApiAccessLogApi(params: ApiAccessLogExportReqVO) {
return defHttp.download({ url: '/infra/api-access-log/export-excel', params }, '访问日志.xls') return defHttp.download({ url: '/infra/api-access-log/export-excel', params }, '访问日志.xls')
} }

View File

@ -46,19 +46,19 @@ export interface ApiErrorLogExportReqVO {
} }
// 查询列表API 访问日志 // 查询列表API 访问日志
export const getApiErrorLogPageApi = (params: ApiErrorLogPageReqVO) => { export function getApiErrorLogPageApi(params: ApiErrorLogPageReqVO) {
return defHttp.get({ url: '/infra/api-error-log/page', params }) return defHttp.get({ url: '/infra/api-error-log/page', params })
} }
// 更新 API 错误日志的处理状态 // 更新 API 错误日志的处理状态
export const updateApiErrorLogPageApi = (id: number, processStatus: number) => { export function updateApiErrorLogPageApi(id: number, processStatus: number) {
return defHttp.put({ return defHttp.put({
url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus
}) })
} }
// 导出API 错误日志 // 导出API 错误日志
export const exportApiErrorLogApi = (params: ApiErrorLogExportReqVO) => { export function exportApiErrorLogApi(params: ApiErrorLogExportReqVO) {
return defHttp.download( return defHttp.download(
{ {
url: '/infra/api-error-log/export-excel', url: '/infra/api-error-log/export-excel',

View File

@ -2,56 +2,56 @@ import { defHttp } from '@/utils/http/axios'
import type { CodegenUpdateReqVO, CodegenCreateListReqVO } from './types' import type { CodegenUpdateReqVO, CodegenCreateListReqVO } from './types'
// 查询列表代码生成表定义 // 查询列表代码生成表定义
export const getCodegenTablePageApi = (params) => { export function getCodegenTablePageApi(params) {
return defHttp.get({ url: '/infra/codegen/table/page', params }) return defHttp.get({ url: '/infra/codegen/table/page', params })
} }
// 查询详情代码生成表定义 // 查询详情代码生成表定义
export const getCodegenTableApi = (id: number) => { export function getCodegenTableApi(id: number) {
return defHttp.get({ url: '/infra/codegen/detail?tableId=' + id }) return defHttp.get({ url: '/infra/codegen/detail?tableId=' + id })
} }
// 新增代码生成表定义 // 新增代码生成表定义
export const createCodegenTableApi = (data: CodegenCreateListReqVO) => { export function createCodegenTableApi(data: CodegenCreateListReqVO) {
return defHttp.post({ url: '/infra/codegen/create', data }) return defHttp.post({ url: '/infra/codegen/create', data })
} }
// 修改代码生成表定义 // 修改代码生成表定义
export const updateCodegenTableApi = (data: CodegenUpdateReqVO) => { export function updateCodegenTableApi(data: CodegenUpdateReqVO) {
return defHttp.put({ url: '/infra/codegen/update', data }) return defHttp.put({ url: '/infra/codegen/update', data })
} }
// 基于数据库的表结构,同步数据库的表和字段定义 // 基于数据库的表结构,同步数据库的表和字段定义
export const syncCodegenFromDBApi = (id: number) => { export function syncCodegenFromDBApi(id: number) {
return defHttp.put({ url: '/infra/codegen/sync-from-db?tableId=' + id }) return defHttp.put({ url: '/infra/codegen/sync-from-db?tableId=' + id })
} }
// 基于 SQL 建表语句,同步数据库的表和字段定义 // 基于 SQL 建表语句,同步数据库的表和字段定义
export const syncCodegenFromSQLApi = (id: number, sql: string) => { export function syncCodegenFromSQLApi(id: number, sql: string) {
return defHttp.put({ url: '/infra/codegen/sync-from-sql?tableId=' + id + '&sql=' + sql }) return defHttp.put({ url: '/infra/codegen/sync-from-sql?tableId=' + id + '&sql=' + sql })
} }
// 预览生成代码 // 预览生成代码
export const previewCodegenApi = (id: number) => { export function previewCodegenApi(id: number) {
return defHttp.get({ url: '/infra/codegen/preview?tableId=' + id }) return defHttp.get({ url: '/infra/codegen/preview?tableId=' + id })
} }
// 下载生成代码 // 下载生成代码
export const downloadCodegenApi = (id: number) => { export function downloadCodegenApi(id: number) {
return defHttp.download({ url: '/infra/codegen/download?tableId=' + id }, '生成代码.zip') return defHttp.download({ url: '/infra/codegen/download?tableId=' + id }, '生成代码.zip')
} }
// 获得表定义 // 获得表定义
export const getSchemaTableListApi = (params) => { export function getSchemaTableListApi(params) {
return defHttp.get({ url: '/infra/codegen/db/table/list', params }) return defHttp.get({ url: '/infra/codegen/db/table/list', params })
} }
// 基于数据库的表结构,创建代码生成器的表定义 // 基于数据库的表结构,创建代码生成器的表定义
export const createCodegenListApi = (data) => { export function createCodegenListApi(data) {
return defHttp.post({ url: '/infra/codegen/create-list', data }) return defHttp.post({ url: '/infra/codegen/create-list', data })
} }
// 删除代码生成表定义 // 删除代码生成表定义
export const deleteCodegenTableApi = (id: number) => { export function deleteCodegenTableApi(id: number) {
return defHttp.delete({ url: '/infra/codegen/delete?tableId=' + id }) return defHttp.delete({ url: '/infra/codegen/delete?tableId=' + id })
} }

View File

@ -27,36 +27,36 @@ export interface ConfigExportReqVO {
} }
// 查询参数列表 // 查询参数列表
export const getConfigPageApi = (params: ConfigPageReqVO) => { export function getConfigPageApi(params: ConfigPageReqVO) {
return defHttp.get({ url: '/infra/config/page', params }) return defHttp.get({ url: '/infra/config/page', params })
} }
// 查询参数详情 // 查询参数详情
export const getConfigApi = (id: number) => { export function getConfigApi(id: number) {
return defHttp.get({ url: '/infra/config/get?id=' + id }) return defHttp.get({ url: '/infra/config/get?id=' + id })
} }
// 根据参数键名查询参数值 // 根据参数键名查询参数值
export const getConfigKeyApi = (configKey: string) => { export function getConfigKeyApi(configKey: string) {
return defHttp.get({ url: '/infra/config/get-value-by-key?key=' + configKey }) return defHttp.get({ url: '/infra/config/get-value-by-key?key=' + configKey })
} }
// 新增参数 // 新增参数
export const createConfigApi = (data: ConfigVO) => { export function createConfigApi(data: ConfigVO) {
return defHttp.post({ url: '/infra/config/create', data }) return defHttp.post({ url: '/infra/config/create', data })
} }
// 修改参数 // 修改参数
export const updateConfigApi = (data: ConfigVO) => { export function updateConfigApi(data: ConfigVO) {
return defHttp.put({ url: '/infra/config/update', data }) return defHttp.put({ url: '/infra/config/update', data })
} }
// 删除参数 // 删除参数
export const deleteConfigApi = (id: number) => { export function deleteConfigApi(id: number) {
return defHttp.delete({ url: '/infra/config/delete?id=' + id }) return defHttp.delete({ url: '/infra/config/delete?id=' + id })
} }
// 导出参数 // 导出参数
export const exportConfigApi = (params: ConfigExportReqVO) => { export function exportConfigApi(params: ConfigExportReqVO) {
return defHttp.download({ url: '/infra/config/export', params }, '参数.xls') return defHttp.download({ url: '/infra/config/export', params }, '参数.xls')
} }

View File

@ -10,26 +10,26 @@ export interface DataSourceConfigVO {
} }
// 查询数据源配置列表 // 查询数据源配置列表
export const getDataSourceConfigListApi = () => { export function getDataSourceConfigListApi() {
return defHttp.get({ url: '/infra/data-source-config/list' }) return defHttp.get({ url: '/infra/data-source-config/list' })
} }
// 查询数据源配置详情 // 查询数据源配置详情
export const getDataSourceConfigApi = (id: number) => { export function getDataSourceConfigApi(id: number) {
return defHttp.get({ url: '/infra/data-source-config/get?id=' + id }) return defHttp.get({ url: '/infra/data-source-config/get?id=' + id })
} }
// 新增数据源配置 // 新增数据源配置
export const createDataSourceConfigApi = (data: DataSourceConfigVO) => { export function createDataSourceConfigApi(data: DataSourceConfigVO) {
return defHttp.post({ url: '/infra/data-source-config/create', data }) return defHttp.post({ url: '/infra/data-source-config/create', data })
} }
// 修改数据源配置 // 修改数据源配置
export const updateDataSourceConfigApi = (data: DataSourceConfigVO) => { export function updateDataSourceConfigApi(data: DataSourceConfigVO) {
return defHttp.put({ url: '/infra/data-source-config/update', data }) return defHttp.put({ url: '/infra/data-source-config/update', data })
} }
// 删除数据源配置 // 删除数据源配置
export const deleteDataSourceConfigApi = (id: number) => { export function deleteDataSourceConfigApi(id: number) {
return defHttp.delete({ url: '/infra/data-source-config/delete?id=' + id }) return defHttp.delete({ url: '/infra/data-source-config/delete?id=' + id })
} }

View File

@ -1,16 +1,16 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 导出Html // 导出Html
export const exportHtmlApi = async () => { export function exportHtmlApiasync() {
return defHttp.get({ url: '/infra/db-doc/export-html', responseType: 'blob' }) return defHttp.get({ url: '/infra/db-doc/export-html', responseType: 'blob' })
} }
// 导出Word // 导出Word
export const exportWordApi = () => { export function exportWordApi() {
return defHttp.get({ url: '/infra/db-doc/export-word', responseType: 'blob' }) return defHttp.get({ url: '/infra/db-doc/export-word', responseType: 'blob' })
} }
// 导出Markdown // 导出Markdown
export const exportMarkdownApi = () => { export function exportMarkdownApi() {
return defHttp.get({ url: '/infra/db-doc/export-markdown', responseType: 'blob' }) return defHttp.get({ url: '/infra/db-doc/export-markdown', responseType: 'blob' })
} }

View File

@ -18,11 +18,11 @@ export interface FilePageReqVO extends PageParam {
} }
// 查询文件列表 // 查询文件列表
export const getFilePageApi = (params: FilePageReqVO) => { export function getFilePageApi(params: FilePageReqVO) {
return defHttp.get({ url: '/infra/file/page', params }) return defHttp.get({ url: '/infra/file/page', params })
} }
// 删除文件 // 删除文件
export const deleteFileApi = (id: number) => { export function deleteFileApi(id: number) {
return defHttp.delete({ url: '/infra/file/delete?id=' + id }) return defHttp.delete({ url: '/infra/file/delete?id=' + id })
} }

View File

@ -31,36 +31,36 @@ export interface FileConfigPageReqVO extends PageParam {
} }
// 查询文件配置列表 // 查询文件配置列表
export const getFileConfigPageApi = (params: FileConfigPageReqVO) => { export function getFileConfigPageApi(params: FileConfigPageReqVO) {
return defHttp.get({ url: '/infra/file-config/page', params }) return defHttp.get({ url: '/infra/file-config/page', params })
} }
// 查询文件配置详情 // 查询文件配置详情
export const getFileConfigApi = (id: number) => { export function getFileConfigApi(id: number) {
return defHttp.get({ url: '/infra/file-config/get?id=' + id }) return defHttp.get({ url: '/infra/file-config/get?id=' + id })
} }
// 更新文件配置为主配置 // 更新文件配置为主配置
export const updateFileConfigMasterApi = (id: number) => { export function updateFileConfigMasterApi(id: number) {
return defHttp.put({ url: '/infra/file-config/update-master?id=' + id }) return defHttp.put({ url: '/infra/file-config/update-master?id=' + id })
} }
// 新增文件配置 // 新增文件配置
export const createFileConfigApi = (data: FileConfigVO) => { export function createFileConfigApi(data: FileConfigVO) {
return defHttp.post({ url: '/infra/file-config/create', data }) return defHttp.post({ url: '/infra/file-config/create', data })
} }
// 修改文件配置 // 修改文件配置
export const updateFileConfigApi = (data: FileConfigVO) => { export function updateFileConfigApi(data: FileConfigVO) {
return defHttp.put({ url: '/infra/file-config/update', data }) return defHttp.put({ url: '/infra/file-config/update', data })
} }
// 删除文件配置 // 删除文件配置
export const deleteFileConfigApi = (id: number) => { export function deleteFileConfigApi(id: number) {
return defHttp.delete({ url: '/infra/file-config/delete?id=' + id }) return defHttp.delete({ url: '/infra/file-config/delete?id=' + id })
} }
// 测试文件配置 // 测试文件配置
export const testFileConfigApi = (id: number) => { export function testFileConfigApi(id: number) {
return defHttp.get({ url: '/infra/file-config/test?id=' + id }) return defHttp.get({ url: '/infra/file-config/test?id=' + id })
} }

View File

@ -26,37 +26,37 @@ export interface JobExportReqVO {
} }
// 任务列表 // 任务列表
export const getJobPageApi = (params: JobPageReqVO) => { export function getJobPageApi(params: JobPageReqVO) {
return defHttp.get({ url: '/infra/job/page', params }) return defHttp.get({ url: '/infra/job/page', params })
} }
// 任务详情 // 任务详情
export const getJobApi = (id: number) => { export function getJobApi(id: number) {
return defHttp.get({ url: '/infra/job/get?id=' + id }) return defHttp.get({ url: '/infra/job/get?id=' + id })
} }
// 新增任务 // 新增任务
export const createJobApi = (data: JobVO) => { export function createJobApi(data: JobVO) {
return defHttp.post({ url: '/infra/job/create', data }) return defHttp.post({ url: '/infra/job/create', data })
} }
// 修改定时任务调度 // 修改定时任务调度
export const updateJobApi = (data: JobVO) => { export function updateJobApi(data: JobVO) {
return defHttp.put({ url: '/infra/job/update', data }) return defHttp.put({ url: '/infra/job/update', data })
} }
// 删除定时任务调度 // 删除定时任务调度
export const deleteJobApi = (id: number) => { export function deleteJobApi(id: number) {
return defHttp.delete({ url: '/infra/job/delete?id=' + id }) return defHttp.delete({ url: '/infra/job/delete?id=' + id })
} }
// 导出定时任务调度 // 导出定时任务调度
export const exportJobApi = (params: JobExportReqVO) => { export function exportJobApi(params: JobExportReqVO) {
return defHttp.download({ url: '/infra/job/export-excel', params }, '定时任务.xls') return defHttp.download({ url: '/infra/job/export-excel', params }, '定时任务.xls')
} }
// 任务状态修改 // 任务状态修改
export const updateJobStatusApi = (id: number, status: number) => { export function updateJobStatusApi(id: number, status: number) {
const params = { const params = {
id, id,
status status
@ -65,11 +65,11 @@ export const updateJobStatusApi = (id: number, status: number) => {
} }
// 定时任务立即执行一次 // 定时任务立即执行一次
export const runJobApi = (id: number) => { export function runJobApi(id: number) {
return defHttp.put({ url: '/infra/job/trigger?id=' + id }) return defHttp.put({ url: '/infra/job/trigger?id=' + id })
} }
// 获得定时任务的下 n 次执行时间 // 获得定时任务的下 n 次执行时间
export const getJobNextTimesApi = (id: number) => { export function getJobNextTimesApi(id: number) {
return defHttp.get({ url: '/infra/job/get_next_times?id=' + id }) return defHttp.get({ url: '/infra/job/get_next_times?id=' + id })
} }

View File

@ -31,17 +31,17 @@ export interface JobLogExportReqVO {
} }
// 任务日志列表 // 任务日志列表
export const getJobLogPageApi = (params: JobLogPageReqVO) => { export function getJobLogPageApi(params: JobLogPageReqVO) {
return defHttp.get({ url: '/infra/job-log/page', params }) return defHttp.get({ url: '/infra/job-log/page', params })
} }
// 任务日志详情 // 任务日志详情
export const getJobLogApi = (id: number) => { export function getJobLogApi(id: number) {
return defHttp.get({ url: '/infra/job-log/get?id=' + id }) return defHttp.get({ url: '/infra/job-log/get?id=' + id })
} }
// 导出定时任务日志 // 导出定时任务日志
export const exportJobLogApi = (params: JobLogExportReqVO) => { export function exportJobLogApi(params: JobLogExportReqVO) {
return defHttp.download( return defHttp.download(
{ {
url: '/infra/job-log/export-excel', url: '/infra/job-log/export-excel',

View File

@ -3,17 +3,17 @@ import { defHttp } from '@/utils/http/axios'
/** /**
* redis * redis
*/ */
export const getCacheApi = () => { export function getCacheApi() {
return defHttp.get({ url: '/infra/redis/get-monitor-info' }) return defHttp.get({ url: '/infra/redis/get-monitor-info' })
} }
// 获取模块 // 获取模块
export const getKeyDefineListApi = () => { export function getKeyDefineListApi() {
return defHttp.get({ url: '/infra/redis/get-key-define-list' }) return defHttp.get({ url: '/infra/redis/get-key-define-list' })
} }
/** /**
* redis key * redis key
*/ */
export const getKeyListApi = (keyTemplate: string) => { export function getKeyListApi(keyTemplate: string) {
return defHttp.get({ return defHttp.get({
url: '/infra/redis/get-key-list', url: '/infra/redis/get-key-list',
params: { params: {
@ -22,16 +22,16 @@ export const getKeyListApi = (keyTemplate: string) => {
}) })
} }
// 获取缓存内容 // 获取缓存内容
export const getKeyValueApi = (key: string) => { export function getKeyValueApi(key: string) {
return defHttp.get({ url: '/infra/redis/get-key-value?key=' + key }) return defHttp.get({ url: '/infra/redis/get-key-value?key=' + key })
} }
// 根据键名删除缓存 // 根据键名删除缓存
export const deleteKeyApi = (key: string) => { export function deleteKeyApi(key: string) {
return defHttp.delete({ url: '/infra/redis/delete-key?key=' + key }) return defHttp.delete({ url: '/infra/redis/delete-key?key=' + key })
} }
export const deleteKeysApi = (keyTemplate: string) => { export function deleteKeysApi(keyTemplate: string) {
return defHttp.delete({ return defHttp.delete({
url: '/infra/redis/delete-keys?', url: '/infra/redis/delete-keys?',
params: { params: {

View File

@ -1,41 +1,41 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 创建公众号账号 // 创建公众号账号
export const createAccount = async (data) => { export function createAccount(data) {
return await defHttp.post({ url: '/mp/account/create', data }) return defHttp.post({ url: '/mp/account/create', data })
} }
// 更新公众号账号 // 更新公众号账号
export const updateAccount = async (data) => { export function updateAccount(data) {
return defHttp.put({ url: '/mp/account/update', data }) return defHttp.put({ url: '/mp/account/update', data })
} }
// 删除公众号账号 // 删除公众号账号
export const deleteAccount = async (id) => { export function deleteAccount(id) {
return defHttp.delete({ url: '/mp/account/delete?id=' + id, method: 'delete' }) return defHttp.delete({ url: '/mp/account/delete?id=' + id, method: 'delete' })
} }
// 获得公众号账号 // 获得公众号账号
export const getAccount = async (id) => { export function getAccount(id) {
return defHttp.get({ url: '/mp/account/get?id=' + id }) return defHttp.get({ url: '/mp/account/get?id=' + id })
} }
// 获得公众号账号分页 // 获得公众号账号分页
export const getAccountPage = async (params) => { export function getAccountPage(params) {
return defHttp.get({ url: '/mp/account/page', params }) return defHttp.get({ url: '/mp/account/page', params })
} }
// 获取公众号账号精简信息列表 // 获取公众号账号精简信息列表
export const getSimpleAccounts = async () => { export function getSimpleAccounts() {
return defHttp.get({ url: '/mp/account/list-all-simple' }) return defHttp.get({ url: '/mp/account/list-all-simple' })
} }
// 生成公众号二维码 // 生成公众号二维码
export const generateAccountQrCode = async (id) => { export function generateAccountQrCode(id) {
return defHttp.put({ url: '/mp/account/generate-qr-code?id=' + id }) return defHttp.put({ url: '/mp/account/generate-qr-code?id=' + id })
} }
// 清空公众号 API 配额 // 清空公众号 API 配额
export const clearAccountQuota = async (id) => { export function clearAccountQuota(id) {
return defHttp.put({ url: '/mp/account/clear-quota?id=' + id }) return defHttp.put({ url: '/mp/account/clear-quota?id=' + id })
} }

View File

@ -1,26 +1,26 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 创建公众号的自动回复 // 创建公众号的自动回复
export const createAutoReply = (data) => { export function createAutoReply(data) {
return defHttp.post({ url: '/mp/auto-reply/create', data }) return defHttp.post({ url: '/mp/auto-reply/create', data })
} }
// 更新公众号的自动回复 // 更新公众号的自动回复
export const updateAutoReply = (data) => { export function updateAutoReply(data) {
return defHttp.put({ url: '/mp/auto-reply/update', data }) return defHttp.put({ url: '/mp/auto-reply/update', data })
} }
// 删除公众号的自动回复 // 删除公众号的自动回复
export const deleteAutoReply = (id) => { export function deleteAutoReply(id) {
return defHttp.delete({ url: '/mp/auto-reply/delete?id=' + id }) return defHttp.delete({ url: '/mp/auto-reply/delete?id=' + id })
} }
// 获得公众号的自动回复 // 获得公众号的自动回复
export const getAutoReply = (id) => { export function getAutoReply(id) {
return defHttp.get({ url: '/mp/auto-reply/get?id=' + id }) return defHttp.get({ url: '/mp/auto-reply/get?id=' + id })
} }
// 获得公众号的自动回复分页 // 获得公众号的自动回复分页
export const getAutoReplyPage = (params) => { export function getAutoReplyPage(params) {
return defHttp.get({ url: '/mp/auto-reply/page', params }) return defHttp.get({ url: '/mp/auto-reply/page', params })
} }

View File

@ -1,12 +1,12 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 获得公众号草稿分页 // 获得公众号草稿分页
export const getDraftPage = (params) => { export function getDraftPage(params) {
return defHttp.get({ url: '/mp/draft/page', params }) return defHttp.get({ url: '/mp/draft/page', params })
} }
// 创建公众号草稿 // 创建公众号草稿
export const createDraft = (accountId, articles) => { export function createDraft(accountId, articles) {
return defHttp.post({ return defHttp.post({
url: '/mp/draft/create?accountId=' + accountId, url: '/mp/draft/create?accountId=' + accountId,
data: { data: {
@ -16,11 +16,11 @@ export const createDraft = (accountId, articles) => {
} }
// 更新公众号草稿 // 更新公众号草稿
export const updateDraft = (accountId, mediaId, articles) => { export function updateDraft(accountId, mediaId, articles) {
return defHttp.put({ url: '/mp/draft/update?accountId=' + accountId + '&mediaId=' + mediaId, data: articles }) return defHttp.put({ url: '/mp/draft/update?accountId=' + accountId + '&mediaId=' + mediaId, data: articles })
} }
// 删除公众号草稿 // 删除公众号草稿
export const deleteDraft = (accountId, mediaId) => { export function deleteDraft(accountId, mediaId) {
return defHttp.delete({ url: '/mp/draft/delete?accountId=' + accountId + '&mediaId=' + mediaId }) return defHttp.delete({ url: '/mp/draft/delete?accountId=' + accountId + '&mediaId=' + mediaId })
} }

View File

@ -1,16 +1,16 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 获得公众号素材分页 // 获得公众号素材分页
export const getFreePublishPage = (params) => { export function getFreePublishPage(params) {
return defHttp.get({ url: '/mp/free-publish/page', params }) return defHttp.get({ url: '/mp/free-publish/page', params })
} }
// 删除公众号素材 // 删除公众号素材
export const deleteFreePublish = (accountId, articleId) => { export function deleteFreePublish(accountId, articleId) {
return defHttp.delete({ url: '/mp/free-publish/delete?accountId=' + accountId + '&&articleId=' + articleId }) return defHttp.delete({ url: '/mp/free-publish/delete?accountId=' + accountId + '&&articleId=' + articleId })
} }
// 发布公众号素材 // 发布公众号素材
export const submitFreePublish = (accountId, mediaId) => { export function submitFreePublish(accountId, mediaId) {
return defHttp.post({ url: '/mp/free-publish/submit?accountId=' + accountId + '&&mediaId=' + mediaId }) return defHttp.post({ url: '/mp/free-publish/submit?accountId=' + accountId + '&&mediaId=' + mediaId })
} }

View File

@ -1,11 +1,11 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 获得公众号素材分页 // 获得公众号素材分页
export const getMaterialPage = (params) => { export function getMaterialPage(params) {
return defHttp.get({ url: '/mp/material/page', params }) return defHttp.get({ url: '/mp/material/page', params })
} }
// 删除公众号永久素材 // 删除公众号永久素材
export const deletePermanentMaterial = (id) => { export function deletePermanentMaterial(id) {
return defHttp.delete({ url: '/mp/material/delete-permanent?id=' + id }) return defHttp.delete({ url: '/mp/material/delete-permanent?id=' + id })
} }

View File

@ -1,12 +1,12 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 获得公众号菜单列表 // 获得公众号菜单列表
export const getMenuList = (accountId) => { export function getMenuList(accountId) {
return defHttp.get({ url: '/mp/menu/list?accountId=' + accountId }) return defHttp.get({ url: '/mp/menu/list?accountId=' + accountId })
} }
// 保存公众号菜单 // 保存公众号菜单
export const saveMenu = (accountId, menus) => { export function saveMenu(accountId, menus) {
return defHttp.post({ return defHttp.post({
url: '/mp/menu/save', url: '/mp/menu/save',
data: { data: {
@ -17,6 +17,6 @@ export const saveMenu = (accountId, menus) => {
} }
// 删除公众号菜单 // 删除公众号菜单
export const deleteMenu = (accountId) => { export function deleteMenu(accountId) {
return defHttp.delete({ url: '/mp/menu/delete?accountId=' + accountId }) return defHttp.delete({ url: '/mp/menu/delete?accountId=' + accountId })
} }

View File

@ -1,11 +1,11 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 获得公众号消息分页 // 获得公众号消息分页
export const getMessagePage = (params) => { export function getMessagePage(params) {
return defHttp.get({ url: '/mp/message/page', params }) return defHttp.get({ url: '/mp/message/page', params })
} }
// 给粉丝发送消息 // 给粉丝发送消息
export const sendMessage = (data) => { export function sendMessage(data) {
return defHttp.post({ url: '/mp/message/send', data }) return defHttp.post({ url: '/mp/message/send', data })
} }

View File

@ -1,21 +1,21 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 更新公众号粉丝 // 更新公众号粉丝
export const updateUser = (data) => { export function updateUser(data) {
return defHttp.put({ url: '/mp/user/update', data }) return defHttp.put({ url: '/mp/user/update', data })
} }
// 获得公众号粉丝 // 获得公众号粉丝
export const getUser = (id) => { export function getUser(id) {
return defHttp.get({ url: '/mp/user/get?id=' + id }) return defHttp.get({ url: '/mp/user/get?id=' + id })
} }
// 获得公众号粉丝分页 // 获得公众号粉丝分页
export const getUserPage = (params) => { export function getUserPage(params) {
return defHttp.get({ url: '/mp/user/page', params }) return defHttp.get({ url: '/mp/user/page', params })
} }
// 同步公众号粉丝 // 同步公众号粉丝
export const syncUser = (accountId) => { export function syncUser(accountId) {
return defHttp.post({ url: '/mp/tag/sync?accountId=' + accountId }) return defHttp.post({ url: '/mp/tag/sync?accountId=' + accountId })
} }

View File

@ -1,21 +1,21 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 获取消息发送概况数据 // 获取消息发送概况数据
export const getUpstreamMessage = (params) => { export function getUpstreamMessage(params) {
return defHttp.get({ url: '/mp/statistics/upstream-message', params }) return defHttp.get({ url: '/mp/statistics/upstream-message', params })
} }
// 用户增减数据 // 用户增减数据
export const getUserSummary = (params) => { export function getUserSummary(params) {
return defHttp.get({ url: '/mp/statistics/user-summary', params }) return defHttp.get({ url: '/mp/statistics/user-summary', params })
} }
// 获得用户累计数据 // 获得用户累计数据
export const getUserCumulate = (params) => { export function getUserCumulate(params) {
return defHttp.get({ url: '/mp/statistics/user-cumulate', params }) return defHttp.get({ url: '/mp/statistics/user-cumulate', params })
} }
// 获得接口分析数据 // 获得接口分析数据
export const getInterfaceSummary = (params) => { export function getInterfaceSummary(params) {
return defHttp.get({ url: '/mp/statistics/interface-summary', params }) return defHttp.get({ url: '/mp/statistics/interface-summary', params })
} }

View File

@ -1,36 +1,36 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 创建公众号标签 // 创建公众号标签
export const createTag = (data) => { export function createTag(data) {
return defHttp.post({ url: '/mp/tag/create', data }) return defHttp.post({ url: '/mp/tag/create', data })
} }
// 更新公众号标签 // 更新公众号标签
export const updateTag = (data) => { export function updateTag(data) {
return defHttp.put({ url: '/mp/tag/update', data }) return defHttp.put({ url: '/mp/tag/update', data })
} }
// 删除公众号标签 // 删除公众号标签
export const deleteTag = (id) => { export function deleteTag(id) {
return defHttp.delete({ url: '/mp/tag/delete?id=' + id }) return defHttp.delete({ url: '/mp/tag/delete?id=' + id })
} }
// 获得公众号标签 // 获得公众号标签
export const getTag = (id) => { export function getTag(id) {
return defHttp.get({ url: '/mp/tag/get?id=' + id }) return defHttp.get({ url: '/mp/tag/get?id=' + id })
} }
// 获得公众号标签分页 // 获得公众号标签分页
export const getTagPage = (params) => { export function getTagPage(params) {
return defHttp.get({ url: '/mp/tag/page', params }) return defHttp.get({ url: '/mp/tag/page', params })
} }
// 获取公众号标签精简信息列表 // 获取公众号标签精简信息列表
export const getSimpleTags = () => { export function getSimpleTags() {
return defHttp.get({ url: '/mp/tag/list-all-simple' }) return defHttp.get({ url: '/mp/tag/list-all-simple' })
} }
// 同步公众号标签 // 同步公众号标签
export const syncTag = (accountId) => { export function syncTag(accountId) {
return defHttp.post({ url: '/mp/tag/sync?accountId=' + accountId }) return defHttp.post({ url: '/mp/tag/sync?accountId=' + accountId })
} }

View File

@ -38,41 +38,41 @@ export interface AppUpdateStatusReqVO {
} }
// 查询列表支付应用 // 查询列表支付应用
export const getAppPageApi = (params: AppPageReqVO) => { export function getAppPage(params: AppPageReqVO) {
return defHttp.get({ url: '/pay/app/page', params }) return defHttp.get({ url: '/pay/app/page', params })
} }
// 查询详情支付应用 // 查询详情支付应用
export const getAppApi = (id: number) => { export function getApp(id: number) {
return defHttp.get({ url: '/pay/app/get?id=' + id }) return defHttp.get({ url: '/pay/app/get?id=' + id })
} }
// 新增支付应用 // 新增支付应用
export const createAppApi = (data: AppVO) => { export function createApp(data: AppVO) {
return defHttp.post({ url: '/pay/app/create', data }) return defHttp.post({ url: '/pay/app/create', data })
} }
// 修改支付应用 // 修改支付应用
export const updateAppApi = (data: AppVO) => { export function updateApp(data: AppVO) {
return defHttp.put({ url: '/pay/app/update', data }) return defHttp.put({ url: '/pay/app/update', data })
} }
// 支付应用信息状态修改 // 支付应用信息状态修改
export const changeAppStatusApi = (data: AppUpdateStatusReqVO) => { export function changeAppStatus(data: AppUpdateStatusReqVO) {
return defHttp.put({ url: '/pay/app/update-status', data }) return defHttp.put({ url: '/pay/app/update-status', data })
} }
// 删除支付应用 // 删除支付应用
export const deleteAppApi = (id: number) => { export function deleteApp(id: number) {
return defHttp.delete({ url: '/pay/app/delete?id=' + id }) return defHttp.delete({ url: '/pay/app/delete?id=' + id })
} }
// 导出支付应用 // 导出支付应用
export const exportAppApi = (params: AppExportReqVO) => { export function exportApp(params: AppExportReqVO) {
return defHttp.download({ url: '/pay/app/export-excel', params }, '支付应用.xls') return defHttp.download({ url: '/pay/app/export-excel', params }, '支付应用.xls')
} }
// 根据商ID称搜索应用列表 // 根据商ID称搜索应用列表
export const getAppListByMerchantIdApi = (merchantId: number) => { export function getAppListByMerchantId(merchantId: number) {
return defHttp.get({ url: '/pay/app/list-merchant-id', params: { merchantId: merchantId } }) return defHttp.get({ url: '/pay/app/list-merchant-id', params: { merchantId: merchantId } })
} }

View File

@ -35,12 +35,12 @@ export interface ChannelExportReqVO {
} }
// 查询列表支付渠道 // 查询列表支付渠道
export const getChannelPageApi = (params: ChannelPageReqVO) => { export function getChannelPage(params: ChannelPageReqVO) {
return defHttp.get({ url: '/pay/channel/page', params }) return defHttp.get({ url: '/pay/channel/page', params })
} }
// 查询详情支付渠道 // 查询详情支付渠道
export const getChannelApi = (merchantId: number, appId: string, code: string) => { export function getChannel(merchantId: number, appId: string, code: string) {
const params = { const params = {
merchantId: merchantId, merchantId: merchantId,
appId: appId, appId: appId,
@ -50,21 +50,21 @@ export const getChannelApi = (merchantId: number, appId: string, code: string) =
} }
// 新增支付渠道 // 新增支付渠道
export const createChannelApi = (data: ChannelVO) => { export function createChannel(data: ChannelVO) {
return defHttp.post({ url: '/pay/channel/create', data }) return defHttp.post({ url: '/pay/channel/create', data })
} }
// 修改支付渠道 // 修改支付渠道
export const updateChannelApi = (data: ChannelVO) => { export function updateChannel(data: ChannelVO) {
return defHttp.put({ url: '/pay/channel/update', data }) return defHttp.put({ url: '/pay/channel/update', data })
} }
// 删除支付渠道 // 删除支付渠道
export const deleteChannelApi = (id: number) => { export function deleteChannel(id: number) {
return defHttp.delete({ url: '/pay/channel/delete?id=' + id }) return defHttp.delete({ url: '/pay/channel/delete?id=' + id })
} }
// 导出支付渠道 // 导出支付渠道
export const exportChannelApi = (params: ChannelExportReqVO) => { export function exportChannel(params: ChannelExportReqVO) {
return defHttp.download({ url: '/pay/channel/export-excel', params }, '支付渠道.xls') return defHttp.download({ url: '/pay/channel/export-excel', params }, '支付渠道.xls')
} }

View File

@ -29,17 +29,17 @@ export interface MerchantExportReqVO {
} }
// 查询列表支付商户 // 查询列表支付商户
export const getMerchantPageApi = (params: MerchantPageReqVO) => { export function getMerchantPage(params: MerchantPageReqVO) {
return defHttp.get({ url: '/pay/merchant/page', params }) return defHttp.get({ url: '/pay/merchant/page', params })
} }
// 查询详情支付商户 // 查询详情支付商户
export const getMerchantApi = (id: number) => { export function getMerchant(id: number) {
return defHttp.get({ url: '/pay/merchant/get?id=' + id }) return defHttp.get({ url: '/pay/merchant/get?id=' + id })
} }
// 根据商户名称搜索商户列表 // 根据商户名称搜索商户列表
export const getMerchantListByNameApi = (name: string) => { export function getMerchantListByName(name: string) {
return defHttp.get({ return defHttp.get({
url: '/pay/merchant/list-by-name?id=', url: '/pay/merchant/list-by-name?id=',
params: { params: {
@ -49,26 +49,26 @@ export const getMerchantListByNameApi = (name: string) => {
} }
// 新增支付商户 // 新增支付商户
export const createMerchantApi = (data: MerchantVO) => { export function createMerchant(data: MerchantVO) {
return defHttp.post({ url: '/pay/merchant/create', data }) return defHttp.post({ url: '/pay/merchant/create', data })
} }
// 修改支付商户 // 修改支付商户
export const updateMerchantApi = (data: MerchantVO) => { export function updateMerchant(data: MerchantVO) {
return defHttp.put({ url: '/pay/merchant/update', data }) return defHttp.put({ url: '/pay/merchant/update', data })
} }
// 删除支付商户 // 删除支付商户
export const deleteMerchantApi = (id: number) => { export function deleteMerchant(id: number) {
return defHttp.delete({ url: '/pay/merchant/delete?id=' + id }) return defHttp.delete({ url: '/pay/merchant/delete?id=' + id })
} }
// 导出支付商户 // 导出支付商户
export const exportMerchantApi = (params: MerchantExportReqVO) => { export function exportMerchant(params: MerchantExportReqVO) {
return defHttp.download({ url: '/pay/merchant/export-excel', params }, '支付商户.xls') return defHttp.download({ url: '/pay/merchant/export-excel', params }, '支付商户.xls')
} }
// 支付商户状态修改 // 支付商户状态修改
export const changeMerchantStatusApi = (id: number, status: number) => { export function changeMerchantStatus(id: number, status: number) {
const data = { const data = {
id, id,
status status

View File

@ -79,31 +79,31 @@ export interface OrderExportReqVO {
} }
// 查询列表支付订单 // 查询列表支付订单
export const getOrderPageApi = async (params: OrderPageReqVO) => { export function getOrderPage(params: OrderPageReqVO) {
return defHttp.get({ url: '/pay/order/page', params }) return defHttp.get({ url: '/pay/order/page', params })
} }
// 查询详情支付订单 // 查询详情支付订单
export const getOrderApi = async (id: number) => { export function getOrder(id: number) {
return defHttp.get({ url: '/pay/order/get?id=' + id }) return defHttp.get({ url: '/pay/order/get?id=' + id })
} }
// 新增支付订单 // 新增支付订单
export const createOrderApi = async (data: OrderVO) => { export function createOrder(data: OrderVO) {
return defHttp.post({ url: '/pay/order/create', data }) return defHttp.post({ url: '/pay/order/create', data })
} }
// 修改支付订单 // 修改支付订单
export const updateOrderApi = async (data: OrderVO) => { export function updateOrder(data: OrderVO) {
return defHttp.put({ url: '/pay/order/update', data }) return defHttp.put({ url: '/pay/order/update', data })
} }
// 删除支付订单 // 删除支付订单
export const deleteOrderApi = async (id: number) => { export function deleteOrder(id: number) {
return defHttp.delete({ url: '/pay/order/delete?id=' + id }) return defHttp.delete({ url: '/pay/order/delete?id=' + id })
} }
// 导出支付订单 // 导出支付订单
export const exportOrderApi = async (params: OrderExportReqVO) => { export function exportOrder(params: OrderExportReqVO) {
return defHttp.download({ url: '/pay/order/export-excel', params }, '支付订单.xls') return defHttp.download({ url: '/pay/order/export-excel', params }, '支付订单.xls')
} }

View File

@ -86,31 +86,31 @@ export interface PayRefundExportReqVO {
} }
// 查询列表退款订单 // 查询列表退款订单
export const getRefundPageApi = (params: RefundPageReqVO) => { export function getRefundPage(params: RefundPageReqVO) {
return defHttp.get({ url: '/pay/refund/page', params }) return defHttp.get({ url: '/pay/refund/page', params })
} }
// 查询详情退款订单 // 查询详情退款订单
export const getRefundApi = (id: number) => { export function getRefund(id: number) {
return defHttp.get({ url: '/pay/refund/get?id=' + id }) return defHttp.get({ url: '/pay/refund/get?id=' + id })
} }
// 新增退款订单 // 新增退款订单
export const createRefundApi = (data: RefundVO) => { export function createRefund(data: RefundVO) {
return defHttp.post({ url: '/pay/refund/create', data }) return defHttp.post({ url: '/pay/refund/create', data })
} }
// 修改退款订单 // 修改退款订单
export const updateRefundApi = (data: RefundVO) => { export function updateRefund(data: RefundVO) {
return defHttp.put({ url: '/pay/refund/update', data }) return defHttp.put({ url: '/pay/refund/update', data })
} }
// 删除退款订单 // 删除退款订单
export const deleteRefundApi = (id: number) => { export function deleteRefund(id: number) {
return defHttp.delete({ url: '/pay/refund/delete?id=' + id }) return defHttp.delete({ url: '/pay/refund/delete?id=' + id })
} }
// 导出退款订单 // 导出退款订单
export const exportRefundApi = (params: PayRefundExportReqVO) => { export function exportRefund(params: PayRefundExportReqVO) {
return defHttp.download({ url: '/pay/refund/export-excel', params }, '退款订单.xls') return defHttp.download({ url: '/pay/refund/export-excel', params }, '退款订单.xls')
} }

View File

@ -1,11 +1,11 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 获得地区树 // 获得地区树
export const getAreaTree = () => { export function getAreaTree() {
return defHttp.get({ url: '/system/area/tree' }) return defHttp.get({ url: '/system/area/tree' })
} }
// 获得 IP 对应的地区名 // 获得 IP 对应的地区名
export const getAreaByIp = (ip: string) => { export function getAreaByIp(ip: string) {
return defHttp.get({ url: '/system/area/get-by-ip?ip=' + ip }) return defHttp.get({ url: '/system/area/get-by-ip?ip=' + ip })
} }

View File

@ -18,31 +18,31 @@ export interface DeptPageReqVO {
} }
// 查询部门(精简)列表 // 查询部门(精简)列表
export const listSimpleDept = async () => { export function listSimpleDept() {
return defHttp.get({ url: '/system/dept/list-all-simple' }) return defHttp.get({ url: '/system/dept/list-all-simple' })
} }
// 查询部门列表 // 查询部门列表
export const getDeptPage = async (params: DeptPageReqVO) => { export function getDeptPage(params: DeptPageReqVO) {
return defHttp.get({ url: '/system/dept/list', params }) return defHttp.get({ url: '/system/dept/list', params })
} }
// 查询部门详情 // 查询部门详情
export const getDept = async (id: number) => { export function getDept(id: number) {
return defHttp.get({ url: '/system/dept/get?id=' + id }) return defHttp.get({ url: '/system/dept/get?id=' + id })
} }
// 新增部门 // 新增部门
export const createDept = async (data: DeptVO) => { export function createDept(data: DeptVO) {
return defHttp.post({ url: '/system/dept/create', data }) return defHttp.post({ url: '/system/dept/create', data })
} }
// 修改部门 // 修改部门
export const updateDept = async (params: DeptVO) => { export function updateDept(params: DeptVO) {
return defHttp.put({ url: '/system/dept/update', data: params }) return defHttp.put({ url: '/system/dept/update', data: params })
} }
// 删除部门 // 删除部门
export const deleteDept = async (id: number) => { export function deleteDept(id: number) {
return defHttp.delete({ url: '/system/dept/delete?id=' + id }) return defHttp.delete({ url: '/system/dept/delete?id=' + id })
} }

View File

@ -2,35 +2,35 @@ import { defHttp } from '@/utils/http/axios'
import type { DictDataVO, DictDataPageReqVO, DictDataExportReqVO } from './types' import type { DictDataVO, DictDataPageReqVO, DictDataExportReqVO } from './types'
// 查询字典数据(精简)列表 // 查询字典数据(精简)列表
export const listSimpleDictData = () => { export function listSimpleDictData() {
return defHttp.get({ url: '/system/dict-data/list-all-simple' }) return defHttp.get({ url: '/system/dict-data/list-all-simple' })
} }
// 查询字典数据列表 // 查询字典数据列表
export const getDictDataPage = (params: DictDataPageReqVO) => { export function getDictDataPage(params: DictDataPageReqVO) {
return defHttp.get({ url: '/system/dict-data/page', params }) return defHttp.get({ url: '/system/dict-data/page', params })
} }
// 查询字典数据详情 // 查询字典数据详情
export const getDictData = (id: number) => { export function getDictData(id: number) {
return defHttp.get({ url: '/system/dict-data/get?id=' + id }) return defHttp.get({ url: '/system/dict-data/get?id=' + id })
} }
// 新增字典数据 // 新增字典数据
export const createDictData = (data: DictDataVO) => { export function createDictData(data: DictDataVO) {
return defHttp.post({ url: '/system/dict-data/create', data }) return defHttp.post({ url: '/system/dict-data/create', data })
} }
// 修改字典数据 // 修改字典数据
export const updateDictData = (data: DictDataVO) => { export function updateDictData(data: DictDataVO) {
return defHttp.put({ url: '/system/dict-data/update', data }) return defHttp.put({ url: '/system/dict-data/update', data })
} }
// 删除字典数据 // 删除字典数据
export const deleteDictData = (id: number) => { export function deleteDictData(id: number) {
return defHttp.delete({ url: '/system/dict-data/delete?id=' + id }) return defHttp.delete({ url: '/system/dict-data/delete?id=' + id })
} }
// 导出字典类型数据 // 导出字典类型数据
export const exportDictData = (params: DictDataExportReqVO) => { export function exportDictData(params: DictDataExportReqVO) {
return defHttp.get({ url: '/system/dict-data/export', params }) return defHttp.get({ url: '/system/dict-data/export', params })
} }

View File

@ -2,35 +2,35 @@ import { defHttp } from '@/utils/http/axios'
import type { DictTypeVO, DictTypePageReqVO, DictTypeExportReqVO } from './types' import type { DictTypeVO, DictTypePageReqVO, DictTypeExportReqVO } from './types'
// 查询字典(精简)列表 // 查询字典(精简)列表
export const listSimpleDictType = () => { export function listSimpleDictType() {
return defHttp.get({ url: '/system/dict-type/list-all-simple' }) return defHttp.get({ url: '/system/dict-type/list-all-simple' })
} }
// 查询字典列表 // 查询字典列表
export const getDictTypePage = (params: DictTypePageReqVO) => { export function getDictTypePage(params: DictTypePageReqVO) {
return defHttp.get({ url: '/system/dict-type/page', params }) return defHttp.get({ url: '/system/dict-type/page', params })
} }
// 查询字典详情 // 查询字典详情
export const getDictType = (id: number) => { export function getDictType(id: number) {
return defHttp.get({ url: '/system/dict-type/get?id=' + id }) return defHttp.get({ url: '/system/dict-type/get?id=' + id })
} }
// 新增字典 // 新增字典
export const createDictType = (data: DictTypeVO) => { export function createDictType(data: DictTypeVO) {
return defHttp.post({ url: '/system/dict-type/create', data }) return defHttp.post({ url: '/system/dict-type/create', data })
} }
// 修改字典 // 修改字典
export const updateDictType = (data: DictTypeVO) => { export function updateDictType(data: DictTypeVO) {
return defHttp.put({ url: '/system/dict-type/update', data }) return defHttp.put({ url: '/system/dict-type/update', data })
} }
// 删除字典 // 删除字典
export const deleteDictType = (id: number) => { export function deleteDictType(id: number) {
return defHttp.delete({ url: '/system/dict-type/delete?id=' + id }) return defHttp.delete({ url: '/system/dict-type/delete?id=' + id })
} }
// 导出字典类型 // 导出字典类型
export const exportDictType = (params: DictTypeExportReqVO) => { export function exportDictType(params: DictTypeExportReqVO) {
return defHttp.get({ url: '/system/dict-type/export', params }) return defHttp.get({ url: '/system/dict-type/export', params })
} }

View File

@ -19,31 +19,31 @@ export interface ErrorCodePageReqVO extends PageParam {
} }
// 查询错误码列表 // 查询错误码列表
export const getErrorCodePage = (params: ErrorCodePageReqVO) => { export function getErrorCodePage(params: ErrorCodePageReqVO) {
return defHttp.get({ url: '/system/error-code/page', params }) return defHttp.get({ url: '/system/error-code/page', params })
} }
// 查询错误码详情 // 查询错误码详情
export const getErrorCode = (id: number) => { export function getErrorCode(id: number) {
return defHttp.get({ url: '/system/error-code/get?id=' + id }) return defHttp.get({ url: '/system/error-code/get?id=' + id })
} }
// 新增错误码 // 新增错误码
export const createErrorCode = (data: ErrorCodeVO) => { export function createErrorCode(data: ErrorCodeVO) {
return defHttp.post({ url: '/system/error-code/create', data }) return defHttp.post({ url: '/system/error-code/create', data })
} }
// 修改错误码 // 修改错误码
export const updateErrorCode = (data: ErrorCodeVO) => { export function updateErrorCode(data: ErrorCodeVO) {
return defHttp.put({ url: '/system/error-code/update', data }) return defHttp.put({ url: '/system/error-code/update', data })
} }
// 删除错误码 // 删除错误码
export const deleteErrorCode = (id: number) => { export function deleteErrorCode(id: number) {
return defHttp.delete({ url: '/system/error-code/delete?id=' + id }) return defHttp.delete({ url: '/system/error-code/delete?id=' + id })
} }
// 导出错误码 // 导出错误码
export const excelErrorCode = (params: ErrorCodePageReqVO) => { export function excelErrorCode(params: ErrorCodePageReqVO) {
return defHttp.download({ url: '/system/error-code/export-excel', params }, '错误码.xls') return defHttp.download({ url: '/system/error-code/export-excel', params }, '错误码.xls')
} }

View File

@ -21,10 +21,10 @@ export interface LoginLogReqVO extends PageParam {
} }
// 查询登录日志列表 // 查询登录日志列表
export const getLoginLogPage = (params: LoginLogReqVO) => { export function getLoginLogPage(params: LoginLogReqVO) {
return defHttp.get({ url: '/system/login-log/page', params }) return defHttp.get({ url: '/system/login-log/page', params })
} }
// 导出登录日志 // 导出登录日志
export const exportLoginLog = (params: LoginLogReqVO) => { export function exportLoginLog(params: LoginLogReqVO) {
return defHttp.download({ url: '/system/login-log/export', params }, '登录日志.xls') return defHttp.download({ url: '/system/login-log/export', params }, '登录日志.xls')
} }

View File

@ -1,31 +1,31 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 创建邮箱账号 // 创建邮箱账号
export const createMailAccount = (data) => { export function createMailAccount(data) {
return defHttp.post({ url: '/system/mail-account/create', data }) return defHttp.post({ url: '/system/mail-account/create', data })
} }
// 更新邮箱账号 // 更新邮箱账号
export const updateMailAccount = (data) => { export function updateMailAccount(data) {
return defHttp.put({ url: '/system/mail-account/update', data }) return defHttp.put({ url: '/system/mail-account/update', data })
} }
// 删除邮箱账号 // 删除邮箱账号
export const deleteMailAccount = (id: number) => { export function deleteMailAccount(id: number) {
return defHttp.delete({ url: '/system/mail-account/delete?id=' + id }) return defHttp.delete({ url: '/system/mail-account/delete?id=' + id })
} }
// 获得邮箱账号 // 获得邮箱账号
export const getMailAccount = (id: number) => { export function getMailAccount(id: number) {
return defHttp.get({ url: '/system/mail-account/get?id=' + id }) return defHttp.get({ url: '/system/mail-account/get?id=' + id })
} }
// 获得邮箱账号分页 // 获得邮箱账号分页
export const getMailAccountPage = (params) => { export function getMailAccountPage(params) {
return defHttp.get({ url: '/system/mail-account/page', params }) return defHttp.get({ url: '/system/mail-account/page', params })
} }
// 获取邮箱账号的精简信息列表 // 获取邮箱账号的精简信息列表
export const getSimpleMailAccountList = () => { export function getSimpleMailAccountList() {
return defHttp.get({ url: '/system/mail-account/list-all-simple' }) return defHttp.get({ url: '/system/mail-account/list-all-simple' })
} }

View File

@ -1,11 +1,11 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 获得邮件日志 // 获得邮件日志
export const getMailLog = (id: number) => { export function getMailLog(id: number) {
return defHttp.get({ url: '/system/mail-log/get?id=' + id }) return defHttp.get({ url: '/system/mail-log/get?id=' + id })
} }
// 获得邮件日志分页 // 获得邮件日志分页
export const getMailAccountPage = (params) => { export function getMailAccountPage(params) {
return defHttp.get({ url: '/system/mail-log/page', params }) return defHttp.get({ url: '/system/mail-log/page', params })
} }

View File

@ -1,31 +1,31 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 创建邮件模版 // 创建邮件模版
export const createMailTemplate = (data) => { export function createMailTemplate(data) {
return defHttp.post({ url: '/system/mail-template/create', data }) return defHttp.post({ url: '/system/mail-template/create', data })
} }
// 更新邮件模版 // 更新邮件模版
export const updateMailTemplate = (data) => { export function updateMailTemplate(data) {
return defHttp.put({ url: '/system/mail-template/update', data }) return defHttp.put({ url: '/system/mail-template/update', data })
} }
// 删除邮件模版 // 删除邮件模版
export const deleteMailTemplate = (id: number) => { export function deleteMailTemplate(id: number) {
return defHttp.delete({ url: '/system/mail-template/delete?id=' + id }) return defHttp.delete({ url: '/system/mail-template/delete?id=' + id })
} }
// 获得邮件模版 // 获得邮件模版
export const getMailTemplate = (id: number) => { export function getMailTemplate(id: number) {
return defHttp.get({ url: '/system/mail-template/get?id=' + id }) return defHttp.get({ url: '/system/mail-template/get?id=' + id })
} }
// 获得邮件模版分页 // 获得邮件模版分页
export const getMailTemplatePage = (params) => { export function getMailTemplatePage(params) {
return defHttp.get({ url: '/system/mail-template/page', params }) return defHttp.get({ url: '/system/mail-template/page', params })
} }
// 发送测试邮件 // 发送测试邮件
export const sendMail = (data) => { export function sendMail(data) {
return defHttp.post({ url: '/system/mail-template/send-mail', data }) return defHttp.post({ url: '/system/mail-template/send-mail', data })
} }

View File

@ -22,31 +22,31 @@ export interface MenuPageReqVO {
} }
// 查询菜单(精简)列表 // 查询菜单(精简)列表
export const listSimpleMenus = () => { export function listSimpleMenus() {
return defHttp.get({ url: '/system/menu/list-all-simple' }) return defHttp.get({ url: '/system/menu/list-all-simple' })
} }
// 查询菜单列表 // 查询菜单列表
export const getMenuList = (params: MenuPageReqVO) => { export function getMenuList(params: MenuPageReqVO) {
return defHttp.get({ url: '/system/menu/list', params }) return defHttp.get({ url: '/system/menu/list', params })
} }
// 获取菜单详情 // 获取菜单详情
export const getMenu = (id: number) => { export function getMenu(id: number) {
return defHttp.get({ url: '/system/menu/get?id=' + id }) return defHttp.get({ url: '/system/menu/get?id' + id })
} }
// 新增菜单 // 新增菜单
export const createMenu = (data: MenuVO) => { export function createMenu(data: MenuVO) {
return defHttp.post({ url: '/system/menu/create', data }) return defHttp.post({ url: '/system/menu/create', data })
} }
// 修改菜单 // 修改菜单
export const updateMenu = (data: MenuVO) => { export function updateMenu(data: MenuVO) {
return defHttp.put({ url: '/system/menu/update', data }) return defHttp.put({ url: '/system/menu/update', data })
} }
// 删除菜单 // 删除菜单
export const deleteMenu = (id: number) => { export function deleteMenu(id: number) {
return defHttp.delete({ url: '/system/menu/delete?id=' + id }) return defHttp.delete({ url: '/system/menu/delete?id' + id })
} }

View File

@ -17,26 +17,26 @@ export interface NoticePageReqVO extends PageParam {
} }
// 查询公告列表 // 查询公告列表
export const getNoticePage = (params: NoticePageReqVO) => { export function getNoticePage(params: NoticePageReqVO) {
return defHttp.get({ url: '/system/notice/page', params }) return defHttp.get({ url: '/system/notice/page', params })
} }
// 查询公告详情 // 查询公告详情
export const getNotice = (id: number) => { export function getNotice(id: number) {
return defHttp.get({ url: '/system/notice/get?id=' + id }) return defHttp.get({ url: '/system/notice/get?id=' + id })
} }
// 新增公告 // 新增公告
export const createNotice = (data: NoticeVO) => { export function createNotice(data: NoticeVO) {
return defHttp.post({ url: '/system/notice/create', data }) return defHttp.post({ url: '/system/notice/create', data })
} }
// 修改公告 // 修改公告
export const updateNotice = (data: NoticeVO) => { export function updateNotice(data: NoticeVO) {
return defHttp.put({ url: '/system/notice/update', data }) return defHttp.put({ url: '/system/notice/update', data })
} }
// 删除公告 // 删除公告
export const deleteNotice = (id: number) => { export function deleteNotice(id: number) {
return defHttp.delete({ url: '/system/notice/delete?id=' + id }) return defHttp.delete({ url: '/system/notice/delete?id=' + id })
} }

View File

@ -2,31 +2,31 @@ import { defHttp } from '@/utils/http/axios'
import qs from 'qs' import qs from 'qs'
// 获得站内信分页 // 获得站内信分页
export const getPostPage = (params) => { export function getPostPage(params) {
return defHttp.get({ url: '/system/notify-message/page', params }) return defHttp.get({ url: '/system/notify-message/page', params })
} }
// 获得我的站内信分页 // 获得我的站内信分页
export const listSimplePosts = (params) => { export function listSimplePosts(params) {
return defHttp.get({ url: '/system/notify-message/my-page', params }) return defHttp.get({ url: '/system/notify-message/my-page', params })
} }
// 批量标记已读 // 批量标记已读
export const updateNotifyMessageRead = (ids: number[]) => { export function updateNotifyMessageRead(ids: number[]) {
return defHttp.put({ url: '/system/notify-message/update-read?' + qs.stringify({ ids: ids }, { indices: false }) }) return defHttp.put({ url: '/system/notify-message/update-read?' + qs.stringify({ ids: ids }, { indices: false }) })
} }
// 标记所有站内信为已读 // 标记所有站内信为已读
export const updateAllNotifyMessageRead = () => { export function updateAllNotifyMessageRead() {
return defHttp.put({ url: '/system/notify-message/update-all-read' }) return defHttp.put({ url: '/system/notify-message/update-all-read' })
} }
// 获取当前用户的最新站内信列表 // 获取当前用户的最新站内信列表
export const getUnreadNotifyMessageList = () => { export function getUnreadNotifyMessageList() {
return defHttp.get({ url: '/system/notify-message/get-unread-list' }) return defHttp.get({ url: '/system/notify-message/get-unread-list' })
} }
// 获得当前用户的未读站内信数量 // 获得当前用户的未读站内信数量
export const getUnreadNotifyMessageCount = () => { export function getUnreadNotifyMessageCount() {
return defHttp.get({ url: '/system/notify-message/get-unread-count' }) return defHttp.get({ url: '/system/notify-message/get-unread-count' })
} }

View File

@ -1,36 +1,36 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
// 创建站内信模板 // 创建站内信模板
export const createNotifyTemplate = (data) => { export function createNotifyTemplate(data) {
return defHttp.post({ url: '/system/notify-template/create', data }) return defHttp.post({ url: '/system/notify-template/create', data })
} }
// 更新站内信模板 // 更新站内信模板
export const updateNotifyTemplate = (data) => { export function updateNotifyTemplate(data) {
return defHttp.put({ url: '/system/notify-template/update', data }) return defHttp.put({ url: '/system/notify-template/update', data })
} }
// 删除站内信模板 // 删除站内信模板
export const deleteNotifyTemplate = (id: number) => { export function deleteNotifyTemplate(id: number) {
return defHttp.delete({ url: '/system/notify-template/delete?id=' + id }) return defHttp.delete({ url: '/system/notify-template/delete?id=' + id })
} }
// 获得站内信模板 // 获得站内信模板
export const getNotifyTemplate = (id: number) => { export function getNotifyTemplate(id: number) {
return defHttp.get({ url: '/system/notify-template/get?id=' + id }) return defHttp.get({ url: '/system/notify-template/get?id=' + id })
} }
// 获得站内信模板分页 // 获得站内信模板分页
export const getNotifyTemplatePage = (params) => { export function getNotifyTemplatePage(params) {
return defHttp.get({ url: '/system/notify-template/page', params }) return defHttp.get({ url: '/system/notify-template/page', params })
} }
// 获取岗位精简信息列表 // 获取岗位精简信息列表
export const listSimplePosts = () => { export function listSimplePosts() {
return defHttp.get({ url: '/system/post/list-all-simple' }) return defHttp.get({ url: '/system/post/list-all-simple' })
} }
// 导出站内信模板 Excel // 导出站内信模板 Excel
export const exportNotifyTemplateExcel = (params) => { export function exportNotifyTemplateExcel(params) {
return defHttp.download({ url: '/system/notify-template/export-excel', params }, '导出站内信模板.xls') return defHttp.download({ url: '/system/notify-template/export-excel', params }, '导出站内信模板.xls')
} }

View File

@ -26,26 +26,26 @@ export interface OAuth2ClientPageReqVO extends PageParam {
status?: number status?: number
} }
// 查询 OAuth2列表 // 查询 OAuth2列表
export const getOAuth2ClientPage = (params: OAuth2ClientPageReqVO) => { export function getOAuth2ClientPage(params: OAuth2ClientPageReqVO) {
return defHttp.get({ url: '/system/oauth2-client/page', params }) return defHttp.get({ url: '/system/oauth2-client/page', params })
} }
// 查询 OAuth2详情 // 查询 OAuth2详情
export const getOAuth2Client = (id: number) => { export function getOAuth2Client(id: number) {
return defHttp.get({ url: '/system/oauth2-client/get?id=' + id }) return defHttp.get({ url: '/system/oauth2-client/get?id=' + id })
} }
// 新增 OAuth2 // 新增 OAuth2
export const createOAuth2Client = (data: OAuth2ClientVO) => { export function createOAuth2Client(data: OAuth2ClientVO) {
return defHttp.post({ url: '/system/oauth2-client/create', data }) return defHttp.post({ url: '/system/oauth2-client/create', data })
} }
// 修改 OAuth2 // 修改 OAuth2
export const updateOAuth2Client = (data: OAuth2ClientVO) => { export function updateOAuth2Client(data: OAuth2ClientVO) {
return defHttp.put({ url: '/system/oauth2-client/update', data }) return defHttp.put({ url: '/system/oauth2-client/update', data })
} }
// 删除 OAuth2 // 删除 OAuth2
export const deleteOAuth2Client = (id: number) => { export function deleteOAuth2Client(id: number) {
return defHttp.delete({ url: '/system/oauth2-client/delete?id=' + id }) return defHttp.delete({ url: '/system/oauth2-client/delete?id=' + id })
} }

View File

@ -18,11 +18,11 @@ export interface OAuth2TokenPageReqVO extends PageParam {
} }
// 查询 token列表 // 查询 token列表
export const getAccessTokenPage = (params: OAuth2TokenPageReqVO) => { export function getAccessTokenPage(params: OAuth2TokenPageReqVO) {
return defHttp.get({ url: '/system/oauth2-token/page', params }) return defHttp.get({ url: '/system/oauth2-token/page', params })
} }
// 删除 token // 删除 token
export const deleteAccessToken = (accessToken: number) => { export function deleteAccessToken(accessToken: number) {
return defHttp.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken }) return defHttp.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken })
} }

View File

@ -1,6 +1,6 @@
import { defHttp } from '@/utils/http/axios' import { defHttp } from '@/utils/http/axios'
export type OperateLogVO = { export interface OperateLogVO {
id: number id: number
userNickname: string userNickname: string
traceId: string traceId: string
@ -32,10 +32,10 @@ export interface OperateLogPageReqVO extends PageParam {
} }
// 查询操作日志列表 // 查询操作日志列表
export const getOperateLogPage = (params: OperateLogPageReqVO) => { export function getOperateLogPage(params: OperateLogPageReqVO) {
return defHttp.get({ url: '/system/operate-log/page', params }) return defHttp.get({ url: '/system/operate-log/page', params })
} }
// 导出操作日志 // 导出操作日志
export const exportOperateLog = (params: OperateLogPageReqVO) => { export function exportOperateLog(params: OperateLogPageReqVO) {
return defHttp.download({ url: '/system/operate-log/export', params }, '操作日志.xls') return defHttp.download({ url: '/system/operate-log/export', params }, '操作日志.xls')
} }

View File

@ -17,26 +17,26 @@ export interface PermissionAssignRoleDataScopeReqVO {
} }
// 查询角色拥有的菜单权限 // 查询角色拥有的菜单权限
export const listRoleMenus = (roleId: number) => { export function listRoleMenus(roleId: number) {
return defHttp.get({ url: '/system/permission/list-role-resources?roleId=' + roleId }) return defHttp.get({ url: '/system/permission/list-role-resources?roleId=' + roleId })
} }
// 赋予角色菜单权限 // 赋予角色菜单权限
export const assignRoleMenu = (data: PermissionAssignRoleMenuReqVO) => { export function assignRoleMenu(data: PermissionAssignRoleMenuReqVO) {
return defHttp.post({ url: '/system/permission/assign-role-menu', data }) return defHttp.post({ url: '/system/permission/assign-role-menu', data })
} }
// 赋予角色数据权限 // 赋予角色数据权限
export const assignRoleDataScope = (data: PermissionAssignRoleDataScopeReqVO) => { export function assignRoleDataScope(data: PermissionAssignRoleDataScopeReqVO) {
return defHttp.post({ url: '/system/permission/assign-role-data-scope', data }) return defHttp.post({ url: '/system/permission/assign-role-data-scope', data })
} }
// 查询用户拥有的角色数组 // 查询用户拥有的角色数组
export const listUserRoles = (userId: number) => { export function listUserRoles(userId: number) {
return defHttp.get({ url: '/system/permission/list-user-roles?userId=' + userId }) return defHttp.get({ url: '/system/permission/list-user-roles?userId=' + userId })
} }
// 赋予用户角色 // 赋予用户角色
export const aassignUserRole = (data: PermissionAssignUserRoleReqVO) => { export function aassignUserRole(data: PermissionAssignUserRoleReqVO) {
return defHttp.post({ url: '/system/permission/assign-user-role', data }) return defHttp.post({ url: '/system/permission/assign-user-role', data })
} }

View File

@ -23,36 +23,36 @@ export interface PostExportReqVO {
} }
// 查询岗位列表 // 查询岗位列表
export const getPostPage = (params: PostPageReqVO) => { export function getPostPage(params: PostPageReqVO) {
return defHttp.get<PageResult<PostVO>>({ url: '/system/post/page', params }) return defHttp.get<PageResult<PostVO>>({ url: '/system/post/page', params })
} }
// 获取岗位精简信息列表 // 获取岗位精简信息列表
export const listSimplePosts = () => { export function listSimplePosts() {
return defHttp.get({ url: '/system/post/list-all-simple' }) return defHttp.get({ url: '/system/post/list-all-simple' })
} }
// 查询岗位详情 // 查询岗位详情
export const getPost = (id: number) => { export function getPost(id: number) {
return defHttp.get({ url: '/system/post/get?id=' + id }) return defHttp.get({ url: '/system/post/get?id=' + id })
} }
// 新增岗位 // 新增岗位
export const createPost = (data: PostVO) => { export function createPost(data: PostVO) {
return defHttp.post({ url: '/system/post/create', data }) return defHttp.post({ url: '/system/post/create', data })
} }
// 修改岗位 // 修改岗位
export const updatePost = (data: PostVO) => { export function updatePost(data: PostVO) {
return defHttp.put({ url: '/system/post/update', data }) return defHttp.put({ url: '/system/post/update', data })
} }
// 删除岗位 // 删除岗位
export const deletePost = (id: number) => { export function deletePost(id: number) {
return defHttp.delete({ url: '/system/post/delete?id=' + id }) return defHttp.delete({ url: '/system/post/delete?id=' + id })
} }
// 导出岗位 // 导出岗位
export const exportPost = (params: PostExportReqVO) => { export function exportPost(params: PostExportReqVO) {
return defHttp.download({ url: '/system/post/export', params }, '导出岗位.xls') return defHttp.download({ url: '/system/post/export', params }, '导出岗位.xls')
} }

View File

@ -30,41 +30,41 @@ export interface RoleExportReqVO {
} }
// 查询角色列表 // 查询角色列表
export const getRolePage = (params: RolePageReqVO) => { export function getRolePage(params: RolePageReqVO) {
return defHttp.get({ url: '/system/role/page', params }) return defHttp.get({ url: '/system/role/page', params })
} }
// 查询角色(精简)列表 // 查询角色(精简)列表
export const listSimpleRoles = () => { export function listSimpleRoles() {
return defHttp.get({ url: '/system/role/list-all-simple' }) return defHttp.get({ url: '/system/role/list-all-simple' })
} }
// 查询角色详情 // 查询角色详情
export const getRole = (id: number) => { export function getRole(id: number) {
return defHttp.get({ url: '/system/role/get?id=' + id }) return defHttp.get({ url: '/system/role/get?id=' + id })
} }
// 新增角色 // 新增角色
export const createRole = (data: RoleVO) => { export function createRole(data: RoleVO) {
return defHttp.post({ url: '/system/role/create', data }) return defHttp.post({ url: '/system/role/create', data })
} }
// 修改角色 // 修改角色
export const updateRole = (data: RoleVO) => { export function updateRole(data: RoleVO) {
return defHttp.put({ url: '/system/role/update', data }) return defHttp.put({ url: '/system/role/update', data })
} }
// 修改角色状态 // 修改角色状态
export const updateRoleStatus = (data: UpdateStatusReqVO) => { export function updateRoleStatus(data: UpdateStatusReqVO) {
return defHttp.put({ url: '/system/role/update-status', data }) return defHttp.put({ url: '/system/role/update-status', data })
} }
// 删除角色 // 删除角色
export const deleteRole = (id: number) => { export function deleteRole(id: number) {
return defHttp.delete({ url: '/system/role/delete?id=' + id }) return defHttp.delete({ url: '/system/role/delete?id=' + id })
} }
// 导出角色 // 导出角色
export const exportRole = (params: RoleExportReqVO) => { export function exportRole(params: RoleExportReqVO) {
return defHttp.download({ url: '/system/post/export', params }, '导出角色.xls') return defHttp.download({ url: '/system/post/export', params }, '导出角色.xls')
} }

View File

@ -24,41 +24,41 @@ export interface SensitiveWordExportReqVO {
} }
// 查询敏感词列表 // 查询敏感词列表
export const getSensitiveWordPage = (params: SensitiveWordPageReqVO) => { export function getSensitiveWordPage(params: SensitiveWordPageReqVO) {
return defHttp.get({ url: '/system/sensitive-word/page', params }) return defHttp.get({ url: '/system/sensitive-word/page', params })
} }
// 查询敏感词详情 // 查询敏感词详情
export const getSensitiveWord = (id: number) => { export function getSensitiveWord(id: number) {
return defHttp.get({ url: '/system/sensitive-word/get?id=' + id }) return defHttp.get({ url: '/system/sensitive-word/get?id=' + id })
} }
// 新增敏感词 // 新增敏感词
export const createSensitiveWord = (data: SensitiveWordVO) => { export function createSensitiveWord(data: SensitiveWordVO) {
return defHttp.post({ url: '/system/sensitive-word/create', data }) return defHttp.post({ url: '/system/sensitive-word/create', data })
} }
// 修改敏感词 // 修改敏感词
export const updateSensitiveWord = (data: SensitiveWordVO) => { export function updateSensitiveWord(data: SensitiveWordVO) {
return defHttp.put({ url: '/system/sensitive-word/update', data }) return defHttp.put({ url: '/system/sensitive-word/update', data })
} }
// 删除敏感词 // 删除敏感词
export const deleteSensitiveWord = (id: number) => { export function deleteSensitiveWord(id: number) {
return defHttp.delete({ url: '/system/sensitive-word/delete?id=' + id }) return defHttp.delete({ url: '/system/sensitive-word/delete?id=' + id })
} }
// 导出敏感词 // 导出敏感词
export const exportSensitiveWord = (params: SensitiveWordExportReqVO) => { export function exportSensitiveWord(params: SensitiveWordExportReqVO) {
return defHttp.download({ url: '/system/sensitive-word/export-excel', params }, '导出敏感词.xls') return defHttp.download({ url: '/system/sensitive-word/export-excel', params }, '导出敏感词.xls')
} }
// 获取所有敏感词的标签数组 // 获取所有敏感词的标签数组
export const getSensitiveWordTags = () => { export function getSensitiveWordTags() {
return defHttp.get({ url: '/system/sensitive-word/get-tags' }) return defHttp.get({ url: '/system/sensitive-word/get-tags' })
} }
// 获得文本所包含的不合法的敏感词数组 // 获得文本所包含的不合法的敏感词数组
export const validateText = (id: number) => { export function validateText(id: number) {
return defHttp.get({ url: '/system/sensitive-word/validate-text?' + id }) return defHttp.get({ url: '/system/sensitive-word/validate-text?' + id })
} }

View File

@ -20,31 +20,31 @@ export interface SmsChannelPageReqVO extends PageParam {
} }
// 查询短信渠道列表 // 查询短信渠道列表
export const getSmsChannelPage = (params: SmsChannelPageReqVO) => { export function getSmsChannelPage(params: SmsChannelPageReqVO) {
return defHttp.get({ url: '/system/sms-channel/page', params }) return defHttp.get({ url: '/system/sms-channel/page', params })
} }
// 获得短信渠道精简列表 // 获得短信渠道精简列表
export const getSimpleSmsChannels = () => { export function getSimpleSmsChannels() {
return defHttp.get({ url: '/system/sms-channel/list-all-simple' }) return defHttp.get({ url: '/system/sms-channel/list-all-simple' })
} }
// 查询短信渠道详情 // 查询短信渠道详情
export const getSmsChannel = (id: number) => { export function getSmsChannel(id: number) {
return defHttp.get({ url: '/system/sms-channel/get?id=' + id }) return defHttp.get({ url: '/system/sms-channel/get?id=' + id })
} }
// 新增短信渠道 // 新增短信渠道
export const createSmsChannel = (data: SmsChannelVO) => { export function createSmsChannel(data: SmsChannelVO) {
return defHttp.post({ url: '/system/sms-channel/create', data }) return defHttp.post({ url: '/system/sms-channel/create', data })
} }
// 修改短信渠道 // 修改短信渠道
export const updateSmsChannel = (data: SmsChannelVO) => { export function updateSmsChannel(data: SmsChannelVO) {
return defHttp.put({ url: '/system/sms-channel/update', data }) return defHttp.put({ url: '/system/sms-channel/update', data })
} }
// 删除短信渠道 // 删除短信渠道
export const deleteSmsChannel = (id: number) => { export function deleteSmsChannel(id: number) {
return defHttp.delete({ url: '/system/sms-channel/delete?id=' + id }) return defHttp.delete({ url: '/system/sms-channel/delete?id=' + id })
} }

View File

@ -47,11 +47,11 @@ export interface SmsLogExportReqVO {
} }
// 查询短信日志列表 // 查询短信日志列表
export const getSmsLogPage = (params: SmsLogPageReqVO) => { export function getSmsLogPage(params: SmsLogPageReqVO) {
return defHttp.get({ url: '/system/sms-log/page', params }) return defHttp.get({ url: '/system/sms-log/page', params })
} }
// 导出短信日志 // 导出短信日志
export const exportSmsLog = (params: SmsLogExportReqVO) => { export function exportSmsLog(params: SmsLogExportReqVO) {
return defHttp.download({ url: '/system/sms-log/export', params }, '短信日志.xls') return defHttp.download({ url: '/system/sms-log/export', params }, '短信日志.xls')
} }

View File

@ -42,36 +42,36 @@ export interface SmsTemplateExportReqVO {
} }
// 查询短信模板列表 // 查询短信模板列表
export const getSmsTemplatePage = (params: SmsTemplatePageReqVO) => { export function getSmsTemplatePage(params: SmsTemplatePageReqVO) {
return defHttp.get({ url: '/system/sms-template/page', params }) return defHttp.get({ url: '/system/sms-template/page', params })
} }
// 查询短信模板详情 // 查询短信模板详情
export const getSmsTemplate = (id: number) => { export function getSmsTemplate(id: number) {
return defHttp.get({ url: '/system/sms-template/get?id=' + id }) return defHttp.get({ url: '/system/sms-template/get?id=' + id })
} }
// 新增短信模板 // 新增短信模板
export const createSmsTemplate = (data: SmsTemplateVO) => { export function createSmsTemplate(data: SmsTemplateVO) {
return defHttp.post({ url: '/system/sms-template/create', data }) return defHttp.post({ url: '/system/sms-template/create', data })
} }
// 修改短信模板 // 修改短信模板
export const updateSmsTemplate = (data: SmsTemplateVO) => { export function updateSmsTemplate(data: SmsTemplateVO) {
return defHttp.put({ url: '/system/sms-template/update', data }) return defHttp.put({ url: '/system/sms-template/update', data })
} }
// 删除短信模板 // 删除短信模板
export const deleteSmsTemplate = (id: number) => { export function deleteSmsTemplate(id: number) {
return defHttp.delete({ url: '/system/sms-template/delete?id=' + id }) return defHttp.delete({ url: '/system/sms-template/delete?id=' + id })
} }
// 发送短信 // 发送短信
export const sendSms = (data: SendSmsReqVO) => { export function sendSms(data: SendSmsReqVO) {
return defHttp.post({ url: '/system/sms-template/send-sms', data }) return defHttp.post({ url: '/system/sms-template/send-sms', data })
} }
// 导出短信模板 // 导出短信模板
export const exportSmsTemplate = (params: SmsTemplateExportReqVO) => { export function exportSmsTemplate(params: SmsTemplateExportReqVO) {
return defHttp.download({ url: '/system/sms-template/export-excel', params }, '短信模板.xls') return defHttp.download({ url: '/system/sms-template/export-excel', params }, '短信模板.xls')
} }

View File

@ -32,31 +32,31 @@ export interface TenantExportReqVO {
} }
// 查询租户列表 // 查询租户列表
export const getTenantPage = (params: TenantPageReqVO) => { export function getTenantPage(params: TenantPageReqVO) {
return defHttp.get({ url: '/system/tenant/page', params }) return defHttp.get({ url: '/system/tenant/page', params })
} }
// 查询租户详情 // 查询租户详情
export const getTenant = (id: number) => { export function getTenant(id: number) {
return defHttp.get({ url: '/system/tenant/get?id=' + id }) return defHttp.get({ url: '/system/tenant/get?id=' + id })
} }
// 新增租户 // 新增租户
export const createTenant = (data: TenantVO) => { export function createTenant(data: TenantVO) {
return defHttp.post({ url: '/system/tenant/create', data }) return defHttp.post({ url: '/system/tenant/create', data })
} }
// 修改租户 // 修改租户
export const updateTenant = (data: TenantVO) => { export function updateTenant(data: TenantVO) {
return defHttp.put({ url: '/system/tenant/update', data }) return defHttp.put({ url: '/system/tenant/update', data })
} }
// 删除租户 // 删除租户
export const deleteTenant = (id: number) => { export function deleteTenant(id: number) {
return defHttp.delete({ url: '/system/tenant/delete?id=' + id }) return defHttp.delete({ url: '/system/tenant/delete?id=' + id })
} }
// 导出租户 // 导出租户
export const exportTenant = (params: TenantExportReqVO) => { export function exportTenant(params: TenantExportReqVO) {
return defHttp.download({ url: '/system/tenant/export-excel', params }, '租户.xls') return defHttp.download({ url: '/system/tenant/export-excel', params }, '租户.xls')
} }

View File

@ -20,30 +20,30 @@ export interface TenantPackagePageReqVO extends PageParam {
} }
// 查询租户套餐列表 // 查询租户套餐列表
export const getTenantPackagePage = (params: TenantPackagePageReqVO) => { export function getTenantPackagePage(params: TenantPackagePageReqVO) {
return defHttp.get({ url: '/system/tenant-package/page', params }) return defHttp.get({ url: '/system/tenant-package/page', params })
} }
// 获得租户 // 获得租户
export const getTenantPackage = (id: number) => { export function getTenantPackage(id: number) {
return defHttp.get({ url: '/system/tenant-package/get?id=' + id }) return defHttp.get({ url: '/system/tenant-package/get?id=' + id })
} }
// 新增租户套餐 // 新增租户套餐
export const createTenantPackage = (data: TenantPackageVO) => { export function createTenantPackage(data: TenantPackageVO) {
return defHttp.post({ url: '/system/tenant-package/create', data }) return defHttp.post({ url: '/system/tenant-package/create', data })
} }
// 修改租户套餐 // 修改租户套餐
export const updateTenantPackage = (data: TenantPackageVO) => { export function updateTenantPackage(data: TenantPackageVO) {
return defHttp.put({ url: '/system/tenant-package/update', data }) return defHttp.put({ url: '/system/tenant-package/update', data })
} }
// 删除租户套餐 // 删除租户套餐
export const deleteTenantPackage = (id: number) => { export function deleteTenantPackage(id: number) {
return defHttp.delete({ url: '/system/tenant-package/delete?id=' + id }) return defHttp.delete({ url: '/system/tenant-package/delete?id=' + id })
} }
// 获取租户套餐精简信息列表 // 获取租户套餐精简信息列表
export const getTenantPackageList = () => { export function getTenantPackageList() {
return defHttp.get({ url: '/system/tenant-package/get-simple-list' }) return defHttp.get({ url: '/system/tenant-package/get-simple-list' })
} }

View File

@ -33,42 +33,42 @@ export interface UserExportReqVO {
} }
// 查询用户管理列表 // 查询用户管理列表
export const getUserPage = (params: UserPageReqVO) => { export function getUserPage(params: UserPageReqVO) {
return defHttp.get({ url: '/system/user/page', params }) return defHttp.get({ url: '/system/user/page', params })
} }
// 查询用户详情 // 查询用户详情
export const getUser = (id: number) => { export function getUser(id: number) {
return defHttp.get({ url: '/system/user/get?id=' + id }) return defHttp.get({ url: '/system/user/get?id=' + id })
} }
// 新增用户 // 新增用户
export const createUser = (data: UserVO) => { export function createUser(data: UserVO) {
return defHttp.post({ url: '/system/user/create', data }) return defHttp.post({ url: '/system/user/create', data })
} }
// 修改用户 // 修改用户
export const updateUser = (data: UserVO) => { export function updateUser(data: UserVO) {
return defHttp.put({ url: '/system/user/update', data }) return defHttp.put({ url: '/system/user/update', data })
} }
// 删除用户 // 删除用户
export const deleteUser = (id: number) => { export function deleteUser(id: number) {
return defHttp.delete({ url: '/system/user/delete?id=' + id }) return defHttp.delete({ url: '/system/user/delete?id=' + id })
} }
// 导出用户 // 导出用户
export const exportUser = (params: UserExportReqVO) => { export function exportUser(params: UserExportReqVO) {
return defHttp.download({ url: '/system/user/export', params }, '用户.xls') return defHttp.download({ url: '/system/user/export', params }, '用户.xls')
} }
// 下载用户导入模板 // 下载用户导入模板
export const importUserTemplate = () => { export function importUserTemplate() {
return defHttp.download({ url: '/system/user/get-import-template' }, '用户导入模板.xls') return defHttp.download({ url: '/system/user/get-import-template' }, '用户导入模板.xls')
} }
// 用户密码重置 // 用户密码重置
export const resetUserPwd = (id: number, password: string) => { export function resetUserPwd(id: number, password: string) {
const data = { const data = {
id, id,
password password
@ -77,7 +77,7 @@ export const resetUserPwd = (id: number, password: string) => {
} }
// 用户状态修改 // 用户状态修改
export const updateUserStatus = (id: number, status: number) => { export function updateUserStatus(id: number, status: number) {
const data = { const data = {
id, id,
status status
@ -86,6 +86,6 @@ export const updateUserStatus = (id: number, status: number) => {
} }
// 获取用户精简信息列表 // 获取用户精简信息列表
export const getListSimpleUsers = () => { export function getListSimpleUsers() {
return defHttp.get({ url: '/system/user/list-all-simple' }) return defHttp.get({ url: '/system/user/list-all-simple' })
} }