北斗应用技术培训报名系统题库

This commit is contained in:
2026-03-27 17:55:17 +08:00
commit ab1d364524
42 changed files with 1301 additions and 0 deletions

1
.eslintignore Normal file
View File

@@ -0,0 +1 @@
coverage

4
.eslintrc Normal file
View File

@@ -0,0 +1,4 @@
{
"extends": "eslint-config-egg",
"root": true
}

15
.gitignore vendored Normal file
View File

@@ -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/

10
.sequelizerc Normal file
View File

@@ -0,0 +1,10 @@
'use strict';
const path = require('path');
module.exports = {
"config": path.join(__dirname, 'database/config.json'),
'migrations-path': path.join(__dirname, 'database/migrations'),
'seeders-path': path.join(__dirname, 'database/seeders'),
'models-path': path.join(__dirname, 'app/model'),
};

31
README.md Normal file
View File

@@ -0,0 +1,31 @@
# open-map-assistant
## QuickStart
<!-- add docs here for user -->
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

156
app/controller/home.js Normal file
View File

@@ -0,0 +1,156 @@
const Controller = require('../core/base_controller');
const fileName = "Home";
class HomeController extends Controller {
// 题库登录接口
async login() {
const { ctx } = this;
try {
const body = ctx.request.body;
const result = await ctx.service.home.login(body);
if (result == "error") {
this.setResponse(ctx, 500, '服务器错误', "none");
return;
}
if (result) {
await ctx.app.redis.get('db3').set(result.dataValues.user_uid, result.dataValues.type, 'EX', 21600);
this.setResponse(ctx, 200, '操作成功', "polymerization", this.encryptRequest(result.dataValues.user_uid + '?' + new Date().getTime()));
} else {
this.setResponse(ctx, 404, '操作失败', "none");
}
} catch (error) {
const blockName = fileName + "--" + "login";
ctx.app.middleware.log('../../controllerLog', blockName + ">>>>" + error);
this.setResponse(ctx, 500, '服务器错误', "none");
}
}
// 获取题库登录状态接口
async loginStatus() {
const { ctx } = this;
try {
const data = ctx.request.body.data;
const topic = await ctx.app.redis.get('db3').get(this.decryptRequest(data).split('?')[0]);
if (topic == null) {
this.setResponse(ctx, 404, '操作失败', "none");
} else {
this.setResponse(ctx, 200, '操作成功', "none");
}
} catch (error) {
const blockName = fileName + "--" + "loginStatus";
ctx.app.middleware.log('../../controllerLog', blockName + ">>>>" + error);
this.setResponse(ctx, 500, '服务器错误', "none");
}
}
// 获取单选题接口
async radio() {
const { ctx } = this;
try {
let rdmcode = await this.checkUid(ctx);
if (!rdmcode) {
this.setResponse(ctx, 401, 'token过期或错误', "none");
return;
}
const body = ctx.request.body;
const result = await ctx.service.home.radio(body);
if (result == "error") {
this.setResponse(ctx, 500, '服务器错误', "none");
return;
}
if (result) {
this.setResponse(ctx, 200, '操作成功', "deconstruction", result);
} else {
this.setResponse(ctx, 404, '操作失败', "none");
}
} catch (error) {
const blockName = fileName + "--" + "radio";
ctx.app.middleware.log('../../controllerLog', blockName + ">>>>" + error);
this.setResponse(ctx, 500, '服务器错误', "none");
}
}
// 获取多选题接口
async multiple() {
const { ctx } = this;
try {
let rdmcode = await this.checkUid(ctx);
if (!rdmcode) {
this.setResponse(ctx, 401, 'token过期或错误', "none");
return;
}
const body = ctx.request.body;
const result = await ctx.service.home.multiple(body);
if (result == "error") {
this.setResponse(ctx, 500, '服务器错误', "none");
return;
}
if (result) {
this.setResponse(ctx, 200, '操作成功', "deconstruction", result);
} else {
this.setResponse(ctx, 404, '操作失败', "none");
}
} catch (error) {
const blockName = fileName + "--" + "multiple";
ctx.app.middleware.log('../../controllerLog', blockName + ">>>>" + error);
this.setResponse(ctx, 500, '服务器错误', "none");
}
}
// 获取判断题接口
async judgment() {
const { ctx } = this;
try {
let rdmcode = await this.checkUid(ctx);
if (!rdmcode) {
this.setResponse(ctx, 401, 'token过期或错误', "none");
return;
}
const body = ctx.request.body;
const result = await ctx.service.home.judgment(body);
if (result == "error") {
this.setResponse(ctx, 500, '服务器错误', "none");
return;
}
if (result) {
this.setResponse(ctx, 200, '操作成功', "deconstruction", result);
} else {
this.setResponse(ctx, 404, '操作失败', "none");
}
} catch (error) {
const blockName = fileName + "--" + "judgment";
ctx.app.middleware.log('../../controllerLog', blockName + ">>>>" + error);
this.setResponse(ctx, 500, '服务器错误', "none");
}
}
// 获取问答题接口
async interlocution() {
const { ctx } = this;
try {
let rdmcode = await this.checkUid(ctx);
if (!rdmcode) {
this.setResponse(ctx, 401, 'token过期或错误', "none");
return;
}
const body = ctx.request.body;
const result = await ctx.service.home.interlocution(body);
if (result == "error") {
this.setResponse(ctx, 500, '服务器错误', "none");
return;
}
if (result) {
this.setResponse(ctx, 200, '操作成功', "deconstruction", result);
} else {
this.setResponse(ctx, 404, '操作失败', "none");
}
} catch (error) {
const blockName = fileName + "--" + "interlocution";
ctx.app.middleware.log('../../controllerLog', blockName + ">>>>" + error);
this.setResponse(ctx, 500, '服务器错误', "none");
}
}
}
module.exports = HomeController;

133
app/core/base_controller.js Normal file
View File

