@ningboyz/apis 1.0.108 → 1.0.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.ts +3 -0
- package/package.json +2 -2
- package/packages/axios.ts +1 -1
- package/packages/cron/index.ts +14 -0
- package/packages/cron/main.ts +47 -0
- package/packages/cron/type.ts +18 -0
- package/packages/index.ts +1 -0
package/index.ts
CHANGED
|
@@ -19,6 +19,7 @@ import NotiRequest from "./packages/noti";
|
|
|
19
19
|
import ElemRequest from "./packages/elem";
|
|
20
20
|
import YzcgRequest from "./packages/yzcg";
|
|
21
21
|
import MyoaRequest from "./packages/myoa";
|
|
22
|
+
import CronRequest from "./packages/cron";
|
|
22
23
|
import { IAxiosConfig } from "./packages/axios";
|
|
23
24
|
|
|
24
25
|
class Request {
|
|
@@ -43,6 +44,7 @@ class Request {
|
|
|
43
44
|
public static elem: ElemRequest;
|
|
44
45
|
public static yzcg: YzcgRequest;
|
|
45
46
|
public static myoa: MyoaRequest;
|
|
47
|
+
public static cron: CronRequest;
|
|
46
48
|
|
|
47
49
|
public static createRequest(config: IAxiosConfig) {
|
|
48
50
|
this.core = new CoreRequest(config);
|
|
@@ -66,6 +68,7 @@ class Request {
|
|
|
66
68
|
this.elem = new ElemRequest(config);
|
|
67
69
|
this.yzcg = new YzcgRequest(config);
|
|
68
70
|
this.myoa = new MyoaRequest(config);
|
|
71
|
+
this.cron = new CronRequest(config);
|
|
69
72
|
}
|
|
70
73
|
}
|
|
71
74
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ningboyz/apis",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.110",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "宁波甬政请求库",
|
|
6
6
|
"author": "nbyt-syq",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"registry": "https://registry.npmjs.org/"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@ningboyz/types": "1.0.
|
|
20
|
+
"@ningboyz/types": "1.0.110",
|
|
21
21
|
"axios": "1.8.4"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {}
|
package/packages/axios.ts
CHANGED
|
@@ -37,7 +37,7 @@ class HttpRequest {
|
|
|
37
37
|
...request.params,
|
|
38
38
|
r: time
|
|
39
39
|
};
|
|
40
|
-
request.headers.usrtoken = userInfo.usrtoken;
|
|
40
|
+
request.headers.usrtoken = userInfo.usrtoken ?? request.headers?.usrtoken;
|
|
41
41
|
request.headers.dbconfig = userInfo.dbConfig;
|
|
42
42
|
return request;
|
|
43
43
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createRequest, IAxiosConfig } from "../axios";
|
|
2
|
+
import MainRequest from "./main";
|
|
3
|
+
|
|
4
|
+
class CronRequest {
|
|
5
|
+
public main: MainRequest;
|
|
6
|
+
|
|
7
|
+
constructor(config: IAxiosConfig) {
|
|
8
|
+
const request = createRequest(config);
|
|
9
|
+
this.main = new MainRequest(request);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default CronRequest;
|
|
14
|
+
export * from "./type"
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { TNoti } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
import {ICronMainDetaildbQuerys, ICronMainSelectdbQuerys} from "./type";
|
|
4
|
+
|
|
5
|
+
class ParaRequest {
|
|
6
|
+
private httpRequest: HttpRequest;
|
|
7
|
+
constructor(httpRequest: HttpRequest) {
|
|
8
|
+
this.httpRequest = httpRequest;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 获取定时任务
|
|
13
|
+
*/
|
|
14
|
+
selectdb(querys: ICronMainSelectdbQuerys) {
|
|
15
|
+
return this.httpRequest.post<TNoti.INotiMainResponse[]>("/gapi/cron/tmain/selectdb", querys, undefined);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 新增定时任务
|
|
20
|
+
*/
|
|
21
|
+
insertdb(params: object) {
|
|
22
|
+
return this.httpRequest.post<TNoti.INotiMainResponse[]>("/gapi/cron/tmain/insertdb", undefined, params);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 修改定时任务
|
|
27
|
+
*/
|
|
28
|
+
updatedb(params: object) {
|
|
29
|
+
return this.httpRequest.post<TNoti.INotiMainResponse[]>("/gapi/cron/tmain/updatedb", undefined, params);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 删除定时任务
|
|
34
|
+
*/
|
|
35
|
+
deletedb(params: object) {
|
|
36
|
+
return this.httpRequest.post<TNoti.INotiMainResponse[]>("/gapi/cron/tmain/deletedb", undefined, params);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 获取定时任务详情列表
|
|
41
|
+
*/
|
|
42
|
+
detaildb(querys: ICronMainDetaildbQuerys, params: object) {
|
|
43
|
+
return this.httpRequest.post<TNoti.INotiMainResponse[]>("/gapi/cron/tmain/detaildb", querys, params);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default ParaRequest;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** ========== main ========== */
|
|
2
|
+
export interface ICronMainSelectdbQuerys {
|
|
3
|
+
datatype: number;
|
|
4
|
+
ispublic: number;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export class TCronMainSelectdbQuerys implements ICronMainSelectdbQuerys {
|
|
8
|
+
datatype: number = -1;
|
|
9
|
+
ispublic: number = -1;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ICronMainDetaildbQuerys {
|
|
13
|
+
cronmain: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export class TCronMainDetaildbQuerys implements ICronMainDetaildbQuerys {
|
|
17
|
+
cronmain: number = -1;
|
|
18
|
+
}
|
package/packages/index.ts
CHANGED