作者 何书鹏
1 个管道 的构建 通过 耗费 3 秒

bug修改

... ... @@ -257,7 +257,7 @@ class HouseAdmin extends Api
$where = ['hb.house_id'=>$house_id];
$total_num = HouseBoard::where($where)
->alias('hb')
->join('house_admin ha','ha.user_id = hb.admin_user_id')
->join('house_admin ha','ha.id = hb.admin_user_id')
->count();
$list = $this->getBoardList($where,$page,$pageNum);
$this->success('success',compact('total_num','list'));
... ... @@ -420,7 +420,7 @@ class HouseAdmin extends Api
Db::startTrans();
try{
(new HouseBoard)->allowField(true)->save(array_merge([
'admin_user_id' => $this->auth->id
'admin_user_id' => $admin['id']
],$post));
// 该社区下的业主ID
$user_id_arr = UserHouse::where('house_id',$post['house_id'])
... ...
... ... @@ -255,6 +255,10 @@ class HouseBoard extends Api
}
}
// 因为公告首页接口已经返回了最新的公告,所以这里防止重复就去掉最新的
if(empty($page) || $page == 1){
$data['info'] = array_shift($data['info']);
}
$this->success('success',$data);
}
... ...