作者 lyh
... ... @@ -38,7 +38,7 @@ class WorkchatMessageSend extends Command
$this->output('开始推送消息' . $task->id);
try {
//超过两小时 不推送了
if(time() - $task->send_time > 7200){
if(time() - strtotime($task->send_time) > 7200){
throw new \Exception('超时两小时未推送');
}
ProjectAssociationServices::getInstance()->sendMessage($task->friend_id, $task->content, $task->content_type);
... ...
... ... @@ -6,6 +6,7 @@ use App\Models\Base;
use App\Models\Inquiry\InquiryFormData;
use App\Models\ProjectAssociation\ProjectAssociation;
use App\Services\ProjectServer;
use App\Utils\LogUtils;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
... ... @@ -40,9 +41,9 @@ class MessagePush extends Base
* @return bool
*/
public static function addInquiryMessage($id, $project_id, $country, $name, $submit_at){
if(!ProjectServer::useProject($project_id)){
return false;
}
// if(!ProjectServer::useProject($project_id)){
// return false;
// }
//项目是否有绑定群
$friend_id = ProjectAssociation::where('project_id', $project_id)
... ...
... ... @@ -155,6 +155,7 @@ class SyncSubmitTaskService
$id = InquiryFormData::saveData($form_id, $data['domain'], $data['ip'], $data['country'], $data['referer'], $data['user_agent'], $data['submit_at'], $data['data']);
//转化询盘
Visit::isInquiry($data['ip']);
... ...