Browse Source

🚀 消息推送模块

master
wangxiang 2 years ago
parent
commit
56e6ed3538
  1. 22
      src/api/platform/common/controller/pushFile.ts
  2. 25
      src/api/platform/common/controller/pushMessage.ts
  3. 25
      src/api/platform/common/controller/pushThirdPartyManage.ts
  4. 2
      src/api/platform/common/entity/pushApplication.ts
  5. 8
      src/api/platform/common/entity/pushCustomType.ts
  6. 17
      src/api/platform/common/entity/pushFile.ts
  7. 26
      src/api/platform/common/entity/pushMessage.ts
  8. 4
      src/api/platform/common/entity/pushPassList.ts
  9. 2
      src/api/platform/common/entity/pushThirdParty.ts
  10. 16
      src/api/platform/common/entity/pushThirdPartyManage.ts
  11. 16
      src/api/platform/common/entity/pushUserManage.ts

22
src/api/platform/common/controller/pushFile.ts

@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
/**
* api模板规范代码参考,
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved.
* author entfrm开发团队-
*/
import type { PushFileParams, PushFileResult } from '/@/api/platform/common/entity/pushFile';
import { defHttp } from '/@/utils/http/axios';
import { UploadFileParams } from '/#/axios';
import { UploadResult } from '/@/api/platform/core/entity/upload';
enum Api {
list = '/common_proxy/common/pushFile/list',
upload = '/common_proxy/common/pushFile/upload',
del = '/common_proxy/common/pushFile/remove'
}
export const listPushFile = (params?: Partial<PushFileParams>) => defHttp.get<PushFileResult>({ url: Api.list, params }, { isReturnResultResponse: true });
export const commonUpload = (params: UploadFileParams, onUploadProgress: (progressEvent: ProgressEvent) => void) =>
defHttp.uploadFile<UploadResult>({ url: Api.upload, onUploadProgress }, params);
export const delPushFile = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` });

25
src/api/platform/common/controller/pushMessage.ts

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
/**
* api模板规范代码参考,
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved.
* author entfrm开发团队-
*/
import type { PushMessageParams, PushMessageResult, PushMessage } from '/@/api/platform/common/entity/pushMessage';
import { defHttp } from '/@/utils/http/axios';
enum Api {
list = '/common_proxy/common/pushMessage/list',
add = '/common_proxy/common/pushMessage/save',
get = '/common_proxy/common/pushMessage',
edit = '/common_proxy/common/pushMessage/update',
del = '/common_proxy/common/pushMessage/remove'
}
export const listPushMessage = (params?: Partial<PushMessageParams>) => defHttp.get<PushMessageResult>({ url: Api.list, params }, { isReturnResultResponse: true });
export const addPushMessage = (params: Partial<PushMessage>) => defHttp.post({ url: Api.add, data: params });
export const editPushMessage = (params: Partial<PushMessage>) => defHttp.put({ url: Api.edit, data: params });
export const getPushMessage = (id: string) => defHttp.get<PushMessage>({ url: `${Api.get}/${id}` });
export const delPushMessage = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` });

25
src/api/platform/common/controller/pushThirdPartyManage.ts

