Bladeren bron

fix(admin): 修复反馈回复功能中的代码格式和逻辑问题

- 修复了 fieldExists 方法调用中的参数间距格式问题
- 在 update 操作后添加了对 reply 方法的调用以确保状态同步
- 统一了方法调用中的参数分隔符格式
- 确保反馈回复操作的数据一致性
shichen 4 maanden geleden
bovenliggende
commit
e0c038d93d
1 gewijzigde bestanden met toevoegingen van 3 en 2 verwijderingen
  1. 3 2
      app/controller/admin/user/FeedBack.php

+ 3 - 2
app/controller/admin/user/FeedBack.php

@@ -62,11 +62,12 @@ class FeedBack extends BaseController
62 62
      */
63 63
     public function reply($id)
64 64
     {
65
-        if (!$this->repository->fieldExists('feedback_id',$id))
65
+        if (!$this->repository->fieldExists('feedback_id', $id))
66 66
             return app('json')->fail('数据不存在');
67 67
         $data = $this->request->params(['reply', 'remake', 'status']);
68 68
         $data['reply_time'] = date("Y-m-d H:i:s");
69
-        $this->repository->update($id,$data);
69
+        $this->repository->update($id, $data);
70
+        $this->repository->reply($id, 0,$data['reply']);
70 71
         return app('json')->success('回复成功');
71 72
     }
72 73