|
...
|
...
|
@@ -6,6 +6,7 @@ use App\Enums\Common\Code; |
|
|
|
use App\Enums\Common\Common;
|
|
|
|
use App\Http\Controllers\Aside\BaseController;
|
|
|
|
use App\Http\Logic\Aside\Manage\MenuLogic;
|
|
|
|
use App\Models\Inquiry\InquiryData;
|
|
|
|
use App\Models\Manage\Manage;
|
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
use Illuminate\Support\Facades\Hash;
|
|
...
|
...
|
@@ -71,4 +72,33 @@ class IndexController extends BaseController |
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :同步询盘记录
|
|
|
|
* @name :sync_inquiry
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/11/16 9:51
|
|
|
|
*/
|
|
|
|
public function sync_inquiry(){
|
|
|
|
$this->request->validate([
|
|
|
|
'data' => 'required|array',
|
|
|
|
'identifying'=>'required',
|
|
|
|
'code'=>'required'
|
|
|
|
], [
|
|
|
|
'data.required' => '自定义询盘数据不为空',
|
|
|
|
'data.array' => '必须为数组',
|
|
|
|
'identifying.required' => '唯一标识不为空',
|
|
|
|
'code'=>'加密串不能为空'
|
|
|
|
]);
|
|
|
|
$code = base64_encode(md5($this->param['identifying']));
|
|
|
|
if($code != $this->param['code']){
|
|
|
|
$this->response('签名错误',Code::SYSTEM_ERROR);
|
|
|
|
}
|
|
|
|
$inquiryModel = new InquiryData();
|
|
|
|
$rs = $inquiryModel->add($this->param);
|
|
|
|
if($rs === false){
|
|
|
|
$this->response('error',Code::SYSTEM_ERROR);
|
|
|
|
}
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|