Compare commits

...

2 Commits

Author SHA1 Message Date
chenbo fc2b61c575 update 首单订单详情 2024-01-22 17:37:44 +08:00
chenbo fffcb10924 update 首单订单详情 2024-01-22 15:57:02 +08:00
2 changed files with 2 additions and 1 deletions

View File

@ -325,7 +325,7 @@ class UserController extends BaseApiController
$firstOrderLogList = Db::name('user_invite_first_order_log')->where('user_id', $this->userId)->page($page, $limit)->order('id', 'desc')->select()->toArray(); $firstOrderLogList = Db::name('user_invite_first_order_log')->where('user_id', $this->userId)->page($page, $limit)->order('id', 'desc')->select()->toArray();
foreach ($firstOrderLogList as &$item) { foreach ($firstOrderLogList as &$item) {
$item['order_info'] = Db::connect('mysql2')->name('store_order')->alias('o')->field('o.total_num,p.store_name,p.image')->leftJoin('store_order_product op', 'o.order_id=op.order_id')->leftJoin('store_product p', 'op.product_id = p.product_id')->where('o.order_sn', $item['order_no'])->find(); $item['order_info'] = Db::connect('mysql2')->name('store_order')->alias('o')->field('o.total_num,p.store_name,p.image,o.pay_price')->leftJoin('store_order_product op', 'o.order_id=op.order_id')->leftJoin('store_product p', 'op.product_id = p.product_id')->where('o.order_sn', $item['order_no'])->find();
$item['create_time'] = date('Y-m-d H:i:s', $item['create_time']); $item['create_time'] = date('Y-m-d H:i:s', $item['create_time']);
} }
$data = [ $data = [

View File

@ -100,6 +100,7 @@ class UserLogic extends BaseLogic
$data['register_num'] = $inviteUserStatistics['data']['user_count']; $data['register_num'] = $inviteUserStatistics['data']['user_count'];
// $data['merchant_num'] = $inviteUserStatistics['data']['merchant_count']; // $data['merchant_num'] = $inviteUserStatistics['data']['merchant_count'];
$data['trade_amount'] = Db::name('user_invite_first_order_log')->where('user_id', $userId)->sum('order_money'); $data['trade_amount'] = Db::name('user_invite_first_order_log')->where('user_id', $userId)->sum('order_money');
$data['share_url'] = env('url.shop_prefix').'/download/index.html?code='.$data['invite_code'];
return $data; return $data;
} }