From 6e761f3727ac1e3d671648a6bec7404cacbebc99 Mon Sep 17 00:00:00 2001 From: qubiaobiao <3294694717@qq.com> Date: Tue, 12 May 2026 17:43:03 +0800 Subject: [PATCH] =?UTF-8?q?ntrip-caster=E6=9C=8D=E5=8A=A1=E5=90=8E?= =?UTF-8?q?=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintignore | 1 + .eslintrc | 4 + .gitignore | 15 + .vscode/launch.json | 36 ++ README.md | 31 + app/controller/home.js | 522 +++++++++++++++++ app/core/base_service.js | 50 ++ app/middleware/ntripCaster/ntripCaster.js | 364 ++++++++++++ app/middleware/utils/log.js | 72 +++ app/model/BNtripAdmin.js | 20 + app/model/BNtripClient.js | 20 + app/model/BNtripMsg.js | 21 + app/model/BNtripRecord.js | 22 + app/model/BSide.js | 30 + app/model2/CNtripAdmin.js | 19 + app/model2/CNtripClient.js | 19 + app/model2/CNtripMsg.js | 20 + app/model2/CNtripRecord.js | 21 + app/model2/CSide.js | 34 ++ app/model3/Mountpoint.js | 21 + app/model4/Account.js | 24 + app/model4/TNtripAdmin.js | 19 + app/model4/TNtripClient.js | 19 + app/model4/TNtripMsg.js | 20 + app/model4/TNtripRecord.js | 21 + app/router.js | 43 ++ app/service/home.js | 662 ++++++++++++++++++++++ config/config.default.js | 231 ++++++++ config/plugin.js | 27 + controllerLog/2026/4/15.txt | 24 + controllerLog/2026/4/16.txt | 36 ++ controllerLog/2026/4/23.txt | 100 ++++ controllerLog/2026/4/24.txt | 16 + controllerLog/2026/4/30.txt | 18 + controllerLog/2026/5/6.txt | 9 + jsconfig.json | 5 + package.json | 49 ++ serviceLog/2026/4/23.txt | 9 + serviceLog/2026/4/24.txt | 7 + serviceLog/2026/4/28.txt | 4 + serviceLog/2026/4/30.txt | 191 +++++++ serviceLog/2026/5/6.txt | 212 +++++++ serviceLog/2026/5/7.txt | 7 + serviceLog/2026/5/9.txt | 7 + test/app/controller/home.test.js | 23 + 45 files changed, 3125 insertions(+) create mode 100644 .eslintignore create mode 100644 .eslintrc create mode 100644 .gitignore create mode 100644 .vscode/launch.json create mode 100644 README.md create mode 100644 app/controller/home.js create mode 100644 app/core/base_service.js create mode 100644 app/middleware/ntripCaster/ntripCaster.js create mode 100644 app/middleware/utils/log.js create mode 100644 app/model/BNtripAdmin.js create mode 100644 app/model/BNtripClient.js create mode 100644 app/model/BNtripMsg.js create mode 100644 app/model/BNtripRecord.js create mode 100644 app/model/BSide.js create mode 100644 app/model2/CNtripAdmin.js create mode 100644 app/model2/CNtripClient.js create mode 100644 app/model2/CNtripMsg.js create mode 100644 app/model2/CNtripRecord.js create mode 100644 app/model2/CSide.js create mode 100644 app/model3/Mountpoint.js create mode 100644 app/model4/Account.js create mode 100644 app/model4/TNtripAdmin.js create mode 100644 app/model4/TNtripClient.js create mode 100644 app/model4/TNtripMsg.js create mode 100644 app/model4/TNtripRecord.js create mode 100644 app/router.js create mode 100644 app/service/home.js create mode 100644 config/config.default.js create mode 100644 config/plugin.js create mode 100644 controllerLog/2026/4/15.txt create mode 100644 controllerLog/2026/4/16.txt create mode 100644 controllerLog/2026/4/23.txt create mode 100644 controllerLog/2026/4/24.txt create mode 100644 controllerLog/2026/4/30.txt create mode 100644 controllerLog/2026/5/6.txt create mode 100644 jsconfig.json create mode 100644 package.json create mode 100644 serviceLog/2026/4/23.txt create mode 100644 serviceLog/2026/4/24.txt create mode 100644 serviceLog/2026/4/28.txt create mode 100644 serviceLog/2026/4/30.txt create mode 100644 serviceLog/2026/5/6.txt create mode 100644 serviceLog/2026/5/7.txt create mode 100644 serviceLog/2026/5/9.txt create mode 100644 test/app/controller/home.test.js diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..4ebc8ae --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +coverage diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..f304bdd --- /dev/null +++ b/.eslintrc @@ -0,0 +1,4 @@ +{ + "extends": "eslint-config-egg", + "root": true +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..652759b --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +logs/ +npm-debug.log +yarn-error.log +node_modules/ +*-lock.json +*-lock.yaml +yarn.lock +coverage/ +.idea/ +run/ +.DS_Store +*.sw* +*.un~ +typings/ +.nyc_output/ diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..14b18bb --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,36 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Egg Debug", + "runtimeExecutable": "npm", + "runtimeArgs": [ + "run", + "dev", + "--", + "--inspect-brk" + ], + "console": "integratedTerminal", + "restart": true, + "autoAttachChildProcesses": true + }, + { + "type": "node", + "request": "launch", + "name": "Egg Test", + "runtimeExecutable": "npm", + "runtimeArgs": [ + "run", + "test:local", + "--", + "--inspect-brk" + ], + "autoAttachChildProcesses": true + } + ] +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..845b281 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# ntrip-server + + + +## QuickStart + + + +see [egg docs][egg] for more detail. + +### Development + +```bash +npm i +npm run dev +open http://localhost:7001/ +``` + +### Deploy + +```bash +npm start +npm stop +``` + +### npm scripts + +- Use `npm run lint` to check code style. +- Use `npm test` to run unit test. + +[egg]: https://eggjs.org diff --git a/app/controller/home.js b/app/controller/home.js new file mode 100644 index 0000000..02cee69 --- /dev/null +++ b/app/controller/home.js @@ -0,0 +1,522 @@ +const { Controller } = require('egg'); + +const GBK = require("gbk.js"); + +const decode = (data) => { + let arr = []; + data.match(/..?/g).forEach((element) => { + arr.push(parseInt(element, 16)); + }); + return GBK.decode(arr); +} + +const CryptoJS = require("crypto-js"); + +const KEY = CryptoJS.enc.Utf8.parse('BDQH'); + +const decryptRequest = (body) => { + return CryptoJS.AES.decrypt(body, KEY, { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7 + }).toString(CryptoJS.enc.Utf8); +}; + +const checkUid = async (ctx) => { + const uid = ctx.request.body.uid; + const token = ctx.request.header.authorization; + const redis = ctx.app.redis; + let rdmcode; + if (!uid) { + const [buser, cuser, tuser] = await Promise.all([ + redis.get('db0').get(token), + redis.get('db1').get(token), + redis.get('db5').get(token), + ]); + rdmcode = buser || cuser || tuser; + } else { + let decryptUid = decryptRequest(uid).split('?')[0]; + const redisType = { + "B": "db0", + "C": "db1", + "T": "db5", + }; + const lastCode = decryptUid[decryptUid.length - 1]; + rdmcode = await redis.get(redisType[lastCode]).get(token); + } + if (!rdmcode) { + return false; + } + return rdmcode; +}; + +const fileName = "home"; + +const setResponse = (ctx, code, msg, model, data = {}) => { + const modelType = { + "none": { code, msg }, + "deconstruction": { code, msg, ...data }, + "polymerization": { code, msg, data } + } + ctx.body = modelType[model]; +} + +class HomeController extends Controller { + // 保存挂载点 + async saveMountpoint() { + const ctx = this.ctx; + try { + let rdmcode = await checkUid(ctx); + if (!rdmcode) { + setResponse(ctx, 401, 'token过期或错误', "none"); + return; + } + const uid = JSON.parse(rdmcode).uid; + const body = ctx.request.body; + const result = await ctx.service.home.saveMountpoint(uid, body); + if (result == "error") { + setResponse(ctx, 500, '服务器错误', "none"); + return; + } + if (result) { + setResponse(ctx, 200, '保存挂载点成功', "none"); + } else { + setResponse(ctx, 404, '保存挂载点失败', "none"); + } + } catch (error) { + const blockName = fileName + "--" + "saveMountpoint"; + ctx.app.middleware.utils.log('../../../controllerLog', blockName + ">>>>" + error); + setResponse(ctx, 500, '服务器错误', "none"); + } + } + + // 修改挂载点密码 + async editPassword() { + const ctx = this.ctx; + try { + let rdmcode = await checkUid(ctx); + if (!rdmcode) { + setResponse(ctx, 401, 'token过期或错误', "none"); + return; + } + const uid = JSON.parse(rdmcode).uid; + const body = ctx.request.body; + const result = await ctx.service.home.editPassword(uid, body); + if (result == "error") { + setResponse(ctx, 500, '服务器错误', "none"); + return; + } + if (result) { + setResponse(ctx, 200, '修改挂载点密码成功', "none"); + } else { + setResponse(ctx, 404, '修改挂载点密码失败', "none"); + } + } catch (error) { + const blockName = fileName + "--" + "editPassword"; + ctx.app.middleware.utils.log('../../../controllerLog', blockName + ">>>>" + error); + setResponse(ctx, 500, '服务器错误', "none"); + } + } + + // 修改挂载点名称 + async editMountpoint() { + const ctx = this.ctx; + try { + let rdmcode = await checkUid(ctx); + if (!rdmcode) { + setResponse(ctx, 401, 'token过期或错误', "none"); + return; + } + const uid = JSON.parse(rdmcode).uid; + const body = ctx.request.body; + const result = await ctx.service.home.editMountpoint(uid, body); + if (result == "error") { + setResponse(ctx, 500, '服务器错误', "none"); + return; + } + if (result) { + setResponse(ctx, 200, '修改挂载点名称成功', "none"); + } else { + setResponse(ctx, 404, '修改挂载点名称失败', "none"); + } + } catch (error) { + const blockName = fileName + "--" + "editMountpoint"; + ctx.app.middleware.utils.log('../../../controllerLog', blockName + ">>>>" + error); + setResponse(ctx, 500, '服务器错误', "none"); + } + } + + // 删除挂载点 + async delMountpoint() { + const ctx = this.ctx; + try { + // 验证用户token + let rdmcode = await checkUid(ctx); + if (!rdmcode) { + setResponse(ctx, 401, 'token过期或错误', "none"); + return; + } + // 解析获取用户ID + const uid = JSON.parse(rdmcode).uid; + const body = ctx.request.body; + // 调用服务层删除挂载点 + const result = await ctx.service.home.delMountpoint(uid, body); + if (result == "error") { + setResponse(ctx, 500, '服务器错误', "none"); + return; + } + // 根据删除结果返回响应 + if (result) { + setResponse(ctx, 200, '修改挂载点名称成功', "none"); + } else { + setResponse(ctx, 404, '修改挂载点名称失败', "none"); + } + } catch (error) { + // 记录异常日志 + const blockName = fileName + "--" + "delMountpoint"; + ctx.app.middleware.utils.log('../../../controllerLog', blockName + ">>>>" + error); + setResponse(ctx, 500, '服务器错误', "none"); + } + } + + // 获取挂载点 + async getMountpoint() { + const ctx = this.ctx; + try { + let rdmcode = await checkUid(ctx); + if (!rdmcode) { + setResponse(ctx, 401, 'token过期或错误', "none"); + return; + } + const uid = JSON.parse(rdmcode).uid; + const result = await ctx.service.home.getMountpoint(uid); + if (result == "error") { + setResponse(ctx, 500, '服务器错误', "none"); + return; + } + if (result) { + const data = { mountpoint: result }; + setResponse(ctx, 200, '获取挂载点成功', "deconstruction", data); + } else { + setResponse(ctx, 404, '获取挂载点失败', "none"); + } + } catch (error) { + const blockName = fileName + "--" + "getMountpoint"; + ctx.app.middleware.utils.log('../../../controllerLog', blockName + ">>>>" + error); + setResponse(ctx, 500, '服务器错误', "none"); + } + } + + // 搜索挂载点 + async searchMountpoint() { + const ctx = this.ctx; + try { + let rdmcode = await checkUid(ctx); + if (!rdmcode) { + setResponse(ctx, 401, 'token过期或错误', "none"); + return; + } + const uid = JSON.parse(rdmcode).uid; + const body = ctx.request.body; + const result = await ctx.service.home.searchMountpoint(uid, body); + if (result == "error") { + setResponse(ctx, 500, '服务器错误', "none"); + return; + } + if (result) { + const data = { mountpoint: result.dataValues.mountpoint }; + setResponse(ctx, 200, '搜索挂载点成功', "deconstruction", data); + } else { + setResponse(ctx, 203, '搜索挂载点失败', "none"); + } + } catch (error) { + const blockName = fileName + "--" + "searchMountpoint"; + ctx.app.middleware.utils.log('../../../controllerLog', blockName + ">>>>" + error); + setResponse(ctx, 500, '服务器错误', "none"); + } + } + + // 全局寻获挂载点 + async findMountpoint() { + const ctx = this.ctx; + try { + const body = ctx.request.body; + const result = await ctx.service.home.findMountpoint(body); + if (result == "error") { + setResponse(ctx, 500, '服务器错误', "none"); + return; + } + if (result) { + const data = { + mountpoint: result.mountpoint, + password: result.password, + status: result.status + }; + setResponse(ctx, 200, '搜索挂载点成功', "deconstruction", data); + } else { + setResponse(ctx, 404, '搜索挂载点失败', "none"); + } + } catch (error) { + const blockName = fileName + "--" + "findMountpoint"; + ctx.app.middleware.utils.log('../../../controllerLog', blockName + ">>>>" + error); + setResponse(ctx, 500, '服务器错误', "none"); + } + } + + // 查看ntrip-clinet密码 + async viewPassword() { + const ctx = this.ctx; + try { + let rdmcode = await checkUid(ctx); + if (!rdmcode) { + setResponse(ctx, 401, 'token过期或错误', "none"); + return; + } + const uid = JSON.parse(rdmcode).uid; + const body = ctx.request.body; + const result = await ctx.service.home.viewPassword(uid, body); + if (result == "error") { + setResponse(ctx, 500, '服务器错误', "none"); + return; + } + if (result) { + const data = { base: result.dataValues.base }; + setResponse(ctx, 200, 'ntrip-clinet密码获取成功', "deconstruction", data); + } else { + setResponse(ctx, 404, 'ntrip-clinet密码获取失败', "none"); + } + } catch (error) { + const blockName = fileName + "--" + "viewPassword"; + ctx.app.middleware.utils.log('../../../controllerLog', blockName + ">>>>" + error); + setResponse(ctx, 500, '服务器错误', "none"); + } + } + + // 获取挂载点记录 + async getRecord() { + const ctx = this.ctx; + try { + let rdmcode = await checkUid(ctx); + if (!rdmcode) { + setResponse(ctx, 401, 'token过期或错误', "none"); + return; + } + const uid = JSON.parse(rdmcode).uid; + const body = ctx.request.body; + const result = await ctx.service.home.getRecord(uid, body); + if (result == "error") { + setResponse(ctx, 500, '服务器错误', "none"); + return; + } + if (result) { + let recordMsg = []; + result.rows.forEach(element => { + recordMsg.push(element.dataValues); + }); + const data = { + recordMsg: recordMsg, + count: result.count + }; + setResponse(ctx, 200, '挂载点记录查询成功', "deconstruction", data); + } else { + setResponse(ctx, 404, '挂载点记录查询失败', "none"); + } + } catch (error) { + const blockName = fileName + "--" + "getRecord"; + ctx.app.middleware.utils.log('../../../controllerLog', blockName + ">>>>" + error); + setResponse(ctx, 500, '服务器错误', "none"); + } + } + + // 存储消息记录 + async saveMsg() { + const ctx = this.ctx; + try { + let rdmcode = await checkUid(ctx); + if (!rdmcode) { + setResponse(ctx, 401, 'token过期或错误', "none"); + return; + } + const uid = JSON.parse(rdmcode).uid; + const body = ctx.request.body; + const { mountpoint, original_msg } = body; + const form = { + mountpoint: mountpoint, + original_msg: original_msg, + created_at: new Date() + }; + const result = await ctx.service.home.saveMsg(uid, form); + if (result == "error") { + setResponse(ctx, 500, '服务器错误', "none"); + return; + } + if (result) { + setResponse(ctx, 200, '消息记录存储成功', "none"); + } else { + setResponse(ctx, 404, '消息记录存储失败', "none"); + } + } catch (error) { + const blockName = fileName + "--" + "saveMsg"; + ctx.app.middleware.utils.log('../../../controllerLog', blockName + ">>>>" + error); + setResponse(ctx, 500, '服务器错误', "none"); + } + } + + // 设置ntrip-clinet密码 + async setPassword() { + const ctx = this.ctx; + try { + let rdmcode = await checkUid(ctx); + if (!rdmcode) { + setResponse(ctx, 401, 'token过期或错误', "none"); + return; + } + const uid = JSON.parse(rdmcode).uid; + const body = ctx.request.body; + const result = await ctx.service.home.setPassword(uid, body); + if (result == "error") { + setResponse(ctx, 500, '服务器错误', "none"); + return; + } + if (result) { + setResponse(ctx, 200, 'ntrip-clinet密码设置成功', "none"); + } else { + setResponse(ctx, 404, 'ntrip-clinet密码设置失败', "none"); + } + } catch (error) { + const blockName = fileName + "--" + "setPassword"; + ctx.app.middleware.utils.log('../../../controllerLog', blockName + ">>>>" + error); + setResponse(ctx, 500, '服务器错误', "none"); + } + } + + // 获取ntrip-clinet密码 + async getPassword() { + const ctx = this.ctx; + try { + const body = ctx.request.body; + const result = await ctx.service.home.getPassword(body); + if (result == "error") { + setResponse(ctx, 500, '服务器错误', "none"); + return; + } + if (result) { + const data = { password: result.dataValues.password }; + setResponse(ctx, 200, 'ntrip-clinet密码获取成功', "deconstruction", data); + } else { + setResponse(ctx, 404, 'ntrip-clinet密码获取失败', "none"); + } + } catch (error) { + const blockName = fileName + "--" + "getPassword"; + ctx.app.middleware.utils.log('../../../controllerLog', blockName + ">>>>" + error); + setResponse(ctx, 500, '服务器错误', "none"); + } + } + + // 获取历史消息 + async getHistoryMsg() { + const ctx = this.ctx; + try { + let rdmcode = await checkUid(ctx); + if (!rdmcode) { + setResponse(ctx, 401, 'token过期或错误', "none"); + return; + } + const uid = JSON.parse(rdmcode).uid; + const body = ctx.request.body; + const result = await ctx.service.home.getHistoryMsg(uid, body); + if (result == "error") { + setResponse(ctx, 500, '服务器错误', "none"); + return; + } + if (result) { + let historyMsg = []; + result.rows.forEach(element => { + historyMsg.push(element.dataValues); + }); + const data = { + historyMsg: historyMsg, + count: result.count + }; + setResponse(ctx, 200, '历史消息查找成功', "deconstruction", data); + } else { + setResponse(ctx, 404, '历史消息查找失败', "none"); + } + } catch (error) { + const blockName = fileName + "--" + "getHistoryMsg"; + ctx.app.middleware.utils.log('../../../controllerLog', blockName + ">>>>" + error); + setResponse(ctx, 500, '服务器错误', "none"); + } + } + + // 删除历史消息 + async delHistoryMsg() { + const ctx = this.ctx; + try { + let rdmcode = await checkUid(ctx); + if (!rdmcode) { + setResponse(ctx, 401, 'token过期或错误', "none"); + return; + } + const uid = JSON.parse(rdmcode).uid; + const body = ctx.request.body; + const model = decryptRequest(body.model); + const password = decryptRequest(body.password); + const requestMsg = body.userMsg; + const resetList = await ctx.service.home.delHistoryMsg(uid, model, password, requestMsg); + if (resetList == "error") { + setResponse(ctx, 500, '服务器错误', "none"); + return; + } + if (resetList) { + setResponse(ctx, 200, '删除历史消息成功', "none"); + } else { + setResponse(ctx, 404, '删除历史消息失败', "none"); + } + } catch (error) { + const blockName = fileName + "--" + "delHistoryMsg"; + ctx.app.middleware.utils.log('../../../controllerLog', blockName + ">>>>" + error); + setResponse(ctx, 500, '服务器错误', "none"); + } + } + + // 获取单位用户 + async bsideManager() { + const ctx = this.ctx; + try { + let rdmcode = await checkUid(ctx); + if (!rdmcode) { + setResponse(ctx, 401, 'token过期或错误', "none"); + return; + } + const uid = JSON.parse(rdmcode).uid; + let result; + if (uid[uid.length - 1] == 'B') { + const body = ctx.request.body; + result = await ctx.service.home.bsideManager(uid, body); + } + if (result == "error") { + setResponse(ctx, 500, '服务器错误', "none"); + return; + } + if (result) { + let bsideUsers = []; + result.rows.forEach(element => { + bsideUsers.push(element.dataValues); + }); + const data = { + bsideUsers: bsideUsers, + count: result.count + }; + setResponse(ctx, 200, '获取单位用户成功', "deconstruction", data); + } else { + setResponse(ctx, 404, '获取单位用户失败', "none"); + } + } catch (error) { + const blockName = fileName + "--" + "bsideManager"; + ctx.app.middleware.utils.log('../../../controllerLog', blockName + ">>>>" + error); + setResponse(ctx, 500, '服务器错误', "none"); + } + } +} + +module.exports = HomeController; diff --git a/app/core/base_service.js b/app/core/base_service.js new file mode 100644 index 0000000..8a79e50 --- /dev/null +++ b/app/core/base_service.js @@ -0,0 +1,50 @@ +const { Service } = require('egg'); + +const sha256 = require("crypto-js/sha256"); + +const CryptoJS = require("crypto-js"); + +const KEY = CryptoJS.enc.Utf8.parse('BDQH'); + +class BaseService extends Service { + shaForm = (body, salt) => { + return sha256(sha256(body).toString() + salt).toString(); + } + + encryptRequest = (body) => { + return CryptoJS.AES.encrypt(body, KEY, { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7 + }).toString(); + } + + decryptRequest = (body) => { + return CryptoJS.AES.decrypt(body, KEY, { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7 + }).toString(CryptoJS.enc.Utf8); + } + + opOptions = (attributes, searchOptions, substring, key, between, sortOptions) => { + let where = {}, order = []; + attributes.forEach(element => { + if (searchOptions[element]) { + if (substring.includes(element)) { + where[element] = { [Op.substring]: searchOptions[element] }; + } else if (key.includes(element)) { + where[element] = searchOptions[element]; + } else if (between.includes(element)) { + where[element] = { [Op.between]: [searchOptions[element][0], searchOptions[element][1]] }; + } + } + if (!sortOptions[element]) { + order.push([element, 'DESC']); + } else if (sortOptions[element]) { + order.push([element, 'ASC']); + } + }); + return { where, order } + } +} + +module.exports = BaseService; \ No newline at end of file diff --git a/app/middleware/ntripCaster/ntripCaster.js b/app/middleware/ntripCaster/ntripCaster.js new file mode 100644 index 0000000..2e1aa1e --- /dev/null +++ b/app/middleware/ntripCaster/ntripCaster.js @@ -0,0 +1,364 @@ +const net = require('net'); +const CryptoJS = require("crypto-js"); + +const KEY = CryptoJS.enc.Utf8.parse('BDQH'); + +class SimpleNtripCaster { + constructor(app) { + this.app = app; + const { config, redis } = app; + const port = config.caster.port; + this.port = port; + this.redis = redis; + this.sourcetable = []; + this.serverSockets = new Map(); // mountpoint -> server socket + this.sizeSockets = new Map(); // client socket -> mountpoint + this.clientSockets = new Map(); // client socket -> mountpoint + this.mountData = new Map(); // mountpoint -> 当前连接的 server socket + console.log(`[Caster] 启动在端口 ${port}`); + } + + start() { + this.server = net.createServer((socket) => { + let clientInfo = ''; + socket.on('data', (data) => { + const request = data.toString(); + clientInfo += request; + // 检查是否收到完整的HTTP请求(以空行结束) + if (clientInfo.includes('\r\n\r\n')) { + this.handleRequest(socket, clientInfo); + clientInfo = ''; + } + }); + socket.on('end', () => { + console.log('[Caster] 连接关闭'); + this.removeClient(socket); + this.broadSizeData(); + }); + socket.on('error', (err) => { + console.log('[Caster] 连接错误:', err.message); + this.removeClient(socket); + this.broadSizeData(); + }); + }); + this.server.listen(this.port, () => { + console.log(`[Caster] 等待连接...`); + }); + } + + sendSourcetable(socket, statusCode, statusMessage, headers1 = {}, headers2 = {}, body = '') { + let response = `HTTP/1.1 ${statusCode} ${statusMessage}\r\n`; + for (const [key, value] of Object.entries(headers1)) { + response += `${key}: ${value}\r\n`; + } + response += `\r\n`; + response += `SOURCETABLE ${statusCode} ${statusMessage}\r\n`; + for (const [key, value] of Object.entries(headers2)) { + response += `${key}: ${value}\r\n`; + } + response += '\r\n' + body; + socket.end(response); + } + + sendResponse(socket, statusCode, statusMessage, headers = {}, body = '') { + let response = `HTTP/1.1 ${statusCode} ${statusMessage}\r\n`; + for (const [key, value] of Object.entries(headers)) { + response += `${key}: ${value}\r\n`; + } + response += '\r\n' + body; + socket.end(response); + } + + clientSendResponse(socket, statusCode, statusMessage, headers = {}, body = '') { + let response = `HTTP/1.1 ${statusCode} ${statusMessage}\r\n`; + for (const [key, value] of Object.entries(headers)) { + response += `${key}: ${value}\r\n`; + } + response += '\r\n' + body; + socket.write(response); + } + + handleOptions(socket, headers) { + this.sendResponse(socket, 204, 'No Content', { + 'Access-Control-Allow-Origin': headers.origin, + 'Access-Control-Allow-Methods': 'GET, OPTIONS, SIZE, SOURCE', + 'Access-Control-Allow-Headers': 'Content-Type, uid, Authorization, ntrip-version, Client-Type, Request-Type', + }); + } + + parseHeaders(headerLines) { + const headers = {}; + headerLines.forEach((line) => { + const [key, value] = line.split(': '); + headers[key.toLowerCase()] = value; + }); + return headers; + } + + handleRequest(socket, request) { + const lines = request.split('\r\n'); + const firstLine = lines[0]; + console.log(`[Caster] 收到请求: ${firstLine.substring(0, 50)}...`); + // 处理 OPTIONS 请求 + if (firstLine.split(' ')[0] === 'OPTIONS') { + const headers = this.parseHeaders(lines.slice(1, lines.indexOf(''))); + this.handleOptions(socket, headers); + } else if (firstLine === 'GET / HTTP/1.1' || firstLine === 'GET / HTTP/1.0' || firstLine === 'GET /') { + // 客户端请求源列表 + this.handleSourcetable(socket, lines); + } else if (firstLine.startsWith('SOURCE')) { + // Server 挂载请求 + this.handleServerMount(socket, lines); + } else if (firstLine.startsWith('GET /')) { + // 客户端请求数据流 + this.handleClientRequest(socket, lines); + } else { + this.sendResponse(socket, 400, 'Bad Request', { + 'Access-Control-Allow-Origin': '*' + }); + } + } + + // 发送源列表 + handleSourcetable(socket, lines) { + const headers = this.parseHeaders(lines.slice(1, lines.indexOf(''))); + let table = ''; + this.sourcetable.forEach(element => { + const { mountpoint, MountpointOptions } = element; + // 源ID + const SourceID = MountpointOptions[0] || 'STR: '; + // 格式 + const Format = MountpointOptions[1] || 'RTCM'; + // 格式详情 + const FormatDetails = MountpointOptions[2] || ''; + // 载体 + const Carrier = MountpointOptions[3] || ''; + // 导航系统 + const NavSystem = MountpointOptions[4] || ''; + // 网络 + const NetWork = MountpointOptions[5] || ''; + // 国家 + const Country = MountpointOptions[6] || ''; + // 纬度 + const Latitude = MountpointOptions[7] || 0.0; + // 经度 + const Longitude = MountpointOptions[8] || 0.0; + // NMEA + const NMEA = MountpointOptions[9] || ''; + // 解决方案 + const Soution = MountpointOptions[10] || ''; + // 发生器 + const Generator = MountpointOptions[11] || ''; + // 压缩加密 + const ComprEncryp = MountpointOptions[12] || ''; + // 认证 + const Auth = MountpointOptions[13] || ''; + // 费用 + const Fee = MountpointOptions[14] || ''; + // 比特率 + const Bitrate = MountpointOptions[15] || ''; + const found = lines.find(line => line.startsWith('Ntrip-Version: Ntrip/2.0')); + if (found == 'Ntrip-Version: Ntrip/2.0') { + // 变体B:RTCM/ntrip-2风格 + table += `STR;${Format};${mountpoint};${FormatDetails};;${Carrier};${NavSystem};${NetWork};${Country};${Latitude};${Longitude};${NMEA};${SourceID};;;;\r\n`; + } else { + // 变体A:BKG/NTRIP 1.0风格 + table += `STR;${Format};${mountpoint};${FormatDetails};;${Carrier};${NavSystem};${SourceID};${Latitude};${Longitude};0.0;${NetWork};${Country};;;;\r\n`; + } + }); + table += 'ENDSOURCETABLE\r\n'; + this.sendSourcetable(socket, 200, 'OK', { + 'Access-Control-Allow-Origin': headers.origin ? headers.origin : '*', + 'Server': 'NTRIP Caster', + 'Content-Type': 'text/plain', + 'Date': 'Tue, 12 May 2026 08:00:00 GMT', + 'Connection': 'close' + }, { + 'Access-Control-Allow-Origin': headers.origin ? headers.origin : '*', + 'Server': 'Caster/1.0', + 'Content-Type': 'text/plain', + 'Charset': 'UTF-8' + }, table); + console.log('[Caster] 已发送源列表'); + } + + // 处理 Server 挂载 + async handleServerMount(socket, lines) { + const source = lines[0].split(' '); + // 密码 + const password = source[1]; + // 挂载点 + const mountpoint = source[2]; + const findMountpoint = await this.app.curl('http://127.0.0.1:' + this.app.server.address().port + '/findMountpoint', { + dataType: 'json', + contentType: 'application/x-www-form-urlencoded', + method: 'POST', + timeout: 3000, + data: { + mountpoint: mountpoint + } + }); + if (findMountpoint.data.code == 404) { + this.sendResponse(socket, 404, 'Mountpoint Not Found', {}); + return; + } + if (password !== findMountpoint.data.password) { + this.sendResponse(socket, 401, 'Unauthorized', {}); + return; + } + const MountpointOptions = lines[2].split(';'); + this.sourcetable.push({ password, mountpoint, MountpointOptions }); + this.serverSockets.set(mountpoint, socket); + this.mountData.set(mountpoint, { + socket: socket, + lastUpdate: Date.now() + }); + // 响应 Server + socket.write('ICY 200 OK\r\n\r\n'); + console.log(`[Caster] Server 挂载成功: ${mountpoint}`); + // 监听 Server 数据 + socket.on('data', (data) => { + this.broadcastData(mountpoint, data); + }); + socket.on('end', () => { + console.log(`[Caster] Server 断开: ${mountpoint}`); + this.serverSockets.delete(mountpoint); + this.mountData.delete(mountpoint); + }); + } + + // 处理 Client 请求 + async handleClientRequest(socket, lines) { + // 解析请求的挂载点 + const headers = this.parseHeaders(lines.slice(1, lines.indexOf(''))); + const firstLine = lines[0]; + const match = firstLine.match(/GET \/(\w+) HTTP\/1\.[01]/); + if (!match) { + this.sendResponse(socket, 404, '404 Not Found', { + 'Access-Control-Allow-Origin': headers.origin, + }); + return; + } + const mountpoint = match[1]; + console.log(`[Caster] Client 请求挂载点: ${mountpoint}`); + const find = lines.find(line => line.startsWith('Request-Type: SIZE')); + const found = lines.find(line => line.startsWith('Client-Type: Virtual-NTRIP-Client/1.0')); + if (found !== 'Client-Type: Virtual-NTRIP-Client/1.0') { + if (find !== 'Request-Type: SIZE') { + const findMountpoint = await this.app.curl('http://127.0.0.1:' + this.app.server.address().port + '/findMountpoint', { + dataType: 'json', + contentType: 'application/x-www-form-urlencoded', + method: 'POST', + timeout: 3000, + data: { + mountpoint: mountpoint + } + }); + if (findMountpoint.data.code == 404) { + this.sendResponse(socket, 404, 'Mountpoint Not Found', {}); + return; + } + const getPassword = await this.app.curl('http://127.0.0.1:' + this.app.server.address().port + '/getPassword', { + dataType: 'json', + contentType: 'application/x-www-form-urlencoded', + method: 'POST', + timeout: 3000, + data: { + mountpoint: mountpoint, + base: headers.authorization.split(' ')[1], + status: findMountpoint.data.status + } + }); + if (getPassword.data.code == 404) { + this.sendResponse(socket, 401, 'Unauthorized', {}); + return; + } + } + } + if (find !== 'Request-Type: SIZE') { + if (!this.mountData.has(mountpoint)) { + this.sendResponse(socket, 404, 'Mountpoint Not Found', { + 'Access-Control-Allow-Origin': headers.origin + }); + return; + } + } + if (found == 'Client-Type: Virtual-NTRIP-Client/1.0') { + const uid = lines[7].split(': ')[1]; + const token = lines[6].split(': ')[1]; + let decryptUid = CryptoJS.AES.decrypt(uid, KEY, { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7 + }).toString(CryptoJS.enc.Utf8).split('?')[0]; + const redisType = { + "B": "db0", + "C": "db1", + "T": "db5", + }; + const lastCode = decryptUid[decryptUid.length - 1]; + const rdmcode = await this.redis.get(redisType[lastCode]).get(token); + if (!rdmcode) { + this.sendResponse(socket, 401, 'Unauthorized', { + 'Access-Control-Allow-Origin': headers.origin + }); + return; + } + } + if (find == 'Request-Type: SIZE') { + const uid = lines[8].split(': ')[1]; + // 接受客户端连接 + this.sizeSockets.set(uid + ':' + mountpoint, socket); + const size = [...this.clientSockets.values()].filter(value => value == mountpoint); + this.clientSendResponse(socket, 200, 'OK', { + 'Access-Control-Allow-Origin': headers.origin, // 设置允许的源 + 'Content-Type': 'text/event-stream', + 'Connection': 'keep-alive' + }, size.length); + console.log(`[Caster] 已发送Client挂载数量`); + } else { + // 接受客户端连接 + this.clientSockets.set(socket, mountpoint); + this.clientSendResponse(socket, 200, 'OK', { + 'Access-Control-Allow-Origin': headers.origin, // 设置允许的源 + 'Content-Type': 'text/event-stream', + 'Connection': 'keep-alive' + }); + this.broadSizeData(); + console.log(`[Caster] Client 已连接至: ${mountpoint}`); + } + } + + // 广播已连接到此挂载点的客户端数量数据给所有已连接到此挂载点的客户端 + broadSizeData() { + for (const [clientMsg, client] of this.sizeSockets.entries()) { + const mountpoint = clientMsg.split(':')[1]; + const size = [...this.clientSockets.values()].filter(value => value == mountpoint); + client.write(size.length + ''); + } + } + + // 广播数据给所有连接到此挂载点的客户端 + broadcastData(mountpoint, data) { + for (const [client, clientMount] of this.clientSockets.entries()) { + if (clientMount === mountpoint && !client.destroyed) { + client.write(data); + } + } + } + + removeClient(socket) { + this.clientSockets.delete(socket); + } + + findHeader(lines, headerName) { + for (const line of lines) { + if (line.startsWith(headerName + ':')) { + return line.substring(headerName.length + 1).trim(); + } + } + return null; + } +} + +// 导出类供单独使用 +module.exports = { SimpleNtripCaster }; \ No newline at end of file diff --git a/app/middleware/utils/log.js b/app/middleware/utils/log.js new file mode 100644 index 0000000..6d7323a --- /dev/null +++ b/app/middleware/utils/log.js @@ -0,0 +1,72 @@ +// 错误日志 +const fs = require('fs'); +const os = require('os'); +const path = require('path'); + +const dirCheck = (dirPath) => { + // 检查文件夹是否存在 + fs.access(dirPath, fs.constants.F_OK, (err) => { + if (err) { + // 文件夹不存在 + console.log('文件夹不存在,正在创建...'); + fs.mkdir(dirPath, { recursive: true }, (err) => { + if (err) throw err; + console.log('文件夹已创建'); + }); + } else { + // 文件夹存在 + console.log('文件夹已存在'); + } + }); +} + +module.exports = (filePath, msg) => { + // 获取时间 + let now = new Date(), + times = { + year: now.getFullYear(), + month: now.getMonth() + 1, + day: now.getDate(), + hour: now.getHours(), + minute: now.getMinutes(), + second: now.getSeconds() + }; + // 获取操作系统类型 + const type = os.type(); + console.log(`操作系统类型: ${type}`); + filePath = path.join(__dirname, filePath); + dirCheck(filePath); + const yearPath = filePath + '/' + times.year; + dirCheck(yearPath); + const monthPath = yearPath + '/' + times.month; + dirCheck(monthPath); + const dayPath = monthPath + '/' + times.day + '.txt'; + const logTime = '[' + times.year + '-' + times.month + '-' + times.day + '>>>' + times.hour + ':' + times.minute + ':' + times.second + ']' + '>>>'; + let crlf; + // 判断操作系统类型,设置换行符 + if (type === 'Windows_NT') { + crlf = '\n'; + } else { + crlf = '\r\n'; + } + // 读取文件内容 + fs.readFile(dayPath, 'utf8', (err, data) => { + if (err) { + if (err.code === 'ENOENT') { + // 文件不存在,直接写入新内容(这里实际上还是使用了覆盖的方式) + fs.writeFile(dayPath, logTime + msg + crlf, (err) => { + if (err) throw err; + console.log('文件已创建并写入新内容'); + }); + } else { + throw err; + } + } else { + // 文件存在,追加新内容 + fs.appendFile(dayPath, logTime + msg + crlf, (err) => { + if (err) throw err; + console.log('新内容已追加到文件'); + }); + } + }); +}; \ No newline at end of file diff --git a/app/model/BNtripAdmin.js b/app/model/BNtripAdmin.js new file mode 100644 index 0000000..3a3b2de --- /dev/null +++ b/app/model/BNtripAdmin.js @@ -0,0 +1,20 @@ +'use strict'; + +module.exports = (app) => { + const { INTEGER, CHAR, STRING } = app.Sequelize; + + const BNtripAdmin = app.model.define('bntrip-admin', { + id: { type: INTEGER(8), primaryKey: true, autoIncrement: true }, + user_uid: CHAR(15), + organization: CHAR(15), + mountpoint: STRING(100), + password: STRING(16) + }, { + freezeTableName: true, + timestamp: false, + createdAt: false, + updatedAt: false + }); + + return BNtripAdmin; +}; \ No newline at end of file diff --git a/app/model/BNtripClient.js b/app/model/BNtripClient.js new file mode 100644 index 0000000..556b2fa --- /dev/null +++ b/app/model/BNtripClient.js @@ -0,0 +1,20 @@ +'use strict'; + +module.exports = (app) => { + const { INTEGER, CHAR, STRING } = app.Sequelize; + + const BNtripClient = app.model.define('bntrip-client', { + id: { type: INTEGER(8), primaryKey: true, autoIncrement: true }, + user_uid: CHAR(15), + organization: CHAR(15), + mountpoint: STRING(100), + base: STRING(104) + }, { + freezeTableName: true, + timestamp: false, + createdAt: false, + updatedAt: false + }); + + return BNtripClient; +}; \ No newline at end of file diff --git a/app/model/BNtripMsg.js b/app/model/BNtripMsg.js new file mode 100644 index 0000000..bd70d80 --- /dev/null +++ b/app/model/BNtripMsg.js @@ -0,0 +1,21 @@ +'use strict'; + +module.exports = (app) => { + const { INTEGER, CHAR, STRING, TEXT, DATE } = app.Sequelize; + + const BNtripMsg = app.model.define('bntrip-msg', { + id: { type: INTEGER(8), primaryKey: true, autoIncrement: true }, + user_uid: CHAR(15), + organization: CHAR(15), + mountpoint: STRING(100), + original_msg: TEXT, + created_at: DATE + }, { + freezeTableName: true, + timestamp: true, + createdAt: true, + updatedAt: false + }); + + return BNtripMsg; +}; \ No newline at end of file diff --git a/app/model/BNtripRecord.js b/app/model/BNtripRecord.js new file mode 100644 index 0000000..6a78040 --- /dev/null +++ b/app/model/BNtripRecord.js @@ -0,0 +1,22 @@ +'use strict'; + +module.exports = (app) => { + const { INTEGER, CHAR, STRING, DATE } = app.Sequelize; + + const BNtripRecord = app.model.define('bntrip-record', { + id: { type: INTEGER(8), primaryKey: true, autoIncrement: true }, + user_uid: CHAR(15), + organization: CHAR(15), + mountpoint: STRING(100), + befor_edit: STRING(100), + created_at: DATE, + updated_at: DATE + }, { + freezeTableName: true, + timestamp: true, + createdAt: true, + updatedAt: true + }); + + return BNtripRecord; +}; \ No newline at end of file diff --git a/app/model/BSide.js b/app/model/BSide.js new file mode 100644 index 0000000..2dca493 --- /dev/null +++ b/app/model/BSide.js @@ -0,0 +1,30 @@ +'use strict'; + +module.exports = (app) => { + const { INTEGER, CHAR, STRING, DATE } = app.Sequelize; + + const BSide = app.model.define('b-side', { + id: { type: INTEGER(8), primaryKey: true, autoIncrement: true }, + uid: CHAR(15), + salt: CHAR(24), + status: INTEGER(3), + role: INTEGER(3), + account_name: STRING(20), + password: CHAR(64), + organization: CHAR(16), + user_name: STRING(20), + phone: CHAR(11), + msg: STRING(300), + created_at: DATE, + updated_at: DATE, + login_at: DATE, + login_status: INTEGER(3) + }, { + freezeTableName: true, + timestamp: true, + createdAt: true, + updatedAt: true + }); + + return BSide; +}; \ No newline at end of file diff --git a/app/model2/CNtripAdmin.js b/app/model2/CNtripAdmin.js new file mode 100644 index 0000000..c762dde --- /dev/null +++ b/app/model2/CNtripAdmin.js @@ -0,0 +1,19 @@ +'use strict'; + +module.exports = (app) => { + const { INTEGER, CHAR, STRING } = app.Sequelize; + + const CNtripAdmin = app.model2.define('cntrip-admin', { + id: { type: INTEGER(8), primaryKey: true, autoIncrement: true }, + user_uid: CHAR(15), + mountpoint: STRING(100), + password: STRING(16) + }, { + freezeTableName: true, + timestamp: false, + createdAt: false, + updatedAt: false + }); + + return CNtripAdmin; +}; \ No newline at end of file diff --git a/app/model2/CNtripClient.js b/app/model2/CNtripClient.js new file mode 100644 index 0000000..21f91a1 --- /dev/null +++ b/app/model2/CNtripClient.js @@ -0,0 +1,19 @@ +'use strict'; + +module.exports = (app) => { + const { INTEGER, CHAR, STRING } = app.Sequelize; + + const CNtripClient = app.model.define('cntrip-client', { + id: { type: INTEGER(8), primaryKey: true, autoIncrement: true }, + user_uid: CHAR(15), + mountpoint: STRING(100), + base: STRING(104) + }, { + freezeTableName: true, + timestamp: false, + createdAt: false, + updatedAt: false + }); + + return CNtripClient; +}; \ No newline at end of file diff --git a/app/model2/CNtripMsg.js b/app/model2/CNtripMsg.js new file mode 100644 index 0000000..45feddc --- /dev/null +++ b/app/model2/CNtripMsg.js @@ -0,0 +1,20 @@ +'use strict'; + +module.exports = (app) => { + const { INTEGER, CHAR, STRING, TEXT, DATE } = app.Sequelize; + + const CNtripMsg = app.model2.define('cntrip-msg', { + id: { type: INTEGER(8), primaryKey: true, autoIncrement: true }, + user_uid: CHAR(15), + mountpoint: STRING(100), + original_msg: TEXT, + created_at: DATE + }, { + freezeTableName: true, + timestamp: true, + createdAt: true, + updatedAt: false + }); + + return CNtripMsg; +}; \ No newline at end of file diff --git a/app/model2/CNtripRecord.js b/app/model2/CNtripRecord.js new file mode 100644 index 0000000..c4f4a40 --- /dev/null +++ b/app/model2/CNtripRecord.js @@ -0,0 +1,21 @@ +'use strict'; + +module.exports = (app) => { + const { INTEGER, CHAR, STRING, DATE } = app.Sequelize; + + const CNtripRecord = app.model2.define('cntrip-record', { + id: { type: INTEGER(8), primaryKey: true, autoIncrement: true }, + user_uid: CHAR(15), + mountpoint: STRING(100), + befor_edit: STRING(100), + created_at: DATE, + updated_at: DATE + }, { + freezeTableName: true, + timestamp: true, + createdAt: true, + updatedAt: true + }); + + return CNtripRecord; +}; \ No newline at end of file diff --git a/app/model2/CSide.js b/app/model2/CSide.js new file mode 100644 index 0000000..053de1f --- /dev/null +++ b/app/model2/CSide.js @@ -0,0 +1,34 @@ +'use strict'; + +module.exports = (app) => { + const { INTEGER, CHAR, STRING, DATE } = app.Sequelize; + + const CSide = app.model2.define('c-side', { + id: { type: INTEGER(8), primaryKey: true, autoIncrement: true }, + uid: CHAR(15), + salt: CHAR(24), + status: INTEGER(3), + role: INTEGER(3), + avatar: CHAR(15), + account_name: STRING(20), + password: CHAR(64), + user_name: STRING(20), + phone: CHAR(11), + gender: INTEGER(1), + age: INTEGER(3), + email: STRING(254), + address: STRING(300), + post_code: CHAR(6), + created_at: DATE, + updated_at: DATE, + login_at: DATE, + login_status: INTEGER(3) + }, { + freezeTableName: true, + timestamp: true, + createdAt: true, + updatedAt: true + }); + + return CSide; +}; \ No newline at end of file diff --git a/app/model3/Mountpoint.js b/app/model3/Mountpoint.js new file mode 100644 index 0000000..2145548 --- /dev/null +++ b/app/model3/Mountpoint.js @@ -0,0 +1,21 @@ +'use strict'; + +module.exports = (app) => { + const { INTEGER, STRING, DATE } = app.Sequelize; + + const Mountpoint = app.model3.define('mountpoint', { + id: { type: INTEGER(8), primaryKey: true, autoIncrement: true }, + mountpoint: STRING(100), + password: STRING(16), + status: INTEGER(3), + created_at: DATE, + updated_at: DATE, + },{ + freezeTableName: true, + timestamp: true, + createdAt: true, + updatedAt: true, + }); + + return Mountpoint; +}; \ No newline at end of file diff --git a/app/model4/Account.js b/app/model4/Account.js new file mode 100644 index 0000000..5bf49e6 --- /dev/null +++ b/app/model4/Account.js @@ -0,0 +1,24 @@ +'use strict'; + +module.exports = (app) => { + const { INTEGER, CHAR, STRING, DATE } = app.Sequelize; + + const Account = app.model4.define('account', { + id: { type: INTEGER(8), primaryKey: true, autoIncrement: true }, + uid: CHAR(15), + salt: CHAR(24), + contest_uid: CHAR(15), + account_name: STRING(20), + password: CHAR(64), + status: INTEGER(3), + created_at: DATE, + login_status: INTEGER(3) + }, { + freezeTableName: true, + timestamp: true, + createdAt: true, + updatedAt: false + }); + + return Account; +}; \ No newline at end of file diff --git a/app/model4/TNtripAdmin.js b/app/model4/TNtripAdmin.js new file mode 100644 index 0000000..4762b07 --- /dev/null +++ b/app/model4/TNtripAdmin.js @@ -0,0 +1,19 @@ +'use strict'; + +module.exports = (app) => { + const { INTEGER, CHAR, STRING } = app.Sequelize; + + const TNtripAdmin = app.model4.define('tntrip-admin', { + id: { type: INTEGER(8), primaryKey: true, autoIncrement: true }, + user_uid: CHAR(15), + mountpoint: STRING(100), + password: STRING(16) + }, { + freezeTableName: true, + timestamp: false, + createdAt: false, + updatedAt: false + }); + + return TNtripAdmin; +}; \ No newline at end of file diff --git a/app/model4/TNtripClient.js b/app/model4/TNtripClient.js new file mode 100644 index 0000000..b066d20 --- /dev/null +++ b/app/model4/TNtripClient.js @@ -0,0 +1,19 @@ +'use strict'; + +module.exports = (app) => { + const { INTEGER, CHAR, STRING } = app.Sequelize; + + const TNtripClient = app.model.define('tntrip-client', { + id: { type: INTEGER(8), primaryKey: true, autoIncrement: true }, + user_uid: CHAR(15), + mountpoint: STRING(100), + base: STRING(104) + }, { + freezeTableName: true, + timestamp: false, + createdAt: false, + updatedAt: false + }); + + return TNtripClient; +}; \ No newline at end of file diff --git a/app/model4/TNtripMsg.js b/app/model4/TNtripMsg.js new file mode 100644 index 0000000..cddbd28 --- /dev/null +++ b/app/model4/TNtripMsg.js @@ -0,0 +1,20 @@ +'use strict'; + +module.exports = (app) => { + const { INTEGER, CHAR, STRING, TEXT, DATE } = app.Sequelize; + + const TNtripMsg = app.model4.define('tntrip-msg', { + id: { type: INTEGER(8), primaryKey: true, autoIncrement: true }, + user_uid: CHAR(15), + mountpoint: STRING(100), + original_msg: TEXT, + created_at: DATE + }, { + freezeTableName: true, + timestamp: true, + createdAt: true, + updatedAt: false + }); + + return TNtripMsg; +}; \ No newline at end of file diff --git a/app/model4/TNtripRecord.js b/app/model4/TNtripRecord.js new file mode 100644 index 0000000..c9a6b54 --- /dev/null +++ b/app/model4/TNtripRecord.js @@ -0,0 +1,21 @@ +'use strict'; + +module.exports = (app) => { + const { INTEGER, CHAR, STRING, DATE } = app.Sequelize; + + const TNtripRecord = app.model4.define('tntrip-record', { + id: { type: INTEGER(8), primaryKey: true, autoIncrement: true }, + user_uid: CHAR(15), + mountpoint: STRING(100), + befor_edit: STRING(100), + created_at: DATE, + updated_at: DATE + }, { + freezeTableName: true, + timestamp: true, + createdAt: true, + updatedAt: true + }); + + return TNtripRecord; +}; \ No newline at end of file diff --git a/app/router.js b/app/router.js new file mode 100644 index 0000000..ffadb2b --- /dev/null +++ b/app/router.js @@ -0,0 +1,43 @@ +/** + * @param {Egg.Application} app - egg application + */ +module.exports = app => { + const { router, middleware, controller } = app; + + setTimeout(() => { + // 启动socket客户端 + const caster = new middleware.ntripCaster.ntripCaster.SimpleNtripCaster(app); + caster.start(); + }, 10000); + + // 保存挂载点 + router.post('/saveMountpoint', controller.home.saveMountpoint); + // 修改挂载点密码 + router.post('/editPassword', controller.home.editPassword); + // 修改挂载点名称 + router.post('/editMountpoint', controller.home.editMountpoint); + // 删除挂载点 + router.post('/delMountpoint', controller.home.delMountpoint); + // 获取挂载点 + router.get('/getMountpoint', controller.home.getMountpoint); + // 搜索挂载点 + router.post('/searchMountpoint', controller.home.searchMountpoint); + // 全局寻获挂载点 + router.post('/findMountpoint', controller.home.findMountpoint); + // 查看ntrip-clinet密码 + router.post('/viewPassword', controller.home.viewPassword); + // 获取挂载点记录 + router.post('/getRecord', controller.home.getRecord); + // 存储消息记录 + router.post('/saveMsg', controller.home.saveMsg); + // 设置ntrip-clinet密码 + router.post('/setPassword', controller.home.setPassword); + // 获取ntrip-clinet密码 + router.post('/getPassword', controller.home.getPassword); + // 获取历史消息 + router.post('/getHistoryMsg', controller.home.getHistoryMsg); + // 删除历史消息 + router.post('/delHistoryMsg', controller.home.delHistoryMsg); + // 获取单位用户 + router.post('/bsideManager', controller.home.bsideManager); +}; diff --git a/app/service/home.js b/app/service/home.js new file mode 100644 index 0000000..506eb85 --- /dev/null +++ b/app/service/home.js @@ -0,0 +1,662 @@ +'use strict'; + +const Service = require('../core/base_service'); + +const { Op } = require('sequelize'); + +const shunt = (uid) => { + return uid[uid.length - 1]; +}; + +const fileName = 'home'; + +const redisType = { + "B": "db0", + "C": "db1", + "T": "db5", +}; + +class HomeService extends Service { + // 保存挂载点 + async saveMountpoint(uid, body) { + const { ctx } = this; + const redis = ctx.app.redis; + try { + const uidLastCode = shunt(uid); + const form = { + user_uid: uid, + mountpoint: body.mountpoint, + password: body.password + }; + let redisKey; + if (uidLastCode == 'B') { + const bside = await ctx.model.BSide.findOne({ where: { uid, status: { [Op.not]: 2 }, role: 1 } }); + if (!bside || bside.organization == null) return false; + form.organization = bside.organization; + redisKey = bside.organization; + } else { + redisKey = uid; + } + const model = { + "B": ctx.model.BNtripAdmin, + "C": ctx.model2.CNtripAdmin, + "T": ctx.model4.TNtripAdmin + }; + const save = await redis.get(redisType[uidLastCode]).get(redisKey + 'mountpoint'); + if (save) { + await redis.get(redisType[uidLastCode]).set(redisKey + 'mountpoint', JSON.stringify([body.mountpoint, ...JSON.parse(save)])); + } else { + const saved = await model[uidLastCode].findAll({ where: uidLastCode == 'B' ? { organization: redisKey } : { user_uid: redisKey } }); + let mountpoint = []; + saved.forEach(element => { + mountpoint.push(element.dataValues.mountpoint); + }); + mountpoint.push(body.mountpoint); + await redis.get(redisType[uidLastCode]).set(redisKey + 'mountpoint', JSON.stringify(mountpoint)); + } + const result = await model[uidLastCode].create(form); + const systemForm = { + mountpoint: body.mountpoint, + password: body.password, + status: uidLastCode == 'B' ? 1 : uidLastCode == 'C' ? 2 : 3, + created_at: new Date(), + updated_at: new Date() + }; + await ctx.model3.Mountpoint.create(systemForm); + if (result) await redis.get(redisType[uidLastCode]).set(body.mountpoint, body.password); + form.befor_edit = ''; + form.created_at = new Date(); + form.updated_at = new Date(); + const modelName = { + "B": ctx.model.BNtripRecord, + "C": ctx.model2.CNtripRecord, + "T": ctx.model4.TNtripRecord + }; + await modelName[uidLastCode].create(form); + await redis.get(redisType[uidLastCode]).bgsave(); + return result || false; + } catch (error) { + const blockName = fileName + "--" + "saveMountpoint"; + ctx.app.middleware.utils.log('../../../serviceLog', blockName + ">>>>" + error); + return 'error'; + } + } + + // 修改挂载点密码 + async editPassword(uid, body) { + const { ctx } = this; + const redis = ctx.app.redis; + try { + const form = { + user_uid: uid, + mountpoint: body.beforEdit, + }; + const uidLastCode = shunt(uid); + if (uidLastCode == 'B') { + const bside = await ctx.model.BSide.findOne({ where: { uid, status: { [Op.not]: 2 }, role: 1 } }); + if (!bside || bside.organization == null) return false; + form.organization = bside.organization; + } + const whereAdmin = { mountpoint: body.beforEdit }; + const modelType = { + "B": ctx.model.BNtripAdmin, + "C": ctx.model2.CNtripAdmin, + "T": ctx.model4.TNtripAdmin + }; + const findAdmin = await modelType[uidLastCode].findOne({ where: whereAdmin }); + if (!findAdmin) return false; + const updateAdminForm = { password: body.password }; + const result = await modelType[uidLastCode].update(updateAdminForm, { where: whereAdmin }); + await ctx.model3.Mountpoint.update(updateAdminForm, { where: whereAdmin }); + if (result[0] !== 0) { + await redis.get(redisType[uidLastCode]).set(body.beforEdit, body.password); + await redis.get(redisType[uidLastCode]).bgsave(); + } + return result[0] == 0 ? false : result; + } catch (error) { + const blockName = fileName + "--" + "editPassword"; + ctx.app.middleware.utils.log('../../../serviceLog', blockName + ">>>>" + error); + return 'error'; + } + } + + // 修改挂载点名称 + async editMountpoint(uid, body) { + const { ctx } = this; + const redis = ctx.app.redis; + try { + const form = { + user_uid: uid, + mountpoint: body.beforEdit + }; + let redisKey; + const uidLastCode = shunt(uid); + if (uidLastCode == 'B') { + const bside = await ctx.model.BSide.findOne({ where: { uid, status: { [Op.not]: 2 }, role: 1 } }); + if (!bside || bside.organization == null) return false; + form.organization = bside.organization; + redisKey = bside.organization; + } else { + redisKey = uid; + } + const save = await redis.get(redisType[uidLastCode]).get(redisKey + 'mountpoint'); + if (save) { + await redis.get(redisType[uidLastCode]).set(redisKey + 'mountpoint', JSON.stringify([body.afterEdit, ...JSON.parse(save).filter(item => item !== body.beforEdit)])); + } else { + await redis.get(redisType[uidLastCode]).set(redisKey + 'mountpoint', JSON.stringify([body.afterEdit])); + } + const whereAdmin = { mountpoint: body.beforEdit }; + const whereRecord = { mountpoint: body.beforEdit, befor_edit: '' }; + const modelType = { + "B": ctx.model.BNtripAdmin, + "C": ctx.model2.CNtripAdmin, + "T": ctx.model4.TNtripAdmin + }; + const model = { + "B": ctx.model.BNtripRecord, + "C": ctx.model2.CNtripRecord, + "T": ctx.model4.TNtripRecord + }; + const modelName = { + "B": ctx.model.BNtripClient, + "C": ctx.model2.CNtripClient, + "T": ctx.model4.TNtripClient + }; + const findAdmin = await modelType[uidLastCode].findOne({ where: whereAdmin }); + if (!findAdmin) return false; + const findRecord = await model[uidLastCode].findOne({ where: whereRecord }); + if (!findRecord) { + form.befor_edit = ''; + form.created_at = new Date(); + form.updated_at = new Date(); + const createResult = await model[uidLastCode].create(form); + if (!createResult) return false; + } + const updateAdminForm = { mountpoint: body.afterEdit }; + const updateRecordForm = { + mountpoint: body.afterEdit, + befor_edit: body.beforEdit, + updated_at: new Date() + }; + const result = await modelType[uidLastCode].update(updateAdminForm, { where: whereAdmin }); + await ctx.model3.Mountpoint.update(updateAdminForm, { where: whereAdmin }); + await model[uidLastCode].update(updateRecordForm, { where: whereRecord }); + await modelName[uidLastCode].update(updateAdminForm, { where: whereAdmin }); + if (result[0] !== 0) { + await redis.get(redisType[uidLastCode]).del(body.beforEdit); + await redis.get(redisType[uidLastCode]).set(body.afterEdit, findAdmin.dataValues.password); + } + await redis.get(redisType[uidLastCode]).bgsave(); + return result[0] == 0 ? false : result; + } catch (error) { + const blockName = fileName + "--" + "editMountpoint"; + ctx.app.middleware.utils.log('../../../serviceLog', blockName + ">>>>" + error); + return 'error'; + } + } + + // 删除挂载点 + async delMountpoint(uid, body) { + const { ctx } = this; + const redis = ctx.app.redis; + try { + let redisKey; + const uidLastCode = shunt(uid); + if (uidLastCode == 'B') { + const bside = await ctx.model.BSide.findOne({ where: { uid, status: { [Op.not]: 2 }, role: 1 } }); + if (!bside || bside.organization == null) return false; + redisKey = bside.organization; + } else { + redisKey = uid; + } + const save = await redis.get(redisType[uidLastCode]).get(redisKey + 'mountpoint'); + if (save) { + await redis.get(redisType[uidLastCode]).del(body.mountpoint); + await redis.get(redisType[uidLastCode]).set(redisKey + 'mountpoint', JSON.stringify([...JSON.parse(save).filter(item => item !== body.mountpoint)])); + await redis.get(redisType[uidLastCode]).bgsave(); + } + const where = { mountpoint: body.mountpoint }; + const modelType = { + "B": ctx.model.BNtripAdmin, + "C": ctx.model2.CNtripAdmin, + "T": ctx.model4.TNtripAdmin + }; + const modelName = { + "B": ctx.model.BNtripClient, + "C": ctx.model2.CNtripClient, + "T": ctx.model4.TNtripClient + }; + const model = { + "B": ctx.model.BNtripMsg, + "C": ctx.model2.CNtripMsg, + "T": ctx.model4.TNtripMsg + }; + const modelRecord = { + "B": ctx.model.BNtripRecord, + "C": ctx.model2.CNtripRecord, + "T": ctx.model4.TNtripRecord + }; + const resetList = await modelType[uidLastCode].destroy({ where }); + await modelName[uidLastCode].destroy({ where }); + await model[uidLastCode].destroy({ where }); + await modelRecord[uidLastCode].destroy({ where }); + return resetList.length == 0 ? false : resetList; + } catch (error) { + const blockName = fileName + "--" + "delMountpoint"; + ctx.app.middleware.utils.log('../../../serviceLog', blockName + ">>>>" + error); + return 'error'; + } +} + + // 获取挂载点 + async getMountpoint(uid) { + const { ctx } = this; + const redis = ctx.app.redis; + try { + let where; + const uidLastCode = shunt(uid); + const model = { + "B": ctx.model.BNtripAdmin, + "C": ctx.model2.CNtripAdmin, + "T": ctx.model4.TNtripAdmin, + }; + let redisKey; + if (uidLastCode == 'B') { + const bside = await ctx.model.BSide.findOne({ where: { uid, status: { [Op.not]: 2 } } }); + if (!bside || bside.organization == null) return false; + where = { organization: bside.organization }; + redisKey = bside.organization; + } else { + where = { user_uid: uid }; + redisKey = uid; + } + const mountpoint = await redis.get(redisType[uidLastCode]).get(redisKey + 'mountpoint'); + if (mountpoint) { + return JSON.parse(mountpoint); + } else { + const result = await model[uidLastCode].findAll({ where }); + if (result.length == 0) return false; + let mountpoint = []; + result.forEach(element => { + mountpoint.push(element.dataValues.mountpoint); + }); + await redis.get(redisType[uidLastCode]).set(redisKey + 'mountpoint', JSON.stringify(mountpoint)); + await redis.get(redisType[uidLastCode]).bgsave(); + return mountpoint; + } + } catch (error) { + const blockName = fileName + "--" + "getMountpoint"; + ctx.app.middleware.utils.log('../../../serviceLog', blockName + ">>>>" + error); + return 'error'; + } + } + + // 搜索挂载点 + async searchMountpoint(uid, body) { + const { ctx } = this; + const redis = ctx.app.redis; + try { + const uidLastCode = shunt(uid); + const model = { + "B": ctx.model.BNtripAdmin, + "C": ctx.model2.CNtripAdmin, + "T": ctx.model4.TNtripAdmin, + }; + const mountpoint = await redis.get(redisType[uidLastCode]).get(body.mountpoint); + if (mountpoint) { + return JSON.parse(mountpoint); + } else { + const where = { mountpoint: body.mountpoint }; + const result = await model[uidLastCode].findOne({ where }); + return result || false; + } + } catch (error) { + const blockName = fileName + "--" + "searchMountpoint"; + ctx.app.middleware.utils.log('../../../serviceLog', blockName + ">>>>" + error); + return 'error'; + } + } + + // 全局寻获挂载点 + async findMountpoint(body) { + const { ctx } = this; + const redis = ctx.app.redis; + try { + const where = { mountpoint: body.mountpoint }; + const result = await ctx.model3.Mountpoint.findOne({ where }); + if (result) { + return result; + } + const attributes = ['mountpoint', 'password']; + // 尝试从 Redis 获取数据 + const [bside, cside, contest] = await Promise.all([ + redis.get(redisType['B']).get(body.mountpoint), + redis.get(redisType['C']).get(body.mountpoint), + redis.get(redisType['T']).get(body.mountpoint) + ]); + // 检查 Redis 中是否有匹配的记录 + const redisResult = bside || cside || contest; + if (redisResult) { + return { mountpoint: body.mountpoint, password: redisResult, status: bside ? 1 : cside ? 2 : 3 }; + } + // 如果 Redis 中没有匹配的记录,尝试从数据库中获取 + const [bAdmin, cAdmin, tAdmin] = await Promise.all([ + ctx.model.BNtripAdmin.findOne({ attributes, where }), + ctx.model2.CNtripAdmin.findOne({ attributes, where }), + ctx.model4.TNtripAdmin.findOne({ attributes, where }) + ]); + // 检查数据库中是否有匹配的记录 + const admin = bAdmin || cAdmin || tAdmin; + if (admin) { + admin.dataValues.status = bAdmin ? 1 : cAdmin ? 2 : 3; + return admin.dataValues; + } + return false; + } catch (error) { + const blockName = fileName + "--" + "findMountpoint"; + ctx.app.middleware.utils.log('../../../serviceLog', blockName + ">>>>" + error); + return 'error'; + } + } + + // 查看ntrip-clinet密码 + async viewPassword(uid, body) { + const { ctx } = this; + try { + const { mountpoint } = body; + const uidLastCode = shunt(uid); + const model = { + "B": ctx.model.BNtripClient, + "C": ctx.model2.CNtripClient, + "T": ctx.model4.TNtripClient + }; + const attributes = ['base']; + const where = { user_uid: uid, mountpoint }; + const user = await model[uidLastCode].findOne({ attributes, where }); + return user || false; + } catch (error) { + const blockName = fileName + "--" + "viewPassword"; + ctx.app.middleware.utils.log('../../../serviceLog', blockName + ">>>>" + error); + return 'error'; + } + } + + // 获取挂载点记录 + async getRecord(uid, body) { + const { ctx } = this; + try { + let bside; + const uidLastCode = shunt(uid); + if (uidLastCode == 'B') { + bside = await ctx.model.BSide.findOne({ where: { uid, status: { [Op.not]: 2 }, role: 1 } }); + if (!bside || bside.organization == null) return false; + } + let { offset, limit, searchOptions, sortOptions } = body; + offset = (offset - 1) * limit; + let attributes = ['mountpoint', 'befor_edit', 'created_at', 'updated_at'], + where = uidLastCode == 'B' ? { organization: bside.organization } : { user_uid: uid }, order = [], dbOptions, joinSubstring = [], + substring = ['mountpoint', 'befor_edit'], key = [], between = ['created_at', 'updated_at']; + attributes.forEach(element => { + if (searchOptions[element]) { + if (searchOptions[element] == '*空') { + if (joinSubstring.includes(element)) { + where[element] = null; + } else { + where[element] = [null, '']; + } + } else if (substring.includes(element)) { + where[element] = { [Op.substring]: searchOptions[element] }; + } else if (key.includes(element)) { + where[element] = searchOptions[element] == "1" ? uidLastCode === 'B' ? 1 : 2 : 0; + } else if (between.includes(element)) { + where[element] = { [Op.between]: [searchOptions[element][0], searchOptions[element][1]] }; + } + } + if (sortOptions[element] == true) { + order.push([element, 'ASC']); + } else if (sortOptions[element] == false) { + order.push([element, 'DESC']); + } + }); + dbOptions = { attributes, offset, limit, where, order }; + const model = { + "B": ctx.model.BNtripRecord, + "C": ctx.model2.CNtripRecord, + "T": ctx.model4.TNtripRecord, + }; + const result = await model[uidLastCode].findAndCountAll(dbOptions); + return result.rows.length == 0 ? false : result; + } catch (error) { + const blockName = fileName + "--" + "getRecord"; + ctx.app.middleware.utils.log('../../../serviceLog', blockName + ">>>>" + error); + return 'error'; + } + } + + // 存储消息记录 + async saveMsg(uid, form) { + const { ctx } = this; + try { + const where = { mountpoint: form.mountpoint }; + const model = { + "B": ctx.model.BNtripAdmin, + "C": ctx.model2.CNtripAdmin, + "T": ctx.model4.TNtripAdmin, + }; + const uidLastCode = shunt(uid); + const bind = await model[uidLastCode].findOne({ where }); + if (!bind) return false; + form.user_uid = bind.dataValues.user_uid; + if (uidLastCode == 'B') { + form.organization = bind.dataValues.organization; + } + const modelName = { + "B": ctx.model.BNtripMsg, + "C": ctx.model2.BNtripMsg, + "T": ctx.model4.BNtripMsg + }; + const result = await modelName[uidLastCode].create(form); + return result || false; + } catch (error) { + const blockName = fileName + "--" + "saveMsg"; + ctx.app.middleware.utils.log('../../../serviceLog', blockName + ">>>>" + error); + return 'error'; + } + } + + // 设置ntrip-clinet密码 + async setPassword(uid, body) { + const { ctx } = this; + try { + const uidLastCode = shunt(uid); + const { mountpoint, password } = body; + const model = { + "B": ctx.model.BSide, + "C": ctx.model2.CSide, + "T": ctx.model4.Account + }; + const user = await model[uidLastCode].findOne({ where: { uid, status: { [Op.not]: 2 } } }); + if (!user) return false; + const form = { + user_uid: uid, + mountpoint, + }; + if (uidLastCode == 'B') { + form.organization = user.dataValues.organization; + } + const modelName = { + "B": ctx.model.BNtripClient, + "C": ctx.model2.CNtripClient, + "T": ctx.model4.TNtripClient + }; + // 将字符串编码为 UTF-8 字节数组 + const bytes = new TextEncoder().encode(user.dataValues.account_name + ':' + password); + // 将字节数组转换为二进制字符串 + let binary = ''; + bytes.forEach(byte => binary += String.fromCharCode(byte)); + const existence = await modelName[uidLastCode].findOne({ where: form }); + if (existence) { + const existence = await modelName[uidLastCode].update({ base: btoa(binary) }, { where: form }); + return existence[0] == 0 ? false : existence; + } else { + form.base = btoa(binary); + const result = await modelName[uidLastCode].create(form); + return result || false; + } + } catch (error) { + const blockName = fileName + "--" + "setPassword"; + ctx.app.middleware.utils.log('../../../serviceLog', blockName + ">>>>" + error); + return 'error'; + } + } + + // 获取ntrip-clinet密码 + async getPassword(body) { + const { ctx } = this; + try { + const { mountpoint, base, status } = body; + const model = { + "1": ctx.model.BNtripClient, + "2": ctx.model2.CNtripClient, + "3": ctx.model4.TNtripClient + }; + const user = await model[status].findOne({ where: { mountpoint, base } }); + return user || false; + } catch (error) { + const blockName = fileName + "--" + "getPassword"; + ctx.app.middleware.utils.log('../../../serviceLog', blockName + ">>>>" + error); + return 'error'; + } + } + + // 获取历史消息 + async getHistoryMsg(uid, body) { + const { ctx } = this; + try { + let bside; + const uidLastCode = shunt(uid); + if (uidLastCode == 'B') { + bside = await ctx.model.BSide.findOne({ where: { uid, status: { [Op.not]: 2 }, role: 1 } }); + if (!bside || bside.organization == null) return false; + } + let { offset, limit, searchOptions, sortOptions } = body; + offset = (offset - 1) * limit; + let attributes = ['mountpoint', 'original_msg', 'created_at'], + where = uidLastCode == 'B' ? { organization: bside.organization } : { user_uid: uid }, order = [], dbOptions, joinSubstring = [], + substring = ['mountpoint', 'original_msg'], key = [], between = ['created_at']; + attributes.forEach(element => { + if (searchOptions[element]) { + if (searchOptions[element] == '*空') { + if (joinSubstring.includes(element)) { + where[element] = null; + } else { + where[element] = [null, '']; + } + } else if (substring.includes(element)) { + where[element] = { [Op.substring]: searchOptions[element] }; + } else if (key.includes(element)) { + where[element] = searchOptions[element] == "1" ? true : false; + } else if (between.includes(element)) { + where[element] = { [Op.between]: [searchOptions[element][0], searchOptions[element][1]] }; + } + } + if (sortOptions[element] == true) { + order.push([element, 'ASC']); + } else if (sortOptions[element] == false) { + order.push([element, 'DESC']); + } + }); + dbOptions = { attributes, offset, limit, where, order }; + const model = { + "B": ctx.model.BNtripMsg, + "C": ctx.model2.BNtripMsg, + "T": ctx.model4.BNtripMsg + }; + const result = await model[uidLastCode].findAndCountAll(dbOptions); + return result.rows.length == 0 ? false : result; + } catch (error) { + const blockName = fileName + "--" + "getHistoryMsg"; + ctx.app.middleware.utils.log('../../../serviceLog', blockName + ">>>>" + error); + return 'error'; + } + } + + // 删除历史消息 + async delHistoryMsg(uid, modelType, password, requestMsg) { + const { ctx } = this; + try { + const uidLastCode = shunt(uid); + const model = { + "B": ctx.model.BSide, + "C": ctx.model2.CSide, + "T": ctx.model4.Account, + }; + const userWhere = uidLastCode == 'B' ? { uid, status: { [Op.not]: 2 }, role: 1 } : { uid }; + const result = await model[uidLastCode].findOne({ where: userWhere }); + if (!result || result.dataValues.password !== this.shaForm(password, this.decryptRequest(result.dataValues.salt))) return false; + let where = {}; + if (modelType == "single") { + const { mountpoint, original_msg, origin_time } = requestMsg; + where = uidLastCode == 'B' ? { organization: bside.organization, mountpoint, original_msg, created_at: origin_time } : { user_uid: uid, mountpoint, original_msg, created_at: origin_time } + } else if (modelType == "multiple") { + let mountpoint = [], original_msg = [], created_at = []; + for (const key in requestMsg) { + requestMsg[key].forEach(element => { + mountpoint.push(element.mountpoint), + original_msg.push(element.original_msg), + created_at.push(element.origin_time) + }); + } + where = uidLastCode == 'B' ? { organization: bside.organization, mountpoint, original_msg, created_at } : { user_uid: uid, mountpoint, original_msg, created_at } + } else if (modelType == "all") { + where = uidLastCode == 'B' ? { organization: bside.organization } : { user_uid: uid } + } + const modelName = { + "B": ctx.model.BNtripMsg, + "C": ctx.model2.BNtripMsg, + "T": ctx.model4.BNtripMsg + }; + const resetList = await modelName[uidLastCode].destroy({ where }); + return resetList.length == 0 ? false : resetList; + } catch (error) { + const blockName = fileName + "--" + "delHistoryMsg"; + ctx.app.middleware.utils.log('../../../serviceLog', blockName + ">>>>" + error); + return 'error'; + } + } + + // 获取单位用户 + async bsideManager(uid, body) { + const { ctx } = this; + try { + const result = await ctx.model.BSide.findOne({ where: { uid, status: { [Op.not]: 2 }, role: 1 } }); + if (!result || result.organization == null) return false; + let { offset, limit, searchOptions } = body; + offset = (offset - 1) * limit; + let attributes = ['account_name', 'user_name', 'phone'], + where = { organization: result.organization, role: { [Op.not]: 1 } }, dbOptions, joinSubstring = []; + attributes.forEach(element => { + if (searchOptions[element]) { + if (searchOptions[element] == '*空') { + if (joinSubstring.includes(element)) { + where[element] = null; + } else { + where[element] = [null, '']; + } + } else { + where[element] = { [Op.substring]: searchOptions[element] }; + } + } + }); + dbOptions = { attributes, offset, limit, where }; + const userList = await ctx.model.BSide.findAndCountAll(dbOptions); + return userList.rows.length == 0 ? false : userList; + } catch (error) { + const blockName = fileName + "--" + "bsideManager"; + ctx.app.middleware.utils.log('../../../serviceLog', blockName + ">>>>" + error); + return 'error'; + } + } +} + +module.exports = HomeService; \ No newline at end of file diff --git a/config/config.default.js b/config/config.default.js new file mode 100644 index 0000000..366e9e5 --- /dev/null +++ b/config/config.default.js @@ -0,0 +1,231 @@ +/* eslint valid-jsdoc: "off" */ + +/** + * @param {Egg.EggAppInfo} appInfo app info + */ +const process = require('process'), +path = require('path'); + +module.exports = appInfo => { + /** + * built-in config + * @type {Egg.EggAppConfig} + **/ + const config = exports = {}; + + // use for cookie sign key, should change to your own and keep security + config.keys = appInfo.name + '_1776061883917_3511'; + + // add your middleware config here + // config.middleware = []; + + // 修改Egg.js的public路径配置到运行路径下 + config.static = { + prefix: '/', + dir: process.cwd() + '/public', + }; + + // 配置执行时临时文件的路径到运行路径 + config.rundir = process.cwd() + '/run'; + + // 配置普通日志文件地址 + config.logger = { + dir: path.join(process.cwd(), 'logs'), + }; + + // 配置定时任务日志文件地址 + config.customLogger = { + scheduleLogger: { + file: path.join(process.cwd(), 'logs', 'egg-schedule.log'), + }, + }; + + config.security = { + csrf: { + enable: false + }, + }; + + // ntrip caster配置 + config.caster = { + ip: '127.0.0.1', + port: 2101 + }; + + config.redis = { + // 开发/测试环境 + clients: { + db0: { + port: 6379, + host: '127.0.0.1', + password: '74191221', + db: 0, + }, + db1: { + port: 6379, + host: '127.0.0.1', + password: '74191221', + db: 1, + }, + db2: { + port: 6379, + host: '127.0.0.1', + password: '74191221', + db: 2, + }, + db3: { + port: 6379, + host: '127.0.0.1', + password: '74191221', + db: 3, + }, + db5: { + port: 6379, + host: '127.0.0.1', + password: '74191221', + db: 5, + }, + db8: { + port: 6379, + host: '127.0.0.1', + password: '74191221', + db: 8, + } + } + // 生产环境 + // clients: { + // db0: { + // port: 6379, + // host: '127.0.0.1', + // password: 'bd3@htcc2023', + // db: 2, + // }, + // db1: { + // port: 6379, + // host: '127.0.0.1', + // password: 'bd3@htcc2023', + // db: 3, + // }, + // db2: { + // port: 6379, + // host: '127.0.0.1', + // password: 'bd3@htcc2023', + // db: 4, + // }, + // db3: { + // port: 6379, + // host: '127.0.0.1', + // password: 'bd3@htcc2023', + // db: 5, + // } + // db5: { + // port: 6379, + // host: '127.0.0.1', + // password: 'bd3@htcc2023', + // db: 7, + // }, + // db8: { + // port: 6379, + // host: '127.0.0.1', + // password: '74191221', + // db: 10, + // } + // } + }; + + config.sequelize = { + // 开发/测试环境 + datasources: [ + { + dialect: 'mariadb', + host: 'localhost', + port: 3306, + username: 'root', + password: '74191221', + database: 'bside', + }, + { + dialect: 'mariadb', + host: 'localhost', + port: 3306, + username: 'root', + password: '74191221', + database: 'cside', + delegate: 'model2', + baseDir: 'model2', + }, + { + dialect: 'mariadb', + host: 'localhost', + port: 3306, + username: 'root', + password: '74191221', + database: 'insiders', + delegate: 'model3', + baseDir: 'model3', + }, + { + dialect: 'mariadb', + host: 'localhost', + port: 3306, + username: 'root', + password: '74191221', + database: 'bdContest', + delegate: 'model4', + baseDir: 'model4', + } + ] + // 生产环境 + // datasources: [ + // { + // dialect: 'mariadb', + // host: 'localhost', + // port: 3306, + // username: 'bdqh_platform', + // password: '124689@XXxx', + // database: 'bside', + // }, + // { + // dialect: 'mariadb', + // host: 'localhost', + // port: 3306, + // username: 'bdqh_platform', + // password: '124689@XXxx', + // database: 'cside', + // delegate: 'model2', + // baseDir: 'model2', + // }, + // { + // dialect: 'mariadb', + // host: 'localhost', + // port: 3306, + // username: 'bdqh_platform', + // password: '124689@XXxx', + // database: 'insiders', + // delegate: 'model3', + // baseDir: 'model3', + // }, + // { + // dialect: 'mariadb', + // host: 'localhost', + // port: 3306, + // username: 'bdqh_platform', + // password: '124689@XXxx', + // database: 'bdContest', + // delegate: 'model4', + // baseDir: 'model4', + // } + // ] + }; + + // add your user config here + const userConfig = { + // myAppName: 'egg', + salt: 'ntripCaster' + }; + + return { + ...config, + ...userConfig, + }; +}; diff --git a/config/plugin.js b/config/plugin.js new file mode 100644 index 0000000..47d52b6 --- /dev/null +++ b/config/plugin.js @@ -0,0 +1,27 @@ +/** @type Egg.EggPlugin */ +module.exports = { + // had enabled by egg + // static: { + // enable: true, + // } + + CryptoJS : { + enable: true, + package: 'crypto-js', + }, + + redis : { + enable: true, + package: 'egg-redis', + }, + + sequelize : { + enable: true, + package: 'egg-sequelize', + }, + + validate : { + enable: true, + package: 'egg-validate', + }, +}; diff --git a/controllerLog/2026/4/15.txt b/controllerLog/2026/4/15.txt new file mode 100644 index 0000000..81dbc0c --- /dev/null +++ b/controllerLog/2026/4/15.txt @@ -0,0 +1,24 @@ +[2026-4-15>>>15:58:4]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>15:58:4]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>15:58:4]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>15:58:5]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>15:58:5]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>15:58:5]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>15:58:5]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>15:59:59]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>15:59:59]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>15:59:59]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>15:59:59]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>16:0:0]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>16:0:0]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>16:0:0]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>16:0:0]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>16:8:55]>>>home--getRecord>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>16:27:58]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>16:27:58]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>16:27:58]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>16:27:58]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>16:29:6]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>16:29:6]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>16:29:6]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-15>>>16:29:6]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') diff --git a/controllerLog/2026/4/16.txt b/controllerLog/2026/4/16.txt new file mode 100644 index 0000000..30bb0dc --- /dev/null +++ b/controllerLog/2026/4/16.txt @@ -0,0 +1,36 @@ +[2026-4-16>>>10:5:20]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') + +[2026-4-16>>>10:5:20]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>10:5:20]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>10:5:21]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>10:5:21]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>10:5:22]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>10:5:22]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:4:39]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:4:39]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:4:40]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:4:40]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:31:3]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:31:3]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:31:4]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:31:4]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:31:8]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:31:8]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:31:9]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:31:9]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:47:39]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:47:39]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:47:40]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:47:40]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:47:48]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:47:48]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:47:49]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:47:49]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:48:6]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:48:6]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:48:7]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:48:7]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:48:16]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:48:16]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:48:17]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-16>>>11:48:17]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') diff --git a/controllerLog/2026/4/23.txt b/controllerLog/2026/4/23.txt new file mode 100644 index 0000000..9fac854 --- /dev/null +++ b/controllerLog/2026/4/23.txt @@ -0,0 +1,100 @@ +[2026-4-23>>>16:32:14]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:32:15]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:32:15]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:32:15]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:32:15]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:40:36]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:40:36]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:40:53]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:40:53]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:45:27]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:48:24]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:49:8]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:52:15]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:52:15]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:52:16]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:52:16]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:52:16]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:52:16]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:53:34]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:53:34]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:53:35]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:53:35]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:53:35]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:53:35]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:55:49]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:56:4]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:56:11]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:56:29]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:56:29]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:56:29]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:56:29]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:56:29]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:56:29]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:57:8]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:57:8]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:57:9]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:57:9]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:57:9]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:57:9]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:57:23]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:57:23]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:57:24]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:57:24]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:57:24]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:57:24]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>16:58:36]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:18:22]>>>home--getRecord>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:18:22]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:18:22]>>>home--getRecord>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:18:56]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:18:56]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:18:56]>>>home--getRecord>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:18:56]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:18:56]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:18:56]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:18:56]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:18:56]>>>home--getRecord>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:26:11]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:26:11]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:26:11]>>>home--getRecord>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:26:11]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:26:11]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:26:11]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:26:11]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:26:11]>>>home--getRecord>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:27:11]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:27:11]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:27:11]>>>home--getRecord>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:27:11]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:27:11]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:27:11]>>>home--getRecord>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:27:15]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:27:15]>>>home--getRecord>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:27:15]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:27:16]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:27:16]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:27:16]>>>home--getRecord>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:28:11]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:28:11]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:28:11]>>>home--getRecord>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:28:11]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:28:11]>>>home--getHistoryMsg>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:28:11]>>>home--bsideManager>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:28:11]>>>home--getRecord>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:28:11]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'get') +[2026-4-23>>>17:51:23]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-23>>>17:51:23]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-23>>>17:52:15]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-23>>>17:52:15]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-23>>>17:52:35]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-23>>>17:52:38]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-23>>>17:52:38]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-23>>>17:53:13]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-23>>>17:53:13]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-23>>>17:55:36]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-23>>>17:55:36]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-23>>>17:56:39]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-23>>>17:56:39]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-23>>>17:58:7]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-23>>>17:58:7]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') diff --git a/controllerLog/2026/4/24.txt b/controllerLog/2026/4/24.txt new file mode 100644 index 0000000..e4e1b78 --- /dev/null +++ b/controllerLog/2026/4/24.txt @@ -0,0 +1,16 @@ +[2026-4-24>>>9:1:37]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-24>>>9:1:37]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-24>>>10:30:35]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-24>>>10:30:35]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-24>>>10:35:26]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-24>>>10:35:26]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-24>>>10:35:53]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-24>>>10:35:53]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-24>>>10:36:24]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-24>>>10:36:24]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-24>>>10:36:58]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-24>>>10:36:58]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-24>>>11:0:2]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-24>>>11:0:2]>>>home--getMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-24>>>14:44:30]>>>home--overwriteMountpoint>>>>Error: WHERE parameter "mountpoint" has invalid "undefined" value +[2026-4-24>>>14:45:1]>>>home--overwriteMountpoint>>>>Error: WHERE parameter "mountpoint" has invalid "undefined" value diff --git a/controllerLog/2026/4/30.txt b/controllerLog/2026/4/30.txt new file mode 100644 index 0000000..f6efd1f --- /dev/null +++ b/controllerLog/2026/4/30.txt @@ -0,0 +1,18 @@ +[2026-4-30>>>17:12:15]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:12:26]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:12:37]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:13:3]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:13:14]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:13:25]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:13:36]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:13:47]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:13:58]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:14:9]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:14:20]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:14:31]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:14:42]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:14:52]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:15:3]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:15:14]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:15:25]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-4-30>>>17:15:36]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') diff --git a/controllerLog/2026/5/6.txt b/controllerLog/2026/5/6.txt new file mode 100644 index 0000000..b279196 --- /dev/null +++ b/controllerLog/2026/5/6.txt @@ -0,0 +1,9 @@ +[2026-5-6>>>11:14:4]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:14:15]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:14:26]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:14:37]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:14:56]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:16:37]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-5-6>>>11:16:48]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-5-6>>>11:16:59]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') +[2026-5-6>>>11:17:10]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'mountpoint') diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..1bbed3f --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,5 @@ +{ + "include": [ + "**/*" + ] +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..e786f14 --- /dev/null +++ b/package.json @@ -0,0 +1,49 @@ +{ + "name": "ntrip-server", + "version": "1.0.0", + "description": "", + "private": true, + "egg": { + "declarations": true + }, + "dependencies": { + "crypto-js": "^4.2.0", + "egg": "^3.17.5", + "egg-redis": "^2.6.0", + "egg-scripts": "^3.0.1", + "egg-sequelize": "^6.0.0", + "egg-validate": "^2.0.2", + "gbk.js": "^0.3.0", + "ioredis": "^5.4.1", + "mariadb": "^3.3.0", + "mysql2": "^3.9.7", + "sequelize": "^6.37.3" + }, + "devDependencies": { + "egg-bin": "6", + "egg-mock": "5", + "eslint": "8", + "eslint-config-egg": "13", + "sequelize-cli": "^6.6.2" + }, + "engines": { + "node": ">=18.0.0" + }, + "scripts": { + "reload": "egg-scripts stop --title=egg-server-ntrip-server && egg-scripts start --port=8022 --workers=1 --daemon --title=egg-server-ntrip-server --ignore-stderr", + "start": "egg-scripts start --port=8022 --workers=1 --daemon --title=egg-server-ntrip-server --ignore-stderr", + "stop": "egg-scripts stop --title=egg-server-ntrip-server", + "dev": "egg-bin dev --port=8022", + "test": "npm run lint -- --fix && npm run test:local", + "test:local": "egg-bin test", + "cov": "egg-bin cov", + "lint": "eslint .", + "ci": "npm run lint && npm run cov" + }, + "repository": { + "type": "git", + "url": "" + }, + "author": "", + "license": "MIT" +} diff --git a/serviceLog/2026/4/23.txt b/serviceLog/2026/4/23.txt new file mode 100644 index 0000000..b93bf23 --- /dev/null +++ b/serviceLog/2026/4/23.txt @@ -0,0 +1,9 @@ +[2026-4-23>>>17:30:15]>>>home--getRecord>>>>ReferenceError: Cannot access 'uidLastCode' before initialization +ion +[2026-4-23>>>17:30:16]>>>home--getHistoryMsg>>>>ReferenceError: Cannot access 'uidLastCode' before initialization +[2026-4-23>>>17:30:16]>>>home--getRecord>>>>ReferenceError: Cannot access 'uidLastCode' before initialization +[2026-4-23>>>17:30:52]>>>home--getHistoryMsg>>>>ReferenceError: Cannot access 'uidLastCode' before initialization +[2026-4-23>>>17:30:52]>>>home--getRecord>>>>ReferenceError: Cannot access 'uidLastCode' before initialization +[2026-4-23>>>17:30:52]>>>home--getHistoryMsg>>>>ReferenceError: Cannot access 'uidLastCode' before initialization +[2026-4-23>>>17:30:52]>>>home--getRecord>>>>ReferenceError: Cannot access 'uidLastCode' before initialization +[2026-4-23>>>17:51:26]>>>home--overwriteMountpoint>>>>ReferenceError: Cannot access 'uidLastCode' before initialization diff --git a/serviceLog/2026/4/24.txt b/serviceLog/2026/4/24.txt new file mode 100644 index 0000000..bbae8a6 --- /dev/null +++ b/serviceLog/2026/4/24.txt @@ -0,0 +1,7 @@ +[2026-4-24>>>14:40:0]>>>home--overwriteMountpoint>>>>Error: WHERE parameter "mountpoint" has invalid "undefined" value +[2026-4-24>>>14:42:12]>>>home--overwriteMountpoint>>>>Error: WHERE parameter "mountpoint" has invalid "undefined" value +[2026-4-24>>>14:42:23]>>>home--overwriteMountpoint>>>>Error: WHERE parameter "mountpoint" has invalid "undefined" value +[2026-4-24>>>14:49:33]>>>home--overwriteMountpoint>>>>Error: WHERE parameter "mountpoint" has invalid "undefined" value +[2026-4-24>>>14:49:45]>>>home--overwriteMountpoint>>>>Error: WHERE parameter "mountpoint" has invalid "undefined" value +[2026-4-24>>>14:50:57]>>>home--overwriteMountpoint>>>>Error: WHERE parameter "mountpoint" has invalid "undefined" value +[2026-4-24>>>14:52:17]>>>home--overwriteMountpoint>>>>Error: WHERE parameter "mountpoint" has invalid "undefined" value diff --git a/serviceLog/2026/4/28.txt b/serviceLog/2026/4/28.txt new file mode 100644 index 0000000..5d0f78f --- /dev/null +++ b/serviceLog/2026/4/28.txt @@ -0,0 +1,4 @@ +[2026-4-28>>>11:22:34]>>>home--saveMsg>>>>ReferenceError: model is not defined +[2026-4-28>>>11:23:28]>>>home--saveMsg>>>>ReferenceError: mountpoint is not defined +[2026-4-28>>>11:34:37]>>>home--saveMsg>>>>SequelizeValidationError: string violation: original_msg cannot be an array or an object +[2026-4-28>>>11:36:10]>>>home--saveMsg>>>>SequelizeValidationError: string violation: original_msg cannot be an array or an object diff --git a/serviceLog/2026/4/30.txt b/serviceLog/2026/4/30.txt new file mode 100644 index 0000000..3a95881 --- /dev/null +++ b/serviceLog/2026/4/30.txt @@ -0,0 +1,191 @@ +[2026-4-30>>>15:54:10]>>>home--editPassword>>>>Error: WHERE parameter "mountpoint" has invalid "undefined" value +[2026-4-30>>>17:16:14]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:16:25]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:16:36]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:16:47]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:16:58]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:17:24]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:17:35]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:17:49]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:18:0]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:18:11]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:18:22]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:18:33]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:18:44]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:18:55]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:19:6]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:19:17]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:19:43]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:19:54]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:20:5]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:20:16]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:20:27]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:20:38]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:20:49]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:20:59]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:21:10]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:21:21]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:21:32]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:21:58]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:22:9]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:22:20]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:22:31]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:22:42]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:23:1]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:23:12]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:23:23]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:23:34]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:23:45]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:23:56]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:24:7]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:24:18]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:24:29]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:24:40]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:24:51]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:25:2]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:25:13]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:25:24]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:25:35]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:25:46]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:25:57]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:26:8]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:26:19]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:26:30]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:26:41]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:26:52]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:27:3]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:27:14]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:27:25]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:27:35]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:27:46]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:27:57]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:28:15]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:28:26]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:29:35]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:29:46]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:29:57]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:30:7]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:30:18]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:30:29]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:30:40]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:30:51]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:31:2]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:31:12]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:31:30]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:31:42]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:31:56]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:32:7]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:32:39]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:32:50]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:33:1]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:33:12]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:33:31]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:33:42]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:33:56]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:34:7]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:34:34]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:34:45]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:34:56]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:35:7]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:35:18]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:35:29]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:35:40]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:35:50]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:36:1]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:36:19]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:37:43]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:37:54]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:38:12]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:38:23]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:38:49]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:39:0]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:39:11]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:39:22]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:39:33]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:39:45]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:39:56]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:41:57]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:42:24]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:42:35]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:42:46]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:42:57]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:43:24]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:43:35]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:43:46]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:44:13]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:44:24]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:44:35]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:44:46]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:44:57]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:45:8]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:45:19]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:45:30]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:45:41]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:45:52]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:46:3]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:46:14]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:46:25]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:46:36]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:46:47]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:47:1]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:47:12]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:47:23]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:47:34]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:47:45]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:47:57]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:48:8]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:48:19]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:48:30]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:48:40]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:48:51]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:49:2]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:49:13]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:49:23]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:49:34]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:49:45]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:49:56]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:50:7]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:50:18]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:50:29]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:50:40]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:50:51]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:51:2]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:51:13]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:51:24]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:51:35]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:51:46]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:52:4]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:52:15]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:52:26]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:53:28]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:53:54]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:54:5]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:54:16]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:54:27]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:54:38]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:54:49]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:55:0]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:55:11]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:55:30]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:55:41]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:55:52]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:56:3]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:56:29]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:56:40]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:56:51]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:57:2]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:57:13]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:57:24]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:57:35]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:57:46]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:57:58]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:58:9]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:58:20]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:58:31]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:58:42]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:58:53]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:59:4]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:59:15]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:59:26]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:59:37]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-4-30>>>17:59:48]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') diff --git a/serviceLog/2026/5/6.txt b/serviceLog/2026/5/6.txt new file mode 100644 index 0000000..440d854 --- /dev/null +++ b/serviceLog/2026/5/6.txt @@ -0,0 +1,212 @@ +[2026-5-6>>>10:34:50]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:35:1]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:35:12]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:35:23]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:35:34]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:35:45]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:35:56]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:36:7]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:36:18]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:36:29]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:36:40]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:36:51]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:37:2]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:37:13]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:37:24]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:37:35]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:37:46]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:37:57]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:38:8]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:38:19]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:38:30]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:38:41]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:38:52]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:39:3]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:39:14]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:39:25]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:39:36]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:39:47]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:39:58]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:40:9]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:40:19]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:40:30]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:40:41]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:40:52]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:41:3]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:41:14]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:41:25]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:41:36]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:41:47]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:41:58]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:42:9]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:42:20]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:42:31]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:42:42]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:42:53]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:43:4]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:43:15]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:43:26]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:43:37]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:43:48]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:43:59]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:44:10]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:44:21]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:44:32]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:44:43]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:44:54]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:45:5]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:45:16]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:45:27]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:45:38]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:45:49]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:46:0]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:46:11]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:46:22]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:46:33]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:46:44]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:46:55]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:47:6]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:47:17]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:47:28]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:47:39]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:47:50]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:48:1]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:48:12]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:48:23]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:48:34]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:48:45]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:48:56]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:49:7]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:49:17]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:49:28]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:49:39]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:49:50]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:50:1]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:50:12]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:50:23]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:50:34]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:50:45]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:50:56]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:51:7]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:51:18]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:51:29]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:51:40]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:51:51]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:52:2]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:52:13]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:52:24]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:52:35]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:52:46]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:52:57]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:53:8]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:53:19]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:53:30]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:53:41]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:53:52]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:54:3]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:54:13]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:54:24]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:54:35]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:54:46]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:54:57]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:55:8]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:55:19]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:55:30]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:55:41]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:55:52]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:56:3]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:56:14]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:56:24]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:56:35]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:56:46]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:56:57]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:57:8]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:57:19]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:57:30]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:57:41]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:57:52]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:58:3]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:58:14]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:58:25]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:58:36]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:58:47]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:58:58]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:59:10]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:59:21]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:59:32]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:59:43]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>10:59:54]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:0:5]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:0:16]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:0:27]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:0:38]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:0:49]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:1:0]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:1:11]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:1:22]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:1:33]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:1:44]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:1:55]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:2:6]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:2:17]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:2:28]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:2:39]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:2:49]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:3:0]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:3:11]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:3:22]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:3:33]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:3:44]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:3:55]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:4:6]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:4:18]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:4:29]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:4:40]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:4:51]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:5:1]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:5:12]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:5:23]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:5:34]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:5:45]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:5:56]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:6:7]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:6:17]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:6:28]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:6:39]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:6:50]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:7:1]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:7:12]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:7:23]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:7:34]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:7:44]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:7:55]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:8:6]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:8:17]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:8:28]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:8:38]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:8:49]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:9:0]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:9:11]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:9:22]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:9:33]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:9:44]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:9:55]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:10:5]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:10:16]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:10:27]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:10:38]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:10:49]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:11:0]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:11:11]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:11:22]>>>home--searchMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:11:48]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:11:59]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:12:10]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:12:21]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:12:32]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:12:43]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:12:54]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:13:5]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:13:23]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:13:34]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-6>>>11:13:45]>>>home--findMountpoint>>>>TypeError: Cannot read properties of undefined (reading 'findOne') diff --git a/serviceLog/2026/5/7.txt b/serviceLog/2026/5/7.txt new file mode 100644 index 0000000..959c123 --- /dev/null +++ b/serviceLog/2026/5/7.txt @@ -0,0 +1,7 @@ +[2026-5-7>>>12:13:3]>>>home--getPassword>>>>SequelizeDatabaseError: (conn:311, no: 1054, SQLState: 42S22) Unknown column 'bntrip-client.mountpointL' in 'where clause' +sql: SELECT `id`, `user_uid`, `organization`, `mountpoint`, `base` FROM `bntrip-client` AS `bntrip-client` WHERE `bntrip-client`.`mountpointL` = 'm1' AND `bntrip-client`.`base` = 'YjE6MDAwMDAw' LIMIT 1; - parameters:[] +[2026-5-7>>>12:23:54]>>>home--setPassword>>>>ReferenceError: base is not defined +[2026-5-7>>>12:24:35]>>>home--setPassword>>>>ReferenceError: base is not defined +[2026-5-7>>>17:43:21]>>>home--viewPassword>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-7>>>17:44:13]>>>home--viewPassword>>>>TypeError: Cannot read properties of undefined (reading 'findOne') +[2026-5-7>>>17:44:13]>>>home--viewPassword>>>>TypeError: Cannot read properties of undefined (reading 'findOne') diff --git a/serviceLog/2026/5/9.txt b/serviceLog/2026/5/9.txt new file mode 100644 index 0000000..eb45d11 --- /dev/null +++ b/serviceLog/2026/5/9.txt @@ -0,0 +1,7 @@ +[2026-5-9>>>10:28:3]>>>home--getMountpoint>>>>SyntaxError: Unexpected token 'm', "[m1]" is not valid JSON +[2026-5-9>>>10:28:3]>>>home--getMountpoint>>>>SyntaxError: Unexpected token 'm', "[m1]" is not valid JSON +[2026-5-9>>>10:28:29]>>>home--getMountpoint>>>>SyntaxError: Unexpected token 'm', "[m1]" is not valid JSON +[2026-5-9>>>10:28:29]>>>home--getMountpoint>>>>SyntaxError: Unexpected token 'm', "[m1]" is not valid JSON +[2026-5-9>>>10:29:23]>>>home--getMountpoint>>>>SyntaxError: Unexpected token ''', "['m1']" is not valid JSON +[2026-5-9>>>10:29:23]>>>home--getMountpoint>>>>SyntaxError: Unexpected token ''', "['m1']" is not valid JSON +[2026-5-9>>>10:52:8]>>>home--saveMountpoint>>>>SequelizeUniqueConstraintError: Validation error diff --git a/test/app/controller/home.test.js b/test/app/controller/home.test.js new file mode 100644 index 0000000..ea43dbb --- /dev/null +++ b/test/app/controller/home.test.js @@ -0,0 +1,23 @@ +const { strict: assert } = require('node:assert'); +const path = require('node:path'); +const { statSync } = require('node:fs'); +const { app } = require('egg-mock/bootstrap'); + +describe('test/app/controller/home.test.js', () => { + it('should assert', async () => { + const pkg = require('../../../package.json'); + assert(app.config.keys.startsWith(pkg.name)); + }); + + it('should typings exists', async () => { + const typings = path.join(__dirname, '../../../typings'); + assert(statSync(typings)); + }); + + it('should GET /', async () => { + return app.httpRequest() + .get('/') + .expect('hi, egg') + .expect(200); + }); +});