日报
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user