@@ -0,0 +1,133 @@
const { Controller } = require('egg');
const sha256 = require("crypto-js/sha256");
const CryptoJS = require("crypto-js");
const KEY = CryptoJS.enc.Utf8.parse('BDQH');
class BaseController extends Controller {
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);
}
// 用户uid生成函数
generateNumberString = (side) => {
// 获取当前日期(年月日)
const now = new Date();
const year = String(now.getFullYear()).padStart(4, '0');
const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以加1
const date = String(now.getDate()).padStart(2, '0');
const dateString = year + month + date;
// 获取当前时间戳的后三位
const timestamp = String(Date.now()).slice(-3);
// 生成三位随机数字
const randomDigits = Math.floor(Math.random() * 100).toString().padStart(3, '0');
// 组合成最终的15位字符串
const fullNumberString = dateString + timestamp + randomDigits + side;
return fullNumberString;
}
// 随机盐生成函数
generateRandomString = () => {
const lowerCaseLetters = 'abcdefghijklmnopqrstuvwxyz';
const upperCaseLetters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
const numbers = '0123456789';
let result = '';
// 生成5位随机小写字母
for (let i = 0; i < 5; i++) {
const randomIndex = Math.floor(Math.random() * lowerCaseLetters.length);
result += lowerCaseLetters[randomIndex];
}
// 生成5位随机大写字母
for (let i = 0; i < 5; i++) {
const randomIndex = Math.floor(Math.random() * upperCaseLetters.length);
result += upperCaseLetters[randomIndex];
}
// 生成2位随机数字
for (let i = 0; i < 2; i++) {
const randomIndex = Math.floor(Math.random() * numbers.length);
result += numbers[randomIndex];
}
// 打乱整个字符串
const characters = result.split('');
for (let i = characters.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[characters[i], characters[j]] = [characters[j], characters[i]];
}
return characters.join('');
}
// 随机生成12位客户端id
generateClientId = () => {
const numbers = '0123456789';
let result = '';
// 生成4位随机数字
for (let i = 0; i < 4; i++) {
const randomIndex = Math.floor(Math.random() * numbers.length);
result += numbers[randomIndex];
}
// 打乱整个字符串
const characters = result.split('');
for (let i = characters.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[characters[i], characters[j]] = [characters[j], characters[i]];
}
// 获取当前日期(年月日)
const now = new Date();
const year = String(now.getFullYear()).padStart(4, '0');
const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以加1
const date = String(now.getDate()).padStart(2, '0');
const dateString = year + month + date;
const fullNumberString = dateString + characters.join('');
return fullNumberString;
}
checkUid = async (ctx) => {
const token = ctx.request.header.authorization;
const redis = ctx.app.redis;
const topic = await redis.get('db3').get(this.decryptRequest(token).split('?')[0]);
return topic || false;
};
setResponse = (ctx, code, msg, model, data = {}) => {
const modelType = {
"none": { code, msg },
"deconstruction": { code, msg, ...data },
"polymerization": { code, msg, data }
}
ctx.body = modelType[model];
}
}
module.exports = BaseController;

88
app/core/base_service.js Normal file
View File

@@ -0,0 +1,88 @@
const { Service } = require('egg');
const { Op } = require('sequelize');
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);
}
// uid生成函数
generateNumberString = () => {
// 获取当前日期(年月日)
const now = new Date();
const year = String(now.getFullYear()).padStart(4, '0');
const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以加1
const date = String(now.getDate()).padStart(2, '0');
const dateString = year + month + date;
// 获取当前时间戳的后四位
const timestamp = String(Date.now()).slice(-4);
// 生成四位随机数字
const randomDigits = Math.floor(Math.random() * 10000).toString().padStart(4, '0');
// 组合成最终的16位数字字符串
const fullNumberString = dateString + timestamp + randomDigits;
return fullNumberString;
}
// 随机盐生成函数
generateRandomString = () => {
const lowerCaseLetters = 'abcdefghijklmnopqrstuvwxyz';
const upperCaseLetters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
const numbers = '0123456789';
let result = '';
// 生成5位随机小写字母
for (let i = 0; i < 5; i++) {
const randomIndex = Math.floor(Math.random() * lowerCaseLetters.length);
result += lowerCaseLetters[randomIndex];
}
// 生成5位随机大写字母
for (let i = 0; i < 5; i++) {
const randomIndex = Math.floor(Math.random() * upperCaseLetters.length);
result += upperCaseLetters[randomIndex];
}
// 生成2位随机数字
for (let i = 0; i < 2; i++) {
const randomIndex = Math.floor(Math.random() * numbers.length);
result += numbers[randomIndex];
}
// 打乱整个字符串
const characters = result.split('');
for (let i = characters.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[characters[i], characters[j]] = [characters[j], characters[i]];
}
return characters.join('');
}
}
module.exports = BaseService;

72
app/middleware/log.js Normal file
View File

@@ -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('新内容已追加到文件');
});
}
});
};

31
app/model/Examinee.js Normal file
View File

@@ -0,0 +1,31 @@
'use strict';
module.exports = (app) => {
const { INTEGER, CHAR, STRING, DATE } = app.Sequelize;
const Examinee = app.model.define('examinee', {
id: { type: INTEGER(8), primaryKey: true, autoIncrement: true },
uid: CHAR(15),
salt: CHAR(24),
password: CHAR(64),
user_name: STRING(10),
identity_card: CHAR(18),
real_check: INTEGER(3),
workplace: STRING(60),
address: STRING(120),
phone: CHAR(11),
email: STRING(60),
referrers: STRING(60),
status: INTEGER(3),
created_at: DATE,
updated_at: DATE,
login_status: INTEGER(3),
},{
freezeTableName: true,
timestamp: true,
createdAt: true,
updatedAt: true,
});
return Examinee;
};

19
app/model/Whitelist.js Normal file
View File

@@ -0,0 +1,19 @@
'use strict';
module.exports = (app) => {
const { INTEGER, CHAR, DATE } = app.Sequelize;
const Whitelist = app.model.define('whitelist', {
id: { type: INTEGER(5), primaryKey: true, autoIncrement: true },
user_uid: CHAR(15),
type: INTEGER(3),
expired_at: DATE,
},{
freezeTableName: true,
timestamp: true,
createdAt: false,
updatedAt: false,
});
return Whitelist;
};

View File

@@ -0,0 +1,19 @@
'use strict';
module.exports = (app) => {
const { INTEGER, STRING } = app.Sequelize;
const Interlocution = app.model2.define('interlocution', {
id: { type: INTEGER(5), primaryKey: true, autoIncrement: true },
stem: STRING(400),
answer: STRING(400),
difficulty: INTEGER(3),
},{
freezeTableName: true,
timestamp: false,
createdAt: false,
updatedAt: false,
});
return Interlocution;
};

19
app/model2/Judgment.js Normal file
View File

@@ -0,0 +1,19 @@
'use strict';
module.exports = (app) => {
const { INTEGER, STRING } = app.Sequelize;
const Judgment = app.model2.define('judgment', {
id: { type: INTEGER(5), primaryKey: true, autoIncrement: true },
stem: STRING(400),
answer: INTEGER(1),
difficulty: INTEGER(3),
},{
freezeTableName: true,
timestamp: false,
createdAt: false,
updatedAt: false,
});
return Judgment;
};

24
app/model2/Multiple.js Normal file
View File

