维护用户销售统计——脚本
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-25 13:10:11
|
||||
* @LastEditTime: 2020-11-25 13:27:34
|
||||
*/
|
||||
|
||||
namespace app\manager\model;
|
||||
@@ -227,6 +227,7 @@ class ProductOrder extends Model
|
||||
{
|
||||
return $this->field('UserId,max(UpdateTime) as last_time')
|
||||
->where(['OrderState' => ['in', ProductOrderEnum::$PayComplete]])
|
||||
->group(['UserId'])
|
||||
->fetchAll();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ $user_model->updateOne(['Id' => ['in', $cost_overtime_user_id_list]], ['follow_s
|
||||
$all_last_cost = $product_order_model->getUserCostTime();
|
||||
$user_last_cost_id = [];
|
||||
$all_last_cost_list = [];
|
||||
foreach ($all_last_costas as $info) {
|
||||
foreach ($all_last_cost as $info) {
|
||||
$all_last_cost_list[$info['UserId']] = $info;
|
||||
$user_last_cost_id[] = $info['UserId'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user