@steedos/service-fields-indexs 2.6.1-beta.7 → 2.6.2-beta.3
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: sunhaolin@hotoa.com
|
|
3
3
|
* @Date: 2023-01-10 11:28:54
|
|
4
|
-
* @LastEditors: sunhaolin@
|
|
5
|
-
* @LastEditTime: 2023-
|
|
4
|
+
* @LastEditors: 孙浩林 sunhaolin@steedos.com
|
|
5
|
+
* @LastEditTime: 2023-08-27 11:00:46
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
const db = require('./default_db')
|
|
@@ -17,14 +17,12 @@ async function run() {
|
|
|
17
17
|
const indexExists = await collection.indexExists(indexName)
|
|
18
18
|
if (!indexExists) {
|
|
19
19
|
await collection.createIndex({
|
|
20
|
-
space: 1,
|
|
21
20
|
handler: 1,
|
|
22
21
|
is_finished: 1,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
start_date: -1
|
|
22
|
+
space: 1,
|
|
23
|
+
start_date: -1,
|
|
24
|
+
category: 1,
|
|
25
|
+
is_deleted: 1,
|
|
28
26
|
}, { background: true, name: indexName })
|
|
29
27
|
}
|
|
30
28
|
} catch (error) {
|
|
@@ -36,10 +34,29 @@ async function run() {
|
|
|
36
34
|
const indexExists = await collection.indexExists(indexName)
|
|
37
35
|
if (!indexExists) {
|
|
38
36
|
await collection.createIndex({
|
|
39
|
-
space: 1,
|
|
40
37
|
handler: 1,
|
|
41
38
|
is_finished: 1,
|
|
39
|
+
space: 1,
|
|
42
40
|
finish_date: -1,
|
|
41
|
+
category: 1,
|
|
42
|
+
is_deleted: 1,
|
|
43
|
+
}, { background: true, name: indexName })
|
|
44
|
+
}
|
|
45
|
+
} catch (error) {
|
|
46
|
+
console.error(error)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
// 推送badge计算
|
|
51
|
+
try {
|
|
52
|
+
const indexName = 'push_badge'
|
|
53
|
+
const indexExists = await collection.indexExists(indexName)
|
|
54
|
+
if (!indexExists) {
|
|
55
|
+
await collection.createIndex({
|
|
56
|
+
handler: 1,
|
|
57
|
+
is_finished: 1,
|
|
58
|
+
space: 1,
|
|
59
|
+
category: 1,
|
|
43
60
|
}, { background: true, name: indexName })
|
|
44
61
|
}
|
|
45
62
|
} catch (error) {
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
* @Author: baozhoutao@steedos.com
|
|
3
|
+
* @Date: 2022-03-28 09:35:35
|
|
4
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
+
* @LastEditTime: 2023-09-02 10:14:08
|
|
6
|
+
* @Description:
|
|
7
|
+
*/
|
|
8
|
+
if (Meteor.isServer && db.cms_categories) {
|
|
2
9
|
db.cms_categories._ensureIndex({
|
|
3
10
|
"site": 1,
|
|
4
11
|
"parent": 1
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
* @Author: baozhoutao@steedos.com
|
|
3
|
+
* @Date: 2022-03-28 09:35:35
|
|
4
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
+
* @LastEditTime: 2023-08-31 10:27:02
|
|
6
|
+
* @Description:
|
|
7
|
+
*/
|
|
8
|
+
if (Meteor.isServer && db.cms_posts) {
|
|
2
9
|
db.cms_posts._ensureIndex({
|
|
3
10
|
"site": 1,
|
|
4
11
|
"tags": 1
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: baozhoutao@hotoa.com
|
|
3
3
|
* @Date: 2022-02-28 09:25:03
|
|
4
4
|
* @LastEditors: 孙浩林 sunhaolin@steedos.com
|
|
5
|
-
* @LastEditTime: 2023-
|
|
5
|
+
* @LastEditTime: 2023-08-20 10:33:17
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
if (Meteor.isServer) {
|
|
@@ -36,15 +36,7 @@ if (Meteor.isServer) {
|
|
|
36
36
|
} catch (error) {
|
|
37
37
|
|
|
38
38
|
}
|
|
39
|
-
try {
|
|
40
|
-
db.instances._ensureIndex({
|
|
41
|
-
"inbox_users": 1
|
|
42
|
-
}, {
|
|
43
|
-
background: true
|
|
44
|
-
});
|
|
45
|
-
} catch (error) {
|
|
46
39
|
|
|
47
|
-
}
|
|
48
40
|
db.instances._ensureIndex({
|
|
49
41
|
"space": 1,
|
|
50
42
|
"is_deleted": 1
|
|
@@ -82,109 +74,7 @@ if (Meteor.isServer) {
|
|
|
82
74
|
}, {
|
|
83
75
|
background: true
|
|
84
76
|
});
|
|
85
|
-
db.instances._ensureIndex({
|
|
86
|
-
"is_deleted": 1,
|
|
87
|
-
"state": 1,
|
|
88
|
-
"space": 1,
|
|
89
|
-
"final_decision": 1,
|
|
90
|
-
"submitter": 1,
|
|
91
|
-
"applicant": 1
|
|
92
|
-
}, Steedos.formatIndex(["is_deleted", "state", "space", "final_decision", "submitter", "applicant"]));
|
|
93
|
-
db.instances._ensureIndex({
|
|
94
|
-
"is_deleted": 1,
|
|
95
|
-
"space": 1,
|
|
96
|
-
"modified": 1,
|
|
97
|
-
"outbox_users": 1
|
|
98
|
-
}, {
|
|
99
|
-
background: true
|
|
100
|
-
});
|
|
101
|
-
db.instances._ensureIndex({
|
|
102
|
-
"is_deleted": 1,
|
|
103
|
-
"state": 1,
|
|
104
|
-
"space": 1,
|
|
105
|
-
"modified": 1,
|
|
106
|
-
"final_decision": 1,
|
|
107
|
-
"submitter": 1,
|
|
108
|
-
"applicant": 1
|
|
109
|
-
}, Steedos.formatIndex(["is_deleted", "state", "space", "modified", "final_decision", "submitter", "applicant"]));
|
|
110
|
-
db.instances._ensureIndex({
|
|
111
|
-
"is_deleted": 1,
|
|
112
|
-
"space": 1,
|
|
113
|
-
"outbox_users": 1
|
|
114
|
-
}, {
|
|
115
|
-
background: true
|
|
116
|
-
});
|
|
117
|
-
db.instances._ensureIndex({
|
|
118
|
-
"is_deleted": 1,
|
|
119
|
-
"space": 1,
|
|
120
|
-
"modified": 1,
|
|
121
|
-
"submit_date": 1,
|
|
122
|
-
"outbox_users": 1
|
|
123
|
-
}, Steedos.formatIndex(["is_deleted", "space", "modified", "submit_date", "outbox_users"]));
|
|
124
|
-
db.instances._ensureIndex({
|
|
125
|
-
"is_deleted": 1,
|
|
126
|
-
"space": 1,
|
|
127
|
-
"submit_date": 1,
|
|
128
|
-
"outbox_users": 1
|
|
129
|
-
}, {
|
|
130
|
-
background: true
|
|
131
|
-
});
|
|
132
|
-
db.instances._ensureIndex({
|
|
133
|
-
"is_deleted": 1,
|
|
134
|
-
"state": 1,
|
|
135
|
-
"space": 1,
|
|
136
|
-
"flow": 1,
|
|
137
|
-
"modified": 1
|
|
138
|
-
}, {
|
|
139
|
-
background: true
|
|
140
|
-
});
|
|
141
|
-
db.instances._ensureIndex({
|
|
142
|
-
"is_deleted": 1,
|
|
143
|
-
"state": 1,
|
|
144
|
-
"space": 1,
|
|
145
|
-
"flow": 1
|
|
146
|
-
}, {
|
|
147
|
-
background: true
|
|
148
|
-
});
|
|
149
|
-
db.instances._ensureIndex({
|
|
150
|
-
"is_deleted": 1,
|
|
151
|
-
"state": 1,
|
|
152
|
-
"space": 1,
|
|
153
|
-
"flow": 1,
|
|
154
|
-
"submit_date": 1,
|
|
155
|
-
"modified": 1
|
|
156
|
-
}, Steedos.formatIndex(["is_deleted", "state", "space", "flow", "submit_date", "modified"]));
|
|
157
|
-
db.instances._ensureIndex({
|
|
158
|
-
"is_deleted": 1,
|
|
159
|
-
"state": 1,
|
|
160
|
-
"space": 1,
|
|
161
|
-
"flow": 1,
|
|
162
|
-
"submit_date": 1
|
|
163
|
-
}, {
|
|
164
|
-
background: true
|
|
165
|
-
});
|
|
166
|
-
db.instances._ensureIndex({
|
|
167
|
-
"is_deleted": 1,
|
|
168
|
-
"state": 1,
|
|
169
|
-
"space": 1,
|
|
170
|
-
"submitter": 1,
|
|
171
|
-
"applicant": 1,
|
|
172
|
-
"inbox_users": 1
|
|
173
|
-
}, Steedos.formatIndex(["is_deleted", "state", "space", "submitter", "applicant", "inbox_users"]));
|
|
174
|
-
db.instances._ensureIndex({
|
|
175
|
-
"is_deleted": 1,
|
|
176
|
-
"state": 1,
|
|
177
|
-
"space": 1,
|
|
178
|
-
"is_archive": 1,
|
|
179
|
-
"submitter": 1,
|
|
180
|
-
"applicant": 1
|
|
181
|
-
}, Steedos.formatIndex(["is_deleted", "state", "space", "is_archive", "submitter", "applicant"]));
|
|
182
77
|
|
|
183
|
-
db.instances._ensureIndex({
|
|
184
|
-
"cc_users": 1
|
|
185
|
-
}, {
|
|
186
|
-
background: true
|
|
187
|
-
});
|
|
188
78
|
db.instances._ensureIndex({
|
|
189
79
|
"space": 1,
|
|
190
80
|
"state": 1,
|
|
@@ -212,12 +102,7 @@ if (Meteor.isServer) {
|
|
|
212
102
|
"traces.approves.type": 1,
|
|
213
103
|
"traces.approves.handler": 1
|
|
214
104
|
}, Steedos.formatIndex(["traces.approves.type", "traces.approves.handler"]));
|
|
215
|
-
|
|
216
|
-
db.instances._ensureIndex({
|
|
217
|
-
"is_recorded": 1
|
|
218
|
-
}, {
|
|
219
|
-
background: true
|
|
220
|
-
});
|
|
105
|
+
|
|
221
106
|
try {
|
|
222
107
|
db.instances._ensureIndex({
|
|
223
108
|
"category": 1
|
|
@@ -252,7 +137,7 @@ if (Meteor.isServer) {
|
|
|
252
137
|
try {
|
|
253
138
|
db.instances._ensureIndex({
|
|
254
139
|
"state": 1,
|
|
255
|
-
"
|
|
140
|
+
"category": 1,
|
|
256
141
|
"is_deleted": 1,
|
|
257
142
|
"space": 1
|
|
258
143
|
}, {});
|
|
@@ -263,61 +148,14 @@ if (Meteor.isServer) {
|
|
|
263
148
|
// 监控箱-用户
|
|
264
149
|
try {
|
|
265
150
|
db.instances._ensureIndex({
|
|
266
|
-
|
|
267
|
-
submit_date: -1,
|
|
268
|
-
form: 1,
|
|
269
|
-
state: 1,
|
|
270
|
-
is_deleted: 1,
|
|
271
|
-
space: 1
|
|
272
|
-
});
|
|
273
|
-
} catch (error) {
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
try {
|
|
277
|
-
db.instances._ensureIndex({
|
|
278
|
-
applicant: 1,
|
|
279
|
-
submit_date: -1,
|
|
280
|
-
form: 1,
|
|
281
|
-
state: 1,
|
|
282
|
-
is_deleted: 1,
|
|
283
|
-
space: 1
|
|
284
|
-
});
|
|
285
|
-
} catch (error) {
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
try {
|
|
289
|
-
db.instances._ensureIndex({
|
|
290
|
-
inbox_users: 1,
|
|
291
|
-
submit_date: -1,
|
|
292
|
-
form: 1,
|
|
293
|
-
state: 1,
|
|
294
|
-
is_deleted: 1,
|
|
295
|
-
space: 1
|
|
296
|
-
});
|
|
297
|
-
} catch (error) {
|
|
298
|
-
|
|
299
|
-
}
|
|
300
|
-
try {
|
|
301
|
-
db.instances._ensureIndex({
|
|
302
|
-
outbox_users: 1,
|
|
151
|
+
space: 1,
|
|
303
152
|
submit_date: -1,
|
|
304
|
-
form: 1,
|
|
305
|
-
state: 1,
|
|
306
|
-
is_deleted: 1,
|
|
307
|
-
space: 1
|
|
308
|
-
});
|
|
309
|
-
} catch (error) {
|
|
310
|
-
|
|
311
|
-
}
|
|
312
|
-
try {
|
|
313
|
-
db.instances._ensureIndex({
|
|
314
153
|
flow: 1,
|
|
315
|
-
|
|
316
|
-
form: 1,
|
|
154
|
+
category: 1,
|
|
317
155
|
state: 1,
|
|
318
156
|
is_deleted: 1,
|
|
319
|
-
|
|
320
|
-
});
|
|
157
|
+
name: 1,
|
|
158
|
+
}, { background: true, name: 'monitor_user' });
|
|
321
159
|
} catch (error) {
|
|
322
160
|
|
|
323
161
|
}
|
|
@@ -355,3 +193,29 @@ if (Meteor.isServer) {
|
|
|
355
193
|
|
|
356
194
|
}
|
|
357
195
|
}
|
|
196
|
+
|
|
197
|
+
// 推送
|
|
198
|
+
try {
|
|
199
|
+
db.instances._ensureIndex({
|
|
200
|
+
inbox_users: 1,
|
|
201
|
+
category: 1,
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
background: true, name: 'push_manager_inbox_users_category'
|
|
205
|
+
});
|
|
206
|
+
} catch (error) {
|
|
207
|
+
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
try {
|
|
211
|
+
db.instances._ensureIndex({
|
|
212
|
+
cc_users: 1,
|
|
213
|
+
category: 1,
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
background: true, name: 'push_manager_cc_users_category'
|
|
217
|
+
});
|
|
218
|
+
} catch (error) {
|
|
219
|
+
|
|
220
|
+
}
|
|
221
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-fields-indexs",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.2-beta.3",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
|
-
"gitHead": "
|
|
13
|
+
"gitHead": "7842aa5d3023622c0e140009cfdd081180563bdd"
|
|
14
14
|
}
|