维护客户自动更改状态
This commit is contained in:
@@ -1,23 +1,38 @@
|
||||
<?php
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: kangkang
|
||||
* @Date: 2020-10-16 14:44:02
|
||||
* @LastEditors: kangkang
|
||||
* @LastEditTime: 2020-11-18 16:42:07
|
||||
*/
|
||||
|
||||
namespace app\manager\model;
|
||||
|
||||
use fastphp\base\Model;
|
||||
use enum\user\User as UserEnum;
|
||||
|
||||
class FollowRecord extends Model
|
||||
{
|
||||
protected $table = 'follow_record';
|
||||
|
||||
/**
|
||||
* @description: 获取最新的跟进记录
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
public function getNewRecord($where)
|
||||
{
|
||||
return $this->where($where)->order()->limit('3')->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 获取待跟进状态超过15天
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
public function getOverTime()
|
||||
{
|
||||
$user_enum = new UserEnum;
|
||||
$time = date('Y-m-d H:i:s', time() - (86400 * 15));
|
||||
$where = [
|
||||
'active' => 1,
|
||||
'follow_status' => ['in', $user_enum::$Unfollow],
|
||||
'create_time' => ['<',$time]
|
||||
];
|
||||
return $this->field('user_id,follow_status')->where($where)->fetchAll();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user