1 个管道
的构建
通过
耗费
0 秒
更新 ShareController.php 头像
正在显示
1 个修改的文件
包含
5 行增加
和
3 行删除
@@ -189,9 +189,11 @@ class ShareController extends RestBaseController | @@ -189,9 +189,11 @@ class ShareController extends RestBaseController | ||
189 | } | 189 | } |
190 | $per_page = !empty($data['per_page']) ? : config('per_page'); | 190 | $per_page = !empty($data['per_page']) ? : config('per_page'); |
191 | $result = Db::name('withdraw_log') | 191 | $result = Db::name('withdraw_log') |
192 | - ->where(['card_id' => $data['id'],'state' => 1,'user_id' => $this->userId]) | ||
193 | - ->field('money,pay_time') | ||
194 | - ->order('pay_time desc') | 192 | + ->alias('w') |
193 | + ->join('user u','w.user_id=u.id','left') | ||
194 | + ->where(['w.card_id' => $data['id'],'w.state' => 1,'w.user_id' => $this->userId]) | ||
195 | + ->field('w.money,w.pay_time,u.avatar') | ||
196 | + ->order('w.pay_time desc') | ||
195 | ->paginate($per_page); | 197 | ->paginate($per_page); |
196 | if ($result === false) { | 198 | if ($result === false) { |
197 | $this->error(['code'=>'40000','msg'=>'获取失败']); | 199 | $this->error(['code'=>'40000','msg'=>'获取失败']); |
-
请 注册 或 登录 后发表评论