增加系统通知功能
This commit is contained in:
87
src/api/system/systemNotice/index.ts
Normal file
87
src/api/system/systemNotice/index.ts
Normal file
@ -0,0 +1,87 @@
|
||||
import { XjrNoticePageModel, XjrNoticePageParams, XjrNoticePageResult } from './model/SystemNoticeModel';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
|
||||
enum Api {
|
||||
Page = '/system/systemNotice/page',
|
||||
List = '/system/systemNotice/list',
|
||||
Info = '/system/systemNotice/info',
|
||||
XjrNotice = '/system/systemNotice',
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 查询XjrNotice分页列表
|
||||
*/
|
||||
export async function getXjrNoticePage(params: XjrNoticePageParams, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<XjrNoticePageResult>(
|
||||
{
|
||||
url: Api.Page,
|
||||
params,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 获取XjrNotice信息
|
||||
*/
|
||||
export async function getXjrNotice(id: String, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.get<XjrNoticePageModel>(
|
||||
{
|
||||
url: Api.Info,
|
||||
params: { id },
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 新增XjrNotice
|
||||
*/
|
||||
export async function addXjrNotice(xjrNotice: Recordable, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post<boolean>(
|
||||
{
|
||||
url: Api.XjrNotice,
|
||||
params: xjrNotice,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 更新XjrNotice
|
||||
*/
|
||||
export async function updateXjrNotice(xjrNotice: Recordable, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.put<boolean>(
|
||||
{
|
||||
url: Api.XjrNotice,
|
||||
params: xjrNotice,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 删除XjrNotice(批量删除)
|
||||
*/
|
||||
export async function deleteXjrNotice(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.delete<boolean>(
|
||||
{
|
||||
url: Api.XjrNotice,
|
||||
data: ids,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
114
src/api/system/systemNotice/model/SystemNoticeModel.ts
Normal file
114
src/api/system/systemNotice/model/SystemNoticeModel.ts
Normal file
@ -0,0 +1,114 @@
|
||||
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';
|
||||
|
||||
/**
|
||||
* @description: XjrNotice分页参数 模型
|
||||
*/
|
||||
export interface XjrNoticePageParams extends BasicPageParams {
|
||||
title: string;
|
||||
|
||||
type: string;
|
||||
|
||||
publisherType: string;
|
||||
|
||||
publisher: string;
|
||||
|
||||
status: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: XjrNotice分页返回值模型
|
||||
*/
|
||||
export interface XjrNoticePageModel {
|
||||
id: string;
|
||||
|
||||
title: string;
|
||||
|
||||
type: string;
|
||||
|
||||
publisherType: string;
|
||||
|
||||
publisher: string;
|
||||
|
||||
status: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: XjrNotice表类型
|
||||
*/
|
||||
export interface XjrNoticeModel {
|
||||
id: number;
|
||||
|
||||
title: string;
|
||||
|
||||
type: number;
|
||||
|
||||
typeName: string;
|
||||
|
||||
publisher: number;
|
||||
|
||||
publisherType: number;
|
||||
|
||||
publisherName: number;
|
||||
|
||||
content: string;
|
||||
|
||||
attachs: number;
|
||||
|
||||
status: number;
|
||||
|
||||
createUserId: number;
|
||||
|
||||
createDate: string;
|
||||
|
||||
modifyUserId: number;
|
||||
|
||||
modifyDate: string;
|
||||
|
||||
deleteMark: number;
|
||||
|
||||
enabledMark: number;
|
||||
|
||||
deptId: number;
|
||||
|
||||
tenantId: number;
|
||||
|
||||
ruleUserId: number;
|
||||
|
||||
xjrNoticeUserList?: XjrNoticeUserModel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: XjrNoticeUser表类型
|
||||
*/
|
||||
export interface XjrNoticeUserModel {
|
||||
id: number;
|
||||
|
||||
noticeId: number;
|
||||
|
||||
userId: number;
|
||||
|
||||
isRead: number;
|
||||
|
||||
reply: string;
|
||||
|
||||
createUserId: number;
|
||||
|
||||
createDate: string;
|
||||
|
||||
modifyUserId: number;
|
||||
|
||||
modifyDate: string;
|
||||
|
||||
deleteMark: number;
|
||||
|
||||
enabledMark: number;
|
||||
|
||||
deptId: number;
|
||||
|
||||
tenantId: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: XjrNotice分页返回值结构
|
||||
*/
|
||||
export type XjrNoticePageResult = BasicFetchResult<XjrNoticePageModel>;
|
||||
Reference in New Issue
Block a user