@@ -0,0 +1,24 @@
'use strict';
module.exports = (app) => {
const { INTEGER, STRING } = app.Sequelize;
const Multiple = app.model2.define('multiple', {
id: { type: INTEGER(5), primaryKey: true, autoIncrement: true },
stem: STRING(400),
options_a: STRING(400),
options_b: STRING(400),
options_c: STRING(400),
options_d: STRING(400),
options_e: STRING(400),
answer: STRING(5),
difficulty: INTEGER(3),
},{
freezeTableName: true,
timestamp: false,
createdAt: false,
updatedAt: false,
});
return Multiple;
};

23
app/model2/Radio.js Normal file
View File

@@ -0,0 +1,23 @@
'use strict';
module.exports = (app) => {
const { INTEGER, STRING, CHAR } = app.Sequelize;
const Radio = app.model2.define('radio', {
id: { type: INTEGER(5), primaryKey: true, autoIncrement: true },
stem: STRING(400),
options_a: STRING(400),
options_b: STRING(400),
options_c: STRING(400),
options_d: STRING(400),
answer: CHAR(1),
difficulty: INTEGER(3),
},{
freezeTableName: true,
timestamp: false,
createdAt: false,
updatedAt: false,
});
return Radio;
};

19
app/router.js Normal file
View File

@@ -0,0 +1,19 @@
/**
* @param {Egg.Application} app - egg application
*/
module.exports = app => {
const { router, controller } = app;
// 题库登录接口
router.post("/login", controller.home.login);
// 获取题库登录状态接口
router.post("/loginStatus", controller.home.loginStatus);
// 获取单选题接口
router.post("/radio", controller.home.radio);
// 获取多选题接口
router.post("/multiple", controller.home.multiple);
// 获取判断题接口
router.post("/judgment", controller.home.judgment);
// 获取问答题接口
router.post("/interlocution", controller.home.interlocution);
};

119
app/service/home.js Normal file
View File

@@ -0,0 +1,119 @@
'use strict';
const Service = require('../core/base_service');
const { Op } = require('sequelize');
const fileName = "Home";
class HomeService extends Service {
// 题库登录接口
async login(body) {
const { ctx } = this;
try {
const phone = this.decryptRequest(body.phone);
const password = this.decryptRequest(body.password);
let attributes = ['uid', 'salt', 'password'], where = { phone }, dbOptions;
dbOptions = { attributes, where }
const user = await ctx.model.Examinee.findOne(dbOptions);
if (user == null) return false;
if (user.dataValues.password != this.shaForm(password, this.decryptRequest(user.dataValues.salt))) return false;
const result = await ctx.model.Whitelist.findOne({ where: { user_uid: user.dataValues.uid } });
if (result == null) return false;
if (result.dataValues.type == '0') return result;
console.log(result.dataValues)
console.log(new Date())
if (result.dataValues.type == '1' && result.dataValues.expired_at < new Date()) {
return false;
} else {
return result;
}
} catch (error) {
const blockName = fileName + "--" + "login";
ctx.app.middleware.log('../../serviceLog', blockName + ">>>>" + error);
return 'error';
}
}
// 获取单选题接口
async radio(body) {
const { ctx } = this;
try {
let limit = 1;
let { offset } = body;
offset = (offset - 1) * limit;
let dbOptions = { offset, limit }
const result = await ctx.model2.Radio.findAndCountAll(dbOptions);
await ctx.model2.Radio.min('id').then(min => {
result.min = min;
});
return result.rows.length == 0 ? false : result;
} catch (error) {
const blockName = fileName + "--" + "radio";
ctx.app.middleware.log('../../serviceLog', blockName + ">>>>" + error);
return 'error';
}
}
// 获取多选题接口
async multiple(body) {
const { ctx } = this;
try {
let limit = 1;
let { offset } = body;
offset = (offset - 1) * limit;
let dbOptions = { offset, limit }
const result = await ctx.model2.Multiple.findAndCountAll(dbOptions);
await ctx.model2.Multiple.min('id').then(min => {
result.min = min;
});
return result.rows.length == 0 ? false : result;
} catch (error) {
const blockName = fileName + "--" + "multiple";
ctx.app.middleware.log('../../serviceLog', blockName + ">>>>" + error);
return 'error';
}
}
// 获取判断题接口
async judgment(body) {
const { ctx } = this;
try {
let limit = 1;
let { offset } = body;
offset = (offset - 1) * limit;
let dbOptions = { offset, limit }
const result = await ctx.model2.Judgment.findAndCountAll(dbOptions);
await ctx.model2.Judgment.min('id').then(min => {
result.min = min;
});
return result.rows.length == 0 ? false : result;
} catch (error) {
const blockName = fileName + "--" + "judgment";
ctx.app.middleware.log('../../serviceLog', blockName + ">>>>" + error);
return 'error';
}
}
// 获取问答题接口
async interlocution(body) {
const { ctx } = this;
try {
let limit = 1;
let { offset } = body;
offset = (offset - 1) * limit;
let dbOptions = { offset, limit }
const result = await ctx.model2.Interlocution.findAndCountAll(dbOptions);
await ctx.model2.Interlocution.min('id').then(min => {
result.min = min;
});
return result.rows.length == 0 ? false : result;
} catch (error) {
const blockName = fileName + "--" + "interlocution";
ctx.app.middleware.log('../../serviceLog', blockName + ">>>>" + error);
return 'error';
}
}
}
module.exports = HomeService;

109
config/config.default.js Normal file
View File

@@ -0,0 +1,109 @@
/* eslint valid-jsdoc: "off" */
/**
* @param {Egg.EggAppInfo} appInfo app info
*/
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 + '_1715070315660_7890';
// add your middleware config here
// config.middleware = [];
config.multipart = {
mode: 'file', // 使用文件模式保存上传的文件
whitelist: () => true, // 允许所有文件类型上传
};
config.security = {
csrf:{
enable:false
},
};
config.redis = {
// 开发/测试环境
clients: {
db3: {
port: 6379,
host: '127.0.0.1',
password: '74191221',
db: 3
}
}
// 生产环境
// clients: {
// db3: {
// port: 6379,
// host: '127.0.0.1',
// password: 'bd3@htcc2023',
// db: 5
// }
// }
};
config.sequelize = {
// 开发/测试环境
datasources: [
{
dialect: 'mariadb',
host: 'localhost',
port: 3306,
username: 'root',
password: '74191221',
database: 'bdTrainingExam'
},
{
dialect: 'mariadb',
host: 'localhost',
port: 3306,
username: 'root',
password: '74191221',
database: 'trainingTopic',
delegate: 'model2',
baseDir: 'model2',
},
]
// 生产环境
// datasources: [
// {
// dialect: 'mariadb',
// host: 'localhost',
// port: 3306,
// username: 'bdqh_platform',
// password: '124689@XXxx',
// database: 'bdTrainingExam'
// },
// {
// dialect: 'mariadb',
// host: 'localhost',
// port: 3306,
// username: 'bdqh_platform',
// password: '124689@XXxx',
// database: 'trainingTopic',
// delegate: 'model2',
// baseDir: 'model2',
// }
// ]
};
// add your user config here
const userConfig = {
// myAppName: 'egg',
salt:'bdTrainingExam'
};
return {
...config,
...userConfig,
};
};

