feat(IndexController): 更新用户充值查询逻辑,按ID降序排序结果

This commit is contained in:
mkm 2024-07-18 18:05:18 +08:00
parent f45f6f63be
commit 9829931e4f

View File

@ -131,11 +131,13 @@ class IndexController extends BaseLikeController
$where['recharge_type'] = 'INDUSTRYMEMBERS';
$where['status'] = 1;
$where['paid'] = 1;
$where[] = ['price','>',1];
// $res = OrderLogic::Count($where,$time);
// if (ProductLogic::hasError()) {
// return $this->fail(ProductLogic::getError()); //获取错误信息并返回错误信息
// }
$res = Db::connect('demo')->name('user_recharge')->where($where)->limit(20)->select()->each(function ($item) {
$res = Db::connect('demo')->name('user_recharge')->where($where)->limit(20)->order('id desc')->select()->each(function ($item) {
if ($item['uid']) {
$find = Db::connect('demo')->name('user')->where('id', $item['uid'])->field('real_name,nickname')->find();
$item['nickname']=$find['real_name']??'';