|
@@ -257,7 +257,7 @@ class HouseAdmin extends Api |
|
@@ -257,7 +257,7 @@ class HouseAdmin extends Api |
257
|
$where = ['hb.house_id'=>$house_id];
|
257
|
$where = ['hb.house_id'=>$house_id];
|
258
|
$total_num = HouseBoard::where($where)
|
258
|
$total_num = HouseBoard::where($where)
|
259
|
->alias('hb')
|
259
|
->alias('hb')
|
260
|
- ->join('house_admin ha','ha.user_id = hb.admin_user_id')
|
260
|
+ ->join('house_admin ha','ha.id = hb.admin_user_id')
|
261
|
->count();
|
261
|
->count();
|
262
|
$list = $this->getBoardList($where,$page,$pageNum);
|
262
|
$list = $this->getBoardList($where,$page,$pageNum);
|
263
|
$this->success('success',compact('total_num','list'));
|
263
|
$this->success('success',compact('total_num','list'));
|
|
@@ -420,7 +420,7 @@ class HouseAdmin extends Api |
|
@@ -420,7 +420,7 @@ class HouseAdmin extends Api |
420
|
Db::startTrans();
|
420
|
Db::startTrans();
|
421
|
try{
|
421
|
try{
|
422
|
(new HouseBoard)->allowField(true)->save(array_merge([
|
422
|
(new HouseBoard)->allowField(true)->save(array_merge([
|
423
|
- 'admin_user_id' => $this->auth->id
|
423
|
+ 'admin_user_id' => $admin['id']
|
424
|
],$post));
|
424
|
],$post));
|
425
|
// 该社区下的业主ID
|
425
|
// 该社区下的业主ID
|
426
|
$user_id_arr = UserHouse::where('house_id',$post['house_id'])
|
426
|
$user_id_arr = UserHouse::where('house_id',$post['house_id'])
|