fix bug
This commit is contained in:
@@ -63,10 +63,13 @@ class Donation
|
||||
$where = " id < ".$lastIndex;
|
||||
}
|
||||
$result['lastIndex'] = 0;
|
||||
$result['total'] = 0;
|
||||
$result['list'] = [];
|
||||
$list = Db::name("order")->where(['user_id'=>$userid,'status'=>1])->where($where)->order("id desc")->limit(env("page_count"))->select()->toArray();
|
||||
|
||||
$list = Db::name("order")->where(['user_id'=>$userid,'status'=>1])->where($where)->order("id desc")->limit(env("page_count"))->select();
|
||||
print_r($list);
|
||||
if(!empty($list)){
|
||||
// $result['total'] = $list->total();
|
||||
$list = $list->toArray();
|
||||
$appUser = getAllUsersMessage($list,"user_id","id,nickname");
|
||||
$studentUser = $this->getStudents($list);
|
||||
foreach ($list as $key => $vo) {
|
||||
@@ -76,6 +79,9 @@ class Donation
|
||||
"date"=> explode(" ",$vo['create_time'])[0],
|
||||
"student_nickname"=>$studentUser[$vo['student_id']]['nickname'],
|
||||
"donation_nickname"=>$appUser[$vo['user_id']]['nickname'],
|
||||
"avatar"=>$studentUser[$vo['student_id']]['avatar'],
|
||||
"type"=>$studentUser[$vo['student_id']]['type'],
|
||||
"is_disabled"=>$studentUser[$vo['student_id']]['is_disabled'],
|
||||
];
|
||||
}
|
||||
if (count($list) < env("PAGE_COUNT")) {
|
||||
@@ -95,7 +101,7 @@ class Donation
|
||||
}
|
||||
$StudentIds = array_unique($StudentIds);
|
||||
$getAllStudentsMessage = [];
|
||||
$UserLists = Db::name("student")->where("id", "IN",$StudentIds)->field("id,nickname")->select()->toArray();
|
||||
$UserLists = Db::name("student")->where("id", "IN",$StudentIds)->field("id,nickname,avatar,type,disabled as is_disabled")->select()->toArray();
|
||||
foreach ($UserLists as $vo) {
|
||||
$getAllStudentsMessage[$vo['id']] = $vo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user