正在显示
1 个修改的文件
包含
3 行增加
和
3 行删除
@@ -118,7 +118,7 @@ func (d *TaskAnomalyDao) List1(userId int, companyId int, taskName string, categ | @@ -118,7 +118,7 @@ func (d *TaskAnomalyDao) List1(userId int, companyId int, taskName string, categ | ||
118 | 118 | ||
119 | } | 119 | } |
120 | condition = append(condition, limit, offset) | 120 | condition = append(condition, limit, offset) |
121 | - sqlStr1 += ` order by task_anomaly.id desc,task.sort_by limit ? offset ? ` | 121 | + sqlStr1 += ` order by task.sort_by ,task_anomaly.id desc limit ? offset ? ` |
122 | result := []ListTaskAnomaly{} | 122 | result := []ListTaskAnomaly{} |
123 | tx := d.transactionContext.PgTx | 123 | tx := d.transactionContext.PgTx |
124 | _, err := tx.Query(&result, sqlStr1, condition...) | 124 | _, err := tx.Query(&result, sqlStr1, condition...) |
@@ -268,7 +268,7 @@ func (d *TaskAnomalyDao) List2(userId int, companyId int, taskName string, categ | @@ -268,7 +268,7 @@ func (d *TaskAnomalyDao) List2(userId int, companyId int, taskName string, categ | ||
268 | sqlStr1 += ` and t_task.leader_id in (?) ` | 268 | sqlStr1 += ` and t_task.leader_id in (?) ` |
269 | } | 269 | } |
270 | condition = append(condition, limit, offset) | 270 | condition = append(condition, limit, offset) |
271 | - sqlStr1 += ` order by task_anomaly.id desc,t_task.task_sort_by limit ? offset ? ` | 271 | + sqlStr1 += ` order by task.sort_by ,task_anomaly.id desc limit ? offset ? ` |
272 | 272 | ||
273 | result := []ListTaskAnomaly{} | 273 | result := []ListTaskAnomaly{} |
274 | tx := d.transactionContext.PgTx | 274 | tx := d.transactionContext.PgTx |
@@ -356,7 +356,7 @@ func (d *TaskAnomalyDao) List3(userId int, companyId int, taskName string, categ | @@ -356,7 +356,7 @@ func (d *TaskAnomalyDao) List3(userId int, companyId int, taskName string, categ | ||
356 | sqlStr2 += ` and task.leader->>'id' in (?) ` | 356 | sqlStr2 += ` and task.leader->>'id' in (?) ` |
357 | } | 357 | } |
358 | condition = append(condition, limit, offset) | 358 | condition = append(condition, limit, offset) |
359 | - sqlStr1 += ` order by task_anomaly.id desc,task.sort_by limit ? offset ? ` | 359 | + sqlStr1 += ` order by task.sort_by ,task_anomaly.id desc limit ? offset ? ` |
360 | result := []ListTaskAnomaly{} | 360 | result := []ListTaskAnomaly{} |
361 | tx := d.transactionContext.PgTx | 361 | tx := d.transactionContext.PgTx |
362 | _, err := tx.Query(&result, sqlStr1, condition...) | 362 | _, err := tx.Query(&result, sqlStr1, condition...) |
-
请 注册 或 登录 后发表评论