Gas.php
2.5 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
68
<?php
namespace app\serviceapi\validate;
use app\common\validate\BaseValidate;
/**
* 功能描述 通用验证规则
* Class Gas
* @package app\commapi\validate
* Date: 2020/7/13
* Time: 12:13
* @author gxd
*/
class Gas extends BaseValidate
{
protected $rule = [
"utype" => "require",
"org_code" => "require",
"uid" => "require",
'amount' => 'require|number',
'goods_name' => 'require',
'itemDesc' => 'require',
'user_name' => 'require',
'certificateType' => 'require',
'certificateNo' => 'require',
'address' => 'require',
'email' => 'require',
'mobileTelephone' => 'require',
'insuranceBeginDate' => 'require',
'insuranceEndDate' => 'require',
'productPackageType' => 'require',
'gasType' => 'require',
'contractType' => 'require',
"callback_url|回调通知地址" => "require",
"applyPolicyNo"=>"require",
"cpcFinanceNoticeNo"=>"require",
"cpcNoticeNo"=>"require",
];
protected $message = [
"utype.require" => "获取推广码的用户类型必须",
"org_code.require" => "组织机构编码必须",
"uid.require" => "用户id必须",
'amount.require' => '产品价格不能为空',
'amount.number' => '产品价格格式错误',
'goods_name.require' => '商品名称不能为空',
'itemDesc.require' => '商品描述不能为空',
'user_name.require' => '投保人信息不能为空',
'certificateType.require' => '证件类型不能为空',
'certificateNo.require' => '证件号不能为空',
'address.require' => '地址不能为空',
'email.require' => '邮箱不能为空',
'mobileTelephone.require' => '联系电话不能为空',
'insuranceBeginDate.require' => '保险起期不能为空',
'insuranceEndDate.require' => '保险止期不能为空',
'productPackageType.require' => '套餐方案不能为空',
'gasType.require' => '燃气类型不能为空',
'contractType.require' => '被保人类型不能为空',
];
protected $scene = [
"get_promo_code"=>["utype","org_code","uid"],
"add_gas_order"=>["amount", "goods_name", "itemDesc", "user_name", "certificateType", "certificateNo","address", "email", "mobileTelephone", "insuranceBeginDate", "insuranceEndDate", "productPackageType", "gasType", "contractType"],
"paycallback" => ["cpcNoticeNo","cpcFinanceNoticeNo","applyPolicyNo"],
];
}