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