|
|
@@ -6,7 +6,7 @@ const mq = require('../../plugin/mq')
|
|
|
class Mcp {
|
|
|
constructor() {
|
|
|
this.logger = new Logger(path.join(__dirname, '../logs/MCP.log'), 'INFO')
|
|
|
-
|
|
|
+
|
|
|
this.messageQueue = 'runforge_message_queue'
|
|
|
|
|
|
this.auto_day = [
|
|
|
@@ -49,11 +49,13 @@ class Mcp {
|
|
|
f.bind_code = ?
|
|
|
`
|
|
|
const rows = await db.query(sql, [bind_code])
|
|
|
- if (!rows) return '系统出错,请稍后再试'
|
|
|
- if (rows.length !== 0) {
|
|
|
+ if (!rows || rows.length === 0) return '系统出错,请稍后再试'
|
|
|
+
|
|
|
+ if (rows[0].bot_account) {
|
|
|
if (rows[0].bot_account !== sender) return '该账号已被他人绑定,请联系客服解绑'
|
|
|
return '该账号您已绑定'
|
|
|
}
|
|
|
+
|
|
|
let insertSql = `
|
|
|
UPDATE lepao_extra SET bot_account = ? WHERE bind_code = ?
|
|
|
`
|