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
def43306
Commit
def43306
authored
Sep 30, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询客户是否在保护期内
parent
6b1437e2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
11 deletions
+22
-11
ImageDepot.php
application/index/controller/ImageDepot.php
+4
-9
UserService.php
application/index/service/UserService.php
+17
-1
Users.php
application/model/Users.php
+1
-1
No files found.
application/index/controller/ImageDepot.php
View file @
def43306
...
...
@@ -4,6 +4,7 @@ namespace app\index\controller;
use
app\index\extend\Basic
;
use
app\index\service\ImageDepotService
;
use
app\index\service\UserService
;
use
app\model\GImageDepot
;
/**
...
...
@@ -170,16 +171,10 @@ class ImageDepot extends Basic
public
function
ceshi
(){
$a
=
1
;
dump
(
$a
);
dump
(
'============'
);
if
(
$a
==
2
){
}
dump
(
'============'
);
dump
(
$a
);
$user_service
=
new
UserService
();
$res
=
$user_service
->
isUserProtect
(
1
);
dump
(
$res
);
}
...
...
application/index/service/UserService.php
View file @
def43306
...
...
@@ -314,7 +314,23 @@ class UserService
$push
->
record
(
2
,
0
,
[
0
=>
$old_agent_id
],
$operation_id
,
$data
);
}
//todo 查询客户是否在保护期内
/**
* 查询客户是否在保护期内
* @param $user_id
* @return bool
*/
public
function
isUserProtect
(
$user_id
){
if
(
!
$user_id
){
return
false
;
}
$res
=
$this
->
user
->
selectUser
(
$user_id
,
"id,protect_time"
);
if
((
time
()
<
strtotime
(
$res
[
'protect_time'
])))
{
return
true
;
//保护期内
}
else
{
return
false
;
//过保护期
}
}
/**
* 设置或者更新客户保护期
...
...
application/model/Users.php
View file @
def43306
...
...
@@ -942,7 +942,7 @@ class Users extends Model
$result
=
Db
::
table
(
$this
->
table
)
->
where
(
'id'
,
$id
)
->
update
(
$params
);
//
dump($this->getLastSql()
);
//
echo $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