|
...
|
...
|
@@ -179,9 +179,9 @@ class RelayInquiry extends Command |
|
|
|
foreach ($inquiry as $key=>$val) {
|
|
|
|
$this->output('询盘ID:' . $val->id);
|
|
|
|
//询盘时间超过2小时 就不处理了
|
|
|
|
if(time() - strtotime($val->inquiry_date) > 7200){
|
|
|
|
if(time() - strtotime($val->inquiry_date) > 259200){
|
|
|
|
$val->status = ReInquiryForm::STATUS_FORGO;
|
|
|
|
$val->remark = '超时2小时未处理!';
|
|
|
|
$val->remark = '超时72小时未处理!';
|
|
|
|
$val->save();
|
|
|
|
continue;
|
|
|
|
}
|
|
...
|
...
|
@@ -355,7 +355,8 @@ class RelayInquiry extends Command |
|
|
|
// 推送消息 消息内容小于10个字符, 使用内置询盘内容
|
|
|
|
$message = $form->message;
|
|
|
|
$message_id = 0;
|
|
|
|
if (strlen($message) < 10) {
|
|
|
|
// 通过字符数量区分, 改成完全获取内置询盘内容
|
|
|
|
if (true) {
|
|
|
|
$use_ids = ReInquiryDetail::where(['re_website' => $domain])->where('status', '<>', ReInquiryDetail::STATUS_FAIL)->pluck('text_id')->toArray();
|
|
|
|
$text = ReInquiryText::whereNotIn('id', $use_ids)->where('status', ReInquiryText::STATUS_USABLE)->inRandomOrder()->first();
|
|
|
|
$message = $text->content;
|
...
|
...
|
|