This commit is contained in:
2025-04-17 10:14:01 +08:00
parent 88dc849bd5
commit c954218088
6 changed files with 125 additions and 59 deletions
+10 -3
View File
@@ -26,13 +26,20 @@ class DailyController
$perPage = $request->input('per_page', 10);
//id
$user_id = $request->user['id'];
if(Util::isEmpty($user_id)){
$userId = $request->user['id'];
if(Util::isEmpty($userId)){
return Util::fail([],'user_id'.trans('not_null'));
}
$where = [];
$where['user_id'] = $user_id;
//判断领导
$mast = config('const.daily_group_2');
if ($userId == $mast['master']) {
$where['leader_id'] = $mast['master'];
}else{
$where['user_id'] = $userId;
}
// 执行分页查询
$data = Daily::with('user')->where($where)