21
config/plugin.js Normal file
View File

@@ -0,0 +1,21 @@
/** @type Egg.EggPlugin */
module.exports = {
// had enabled by egg
// static: {
// enable: true,
// }
redis: {
enable: true,
package: 'egg-redis',
},
sequelize: {
enable: true,
package: 'egg-sequelize',
},
validate: {
enable: true,
package: 'egg-validate',
},
};

View File

@@ -0,0 +1,8 @@
[2025-2-28>>>11:45:1]>>>System--examMsg>>>>TypeError: this.checkUid is not a function
[2025-2-28>>>11:49:11]>>>System--examMsg>>>>TypeError: Cannot read properties of undefined (reading 'get')
[2025-2-28>>>11:58:40]>>>System--examMsg>>>>TypeError: Cannot read properties of undefined (reading 'get')
[2025-2-28>>>11:58:59]>>>System--examMsg>>>>TypeError: Cannot read properties of undefined (reading 'get')
[2025-2-28>>>13:57:5]>>>System--examMsg>>>>TypeError: Cannot read properties of undefined (reading 'get')
[2025-2-28>>>13:58:15]>>>System--examMsg>>>>TypeError: Cannot read properties of undefined (reading 'get')
[2025-2-28>>>13:59:26]>>>System--examMsg>>>>TypeError: Cannot read properties of undefined (reading 'get')
[2025-2-28>>>13:59:43]>>>System--examMsg>>>>TypeError: Cannot read properties of undefined (reading 'get')

View File

@@ -0,0 +1,23 @@
[2025-3-11>>>15:47:43]>>>User--CNTEV>>>>TypeError: Cannot read properties of null (reading 'real_check')
[2025-3-11>>>15:49:1]>>>User--CNTEV>>>>TypeError: Cannot read properties of null (reading 'real_check')
[2025-3-11>>>15:49:26]>>>User--CNTEV>>>>ResponseTimeoutError: Response timeout for 3000ms, POST http://127.0.0.1:8011/CNTEV -1 (connected: true, keepalive socket: false, agent status: {"createSocketCount":1,"createSocketErrorCount":0,"closeSocketCount":1,"errorSocketCount":0,"timeoutSocketCount":0,"requestCount":0,"freeSockets":{},"sockets":{},"requests":{}}, socketHandledRequests: 1, socketHandledResponses: 0)
headers: {}
[2025-3-11>>>16:39:57]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>16:41:4]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>16:41:29]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>16:41:41]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>16:45:5]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>16:46:22]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>16:47:19]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>16:48:21]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>16:48:57]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>16:49:26]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>16:49:45]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>16:51:28]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>16:52:16]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>16:52:49]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>16:53:12]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>16:53:48]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>17:18:21]>>>User--uploadPhoto>>>>ReferenceError: result is not defined
[2025-3-11>>>17:20:47]>>>User--uploadPhoto>>>>Error: ENOENT: no such file or directory, rename 'D:\bdqh-technology-education-platform\back-end\bd-training-exam\app\controller\1741681282631.jpg' -> 'D:\bdqh-technology-education-platform\back-end\bd-training-exam\app\controller\142327200010180611.jpg'
[2025-3-11>>>17:26:20]>>>User--uploadPhoto>>>>Error: EXDEV: cross-device link not permitted, rename 'C:\Users\23577\AppData\Local\Temp\egg-multipart-tmp\bd-training-exam\2025\03\11\17\23234a9a-7469-46ab-9a6c-04e5ab9768d9.jpg' -> 'D:\bdqh-technology-education-platform\back-end\bd-training-exam\app\public\userPhoto\142327200010180611.jpg'

View File

@@ -0,0 +1 @@
[2025-3-12>>>11:20:57]>>>System--diffCode>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')

View File

@@ -0,0 +1,21 @@
[2025-3-13>>>11:10:26]>>>System--diffIdentityCard>>>>TypeError: data.join is not a function
[2025-3-13>>>11:12:21]>>>System--diffPhone>>>>ReferenceError: Cannot access 'data' before initialization
[2025-3-13>>>11:12:25]>>>System--diffPhone>>>>ReferenceError: Cannot access 'data' before initialization
[2025-3-13>>>11:12:27]>>>System--diffPhone>>>>ReferenceError: Cannot access 'data' before initialization
[2025-3-13>>>11:12:28]>>>System--diffPhone>>>>ReferenceError: Cannot access 'data' before initialization
[2025-3-13>>>11:13:41]>>>System--diffPhone>>>>ReferenceError: Cannot access 'data' before initialization
[2025-3-13>>>11:14:17]>>>System--diffPhone>>>>ReferenceError: Cannot access 'data' before initialization
[2025-3-13>>>17:48:7]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'forEach')
[2025-3-13>>>17:48:7]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'forEach')
[2025-3-13>>>17:48:7]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'forEach')
[2025-3-13>>>17:48:7]>>>Exam--gradesList>>>>TypeError: Cannot read properties of undefined (reading 'forEach')
[2025-3-13>>>17:48:7]>>>Exam--gradesList>>>>TypeError: Cannot read properties of undefined (reading 'forEach')
[2025-3-13>>>17:48:7]>>>Exam--gradesList>>>>TypeError: Cannot read properties of undefined (reading 'forEach')
[2025-3-13>>>17:48:7]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'forEach')
[2025-3-13>>>17:48:7]>>>Exam--gradesList>>>>TypeError: Cannot read properties of undefined (reading 'forEach')
[2025-3-13>>>17:48:12]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'forEach')
[2025-3-13>>>17:49:34]>>>Exam--applicationList>>>>TypeError: Cannot read properties of undefined (reading 'forEach')
[2025-3-13>>>19:13:0]>>>Exam--application>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-3-13>>>19:31:7]>>>User--checkInfo>>>>TypeError: Cannot read properties of undefined (reading 'dataValues')
[2025-3-13>>>19:38:41]>>>Exam--application>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-3-13>>>19:40:24]>>>Exam--application>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')

View File

@@ -0,0 +1 @@
[2025-3-14>>>15:40:24]>>>Exam--cancelApplication>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')

View File

