@steedos/service-fields-indexs 2.5.12-beta.38 → 2.5.12-beta.39
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) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-fields-indexs",
|
|
3
|
-
"version": "2.5.12-beta.
|
|
3
|
+
"version": "2.5.12-beta.39",
|
|
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": "d26f1a84a6f12bf0f221e46cc69888362789c5b2"
|
|
14
14
|
}
|