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
6b1437e2
Commit
6b1437e2
authored
Sep 30, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置或者更新客户保护期
parent
224aa4f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
UserService.php
application/index/service/UserService.php
+22
-0
Users.php
application/model/Users.php
+12
-0
No files found.
application/index/service/UserService.php
View file @
6b1437e2
...
...
@@ -313,4 +313,25 @@ class UserService
$data
[
'user_id'
]
=
$user_id
;
$push
->
record
(
2
,
0
,
[
0
=>
$old_agent_id
],
$operation_id
,
$data
);
}
//todo 查询客户是否在保护期内
/**
* 设置或者更新客户保护期
* @return mixed
*/
public
function
setUserProtectTime
(
$user_id
){
if
(
!
$user_id
){
return
false
;
}
$future_time
=
date
(
"Y-m-d H:i:s"
,
strtotime
(
"+1 day"
));
//24小时前的时间
$params_
[
'protect_time'
]
=
$future_time
;
$res
=
$this
->
user
->
updateUsers
(
$user_id
,
$params_
);
//int(1)
if
(
$res
==
1
){
return
true
;
}
else
{
return
false
;
}
}
}
\ No newline at end of file
application/model/Users.php
View file @
6b1437e2
...
...
@@ -933,5 +933,17 @@ class Users extends Model
->
group
(
"b.id"
)
->
count
();
}
/**
* 更新数据
*/
public
function
updateUsers
(
$id
,
$params
)
{
$result
=
Db
::
table
(
$this
->
table
)
->
where
(
'id'
,
$id
)
->
update
(
$params
);
//dump($this->getLastSql());
return
$result
;
}
}
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