@@ -0,0 +1,29 @@
[2025-4-2>>>14:25:13]>>>Home--radio>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>14:58:51]>>>Home--multiple>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>14:59:25]>>>Home--multiple>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:0:28]>>>Home--radio>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:0:29]>>>Home--radio>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:0:32]>>>Home--judgment>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:0:32]>>>Home--interlocution>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:0:32]>>>Home--radio>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:0:32]>>>Home--multiple>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:1:39]>>>Home--radio>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:1:39]>>>Home--multiple>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:1:39]>>>Home--judgment>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:1:39]>>>Home--interlocution>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:4:22]>>>Home--radio>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:4:22]>>>Home--multiple>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:4:22]>>>Home--judgment>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:4:22]>>>Home--interlocution>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:4:42]>>>Home--judgment>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:4:42]>>>Home--radio>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:4:42]>>>Home--multiple>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:4:42]>>>Home--interlocution>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:8:15]>>>Home--radio>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:8:15]>>>Home--multiple>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:8:15]>>>Home--judgment>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:8:15]>>>Home--interlocution>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:8:22]>>>Home--multiple>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:8:22]>>>Home--judgment>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:8:22]>>>Home--radio>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-2>>>17:8:22]>>>Home--interlocution>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')

View File

@@ -0,0 +1,6 @@
[2025-4-21>>>11:31:57]>>>Home--judgment>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
xt')
[2025-4-21>>>11:39:20]>>>Home--radio>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-21>>>11:39:20]>>>Home--multiple>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-21>>>11:39:20]>>>Home--interlocution>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-21>>>11:39:20]>>>Home--judgment>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')

View File

@@ -0,0 +1,4 @@
[2025-4-3>>>17:39:45]>>>Home--radio>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-3>>>17:39:45]>>>Home--judgment>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-3>>>17:39:45]>>>Home--interlocution>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')
[2025-4-3>>>17:39:45]>>>Home--multiple>>>>TypeError: Cannot read properties of undefined (reading 'ciphertext')

23
database/config.json Normal file
View File

@@ -0,0 +1,23 @@
{
"development": {
"username": "root",
"password": 74191221,
"database": "vm_centos",
"host": "127.0.0.1",
"dialect": "mariadb"
},
"test": {
"username": "root",
"password": 74191221,
"database": "vm_centos",
"host": "127.0.0.1",
"dialect": "mariadb"
},
"production": {
"username": "root",
"password": 74191221,
"database": "vm_centos",
"host": "127.0.0.1",
"dialect": "mariadb"
}
}

5
jsconfig.json Normal file
View File

@@ -0,0 +1,5 @@
{
"include": [
"**/*"
]
}

49
package.json Normal file
View File

