Merge branch 'bugfix' into release
This commit is contained in:
commit
9d9c37714b
@ -11,6 +11,6 @@ WORKDIR /app
|
|||||||
|
|
||||||
RUN npm config set registry http://registry.npm.taobao.org/ && npm install pm2@5.2.2 -g
|
RUN npm config set registry http://registry.npm.taobao.org/ && npm install pm2@5.2.2 -g
|
||||||
|
|
||||||
RUN rm -rf node_modules/tsbuffer-validator/index.js && cp tsbufferIndex.js node_modules/tsbuffer-validator/index.js
|
#RUN rm -rf node_modules/tsbuffer-validator/index.js && cp tsbufferIndex.js node_modules/tsbuffer-validator/index.js
|
||||||
|
|
||||||
CMD cd /app && sh zoeninfo.sh "Asia/Tokyo" && pm2-runtime start js_pm2.config.js -- ${Param}
|
CMD cd /app && sh zoeninfo.sh "Asia/Tokyo" && pm2-runtime start js_pm2.config.js -- ${Param}
|
||||||
|
109
package-lock.json
generated
109
package-lock.json
generated
@ -11,7 +11,6 @@
|
|||||||
"axios": "^1.4.0",
|
"axios": "^1.4.0",
|
||||||
"crypto-js": "^4.1.1",
|
"crypto-js": "^4.1.1",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"heapdump": "^0.3.15",
|
|
||||||
"ioredis": "^5.3.2",
|
"ioredis": "^5.3.2",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
"mathjs": "^11.4.0",
|
"mathjs": "^11.4.0",
|
||||||
@ -21,7 +20,7 @@
|
|||||||
"redis": "^4.3.1",
|
"redis": "^4.3.1",
|
||||||
"shelljs": "^0.8.5",
|
"shelljs": "^0.8.5",
|
||||||
"sync-request": "^6.1.0",
|
"sync-request": "^6.1.0",
|
||||||
"tsrpc": "^3.4.12",
|
"tsrpc": "^3.4.14",
|
||||||
"xlsx": "^0.18.5"
|
"xlsx": "^0.18.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -2925,18 +2924,6 @@
|
|||||||
"he": "bin/he"
|
"he": "bin/he"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/heapdump": {
|
|
||||||
"version": "0.3.15",
|
|
||||||
"resolved": "https://registry.npmjs.org/heapdump/-/heapdump-0.3.15.tgz",
|
|
||||||
"integrity": "sha512-n8aSFscI9r3gfhOcAECAtXFaQ1uy4QSke6bnaL+iymYZ/dWs9cqDqHM+rALfsHUwukUbxsdlECZ0pKmJdQ/4OA==",
|
|
||||||
"hasInstallScript": true,
|
|
||||||
"dependencies": {
|
|
||||||
"nan": "^2.13.2"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/http-basic": {
|
"node_modules/http-basic": {
|
||||||
"version": "8.1.3",
|
"version": "8.1.3",
|
||||||
"resolved": "https://registry.npmmirror.com/http-basic/-/http-basic-8.1.3.tgz",
|
"resolved": "https://registry.npmmirror.com/http-basic/-/http-basic-8.1.3.tgz",
|
||||||
@ -3853,11 +3840,6 @@
|
|||||||
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
|
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/nan": {
|
|
||||||
"version": "2.18.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz",
|
|
||||||
"integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w=="
|
|
||||||
},
|
|
||||||
"node_modules/nanoid": {
|
"node_modules/nanoid": {
|
||||||
"version": "3.3.1",
|
"version": "3.3.1",
|
||||||
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.1.tgz",
|
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.1.tgz",
|
||||||
@ -5092,12 +5074,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tsbuffer": {
|
"node_modules/tsbuffer": {
|
||||||
"version": "2.2.7",
|
"version": "2.2.8",
|
||||||
"resolved": "https://registry.npmmirror.com/tsbuffer/-/tsbuffer-2.2.7.tgz",
|
"resolved": "https://registry.npmjs.org/tsbuffer/-/tsbuffer-2.2.8.tgz",
|
||||||
"integrity": "sha512-WkP6NU14W14Kxa+OtccJ4m9+nY8UZs/DlM3FQzxstBkNGzmNvggN3+2mfIzYO8YDKu6mqYUXgpNg1aqIYcUACw==",
|
"integrity": "sha512-P907NAcy6G2+glFFvxd4oE/j9IXRw7Imi6qXLm6WAYGV1ksJdFrge+86R1pAeRzhcgP9KfvjMcR+miv/HnWZpg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"k8w-extend-native": "^1.4.6",
|
"k8w-extend-native": "^1.4.6",
|
||||||
"tsbuffer-validator": "^2.1.1",
|
"tsbuffer-validator": "^2.1.2",
|
||||||
"tslib": "*"
|
"tslib": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -5120,9 +5102,9 @@
|
|||||||
"integrity": "sha512-I4+5Xfk7G+D++kXdNnYTeY26WQTaf14C84XQwPKteNmrwxRY3CQCkMqASRiCUqtpOuDn43qmoxuXpT+Vo8Wltg=="
|
"integrity": "sha512-I4+5Xfk7G+D++kXdNnYTeY26WQTaf14C84XQwPKteNmrwxRY3CQCkMqASRiCUqtpOuDn43qmoxuXpT+Vo8Wltg=="
|
||||||
},
|
},
|
||||||
"node_modules/tsbuffer-validator": {
|
"node_modules/tsbuffer-validator": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmmirror.com/tsbuffer-validator/-/tsbuffer-validator-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/tsbuffer-validator/-/tsbuffer-validator-2.1.2.tgz",
|
||||||
"integrity": "sha512-12JVltPQjv2hZqfd9TZhTjCyQ0bvtRlTXyczOAaH+CnryWI9Twt0i9ZGaM5fb2QMxW5BOhToOIbwO8opDqpCEg==",
|
"integrity": "sha512-PrqIYy7aANY7ssr92HJN8ZM+eGc4Qmpvu7nNBv+T2DOAb+eqblKjlDZEhNnzxjs/ddqu9PqPe4Aa+fqYdzo98g==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"k8w-extend-native": "^1.4.6",
|
"k8w-extend-native": "^1.4.6",
|
||||||
"tsbuffer-schema": "^2.2.0",
|
"tsbuffer-schema": "^2.2.0",
|
||||||
@ -5130,32 +5112,32 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tslib": {
|
"node_modules/tslib": {
|
||||||
"version": "2.4.0",
|
"version": "2.4.1",
|
||||||
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
|
||||||
"integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
|
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
|
||||||
},
|
},
|
||||||
"node_modules/tsrpc": {
|
"node_modules/tsrpc": {
|
||||||
"version": "3.4.12",
|
"version": "3.4.14",
|
||||||
"resolved": "https://registry.npmmirror.com/tsrpc/-/tsrpc-3.4.12.tgz",
|
"resolved": "https://registry.npmjs.org/tsrpc/-/tsrpc-3.4.14.tgz",
|
||||||
"integrity": "sha512-FMa7FdzW7LdhsQ49DxcNegeW4oRJGxqP+3DXbZBvsUHSeL2h6UFCSKmw2TypI2ChDeRGgbo+wt6uJ0upF6fz9Q==",
|
"integrity": "sha512-v1EHjAbza6kuMMPbVu30zQlx05jy8XOCJciyU0gotwbAlnteS48uqOD9ze6WvOt6xeJwyQW5VyGy14oeBEiJtQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/ws": "^7.4.7",
|
"@types/ws": "^7.4.7",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
"tsbuffer": "^2.2.7",
|
"tsbuffer": "^2.2.8",
|
||||||
"tsrpc-base-client": "^2.1.11",
|
"tsrpc-base-client": "^2.1.13",
|
||||||
"tsrpc-proto": "^1.4.3",
|
"tsrpc-proto": "^1.4.3",
|
||||||
"uuid": "^8.3.2",
|
"uuid": "^8.3.2",
|
||||||
"ws": "^7.5.9"
|
"ws": "^7.5.9"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tsrpc-base-client": {
|
"node_modules/tsrpc-base-client": {
|
||||||
"version": "2.1.12",
|
"version": "2.1.13",
|
||||||
"resolved": "https://registry.npmmirror.com/tsrpc-base-client/-/tsrpc-base-client-2.1.12.tgz",
|
"resolved": "https://registry.npmjs.org/tsrpc-base-client/-/tsrpc-base-client-2.1.13.tgz",
|
||||||
"integrity": "sha512-7Zsby1dtDQkxzvT/tRMLLnjCqpYpoCwN9Sci9x7iWCBMNHiiBPBoKIIp2nqhlfLF3kxSgemQOGF499Mx3GVQfg==",
|
"integrity": "sha512-oNPOZEJfXkOwqi2wp/j0q55NzA7qJFRpL2IzTEU59PTPRZ5OpbV2wg3VVNK7NTJBOjwPSUH/TNBckWtIVKstKg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"k8w-extend-native": "^1.4.6",
|
"k8w-extend-native": "^1.4.6",
|
||||||
"tsbuffer": "^2.2.7",
|
"tsbuffer": "^2.2.7",
|
||||||
"tslib": "*",
|
"tslib": "=2.4.1",
|
||||||
"tsrpc-proto": "^1.4.3"
|
"tsrpc-proto": "^1.4.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -7929,14 +7911,6 @@
|
|||||||
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
|
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"heapdump": {
|
|
||||||
"version": "0.3.15",
|
|
||||||
"resolved": "https://registry.npmjs.org/heapdump/-/heapdump-0.3.15.tgz",
|
|
||||||
"integrity": "sha512-n8aSFscI9r3gfhOcAECAtXFaQ1uy4QSke6bnaL+iymYZ/dWs9cqDqHM+rALfsHUwukUbxsdlECZ0pKmJdQ/4OA==",
|
|
||||||
"requires": {
|
|
||||||
"nan": "^2.13.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"http-basic": {
|
"http-basic": {
|
||||||
"version": "8.1.3",
|
"version": "8.1.3",
|
||||||
"resolved": "https://registry.npmmirror.com/http-basic/-/http-basic-8.1.3.tgz",
|
"resolved": "https://registry.npmmirror.com/http-basic/-/http-basic-8.1.3.tgz",
|
||||||
@ -8655,11 +8629,6 @@
|
|||||||
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
|
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"nan": {
|
|
||||||
"version": "2.18.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz",
|
|
||||||
"integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w=="
|
|
||||||
},
|
|
||||||
"nanoid": {
|
"nanoid": {
|
||||||
"version": "3.3.1",
|
"version": "3.3.1",
|
||||||
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.1.tgz",
|
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.1.tgz",
|
||||||
@ -9598,12 +9567,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tsbuffer": {
|
"tsbuffer": {
|
||||||
"version": "2.2.7",
|
"version": "2.2.8",
|
||||||
"resolved": "https://registry.npmmirror.com/tsbuffer/-/tsbuffer-2.2.7.tgz",
|
"resolved": "https://registry.npmjs.org/tsbuffer/-/tsbuffer-2.2.8.tgz",
|
||||||
"integrity": "sha512-WkP6NU14W14Kxa+OtccJ4m9+nY8UZs/DlM3FQzxstBkNGzmNvggN3+2mfIzYO8YDKu6mqYUXgpNg1aqIYcUACw==",
|
"integrity": "sha512-P907NAcy6G2+glFFvxd4oE/j9IXRw7Imi6qXLm6WAYGV1ksJdFrge+86R1pAeRzhcgP9KfvjMcR+miv/HnWZpg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"k8w-extend-native": "^1.4.6",
|
"k8w-extend-native": "^1.4.6",
|
||||||
"tsbuffer-validator": "^2.1.1",
|
"tsbuffer-validator": "^2.1.2",
|
||||||
"tslib": "*"
|
"tslib": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -9626,9 +9595,9 @@
|
|||||||
"integrity": "sha512-I4+5Xfk7G+D++kXdNnYTeY26WQTaf14C84XQwPKteNmrwxRY3CQCkMqASRiCUqtpOuDn43qmoxuXpT+Vo8Wltg=="
|
"integrity": "sha512-I4+5Xfk7G+D++kXdNnYTeY26WQTaf14C84XQwPKteNmrwxRY3CQCkMqASRiCUqtpOuDn43qmoxuXpT+Vo8Wltg=="
|
||||||
},
|
},
|
||||||
"tsbuffer-validator": {
|
"tsbuffer-validator": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmmirror.com/tsbuffer-validator/-/tsbuffer-validator-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/tsbuffer-validator/-/tsbuffer-validator-2.1.2.tgz",
|
||||||
"integrity": "sha512-12JVltPQjv2hZqfd9TZhTjCyQ0bvtRlTXyczOAaH+CnryWI9Twt0i9ZGaM5fb2QMxW5BOhToOIbwO8opDqpCEg==",
|
"integrity": "sha512-PrqIYy7aANY7ssr92HJN8ZM+eGc4Qmpvu7nNBv+T2DOAb+eqblKjlDZEhNnzxjs/ddqu9PqPe4Aa+fqYdzo98g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"k8w-extend-native": "^1.4.6",
|
"k8w-extend-native": "^1.4.6",
|
||||||
"tsbuffer-schema": "^2.2.0",
|
"tsbuffer-schema": "^2.2.0",
|
||||||
@ -9636,32 +9605,32 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tslib": {
|
"tslib": {
|
||||||
"version": "2.4.0",
|
"version": "2.4.1",
|
||||||
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
|
||||||
"integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
|
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
|
||||||
},
|
},
|
||||||
"tsrpc": {
|
"tsrpc": {
|
||||||
"version": "3.4.12",
|
"version": "3.4.14",
|
||||||
"resolved": "https://registry.npmmirror.com/tsrpc/-/tsrpc-3.4.12.tgz",
|
"resolved": "https://registry.npmjs.org/tsrpc/-/tsrpc-3.4.14.tgz",
|
||||||
"integrity": "sha512-FMa7FdzW7LdhsQ49DxcNegeW4oRJGxqP+3DXbZBvsUHSeL2h6UFCSKmw2TypI2ChDeRGgbo+wt6uJ0upF6fz9Q==",
|
"integrity": "sha512-v1EHjAbza6kuMMPbVu30zQlx05jy8XOCJciyU0gotwbAlnteS48uqOD9ze6WvOt6xeJwyQW5VyGy14oeBEiJtQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/ws": "^7.4.7",
|
"@types/ws": "^7.4.7",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
"tsbuffer": "^2.2.7",
|
"tsbuffer": "^2.2.8",
|
||||||
"tsrpc-base-client": "^2.1.11",
|
"tsrpc-base-client": "^2.1.13",
|
||||||
"tsrpc-proto": "^1.4.3",
|
"tsrpc-proto": "^1.4.3",
|
||||||
"uuid": "^8.3.2",
|
"uuid": "^8.3.2",
|
||||||
"ws": "^7.5.9"
|
"ws": "^7.5.9"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tsrpc-base-client": {
|
"tsrpc-base-client": {
|
||||||
"version": "2.1.12",
|
"version": "2.1.13",
|
||||||
"resolved": "https://registry.npmmirror.com/tsrpc-base-client/-/tsrpc-base-client-2.1.12.tgz",
|
"resolved": "https://registry.npmjs.org/tsrpc-base-client/-/tsrpc-base-client-2.1.13.tgz",
|
||||||
"integrity": "sha512-7Zsby1dtDQkxzvT/tRMLLnjCqpYpoCwN9Sci9x7iWCBMNHiiBPBoKIIp2nqhlfLF3kxSgemQOGF499Mx3GVQfg==",
|
"integrity": "sha512-oNPOZEJfXkOwqi2wp/j0q55NzA7qJFRpL2IzTEU59PTPRZ5OpbV2wg3VVNK7NTJBOjwPSUH/TNBckWtIVKstKg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"k8w-extend-native": "^1.4.6",
|
"k8w-extend-native": "^1.4.6",
|
||||||
"tsbuffer": "^2.2.7",
|
"tsbuffer": "^2.2.7",
|
||||||
"tslib": "*",
|
"tslib": "=2.4.1",
|
||||||
"tsrpc-proto": "^1.4.3"
|
"tsrpc-proto": "^1.4.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
"axios": "^1.4.0",
|
"axios": "^1.4.0",
|
||||||
"crypto-js": "^4.1.1",
|
"crypto-js": "^4.1.1",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"heapdump": "^0.3.15",
|
|
||||||
"ioredis": "^5.3.2",
|
"ioredis": "^5.3.2",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
"mathjs": "^11.4.0",
|
"mathjs": "^11.4.0",
|
||||||
@ -47,7 +46,7 @@
|
|||||||
"redis": "^4.3.1",
|
"redis": "^4.3.1",
|
||||||
"shelljs": "^0.8.5",
|
"shelljs": "^0.8.5",
|
||||||
"sync-request": "^6.1.0",
|
"sync-request": "^6.1.0",
|
||||||
"tsrpc": "^3.4.12",
|
"tsrpc": "^3.4.14",
|
||||||
"xlsx": "^0.18.5"
|
"xlsx": "^0.18.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import { getGud } from "../../public/gud";
|
|||||||
|
|
||||||
|
|
||||||
export default async function (call: ApiCall<ReqSend, ResSend>) {
|
export default async function (call: ApiCall<ReqSend, ResSend>) {
|
||||||
let status_chat = await getGud(call.uid)['status_chat'];
|
let status_chat = (await getGud(call.uid))['status_chat'];
|
||||||
// 验证是否被禁言
|
// 验证是否被禁言
|
||||||
if(status_chat == 1) return call.error(lng.chat_4);
|
if(status_chat == 1) return call.error(lng.chat_4);
|
||||||
let data = call.req;
|
let data = call.req;
|
||||||
|
@ -26,7 +26,7 @@ export default async function (call: ApiCall<ReqOpen, ResOpen>) {
|
|||||||
call.succ({
|
call.succ({
|
||||||
sTime: sTime,
|
sTime: sTime,
|
||||||
recIndex: db?.recIndex || [],
|
recIndex: db?.recIndex || [],
|
||||||
payNum: await PayFun.getPayDaysAllPayNum(call.uid, _hdinfo.stime, _hdinfo.rtime),
|
payNum: (await PayFun.getPayDaysAllPayNum(call.uid, _hdinfo.stime, _hdinfo.rtime)) * 10,
|
||||||
hdinfo: _hdinfo
|
hdinfo: _hdinfo
|
||||||
});
|
});
|
||||||
}
|
}
|
@ -20,7 +20,7 @@ export default async function (call: ApiCall<ReqRec, ResRec>) {
|
|||||||
let db = await G.mongodb.cEvent(_dbType).findOne({ uid: call.uid, type: _dbType });
|
let db = await G.mongodb.cEvent(_dbType).findOne({ uid: call.uid, type: _dbType });
|
||||||
if (db.recIndex.includes(call.req.index)) return call.error('', { code: -2 });
|
if (db.recIndex.includes(call.req.index)) return call.error('', { code: -2 });
|
||||||
|
|
||||||
let payNum = await PayFun.getPayDaysAllPayNum(call.uid, _hdinfo.stime, _hdinfo.rtime);
|
let payNum = (await PayFun.getPayDaysAllPayNum(call.uid, _hdinfo.stime, _hdinfo.rtime)) * 10;
|
||||||
if (payNum < conf.total) return call.error('', { code: -3 });
|
if (payNum < conf.total) return call.error('', { code: -3 });
|
||||||
|
|
||||||
await PlayerFun.sendPrize(call, conf.prize);
|
await PlayerFun.sendPrize(call, conf.prize);
|
||||||
|
@ -38,9 +38,7 @@ export default async function (call: ApiCall<ReqAllGet, ResAllGet>) {
|
|||||||
}
|
}
|
||||||
// XstaskFun.delTask(call.uid, task._id);
|
// XstaskFun.delTask(call.uid, task._id);
|
||||||
XstaskFun.changeInfo(call.uid, change);
|
XstaskFun.changeInfo(call.uid, change);
|
||||||
await PlayerFun.sendPrize(call, taskConf.prize);
|
|
||||||
HongDianChange.sendChangeKey(call.uid, ['xstaskhd', 'huodonghd']);
|
HongDianChange.sendChangeKey(call.uid, ['xstaskhd', 'huodonghd']);
|
||||||
|
|
||||||
if (!tequan) {
|
if (!tequan) {
|
||||||
prizeArr.push(...taskConf.prize)
|
prizeArr.push(...taskConf.prize)
|
||||||
} else {
|
} else {
|
||||||
@ -48,8 +46,9 @@ export default async function (call: ApiCall<ReqAllGet, ResAllGet>) {
|
|||||||
prizeArr.push(...taskConf.prize)
|
prizeArr.push(...taskConf.prize)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
prizeArr.push(...taskConf.prize)
|
// prizeArr.push(...taskConf.prize)
|
||||||
}
|
}
|
||||||
|
if (prizeArr.length > 0) await PlayerFun.sendPrize(call, prizeArr);
|
||||||
call.succ({
|
call.succ({
|
||||||
taskList: await XstaskFun.getAllTask(call.uid),
|
taskList: await XstaskFun.getAllTask(call.uid),
|
||||||
prize: PublicShared.mergePrize(prizeArr)
|
prize: PublicShared.mergePrize(prizeArr)
|
||||||
|
79
src/fix_patch/patch_hdinfo.ts
Normal file
79
src/fix_patch/patch_hdinfo.ts
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
import {patchFun, patchInit} from "../patch";
|
||||||
|
|
||||||
|
class Path {
|
||||||
|
@patchFun
|
||||||
|
async fun1(a: any) {
|
||||||
|
//这里执行脚本的内容,加了patchFun的函数,不允许重复执行
|
||||||
|
console.log("这是第1个脚本里内容");
|
||||||
|
|
||||||
|
let _hd = G.gc.huodong.find(i => i.hdid == 4000)
|
||||||
|
|
||||||
|
if (!_hd) {
|
||||||
|
console.log('htype4没查到活动')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
await G.mongodb.collection('hdinfo').findOneAndUpdate({hdid: 4000}, {$set: {data: _hd.data}})
|
||||||
|
|
||||||
|
console.log('这是第1个脚本执行完成')
|
||||||
|
|
||||||
|
return 12
|
||||||
|
}
|
||||||
|
|
||||||
|
@patchFun
|
||||||
|
async fun2(a: any) {
|
||||||
|
//这里执行脚本的内容,加了patchFun的函数,不允许重复执行
|
||||||
|
console.log("这是第2个脚本里内容");
|
||||||
|
|
||||||
|
let _hd = G.gc.huodong.find(i => i.htype == 2)
|
||||||
|
|
||||||
|
if (!_hd) {
|
||||||
|
console.log('htype2没查到活动')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
await G.mongodb.collection('hdinfo').updateMany({htype: 2}, {$set: {data: _hd.data}})
|
||||||
|
|
||||||
|
console.log('这是第2个脚本执行完成')
|
||||||
|
|
||||||
|
return 12
|
||||||
|
}
|
||||||
|
|
||||||
|
@patchFun
|
||||||
|
async fun3(a: any) {
|
||||||
|
//这里执行脚本的内容,加了patchFun的函数,不允许重复执行
|
||||||
|
console.log("这是第3个脚本里内容");
|
||||||
|
|
||||||
|
let _hd = G.gc.huodong.find(i => i.htype == 5)
|
||||||
|
|
||||||
|
if (!_hd) {
|
||||||
|
console.log('htype5没查到活动')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
await G.mongodb.collection('hdinfo').updateMany({htype: 5}, {$set: {data: _hd.data}})
|
||||||
|
|
||||||
|
console.log('这是第3个脚本执行完成')
|
||||||
|
|
||||||
|
return 12
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async run() {
|
||||||
|
await this.fun1(1);
|
||||||
|
await this.fun2(2);
|
||||||
|
await this.fun3(3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
await patchInit()
|
||||||
|
let patch = new Path();
|
||||||
|
await patch.run();
|
||||||
|
setInterval(() => {
|
||||||
|
console.log(new Date().format("MM-dd hh:mm:ss"));
|
||||||
|
}, 1000);
|
||||||
|
console.log("逻辑执行完成,等待退出");
|
||||||
|
}
|
||||||
|
|
||||||
|
main();
|
@ -15,7 +15,7 @@ export function patchFun(target: any, key: string, descriptor: PropertyDescripto
|
|||||||
throw new Error();
|
throw new Error();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
let caller = (e.stack.split("\n").slice(2)[0].split("\\").slice(-2));
|
let caller = (e.stack.split("\n").slice(2)[0].split("\\").slice(-2));
|
||||||
scriptName = caller[1].split(':')[0];
|
scriptName = caller[0].split('(')[1].split(':')[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!scriptName){
|
if(!scriptName){
|
||||||
|
@ -31,6 +31,8 @@ export class PayFun {
|
|||||||
let obj: payLog = {time: G.time, type: type};
|
let obj: payLog = {time: G.time, type: type};
|
||||||
if (conf.time != -1) obj.eTime = time + conf.time;
|
if (conf.time != -1) obj.eTime = time + conf.time;
|
||||||
|
|
||||||
|
obj.args = payArgs
|
||||||
|
|
||||||
if (payId == 'G123SendGift') {
|
if (payId == 'G123SendGift') {
|
||||||
obj.popup_id = payArgs.popup_id
|
obj.popup_id = payArgs.popup_id
|
||||||
obj.template_id = payArgs.template_id
|
obj.template_id = payArgs.template_id
|
||||||
|
@ -3,6 +3,7 @@ import {PublicShared} from "../../shared/public/public";
|
|||||||
import { Wjjl } from "../../module/collection_wjjl";
|
import { Wjjl } from "../../module/collection_wjjl";
|
||||||
import { ZhanLingTasks } from "../zhanling";
|
import { ZhanLingTasks } from "../zhanling";
|
||||||
import { setGud } from '../gud';
|
import { setGud } from '../gud';
|
||||||
|
import { EmailFun } from '../email';
|
||||||
|
|
||||||
|
|
||||||
export class SchedulerNewDayLocalCtor extends Scheduler {
|
export class SchedulerNewDayLocalCtor extends Scheduler {
|
||||||
@ -36,7 +37,7 @@ export class SchedulerNewDayLocalCtor extends Scheduler {
|
|||||||
if (gud.logoutTime && PublicShared.getToWeekMondayZeroTime(gud.logoutTime) < PublicShared.getToWeekMondayZeroTime(G.time)) {
|
if (gud.logoutTime && PublicShared.getToWeekMondayZeroTime(gud.logoutTime) < PublicShared.getToWeekMondayZeroTime(G.time)) {
|
||||||
ZhanLingTasks.clearLog(gud.uid, 'week');
|
ZhanLingTasks.clearLog(gud.uid, 'week');
|
||||||
}
|
}
|
||||||
G.emit('FIRST_LOGIN_EVERY_DAY', gud, G.time - 24 * 3600, G.time);
|
G.emit('FIRST_LOGIN_EVERY_DAY', gud, gud.loginTime, G.time);
|
||||||
}
|
}
|
||||||
gud.loginTime = G.time;
|
gud.loginTime = G.time;
|
||||||
add.loginTime = G.time;
|
add.loginTime = G.time;
|
||||||
@ -54,5 +55,35 @@ export class SchedulerNewDayLocalCtor extends Scheduler {
|
|||||||
}
|
}
|
||||||
G.server.broadcastClusterMsg('msg_s2c/NewDay', { time: this.zeroTime });
|
G.server.broadcastClusterMsg('msg_s2c/NewDay', { time: this.zeroTime });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
// 每周一,发放终身卡
|
||||||
|
if (PublicShared.getWeek(G.time) != 1) {
|
||||||
|
console.log("不是周一,不发放终身卡", PublicShared.getWeek(G.time));
|
||||||
|
return
|
||||||
|
};
|
||||||
|
|
||||||
|
let logs = await G.mongodb.collection("payLogNew").find(
|
||||||
|
{ key: "zhongshenka", del_time: { $exists: false } }, { projection: { _id: 0, } }
|
||||||
|
).toArray();
|
||||||
|
|
||||||
|
if (logs.length == 0) {
|
||||||
|
console.log("没有终身卡数据,不发放终身卡");
|
||||||
|
}
|
||||||
|
let con = G.gc.payEmail.zhongshenka.filter(e => e.day == 7)[0];
|
||||||
|
for (let i = 0; i < logs.length; i++) {
|
||||||
|
console.log("发放终身卡", logs[i].uid);
|
||||||
|
// 发送邮件
|
||||||
|
EmailFun.addEmail({
|
||||||
|
uid: logs[i].uid,
|
||||||
|
type: "system",
|
||||||
|
title: con.title,
|
||||||
|
content: con.content,
|
||||||
|
contentInsertArr: [],
|
||||||
|
createTime: G.time,
|
||||||
|
prize:con.prize,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,11 @@ export type payLog = {
|
|||||||
* @system 系统赠送
|
* @system 系统赠送
|
||||||
*/
|
*/
|
||||||
type: 'user' | 'system' | 'legu';
|
type: 'user' | 'system' | 'legu';
|
||||||
|
/**
|
||||||
|
* 其他信息
|
||||||
|
*/
|
||||||
|
args?: any;
|
||||||
|
|
||||||
|
|
||||||
/** G123 */
|
/** G123 */
|
||||||
popup_id?: string
|
popup_id?: string
|
||||||
|
@ -18482,6 +18482,14 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 3,
|
"id": 3,
|
||||||
|
"name": "args",
|
||||||
|
"type": {
|
||||||
|
"type": "Any"
|
||||||
|
},
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
"name": "popup_id",
|
"name": "popup_id",
|
||||||
"type": {
|
"type": {
|
||||||
"type": "String"
|
"type": "String"
|
||||||
@ -18489,7 +18497,7 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 4,
|
"id": 5,
|
||||||
"name": "buyNumber",
|
"name": "buyNumber",
|
||||||
"type": {
|
"type": {
|
||||||
"type": "Number"
|
"type": "Number"
|
||||||
@ -18497,7 +18505,7 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
|||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 5,
|
"id": 6,
|
||||||
"name": "template_id",
|
"name": "template_id",
|
||||||
"type": {
|
"type": {
|
||||||
"type": "String"
|
"type": "String"
|
||||||
|
@ -238,7 +238,9 @@ export class HeroShared {
|
|||||||
let find = Object.entries(posObj).find(v => v[1] == hero._id);
|
let find = Object.entries(posObj).find(v => v[1] == hero._id);
|
||||||
|
|
||||||
if (find) {
|
if (find) {
|
||||||
let __buff = G.gc.fightPlan[select][lv].buff[Number(find[0]) - 1];
|
let maxLv = R.values(G.gc.fightPlan[select]).length - 1
|
||||||
|
let fixLv = lv > maxLv ? maxLv : lv
|
||||||
|
let __buff = G.gc.fightPlan[select][fixLv].buff[Number(find[0]) - 1];
|
||||||
__buff && PublicShared.mergeProperty(buff, __buff);
|
__buff && PublicShared.mergeProperty(buff, __buff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ export class PublicShared {
|
|||||||
* 随机生成区间范围整数
|
* 随机生成区间范围整数
|
||||||
*/
|
*/
|
||||||
static randomNum(min: number, max: number) {
|
static randomNum(min: number, max: number) {
|
||||||
return Math.floor(Math.random() * (max - min) + min);
|
return Math.floor(Math.random() * (max - min + 1) + min);
|
||||||
}
|
}
|
||||||
/**获取道具配置 */
|
/**获取道具配置 */
|
||||||
static getAtnConf(atn: prizeType) {
|
static getAtnConf(atn: prizeType) {
|
||||||
|
Loading…
Reference in New Issue
Block a user