This commit is contained in:
2025-07-10 14:27:56 +08:00
parent 9f077f7572
commit a45d586f07
13 changed files with 179 additions and 34 deletions
+17 -5
View File
@@ -39,9 +39,9 @@ class FollowController extends BaseController
public function list(Request $request)
{
try {
$data = $this->validate(new FollowValidate(), $request->get(), 'upwd_list');
$result = (new FollowService())->list($request->all());
return $this->success($this->page($result));
$data = $this->validate(new FollowValidate(), $request->get(), 'list');
$result = (new FollowService())->list($request->all(),$request->user->uid);
return $this->success($result);
} catch (\Throwable $e) {
return $this->error($e->getMessage());
}
@@ -69,7 +69,7 @@ class FollowController extends BaseController
return $this->error('记录不存在');
}
$res = Follow::getFollow($res);
$res = FollowService::getFollow($res);
return $this->success($res);
}
@@ -96,7 +96,7 @@ class FollowController extends BaseController
}
$data = [
'user_id'=>$request->user['id'],
'user_id'=>$request->user->uid,
'customer_id'=>$customer_id,
'type'=>$type,
'picture'=>$picture,
@@ -117,6 +117,18 @@ class FollowController extends BaseController
$customer->warn = 0;
$customer->save();
$follow_next = Util::getParam($request, 'follow_next', 0);
$follow_remark = Util::getParam($request, 'follow_remark', 0);
if($res && (!empty($follow_next))){
$data = [
'follow_next' => $follow_next,
'follow_remark' => $follow_remark,
'warn' => 0,
];
$res = Customer::where('id', $customer_id)
->update($data);
}
if ($res) {
return $this->success($res,trans('save_success'));
} else {