维护用户销售统计——订单

This commit is contained in:
wanyongkang
2020-11-25 09:58:17 +08:00
parent 74e7f832d6
commit 3e1e5aee86
2 changed files with 58 additions and 4 deletions

View File

@@ -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();
}
}