待跟进列表
This commit is contained in:
@@ -68,11 +68,16 @@ class CustomerController
|
|||||||
$userId = $request->user['id'];
|
$userId = $request->user['id'];
|
||||||
$where = [
|
$where = [
|
||||||
['user_id', '=', $userId],
|
['user_id', '=', $userId],
|
||||||
|
['follow_next', '<>', 0],
|
||||||
// ['follow_next', '<=', time() + 3600 * 24],
|
// ['follow_next', '<=', time() + 3600 * 24],
|
||||||
['follow_next', '>', time()],
|
// ['follow_next', '>', time()],
|
||||||
['warn', '<', 1]
|
// ['warn', '<', 1]
|
||||||
];
|
];
|
||||||
$customer = Customer::where($where)->orderBy('follow_next')->get();
|
$customer = Customer::where($where)->whereNotNull('follow_next')->orderBy('follow_next')->get();
|
||||||
|
|
||||||
|
foreach ($customer as &$item) {
|
||||||
|
$item['follow_remaining'] = $item->follow_next-time();
|
||||||
|
}
|
||||||
return Util::success($customer,trans('success'));
|
return Util::success($customer,trans('success'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -146,6 +146,8 @@ class FollowController
|
|||||||
|
|
||||||
$customer = Customer::find($customer_id);
|
$customer = Customer::find($customer_id);
|
||||||
$customer->follow_last = strtotime($res->created_at);
|
$customer->follow_last = strtotime($res->created_at);
|
||||||
|
$customer->follow_next = null;
|
||||||
|
$customer->warn = 0;
|
||||||
$customer->save();
|
$customer->save();
|
||||||
|
|
||||||
if ($res) {
|
if ($res) {
|
||||||
|
|||||||
Reference in New Issue
Block a user