正在显示
3 个修改的文件
包含
26 行增加
和
9 行删除
| @@ -42,6 +42,10 @@ class InquiryInfoController extends BaseController | @@ -42,6 +42,10 @@ class InquiryInfoController extends BaseController | ||
| 42 | 'id.required' => 'ID不能为空' | 42 | 'id.required' => 'ID不能为空' |
| 43 | ]); | 43 | ]); |
| 44 | } | 44 | } |
| 45 | + //参数验证 | ||
| 46 | + $this->validationParam(); | ||
| 47 | + $inquiryInfoLogic->inquirySave(); | ||
| 48 | + $this->response('success'); | ||
| 45 | } | 49 | } |
| 46 | 50 | ||
| 47 | /** | 51 | /** |
| @@ -60,8 +64,16 @@ class InquiryInfoController extends BaseController | @@ -60,8 +64,16 @@ class InquiryInfoController extends BaseController | ||
| 60 | 'forward_url'=>'required',//转发网址 | 64 | 'forward_url'=>'required',//转发网址 |
| 61 | 'message'=>'required',//发送内容 | 65 | 'message'=>'required',//发送内容 |
| 62 | 'delay'=>'required',//延迟发送时间 | 66 | 'delay'=>'required',//延迟发送时间 |
| 67 | + 'type'=>'required',//询盘1类型 | ||
| 63 | ],[ | 68 | ],[ |
| 64 | - 'id.required' => 'ID不能为空' | 69 | + 'name.required' => '名称不能为空', |
| 70 | + 'email.required' => '邮箱不能为空', | ||
| 71 | + 'phone.required' => '电话号码不能为空', | ||
| 72 | + 'ip.required' => 'ip不能为空', | ||
| 73 | + 'forward_url.required' => '转发网址不能为空', | ||
| 74 | + 'message.required' => '发送内容不能为空', | ||
| 75 | + 'delay.required' => '延迟发送时间不能为空', | ||
| 76 | + 'type.required' => '类型不能为空', | ||
| 65 | ]); | 77 | ]); |
| 66 | } | 78 | } |
| 67 | } | 79 | } |
| @@ -31,6 +31,10 @@ class InquiryInfoLogic extends BaseLogic | @@ -31,6 +31,10 @@ class InquiryInfoLogic extends BaseLogic | ||
| 31 | public function getInquiryLists($map,$page,$row,$order = 'id'){ | 31 | public function getInquiryLists($map,$page,$row,$order = 'id'){ |
| 32 | $query = $this->model->leftJoin('gl_inquiry_user', 'gl_inquiry_user.xp_id', '=', 'gl_inquiry_info.id') | 32 | $query = $this->model->leftJoin('gl_inquiry_user', 'gl_inquiry_user.xp_id', '=', 'gl_inquiry_info.id') |
| 33 | ->orderBy('gl_inquiry_info.'.$order,'desc'); | 33 | ->orderBy('gl_inquiry_info.'.$order,'desc'); |
| 34 | + //搜索条件处理 | ||
| 35 | + if(isset($map['domain'])){ | ||
| 36 | + $query = $query->where('gl_inquiry_info.domain','like','%'.$map['domain'].'%'); | ||
| 37 | + } | ||
| 34 | $query = $this->searchParam($query,$map); | 38 | $query = $this->searchParam($query,$map); |
| 35 | $lists = $query->paginate($row, $this->selectParam(), 'page', $page); | 39 | $lists = $query->paginate($row, $this->selectParam(), 'page', $page); |
| 36 | return $this->success($lists); | 40 | return $this->success($lists); |
| @@ -60,16 +64,13 @@ class InquiryInfoLogic extends BaseLogic | @@ -60,16 +64,13 @@ class InquiryInfoLogic extends BaseLogic | ||
| 60 | } | 64 | } |
| 61 | 65 | ||
| 62 | /** | 66 | /** |
| 63 | - * @name :(搜索参数处理)searchParam | 67 | + * @remark :自定义添加特殊询盘信息 |
| 68 | + * @name :inquirySave | ||
| 64 | * @author :lyh | 69 | * @author :lyh |
| 65 | * @method :post | 70 | * @method :post |
| 66 | - * @time :2023/6/14 14:58 | 71 | + * @time :2023/7/12 9:22 |
| 67 | */ | 72 | */ |
| 68 | - public function searchParam(&$query,$map){ | ||
| 69 | - //搜索条件处理 | ||
| 70 | - if(isset($map['domain'])){ | ||
| 71 | - $query = $query->where('gl_inquiry_info.domain','like','%'.$map['domain'].'%'); | ||
| 72 | - } | ||
| 73 | - return $query; | 73 | + public function inquirySave(){ |
| 74 | + | ||
| 74 | } | 75 | } |
| 75 | } | 76 | } |
| @@ -255,6 +255,10 @@ Route::group([], function () { | @@ -255,6 +255,10 @@ Route::group([], function () { | ||
| 255 | Route::any('/del', [Aside\Template\ATemplateTypeController::class, 'del'])->name('admin.ATemplateType_del'); | 255 | Route::any('/del', [Aside\Template\ATemplateTypeController::class, 'del'])->name('admin.ATemplateType_del'); |
| 256 | }); | 256 | }); |
| 257 | }); | 257 | }); |
| 258 | + | ||
| 259 | + Route::prefix('inquiry')->group(function () { | ||
| 260 | + Route::any('/', [Aside\Projects\InquiryInfoController::class, 'lists'])->name('admin.inquiry_lists'); | ||
| 261 | + }); | ||
| 258 | }); | 262 | }); |
| 259 | 263 | ||
| 260 | 264 |
-
请 注册 或 登录 后发表评论