Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
a6e4648f
Commit
a6e4648f
authored
Aug 28, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
验证器修改
parent
facc7c39
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
78 deletions
+51
-78
User.php
application/api_broker/controller/User.php
+14
-16
UserGetLastOrNextUserIdPhoneFollowPuValidate.php
...validate/UserGetLastOrNextUserIdPhoneFollowPuValidate.php
+0
-31
UserGetLastOrNextUserIdValidate.php
...n/api_broker/validate/UserGetLastOrNextUserIdValidate.php
+0
-31
UserValidate.php
application/api_broker/validate/UserValidate.php
+37
-0
No files found.
application/api_broker/controller/User.php
View file @
a6e4648f
...
...
@@ -184,17 +184,17 @@ class User extends Basic
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/*$params = array(
"user_id" => 59089,
"agent_id" => 9,
"type" => "next",
);*/
$checkResult
=
$this
->
validate
(
$params
,
"User
GetLastOrNextUserIdValidate.verifyStatus
"
);
$checkResult
=
$this
->
validate
(
$params
,
"User
Validate.getLastOrNextUserID
"
);
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"300"
,
$checkResult
);
}
/*$params = array(
"user_id" => 59089,
"agent_id" => 9,
"type" =>"next",
);*/
$type
=
-
1
;
//APP状态
...
...
@@ -501,18 +501,16 @@ class User extends Basic
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
$checkResult
=
$this
->
validate
(
$params
,
"UserGetLastOrNextUserIdPhoneFollowPuValidate.verifyStatus"
);
/*$params = array(
"id" => 1956,
"agent_id" => 9,
"type" => "next",
);*/
$checkResult
=
$this
->
validate
(
$params
,
"UserValidate.getLastOrNextUserIDPhoneFollowPu"
);
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"300"
,
$checkResult
);
}
// $params = array(
// "id" => 1956,
// "agent_id" => 9,
// "type" =>"next",
// );
$last_month
=
date
(
"Y-m-d"
,
strtotime
(
"-1 month"
));
if
(
!
empty
(
$this
->
params
[
'start_date'
])
&&
empty
(
$this
->
params
[
'end_date'
]))
{
if
(
strtotime
(
$last_month
)
>
strtotime
(
$this
->
params
[
'start_date'
]))
{
...
...
@@ -642,9 +640,9 @@ class User extends Basic
return
$this
->
response
(
"201"
,
"24小时保护期内"
,
[
'id'
=>
$model_res
[
0
][
'id'
]
]);
}
}
//
dump($model_res);exit();
//dump($model_res);exit();
$where
=
[];
//
$where['city'] = trim($this->city);
//$where['city'] = trim($this->city);
if
(
!
empty
(
$this
->
params
[
'end_date'
])
&&
!
empty
(
$this
->
params
[
'start_date'
]))
{
if
(
strtotime
(
$last_month
)
>
strtotime
(
$this
->
params
[
'start_date'
]))
{
$start_date
=
$last_month
;
...
...
application/api_broker/validate/UserGetLastOrNextUserIdPhoneFollowPuValidate.php
deleted
100644 → 0
View file @
facc7c39
<?php
namespace
app\api_broker\validate
;
use
think\Validate
;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018/8/7
* Time: 13:54:12
*/
class
UserGetLastOrNextUserIdPhoneFollowPuValidate
extends
Validate
{
protected
$rule
=
[
'type'
=>
'require'
,
'agent_id'
=>
'require|number|gt:0'
,
'id'
=>
'require|number|gt:0'
];
protected
$message
=
[
'type.require'
=>
'网络异常!错误代码:uv1'
,
//type为必填字段
'agent_id.require'
=>
'agent_id为必填字段'
,
//agent_id为必填字段
'agent_id.number'
=>
'网络异常!错误代码:uv4'
,
//agent_id只能为数字
'agent_id.gt'
=>
'网络异常!错误代码:uv5'
,
//agent_id必须大于0
'id.require'
=>
'id为必填字段'
,
//user_id为必填字段
'id.number'
=>
'网络异常!错误代码:uv7'
,
//user_id只能为数字
'id.gt'
=>
'网络异常!错误代码:uv8'
,
//user_id必须大于0
];
protected
$scene
=
[
'add_phone_follow_up_verify'
=>
[
'id'
,
'agent_id'
,
'type'
],
];
}
application/api_broker/validate/UserGetLastOrNextUserIdValidate.php
deleted
100644 → 0
View file @
facc7c39
<?php
namespace
app\api_broker\validate
;
use
think\Validate
;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018/8/7
* Time: 13:54:12
*/
class
UserGetLastOrNextUserIdValidate
extends
Validate
{
protected
$rule
=
[
'type'
=>
'require'
,
'agent_id'
=>
'require|number|gt:0'
,
'user_id'
=>
'require|number|gt:0'
];
protected
$message
=
[
'type.require'
=>
'网络异常!错误代码:uv1'
,
//type为必填字段
'agent_id.require'
=>
'agent_id为必填字段'
,
//agent_id为必填字段
'agent_id.number'
=>
'网络异常!错误代码:uv4'
,
//agent_id只能为数字
'agent_id.gt'
=>
'网络异常!错误代码:uv5'
,
//agent_id必须大于0
'user_id.require'
=>
'user_id为必填字段'
,
//user_id为必填字段
'user_id.number'
=>
'网络异常!错误代码:uv7'
,
//user_id只能为数字
'user_id.gt'
=>
'网络异常!错误代码:uv8'
,
//user_id必须大于0
];
protected
$scene
=
[
'add_phone_follow_up_verify'
=>
[
'user_id'
,
'agent_id'
,
'type'
],
];
}
application/api_broker/validate/UserValidate.php
0 → 100644
View file @
a6e4648f
<?php
namespace
app\api_broker\validate
;
use
think\Validate
;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018/8/7
* Time: 13:54:12
*/
class
UserValidate
extends
Validate
{
protected
$rule
=
[
'type'
=>
'require'
,
'agent_id'
=>
'require|number|gt:0'
,
'user_id'
=>
'require|number|gt:0'
,
'id'
=>
'require|number|gt:0'
];
protected
$message
=
[
'type.require'
=>
'type为必填字段'
,
'agent_id.require'
=>
'agent_id为必填字段'
,
'agent_id.number'
=>
'agent_id只能为数字'
,
'agent_id.gt'
=>
'agent_id必须大于0'
,
'user_id.require'
=>
'user_id为必填字段'
,
'user_id.number'
=>
'user_id只能为数字'
,
'user_id.gt'
=>
'user_id必须大于0'
,
'id.require'
=>
'id为必填字段'
,
'id.number'
=>
'id只能为数字'
,
'id.gt'
=>
'id必须大于0'
,
];
protected
$scene
=
[
'getLastOrNextUserID'
=>
[
'user_id'
,
'agent_id'
,
'type'
],
'getLastOrNextUserIDPhoneFollowPu'
=>
[
'id'
,
'agent_id'
,
'type'
],
];
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment