InquiryInfoController.php
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
namespace App\Http\Controllers\Aside\Projects;
use App\Enums\Common\Code;
use App\Http\Controllers\Aside\BaseController;
use App\Http\Logic\Aside\Projects\InquiryInfoLogic;
/**
* @remark :询盘中心
* @class :InquiryInfoController.php
* @author :lyh
* @time :2023/7/11 14:33
*/
class InquiryInfoController extends BaseController
{
/**
* @remark :获取询盘中心列表
* @name :lists
* @author :lyh
* @method :post
* @time :2023/7/11 15:23
*/
public function lists(InquiryInfoLogic $inquiryInfoLogic){
$lists = $inquiryInfoLogic->getInquiryLists($this->map,$this->page,$this->row,$this->order);
$this->response('success',Code::SUCCESS,$lists);
}
/**
* @remark :保存询盘信息
* @name :save
* @author :lyh
* @method :post
* @time :2023/7/11 15:33
*/
public function save(InquiryInfoLogic $inquiryInfoLogic){
if(isset($this->param['id']) && !empty($this->param['id'])){
$this->request->validate([
'id'=>'required'
],[
'id.required' => 'ID不能为空'
]);
}
}
/**
* @remark :参数验证
* @name :validationParam
* @author :lyh
* @method :post
* @time :2023/7/11 15:34
*/
public function validationParam(){
$this->request->validate([
'name'=>'required',//名称
'email'=>'required',//邮箱
'phone'=>'required',//电话号码
'ip'=>'required',//ip
'forward_url'=>'required',//转发网址
'message'=>'required',//发送内容
'delay'=>'required',//延迟发送时间
],[
'id.required' => 'ID不能为空'
]);
}
}