...
|
...
|
@@ -176,8 +176,11 @@ class House extends Backend |
|
|
}
|
|
|
$result = $row->allowField(true)->save($params);
|
|
|
$data = Db::name('house')->where('id',$ids)->find();
|
|
|
$house_admin = Db::name('house_admin')->where('house_id',$ids)->find();
|
|
|
Db::name('house_admin')->where('id',$data['admin_user_id'])->update(['house_id'=>$ids]);
|
|
|
Db::name('house_admin')->where('user_id',$row->user_id)->where('house_id',$ids)->update(['user_id'=>$data['admin_user_id']]);
|
|
|
if($house_admin) {
|
|
|
Db::name('house_admin')->where('id',$house_admin['id'])->update(['house_id'=>'']);
|
|
|
}
|
|
|
|
|
|
Db::commit();
|
|
|
} catch (ValidateException $e) {
|
...
|
...
|
|