|
...
|
...
|
@@ -2,10 +2,14 @@ |
|
|
|
|
|
|
|
namespace App\Http\Controllers\Api;
|
|
|
|
|
|
|
|
use App\Enums\Common\Code;
|
|
|
|
use App\Exceptions\InquiryFilterException;
|
|
|
|
use App\Models\SyncSubmitTask\SyncSubmitTask;
|
|
|
|
use App\Models\Visit\Visit;
|
|
|
|
use App\Services\CosService;
|
|
|
|
use App\Services\ProjectServer;
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class InquiryController
|
|
...
|
...
|
@@ -51,4 +55,39 @@ class InquiryController extends BaseController |
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :修改路由状态
|
|
|
|
* @name :editInquiryStatus
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2024/3/22 15:31
|
|
|
|
*/
|
|
|
|
public function editInquiryStatus(){
|
|
|
|
$this->request->validate([
|
|
|
|
'project_id'=>'required',
|
|
|
|
'ip'=>'required',
|
|
|
|
'updated_date'=>'required',
|
|
|
|
],[
|
|
|
|
'project_id.required' => 'project_id不能为空',
|
|
|
|
'ip.required' => 'ip不能为空',
|
|
|
|
'updated_date.required' => '日期不能为空',
|
|
|
|
]);
|
|
|
|
ProjectServer::useProject($this->param['project_id']);
|
|
|
|
$customerVisitModel = new Visit();
|
|
|
|
$info = $customerVisitModel->read([
|
|
|
|
'ip'=>$this->param['ip'],
|
|
|
|
'updated_date'=>$this->param['updated_date']
|
|
|
|
]);
|
|
|
|
if($info === false){
|
|
|
|
$this->response('当前记录不存在',Code::SYSTEM_ERROR);
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
$customerVisitModel->edit(['is_inquiry'=>1],['id'=>$info['id']]);
|
|
|
|
}catch (\Exception $e){
|
|
|
|
$this->response('操作失败',Code::SYSTEM_ERROR);
|
|
|
|
}
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|