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

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

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