Просмотр исходного кода

fix(feedback): 移除反馈回复查询中的冗余条件

- 删除了 feedback_reply 表查询中不必要的 uid > 0 条件
- 简化了反馈回复存在性检查逻辑
- 提高了查询性能并减少了潜在的数据一致性问题
shichen месяцев назад: 4
Родитель
Сommit
0dbdca486f
1 измененных файлов с 0 добавлено и 1 удалено
  1. 0 1
      app/common/repositories/user/FeedbackRepository.php

+ 0 - 1
app/common/repositories/user/FeedbackRepository.php

@@ -50,7 +50,6 @@ class FeedbackRepository extends BaseRepository
50 50
         foreach ($list as &$item) {
51 51
             $isReply = Db::name('feedback_reply')
52 52
                 ->where(['feedback_id' => $item['feedback_id']])
53
-                ->where('uid', '>', 0)
54 53
                 ->find();
55 54
             if (!$isReply) {
56 55
                 $item['userReply'] = 1;