Browse Source

子项目用户列表用uid徘,防止create_time时间相同导致分页获取重复问题

ellisran 3 tháng trước cách đây
mục cha
commit
c9a618fdd8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app/service/project_account.js

+ 1 - 1
app/service/project_account.js

@@ -1094,7 +1094,7 @@ module.exports = app => {
             const offset = limit * (this.ctx.page - 1);
             const sql = `SELECT pa.*, spp.id AS permission_id, 
                     spp.file_permission, spp.budget_permission, spp.info_permission, spp.datacollect_permission, spp.fund_trans_permission, spp.fund_pay_permission, spp.contract_permission, spp.payment_permission 
-                FROM ${this.ctx.service.subProjPermission.tableName} spp LEFT JOIN ${this.tableName} pa ON spp.uid = pa.id WHERE ` + filterSql + ' ORDER BY spp.create_time DESC LIMIT ?, ?';
+                FROM ${this.ctx.service.subProjPermission.tableName} spp LEFT JOIN ${this.tableName} pa ON spp.uid = pa.id WHERE ` + filterSql + ' ORDER BY spp.uid DESC LIMIT ?, ?';
             const result = await this.db.query(sql, [offset, limit]);
             return result;
         }