作者 Cool
1 个管道 的构建 通过 耗费 0 秒

设置社区管理员,用户收益排序调整

... ... @@ -94,12 +94,12 @@ class HouseAdmin extends Backend
}
$result = $this->model->allowField(true)->save($params);
// $house_admin_id = $this->model->getLastInsID();
//
// $data = Db::name('house_admin')->where('id',$house_admin_id)->find();
// if(!empty($data['user_id'])){
// Db::name('user')->where('id',$data['user_id'])->update(['identity'=>1]);
// }
$house_admin_id = $this->model->getLastInsID();
$data = Db::name('house_admin')->where('id',$house_admin_id)->find();
if(!empty($data['user_id'])){
Db::name('user')->where('id',$data['user_id'])->update(['identity'=>1]);
}
Db::commit();
} catch (ValidateException $e) {
... ...
... ... @@ -714,6 +714,7 @@ class User extends Api
$list = UserMoneyLog::where($where)
->field("memo,money,from_unixtime(createtime, '%Y-%m-%d %H:%i:%S') createtime")
->page($page,$pageNum)
->order('createtime','DESC')
->select();
$this->success('成功',compact('total_num','list'));
}
... ...