@@ -0,0 +1,49 @@
{
"name": "bd-training-exam-topic",
"version": "1.0.0",
"description": "",
"private": true,
"egg": {
"declarations": true
},
"dependencies": {
"crypto-js": "^4.2.0",
"egg": "^3.17.5",
"egg-multipart": "^3.5.0",
"egg-redis": "^2.6.0",
"egg-schedule": "^4.0.1",
"egg-scripts": "2",
"egg-sequelize": "^6.0.0",
"egg-validate": "^2.0.2",
"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": ">=16.0.0"
},
"scripts": {
"start": "egg-scripts start --daemon --port=8021 --title=egg-server-bd-training-exam-topic",
"stop": "egg-scripts stop --title=egg-server-bd-training-exam-topic",
"dev": "egg-bin dev --port=8021",
"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"
}

8
serviceLog/2025/3/11.txt Normal file
View File

@@ -0,0 +1,8 @@
[2025-3-11>>>15:45:31]>>>User--CNTEV>>>>SequelizeDatabaseError: (conn:148, no: 1054, SQLState: 42S22) Unknown column 'examinee.idCard' in 'where clause'
sql: SELECT `real_check` FROM `examinee` AS `examinee` WHERE `examinee`.`idCard` = '142327200010180611' AND `examinee`.`name` = '屈彪彪' LIMIT 1; - parameters:[]
[2025-3-11>>>17:38:53]>>>User--uploadPhoto>>>>TypeError: Cannot read properties of undefined (reading '0')
[2025-3-11>>>17:39:16]>>>User--uploadPhoto>>>>TypeError: Cannot read properties of undefined (reading '0')
[2025-3-11>>>17:40:5]>>>User--uploadPhoto>>>>TypeError: Cannot read properties of undefined (reading '0')
[2025-3-11>>>17:40:47]>>>User--uploadPhoto>>>>TypeError: Cannot read properties of undefined (reading '0')
[2025-3-11>>>17:40:54]>>>User--uploadPhoto>>>>TypeError: Cannot read properties of undefined (reading '0')
[2025-3-11>>>17:41:18]>>>User--uploadPhoto>>>>TypeError: Cannot read properties of undefined (reading '0')

9
serviceLog/2025/3/12.txt Normal file
View File

@@ -0,0 +1,9 @@
[2025-3-12>>>11:0:51]>>>User--checkInfo>>>>Error: WHERE parameter "account_name" has invalid "undefined" value
[2025-3-12>>>11:1:47]>>>User--checkInfo>>>>Error: WHERE parameter "account_name" has invalid "undefined" value
[2025-3-12>>>11:1:58]>>>User--checkInfo>>>>Error: WHERE parameter "identity_card" has invalid "undefined" value
[2025-3-12>>>12:40:45]>>>System--registered>>>>SequelizeDatabaseError: (conn:209, no: 1406, SQLState: 22001) Data too long for column 'gender' at row 1
sql: INSERT INTO `examinee` (`id`,`uid`,`salt`,`account_name`,`password`,`identity_card`,`user_name`,`real_check`,`gender`,`age`,`email`,`phone`,`address`,`workplace`,`status`,`created_at`,`updated_at`,`login_status`) VALUES (DEFAULT,?,?,?,?,?,?,?,?,?,?,?,?,?,?...
[2025-3-12>>>12:42:40]>>>System--registered>>>>SequelizeDatabaseError: (conn:217, no: 1406, SQLState: 22001) Data too long for column 'gender' at row 1
sql: INSERT INTO `examinee` (`id`,`uid`,`salt`,`account_name`,`password`,`identity_card`,`user_name`,`real_check`,`gender`,`age`,`email`,`phone`,`address`,`workplace`,`status`,`created_at`,`updated_at`,`login_status`) VALUES (DEFAULT,?,?,?,?,?,?,?,?,?,?,?,?,?,?...
[2025-3-12>>>12:47:17]>>>System--registered>>>>SequelizeDatabaseError: (conn:232, no: 1406, SQLState: 22001) Data too long for column 'gender' at row 1
sql: INSERT INTO `examinee` (`id`,`uid`,`salt`,`account_name`,`password`,`identity_card`,`user_name`,`real_check`,`gender`,`age`,`email`,`phone`,`address`,`workplace`,`status`,`created_at`,`updated_at`,`login_status`) VALUES (DEFAULT,?,?,?,?,?,?,?,?,?,?,?,?,?,?...

18
serviceLog/2025/3/13.txt Normal file
View File

@@ -0,0 +1,18 @@
[2025-3-13>>>11:7:16]>>>System--diffIdentityCard>>>>TypeError: Cannot read properties of null (reading 'dataValues')
[2025-3-13>>>11:28:29]>>>System--diffIdentityCard>>>>ReferenceError: dbOptions is not defined
[2025-3-13>>>11:54:12]>>>System--diffIdentityCard>>>>TypeError: Cannot read properties of null (reading 'dataValues')
[2025-3-13>>>16:23:15]>>>User--checkInfo>>>>Error: WHERE parameter "account_name" has invalid "undefined" value
[2025-3-13>>>19:12:52]>>>User--checkInfo>>>>Error: WHERE parameter "account_name" has invalid "undefined" value
[2025-3-13>>>19:20:34]>>>User--checkInfo>>>>Error: WHERE parameter "account_name" has invalid "undefined" value
[2025-3-13>>>19:21:48]>>>User--checkInfo>>>>Error: WHERE parameter "account_name" has invalid "undefined" value
[2025-3-13>>>19:22:32]>>>User--checkInfo>>>>Error: WHERE parameter "account_name" has invalid "undefined" value
[2025-3-13>>>19:26:5]>>>User--checkInfo>>>>Error: WHERE parameter "account_name" has invalid "undefined" value
[2025-3-13>>>19:26:25]>>>User--checkInfo>>>>Error: WHERE parameter "account_name" has invalid "undefined" value
[2025-3-13>>>19:44:51]>>>Exam--application>>>>SequelizeForeignKeyConstraintError: (conn:1065, no: 1452, SQLState: 23000) Cannot add or update a child row: a foreign key constraint fails (`bdtrainingexam`.`application`, CONSTRAINT `FK_application_examination` FOREIGN KEY (`exam_uid`) REFERENCES `examination` (`uid`))
sql: INSERT INTO `application` (`id`,`user_uid`,`exam_uid`,`source`,`status`,`pay_status`,`result`,`created_at`) VALUES (DEFAULT,?,?,?,?,?,?,?); - parameters:['20250312837014E','','个人',0,0,'用户个人报名','2025-03-13 11:44:51.948']
[2025-3-13>>>19:44:55]>>>Exam--application>>>>SequelizeForeignKeyConstraintError: (conn:1065, no: 1452, SQLState: 23000) Cannot add or update a child row: a foreign key constraint fails (`bdtrainingexam`.`application`, CONSTRAINT `FK_application_examination` FOREIGN KEY (`exam_uid`) REFERENCES `examination` (`uid`))
sql: INSERT INTO `application` (`id`,`user_uid`,`exam_uid`,`source`,`status`,`pay_status`,`result`,`created_at`) VALUES (DEFAULT,?,?,?,?,?,?,?); - parameters:['20250312837014E','','个人',0,0,'用户个人报名','2025-03-13 11:44:55.936']
[2025-3-13>>>20:19:1]>>>User--checkInfo>>>>ReferenceError: identity_card is not defined
[2025-3-13>>>20:19:35]>>>User--checkInfo>>>>ReferenceError: identity_card is not defined
[2025-3-13>>>20:26:49]>>>User--checkInfo>>>>ResponseTimeoutError: Response timeout for 3000ms, POST http://127.0.0.1:8011/CNTEV -1 (connected: true, keepalive socket: false, agent status: {"createSocketCount":1,"createSocketErrorCount":0,"closeSocketCount":1,"errorSocketCount":0,"timeoutSocketCount":0,"requestCount":0,"freeSockets":{},"sockets":{},"requests":{}}, socketHandledRequests: 1, socketHandledResponses: 0)
headers: {}

24
serviceLog/2025/3/14.txt Normal file
View File

@@ -0,0 +1,24 @@
[2025-3-14>>>11:6:27]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:215, no: 1054, SQLState: 42S22) Unknown column 'application.uid' in 'where clause'
sql: SELECT `id`, `user_uid`, `exam_uid`, `source`, `status`, `pay_status`, `result`, `created_at`, `created_at` AS `createdAt` FROM `application` AS `application` WHERE `application`.`uid` = '20250312837014E'; - parameters:[]
[2025-3-14>>>11:6:27]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:220, no: 1054, SQLState: 42S22) Unknown column 'application.uid' in 'where clause'
sql: SELECT `id`, `user_uid`, `exam_uid`, `source`, `status`, `pay_status`, `result`, `created_at`, `created_at` AS `createdAt` FROM `application` AS `application` WHERE `application`.`uid` = '20250312837014E'; - parameters:[]
[2025-3-14>>>11:6:27]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:219, no: 1054, SQLState: 42S22) Unknown column 'application.uid' in 'where clause'
sql: SELECT `id`, `user_uid`, `exam_uid`, `source`, `status`, `pay_status`, `result`, `created_at`, `created_at` AS `createdAt` FROM `application` AS `application` WHERE `application`.`uid` = '20250312837014E'; - parameters:[]
[2025-3-14>>>11:6:27]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:219, no: 1054, SQLState: 42S22) Unknown column 'application.uid' in 'where clause'
sql: SELECT `id`, `user_uid`, `exam_uid`, `source`, `status`, `pay_status`, `result`, `created_at`, `created_at` AS `createdAt` FROM `application` AS `application` WHERE `application`.`uid` = '20250312837014E'; - parameters:[]
[2025-3-14>>>11:6:27]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:221, no: 1054, SQLState: 42S22) Unknown column 'application.uid' in 'where clause'
sql: SELECT `id`, `user_uid`, `exam_uid`, `source`, `status`, `pay_status`, `result`, `created_at`, `created_at` AS `createdAt` FROM `application` AS `application` WHERE `application`.`uid` = '20250312837014E'; - parameters:[]
[2025-3-14>>>11:6:27]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:219, no: 1054, SQLState: 42S22) Unknown column 'application.uid' in 'where clause'
sql: SELECT `id`, `user_uid`, `exam_uid`, `source`, `status`, `pay_status`, `result`, `created_at`, `created_at` AS `createdAt` FROM `application` AS `application` WHERE `application`.`uid` = '20250312837014E'; - parameters:[]
[2025-3-14>>>11:6:40]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:225, no: 1054, SQLState: 42S22) Unknown column 'application.uid' in 'where clause'
sql: SELECT `id`, `user_uid`, `exam_uid`, `source`, `status`, `pay_status`, `result`, `created_at`, `created_at` AS `createdAt` FROM `application` AS `application` WHERE `application`.`uid` = '20250312837014E'; - parameters:[]
[2025-3-14>>>11:6:40]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:227, no: 1054, SQLState: 42S22) Unknown column 'application.uid' in 'where clause'
sql: SELECT `id`, `user_uid`, `exam_uid`, `source`, `status`, `pay_status`, `result`, `created_at`, `created_at` AS `createdAt` FROM `application` AS `application` WHERE `application`.`uid` = '20250312837014E'; - parameters:[]
[2025-3-14>>>11:6:40]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:224, no: 1054, SQLState: 42S22) Unknown column 'application.uid' in 'where clause'
sql: SELECT `id`, `user_uid`, `exam_uid`, `source`, `status`, `pay_status`, `result`, `created_at`, `created_at` AS `createdAt` FROM `application` AS `application` WHERE `application`.`uid` = '20250312837014E'; - parameters:[]
[2025-3-14>>>11:6:40]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:228, no: 1054, SQLState: 42S22) Unknown column 'application.uid' in 'where clause'
sql: SELECT `id`, `user_uid`, `exam_uid`, `source`, `status`, `pay_status`, `result`, `created_at`, `created_at` AS `createdAt` FROM `application` AS `application` WHERE `application`.`uid` = '20250312837014E'; - parameters:[]
[2025-3-14>>>11:6:40]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:225, no: 1054, SQLState: 42S22) Unknown column 'application.uid' in 'where clause'
sql: SELECT `id`, `user_uid`, `exam_uid`, `source`, `status`, `pay_status`, `result`, `created_at`, `created_at` AS `createdAt` FROM `application` AS `application` WHERE `application`.`uid` = '20250312837014E'; - parameters:[]
[2025-3-14>>>11:6:40]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:226, no: 1054, SQLState: 42S22) Unknown column 'application.uid' in 'where clause'
sql: SELECT `id`, `user_uid`, `exam_uid`, `source`, `status`, `pay_status`, `result`, `created_at`, `created_at` AS `createdAt` FROM `application` AS `application` WHERE `application`.`uid` = '20250312837014E'; - parameters:[]

