修改用户详情查询

This commit is contained in:
luofei 2024-03-12 16:05:20 +08:00
parent 8df7adef7d
commit 7bf56d18e2

View File

@ -312,7 +312,7 @@ class UserDao extends BaseDao
public function userOrderDetail($uid)
{
$info = User::getDB()->alias('A')->with(['group','spread','memberIcon'])
->join('StoreOrder B', 'A.uid = B.uid and B.paid = 1 and B.pay_time between \'' . date('Y/m/d', strtotime('first day of')) . ' 00:00:00\' and \'' . date('Y/m/d H:i:s') . '\'')
->leftJoin('StoreOrder B', 'A.uid = B.uid and B.paid = 1 and B.pay_time between \'' . date('Y/m/d', strtotime('first day of')) . ' 00:00:00\' and \'' . date('Y/m/d H:i:s') . '\'')
->join('PresellOrder C', 'C.order_id = B.order_id and C.paid = 1', 'LEFT')
->field('A.*, sum(B.pay_price + IFNULL(C.pay_price,0)) as total_pay_price, count(B.order_id) as total_pay_count,is_svip,svip_endtime,svip_save_money')
->where('A.uid', $uid)