baja-lite 1.0.5 → 1.0.7
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/cjs/boot-remote.d.ts +2 -2
- package/cjs/code.js +19 -5
- package/cjs/convert-xml.js +5 -5
- package/cjs/fn.js +3 -3
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +1 -0
- package/cjs/list.d.ts +10 -0
- package/cjs/list.js +36 -0
- package/cjs/object.js +4 -4
- package/cjs/set-ex.d.ts +41 -15
- package/cjs/set-ex.js +68 -52
- package/cjs/sql.d.ts +391 -193
- package/cjs/sql.js +580 -287
- package/cjs/test-mysql.d.ts +1 -0
- package/cjs/test-mysql.js +15 -2
- package/es/boot-remote.d.ts +2 -2
- package/es/code.js +19 -5
- package/es/convert-xml.js +5 -5
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/list.d.ts +10 -0
- package/es/list.js +32 -0
- package/es/object.js +1 -1
- package/es/set-ex.d.ts +41 -15
- package/es/set-ex.js +68 -52
- package/es/sql.d.ts +391 -193
- package/es/sql.js +569 -277
- package/es/test-mysql.d.ts +1 -0
- package/es/test-mysql.js +15 -3
- package/package.json +8 -6
- package/src/boot-remote.ts +2 -2
- package/src/code.ts +24 -8
- package/src/convert-xml.ts +5 -6
- package/src/index.ts +2 -1
- package/src/list.ts +31 -0
- package/src/object.ts +4 -3
- package/src/set-ex.ts +91 -70
- package/src/sql.ts +647 -318
- package/src/test-mysql.ts +28 -9
package/src/test-mysql.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
2
|
import { Boot } from './boot';
|
|
3
|
-
import { SqlService, Field, DB, DBType,
|
|
4
|
-
|
|
3
|
+
import { SqlService, Field, DB, DBType, SqlType, ColumnMode, } from './sql';
|
|
5
4
|
class AmaFuck2 {
|
|
6
|
-
@Field({ type: SqlType.varchar, length: 200,
|
|
5
|
+
@Field({ type: SqlType.varchar, length: 200, id: true, uuid: true })
|
|
7
6
|
site?: string;
|
|
8
|
-
@Field({ type: SqlType.varchar, length: 200,def:'333' })
|
|
7
|
+
@Field({ type: SqlType.varchar, length: 200, def: '333' })
|
|
9
8
|
sellerSku2?: string;
|
|
10
|
-
@Field({ type: SqlType.varchar,
|
|
9
|
+
@Field({ type: SqlType.varchar, length: 200 })
|
|
11
10
|
sellerSku?: string;
|
|
12
11
|
}
|
|
13
12
|
|
|
@@ -17,7 +16,15 @@ class AmaFuck2 {
|
|
|
17
16
|
class AmaService2 extends SqlService<AmaFuck2>{
|
|
18
17
|
|
|
19
18
|
}
|
|
20
|
-
|
|
19
|
+
|
|
20
|
+
interface Menu {
|
|
21
|
+
resourceid: string;
|
|
22
|
+
resourcepid: string;
|
|
23
|
+
resourcename: string;
|
|
24
|
+
children: Menu[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export async function go2() {
|
|
21
28
|
await Boot({
|
|
22
29
|
Mysql: {
|
|
23
30
|
host: '39.98.58.252',
|
|
@@ -28,7 +35,7 @@ async function go2() {
|
|
|
28
35
|
database: 'dmce',
|
|
29
36
|
debug: false
|
|
30
37
|
},
|
|
31
|
-
log: '
|
|
38
|
+
log: 'info',
|
|
32
39
|
columnMode: ColumnMode.HUMP,
|
|
33
40
|
sqlDir: 'E:/pro/baja-lite/xml'
|
|
34
41
|
});
|
|
@@ -98,8 +105,20 @@ async function go2() {
|
|
|
98
105
|
return 1;
|
|
99
106
|
}
|
|
100
107
|
});
|
|
101
|
-
await service.select({sqlId: 'event-report.matchSectionTempWGoalPlayerList',params: {searchVo:{matchId:'yyyy',matchSection:'oooo'}}});
|
|
102
|
-
}
|
|
103
108
|
|
|
109
|
+
const data = await service.select<Menu>({
|
|
110
|
+
sql: 'SELECT resourceid, resourcepid,resourcename FROM cp_resource ',
|
|
111
|
+
params: {
|
|
112
|
+
site: '1234',
|
|
113
|
+
matchInfo: { reportType: 'yyyy', id: '11' }
|
|
114
|
+
},
|
|
115
|
+
// mapper: [
|
|
116
|
+
// ['site', ['info', 'bSist'], 989],
|
|
117
|
+
// ['site', ['info2', 'bSist'], 33],
|
|
118
|
+
// ['site', ['Bsite'], 0]
|
|
119
|
+
// ]
|
|
120
|
+
});
|
|
121
|
+
console.log(data);
|
|
104
122
|
|
|
123
|
+
}
|
|
105
124
|
go2();
|