75
serviceLog/2025/3/17.txt Normal file
View File

@@ -0,0 +1,75 @@
[2025-3-17>>>10:31:14]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:117, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:31:14]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:120, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:31:14]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:123, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:31:14]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:120, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:31:14]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:123, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:31:15]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:120, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:33:27]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:127, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:33:27]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:129, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:33:27]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:127, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:33:27]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:129, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:33:27]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:127, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:33:28]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:126, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:35:41]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:133, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:35:41]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:133, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:35:41]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:135, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:35:41]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:133, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:35:41]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:131, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:35:41]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:135, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:35:49]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:133, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:35:49]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:132, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:35:49]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:133, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:35:49]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:132, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:35:49]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:135, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:35:49]>>>Exam--examList>>>>SequelizeDatabaseError: (conn:135, no: 1054, SQLState: 42S22) Unknown column 'examination.user_uid' in 'where clause'
sql: SELECT count(*) AS `count` FROM `examination` AS `examination` WHERE `examination`.`user_uid` = '20250312837014E'; - parameters:[]
[2025-3-17>>>10:45:44]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:45:49]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:48:14]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:49:39]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:49:40]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:49:40]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:49:40]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:49:40]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:50:28]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:50:28]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:50:28]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:50:28]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:50:28]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:51:11]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:51:11]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:51:11]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:51:11]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:51:11]>>>Exam--gradesList>>>>ReferenceError: body is not defined
[2025-3-17>>>10:55:24]>>>Exam--gradesList>>>>TypeError: s.replace is not a function
[2025-3-17>>>10:56:0]>>>Exam--gradesList>>>>TypeError: s.replace is not a function
[2025-3-17>>>11:23:54]>>>Exam--gradesList>>>>TypeError: s.replace is not a function
[2025-3-17>>>11:24:45]>>>Exam--gradesList>>>>TypeError: s.replace is not a function
[2025-3-17>>>11:24:53]>>>Exam--gradesList>>>>TypeError: s.replace is not a function
[2025-3-17>>>11:24:53]>>>Exam--gradesList>>>>TypeError: s.replace is not a function
[2025-3-17>>>11:24:53]>>>Exam--gradesList>>>>TypeError: s.replace is not a function
[2025-3-17>>>11:24:54]>>>Exam--gradesList>>>>TypeError: s.replace is not a function
[2025-3-17>>>11:24:54]>>>Exam--gradesList>>>>TypeError: s.replace is not a function

2
serviceLog/2025/3/21.txt Normal file
View File

@@ -0,0 +1,2 @@
[2025-3-21>>>18:31:12]>>>User--checkPhoto>>>>ReferenceError: monitoring is not defined
[2025-3-21>>>18:31:24]>>>User--checkPhoto>>>>ReferenceError: monitoring is not defined

34
serviceLog/2025/3/24.txt Normal file
View File

