Explorar el Código

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

- 修复了 fieldExists 方法调用中的参数间距格式问题
- 在 update 操作后添加了对 reply 方法的调用以确保状态同步
- 统一了方法调用中的参数分隔符格式
- 确保反馈回复操作的数据一致性
shichen hace 4 meses
padre
commit
e0c038d93d
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  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
     public function reply($id)
63
     public function reply($id)
64
     {
64
     {
65
-        if (!$this->repository->fieldExists('feedback_id',$id))
65
+        if (!$this->repository->fieldExists('feedback_id', $id))
66
             return app('json')->fail('数据不存在');
66
             return app('json')->fail('数据不存在');
67
         $data = $this->request->params(['reply', 'remake', 'status']);
67
         $data = $this->request->params(['reply', 'remake', 'status']);
68
         $data['reply_time'] = date("Y-m-d H:i:s");
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
         return app('json')->success('回复成功');
71
         return app('json')->success('回复成功');
71
     }
72
     }
72
 
73