Browse Source

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

laiguoran 3 năm trước cách đây
mục cha
commit
4c1d3a1c42
1 tập tin đã thay đổi với 2 bổ sung11 xóa
  1. 2 11
      app/service/project_account.js

+ 2 - 11
app/service/project_account.js

@@ -820,17 +820,8 @@ module.exports = app => {
          * @return {Promise<Array>} - 账号
          */
         async getAllProjectAccountByPid(project_id) {
-            this.initSqlBuilder();
-            const columns = ['account', 'name', 'company', 'role', 'mobile', 'telephone', 'is_admin', 'account_group',];
-            this.sqlBuilder.columns = columns;
-            this.sqlBuilder.setAndWhere('project_id', {
-                value: project_id,
-                operate: '=',
-            });
-            const [sql, sqlParam] = this.sqlBuilder.build(this.tableName);
-            const accountData = await this.db.query(sql, sqlParam);
-
-            return accountData;
+            const sql = 'Select `account`, `name`, `company`, `role`, `mobile`, `telephone`, `is_admin` as `isAdmin`, `account_group` as `accountGroup` From ' + this.tableName + ' where project_id = ?';
+            return await this.db.query(sql, [project_id]);
         }
     }