@@ -0,0 +1,34 @@
[2025-3-24>>>17:13:38]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'belongsTo')
[2025-3-24>>>17:13:38]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'belongsTo')
[2025-3-24>>>17:13:38]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'belongsTo')
[2025-3-24>>>17:13:38]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'belongsTo')
[2025-3-24>>>17:13:38]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'belongsTo')
[2025-3-24>>>17:13:38]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'belongsTo')
[2025-3-24>>>17:15:28]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'hasMany')
[2025-3-24>>>17:15:28]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'hasMany')
[2025-3-24>>>17:15:28]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'hasMany')
[2025-3-24>>>17:15:28]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'hasMany')
[2025-3-24>>>17:15:28]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'hasMany')
[2025-3-24>>>17:15:28]>>>Exam--examList>>>>TypeError: Cannot read properties of undefined (reading 'hasMany')
[2025-3-24>>>17:16:6]>>>Exam--examList>>>>SequelizeEagerLoadingError: application is not associated to examination!
[2025-3-24>>>17:16:6]>>>Exam--applicationList>>>>SequelizeDatabaseError: (conn:928, no: 1054, SQLState: 42S22) Unknown column 'examinations.exam_uid' in 'on clause'
sql: SELECT count(`application`.`id`) AS `count` FROM `application` AS `application` LEFT OUTER JOIN `examinee` AS `examinee` ON `application`.`user_uid` = `examinee`.`uid` INNER JOIN `examination` AS `examinations` ON `application`.`id` = `examinations`.`exam_... - parameters:[]
[2025-3-24>>>17:16:6]>>>Exam--examList>>>>SequelizeEagerLoadingError: application is not associated to examination!
[2025-3-24>>>17:16:6]>>>Exam--examList>>>>SequelizeEagerLoadingError: application is not associated to examination!
[2025-3-24>>>17:16:6]>>>Exam--examList>>>>SequelizeEagerLoadingError: application is not associated to examination!
[2025-3-24>>>17:16:6]>>>Exam--examList>>>>SequelizeEagerLoadingError: application is not associated to examination!
[2025-3-24>>>17:16:6]>>>Exam--applicationList>>>>SequelizeDatabaseError: (conn:930, no: 1054, SQLState: 42S22) Unknown column 'examinations.exam_uid' in 'on clause'
sql: SELECT count(`application`.`id`) AS `count` FROM `application` AS `application` LEFT OUTER JOIN `examinee` AS `examinee` ON `application`.`user_uid` = `examinee`.`uid` INNER JOIN `examination` AS `examinations` ON `application`.`id` = `examinations`.`exam_... - parameters:[]
[2025-3-24>>>17:16:6]>>>Exam--examList>>>>SequelizeEagerLoadingError: application is not associated to examination!
[2025-3-24>>>17:16:22]>>>Exam--examList>>>>SequelizeEagerLoadingError: application is not associated to examination!
[2025-3-24>>>17:16:22]>>>Exam--examList>>>>SequelizeEagerLoadingError: application is not associated to examination!
[2025-3-24>>>17:16:22]>>>Exam--examList>>>>SequelizeEagerLoadingError: application is not associated to examination!
[2025-3-24>>>17:16:22]>>>Exam--examList>>>>SequelizeEagerLoadingError: application is not associated to examination!
[2025-3-24>>>17:16:22]>>>Exam--examList>>>>SequelizeEagerLoadingError: application is not associated to examination!
[2025-3-24>>>17:16:22]>>>Exam--examList>>>>SequelizeEagerLoadingError: application is not associated to examination!
[2025-3-24>>>17:19:36]>>>Exam--examList>>>>TypeError: result.rows.map(...).split is not a function
[2025-3-24>>>17:19:36]>>>Exam--examList>>>>TypeError: result.rows.map(...).split is not a function
[2025-3-24>>>17:19:36]>>>Exam--examList>>>>TypeError: result.rows.map(...).split is not a function
[2025-3-24>>>17:19:36]>>>Exam--examList>>>>TypeError: result.rows.map(...).split is not a function
[2025-3-24>>>17:19:36]>>>Exam--examList>>>>TypeError: result.rows.map(...).split is not a function
[2025-3-24>>>17:19:36]>>>Exam--examList>>>>TypeError: result.rows.map(...).split is not a function

1
serviceLog/2025/3/26.txt Normal file
View File

@@ -0,0 +1 @@
[2025-3-26>>>14:19:18]>>>User--uploadPhoto>>>>TypeError: Cannot set properties of undefined (setting 'filename')

3
serviceLog/2025/3/5.txt Normal file
View File

@@ -0,0 +1,3 @@
[2025-3-5>>>17:36:3]>>>Exam--grades>>>>SequelizeEagerLoadingError: examination is not associated to grades!
[2025-3-5>>>17:36:5]>>>Exam--historyExam>>>>SequelizeEagerLoadingError: examination is not associated to application!
[2025-3-5>>>17:45:41]>>>Exam--grades>>>>SequelizeEagerLoadingError: examinee is not associated to grades!

9
serviceLog/2025/4/2.txt Normal file
View File

@@ -0,0 +1,9 @@
[2025-4-2>>>14:26:11]>>>Home--radio>>>>TypeError: Cannot read properties of undefined (reading 'findAndCountAll')
[2025-4-2>>>14:26:23]>>>Home--radio>>>>TypeError: Cannot read properties of undefined (reading 'findAndCountAll')
[2025-4-2>>>14:27:3]>>>Home--radio>>>>TypeError: Cannot read properties of undefined (reading 'findAndCountAll')
[2025-4-2>>>14:27:54]>>>Home--radio>>>>SequelizeDatabaseError: (conn:68, no: 1054, SQLState: 42S22) Unknown column 'options_a' in 'field list'
sql: SELECT `id`, `stem`, `options_a` AS `optionsA`, `options_b` AS `optionsB`, `options_c` AS `optionsC`, `options_d` AS `optionsD`, `answer` FROM `radio` AS `radio` LIMIT 0, 1; - parameters:[]
[2025-4-2>>>16:49:32]>>>Home--login>>>>ReferenceError: Cannot access 'result' before initialization
[2025-4-2>>>16:50:11]>>>Home--login>>>>ReferenceError: Cannot access 'result' before initialization
[2025-4-2>>>16:50:34]>>>Home--login>>>>ReferenceError: Cannot access 'result' before initialization
[2025-4-2>>>16:53:27]>>>Home--login>>>>ReferenceError: Cannot access 'result' before initialization

12
serviceLog/2025/4/3.txt Normal file
View File

@@ -0,0 +1,12 @@
[2025-4-3>>>17:0:18]>>>Home--radio>>>>ReferenceError: minId is not defined
[2025-4-3>>>17:0:32]>>>Home--radio>>>>ReferenceError: minId is not defined
[2025-4-3>>>17:1:36]>>>Home--radio>>>>ReferenceError: minId is not defined
[2025-4-3>>>17:3:28]>>>Home--radio>>>>ReferenceError: minId is not defined
[2025-4-3>>>17:4:24]>>>Home--radio>>>>SequelizeDatabaseError: (conn:674, no: 1305, SQLState: 42000) FUNCTION trainingtopic.id does not exist
sql: SELECT id(`min`) AS `id` FROM `radio` AS `radio`; - parameters:[]
[2025-4-3>>>17:5:40]>>>Home--radio>>>>SequelizeDatabaseError: (conn:680, no: 1305, SQLState: 42000) FUNCTION trainingtopic.id does not exist
sql: SELECT id(`min`) AS `id` FROM `radio` AS `radio`; - parameters:[]
[2025-4-3>>>17:10:1]>>>Home--radio>>>>SequelizeDatabaseError: (conn:691, no: 1054, SQLState: 42S22) Unknown column 'age' in 'field list'
sql: SELECT min(`age`) AS `min` FROM `radio` AS `radio`; - parameters:[]
[2025-4-3>>>17:10:30]>>>Home--radio>>>>SequelizeDatabaseError: (conn:696, no: 1054, SQLState: 42S22) Unknown column 'age' in 'field list'
sql: SELECT min(`age`) AS `min` FROM `radio` AS `radio`; - parameters:[]

View File

@@ -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);
});
});