维护用户排序时间搜索

This commit is contained in:
wanyongkang
2020-11-24 15:22:25 +08:00
parent 4736fdd979
commit a326346f5b
2 changed files with 8 additions and 11 deletions

View File

@@ -101,7 +101,7 @@ class SellInfo extends Controller
$data['sell_percent'] = "我的营业额($user_cost)/总营业额($all_cost)=" . $sell_percent . '%';
$data['cost_percent'] = "消费客户数($user_cost_num)/所有客户($all_cost_num)=" . $cost_percent . '%';
$data['cost_register'] = "注册且购买过的客户($user_register_cost_count)/当月新注册客户总数($user_register_count)=" . $cost_register . '%';
$data['cost_old_user'] = "老客户在本月再次购买(" . ($user_cost_num - $user_register_cost_count) . ")/所有老客户(" . $cost_old_user . '%';
$data['cost_old_user'] = "老客户在本月再次购买(" . ($user_cost_num - $user_register_cost_count) . ")/所有老客户(" . ($all_cost_num - $user_register_count) . ')=' . $cost_old_user . '%';
$data['com_cost'] = "同比增加金额=" . $com_cost;
$data['com_percent'] = "同比增加百分比=" . $com_percent . '%';
$data['today_new_user'] = "今日新赠客户" . $today_new_user;

View File

@@ -5,7 +5,7 @@
* @Author: kangkang
* @Date: 2020-10-13 19:52:37
* @LastEditors: Please set LastEditors
* @LastEditTime: 2020-11-24 14:55:57
* @LastEditTime: 2020-11-24 15:14:39
*/
namespace app\manager\controller;
@@ -78,16 +78,13 @@ class UserFollow extends Controller
$date3 = date("Y-m-01", time());
$date4 = date("Y-m-d H:i:s", time());
if (!empty($search['last_month']['s_time'])) {
$date1 = date('Y-m-d',strtotime($search['last_month']['s_time']));
$date2 = date('Y-m-d 23:59:59',strtotime($search['last_month']['e_time']));
$is_screen = true;
$date1 = date('Y-m-d', strtotime($search['last_month']['s_time']));
$date2 = date('Y-m-d H:i:s', strtotime($search['last_month']['e_time']));
} elseif (!empty($search['new_month']['s_time'])) {
$date3 = date('Y-m-d',strtotime($search['new_month']['s_time']));
$date4 = date('Y-m-d 23:59:59',strtotime($search['new_month']['e_time']));
$is_screen = true;
$date3 = date('Y-m-d', strtotime($search['new_month']['s_time']));
$date4 = date('Y-m-d H:i:s', strtotime($search['new_month']['e_time']));
}
//上月
$time_where1 .= " UpdateTime>='" . $date1 . "' and UpdateTime<='" . $date2 . "' ";
//本月
@@ -157,7 +154,7 @@ class UserFollow extends Controller
foreach ($user_list as $info) {
$info['last_pay_time'] = '无消费';
$pay_time = $product_order_model->getNewOne('UpdateTime', ['UserId' => $info['Id'], 'ScoreType' => ProductOrderEnum::$PayComplete]);
$pay_time = $product_order_model->getNewOne('UpdateTime', ['UserId' => $info['Id'], 'OrderState' => ['in', ProductOrderEnum::$PayComplete]]);
if ($pay_time) {
$info['last_pay_time'] = $pay_time['UpdateTime'];
}
@@ -256,7 +253,7 @@ class UserFollow extends Controller
$user_model = new User;
$user_enum = new UserEnum;
if ($user_model->updateOne(['Id' => $data['user_id']], ['follow_status' => $data['status']])) {
$follow_rcord->updateOne(['user_id'=>$data['user_id']],['active' => 0]);
$follow_rcord->updateOne(['user_id' => $data['user_id']], ['active' => 0]);
$info = [];
$info['user_id'] = $data['user_id'];
$info['op_user'] = $this->userinfo['OperaterID'];