fixed
This commit is contained in:
@@ -25,28 +25,39 @@ class Tasktimer extends Controller
|
||||
|
||||
//客户回访计划
|
||||
Mmodel::catchJson(function (){
|
||||
//回访记录
|
||||
$return_record = Db::table('fa_firmcustomerfollowuprecord')
|
||||
->where('status','no')
|
||||
->select();
|
||||
if(empty($return_record)){
|
||||
Tools::log_to_write_txt(['无回访记录计划,无需回访']);
|
||||
return '';
|
||||
}
|
||||
foreach ($return_record as $k=>$item){
|
||||
|
||||
Tools::log_to_write_txt(['客户回访计划,开始:$item'=>$item]);
|
||||
$ret = $this->postText($item);
|
||||
//dump($ret);
|
||||
Tools::log_to_write_txt(['客户回访计划,结束:$res'=>$ret]);
|
||||
}
|
||||
|
||||
//Tools::log_to_write_txt(['runMinutes,出参:$res'=>$ret]);
|
||||
//dump($ret);
|
||||
return '';
|
||||
$this->returnPlan();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* desc:客户回访计划
|
||||
* author:wh
|
||||
* @return string
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
function returnPlan(){
|
||||
//回访记录
|
||||
$return_record = Db::table('fa_firmcustomerfollowuprecord')
|
||||
->where('status','no')
|
||||
->select();
|
||||
if(empty($return_record)){
|
||||
Tools::log_to_write_txt(['无回访记录计划,无需回访']);
|
||||
return '';
|
||||
}
|
||||
foreach ($return_record as $k=>$item){
|
||||
|
||||
Tools::log_to_write_txt(['客户回访计划,开始:$item'=>$item]);
|
||||
$ret = $this->postText($item);
|
||||
//dump($ret);
|
||||
Tools::log_to_write_txt(['客户回访计划,结束:$res'=>$ret]);
|
||||
}
|
||||
|
||||
//Tools::log_to_write_txt(['runMinutes,出参:$res'=>$ret]);
|
||||
//dump($ret);
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* desc:发送文字消息
|
||||
|
||||
Reference in New Issue
Block a user