@ -1,25 +0,0 @@ @@ -1,25 +0,0 @@
/**
* api模板规范代码参考,
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved.
* author entfrm开发团队-
*/
import type { PushThirdPartyManage, PushThirdPartyManageParams, PushThirdPartyManageResult } from '/@/api/platform/common/entity/pushThirdPartyManage';
import { defHttp } from '/@/utils/http/axios';
enum Api {
list = '/common_proxy/common/pushThirdPartyManage/list',
add = '/common_proxy/common/pushThirdPartyManage/save',
get = '/common_proxy/common/pushThirdPartyManage',
edit = '/common_proxy/common/pushThirdPartyManage/update',
del = '/common_proxy/common/pushThirdPartyManage/remove',
}
export const listPushThirdPartyManage = (params?: Partial<PushThirdPartyManageParams>) => defHttp.get<PushThirdPartyManageResult>({ url: Api.list, params }, { isReturnResultResponse: true });
export const addPushThirdPartyManage = (params: Partial<PushThirdPartyManage>) => defHttp.post({ url: Api.add, data: params });
export const editPushThirdPartyManage = (params: Partial<PushThirdPartyManage>) => defHttp.put({ url: Api.edit, data: params });
export const getPushThirdPartyManage = (id: string) => defHttp.get<PushThirdPartyManage>({ url: `${Api.get}/${id}` });
export const delPushThirdPartyManage = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` });

2
src/api/platform/common/entity/pushApplication.ts

@ -7,7 +7,7 @@ export interface PushApplication extends CommonEntity { @@ -7,7 +7,7 @@ export interface PushApplication extends CommonEntity {
id: string;
name: string;
status: string;
url: string;
ip: string;
messageSecret: string;
}

8
src/api/platform/common/entity/pushCustomType.ts

@ -6,10 +6,10 @@ export type PushCustomTypeParams = Page & PushCustomType; @@ -6,10 +6,10 @@ export type PushCustomTypeParams = Page & PushCustomType;
export interface PushCustomType extends CommonEntity {
id: string;
name: string;
level: string;
isVibration: string;
isSound: string;
customSound: string;
playSound: string;
playVibrate: string;
playLights: string;
customPlayFileName: string;
}
export type PushCustomTypeResult = R<PushCustomType[]>;

17
src/api/platform/common/entity/pushFile.ts

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
import type { R } from '/#/axios';
import type { CommonEntity, Page } from '/@/api/common/data/entity';
export type PushFileParams = Page & PushFile;
export interface PushFile extends CommonEntity {
id: string;
fileUrl: string;
fileName: string;
bucketName: string;
original: string;
type: string;
fileSize: number;
[key: string]: any;
}
export type PushFileResult = R<PushFile[]>;

26
src/api/platform/common/entity/pushMessage.ts

@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
import type { R } from '/#/axios';
import type { CommonEntity, Page } from '/@/api/common/data/entity';
export type PushMessageParams = Page & PushMessage;
export interface PushMessage extends CommonEntity {
id: string;
fromUserId: string;
type: string;
customTypeId: string;
status: string;
aliasType: string;
alias: string;
displayType: string;
title: string;
text: string;
sound: string;
playVibrate: string;
playLights: string;
playSound: string;
customPlayFileName: string;
custom: string;
[key: string]: any;
}
export type PushMessageResult = R<PushMessage[]>;

4
src/api/platform/common/entity/pushPassList.ts

@ -5,8 +5,8 @@ export type PushPassListParams = Page & PushPassList; @@ -5,8 +5,8 @@ export type PushPassListParams = Page & PushPassList;
export interface PushPassList extends CommonEntity {
id: string;
pushManageId: string;
name: string;
fromPushId: string;
toPushId: string;
type: string;
}

2
src/api/platform/common/entity/pushThirdParty.ts

@ -7,7 +7,7 @@ export interface PushThirdParty extends CommonEntity { @@ -7,7 +7,7 @@ export interface PushThirdParty extends CommonEntity {
id: string;
statutoryRepName: string;
idCard: string;
enterpName: string;
entName: string;
licenseFileId: string;
phone: string;
creditCode: string;

16
src/api/platform/common/entity/pushThirdPartyManage.ts

@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
import type { R } from '/#/axios';
import type { CommonEntity, Page } from '/@/api/common/data/entity';
export type PushThirdPartyManageParams = Page & PushThirdPartyManage;
export interface PushThirdPartyManage extends CommonEntity {
id: string;
thirdPartyId: string;
enterpName: string;
pushTypeId: string;
isVibration: string;
isSound: string;
customSound: string;
}
export type PushThirdPartyManageResult = R<PushThirdPartyManage[]>;

16
src/api/platform/common/entity/pushUserManage.ts

@ -5,14 +5,14 @@ export type PushUserManageParams = Page & PushUserManage; @@ -5,14 +5,14 @@ export type PushUserManageParams = Page & PushUserManage;
export interface PushUserManage extends CommonEntity {
id: string;
userId: string;
nickName: string;
sex: string;
avatar: string;
pushTypeId: string;
isVibration: string;
isSound: string;
customSound: string;
toUserId: string;
fromUserId: string;
userName: string;
status: string;
playSound: string;
playVibrate: string;
playLights: string;
type: string;
}
export type PushUserManageResult = R<PushUserManage[]>;

Loading…
Cancel
Save