维护用户销售统计——订单
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* @Author: kangkang
|
||||
* @Date: 2020-10-16 14:44:02
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime: 2020-11-24 15:53:12
|
||||
* @LastEditTime: 2020-11-25 09:46:23
|
||||
*/
|
||||
|
||||
namespace app\manager\model;
|
||||
@@ -203,4 +203,18 @@ class ProductOrder extends Model
|
||||
->group(['UserId'],$having)
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 获取用户所有的消费记录
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
public function getUserCost($user_id, $index, $where='')
|
||||
{
|
||||
return $this->field('UpdateTime,OrderNo,OrderType,ProductName,PackageName,PaymentAmount,Accounts,ConnectCount,PayType')
|
||||
->where(['UserId' => $user_id])
|
||||
->where($where)
|
||||
->order('Id desc')
|
||||
->fetchAll();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user