Commit e841660c by Sxy

fix: 代码规范

parent ef46e093
......@@ -33,9 +33,9 @@ module.exports = (db, DataTypes) =>
// define the table's name
tableName: 'x_product',
getterMethods: {
spName() {
return servicer_name;
},
// spName() {
// return servicer_name;
// },
},
validate: {
......
......@@ -25,9 +25,9 @@ module.exports = (db, DataTypes) =>
// define the table's name
tableName: 'tx_product_price',
getterMethods: {
spName() {
return servicer_name;
},
// spName() {
// return servicer_name;
// },
},
validate: {
......
......@@ -110,13 +110,13 @@ class MsgService extends ServiceBase {
}
async findSystemMsgCount(pobj, qobj, req) {
const { type, company_id } = pobj;
const { type, company_id: companyId } = pobj;
const where = {
msgType: system.Msg.SYS,
is_undo: false,
company_id: {
$in: [1, company_id],
$in: [1, companyId],
},
};
if (type === 'recently') {
......@@ -150,7 +150,7 @@ class MsgService extends ServiceBase {
}
async list(pobj, qobj, req) {
const { userid, msgType, pageSize = 10, pageNo = 1, company_id } = pobj;
const { userid, msgType, pageSize = 10, pageNo = 1, company_id: companyId } = pobj;
let msgData = [];
const other = {
limit: pageSize,
......@@ -175,7 +175,7 @@ class MsgService extends ServiceBase {
msgType: system.Msg.SYS,
is_undo: false,
company_id: {
$in: [1, company_id],
$in: [1, companyId],
},
}, [], other);
msgData = msgData.map(item => ({
......
......@@ -32,15 +32,15 @@ class LogClient {
}
async logList(pobj) {
const { search, pageInfo, company_id } = pobj;
const { userName, errorInfo, messageBody, resultInfo, created_at, opTitle, requestId } = search;
const { search, pageInfo, company_id: companyId } = pobj;
const { userName, errorInfo, messageBody, resultInfo, created_at: createdAt, opTitle, requestId } = search;
const query = {
indexName: `logs-sytxpublic-msgq-${settings.logindex}`,
pageSize: pageInfo.pageSize,
currentPage: pageInfo.pageNo,
};
if (company_id && company_id != 1) {
query.identifyCode = `_${company_id}_`;
if (companyId && companyId != 1) {
query.identifyCode = `_${companyId}_`;
}
if (opTitle) {
query.opTitle = opTitle;
......@@ -60,9 +60,9 @@ class LogClient {
if (resultInfo) {
query.resultInfo = resultInfo;
}
if (created_at && created_at[0] && created_at[1]) {
query.startTime = new Date(created_at[0]).getTime();
query.entTime = new Date(created_at[1]).getTime();
if (createdAt && createdAt[0] && createdAt[1]) {
query.startTime = new Date(createdAt[0]).getTime();
query.entTime = new Date(createdAt[1]).getTime();
}
console.log('请求--------日志');
console.log(settings.logUrl());
......@@ -77,7 +77,7 @@ class LogClient {
if (rtn && rtn.status === 1) {
return rtn.data;
}
throw new Error(rtn && rtn.message || '请联系管理员');
throw new Error((rtn && rtn.message) || '请联系管理员');
} else {
throw new Error(rtn);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment