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
c77eb63b
Commit
c77eb63b
authored
Aug 20, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保存并设置用户有效期,保护期
parent
3c8e7989
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
1 deletion
+47
-1
HomePageLog.php
application/api_broker/controller/HomePageLog.php
+7
-0
UserExpiredTimeService.php
application/api_broker/service/UserExpiredTimeService.php
+39
-0
Remark.php
application/index/controller/Remark.php
+1
-1
No files found.
application/api_broker/controller/HomePageLog.php
View file @
c77eb63b
...
@@ -101,6 +101,13 @@ class HomePageLog extends Basic
...
@@ -101,6 +101,13 @@ class HomePageLog extends Basic
$result
[
$key
][
'img'
]
=
$res_a
[
0
][
'img'
];
$result
[
$key
][
'img'
]
=
$res_a
[
0
][
'img'
];
$result
[
$key
][
'store_name'
]
=
$res_a
[
0
][
'store_name'
];
$result
[
$key
][
'store_name'
]
=
$res_a
[
0
][
'store_name'
];
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
$is_outstrip_twenty_four_hours
=
0
;
if
((
time
()
-
strtotime
(
$value
[
'create_time'
]))
>
(
60
*
60
*
24
)){
$is_outstrip_twenty_four_hours
=
1
;
}
$result
[
$key
][
'is_outstrip_twenty_four_hours'
]
=
$is_outstrip_twenty_four_hours
;
}
}
$count
=
$this
->
uPhoneFollowUpModel
->
getSearchCount
(
$where_
);
$count
=
$this
->
uPhoneFollowUpModel
->
getSearchCount
(
$where_
);
...
...
application/api_broker/service/UserExpiredTimeService.php
0 → 100644
View file @
c77eb63b
<?php
namespace
app\api_broker\service
;
use
app\extra\RedisExt
;
/**
* Created by PhpStorm.
* User: zhu wei
* Date: 2018-08-20
* Time: 14:42:53
*/
class
UserExpiredTimeService
{
/**
* 保存并设置用户有效期,保护期
* @param $user_id
* @return bool
*/
public
function
saveExpiredTimeByUser
(
$user_id
)
{
if
(
$user_id
){
try
{
$redis_
=
RedisExt
::
getRedis
();
if
(
$redis_
)
{
$res
=
$redis_
->
set
(
"expired_time_user_"
.
$user_id
,
1
,
86400
);
}
else
{
return
false
;
}
}
catch
(
Exception
$exception
)
{
return
false
;
}
}
else
{
return
false
;
}
}
}
\ No newline at end of file
application/index/controller/Remark.php
View file @
c77eb63b
...
@@ -133,7 +133,7 @@ class Remark extends Basic
...
@@ -133,7 +133,7 @@ class Remark extends Basic
if
((
time
()
-
strtotime
(
$v
[
'create_time'
]))
>
(
60
*
60
*
24
)){
if
((
time
()
-
strtotime
(
$v
[
'create_time'
]))
>
(
60
*
60
*
24
)){
$is_outstrip_twenty_four_hours
=
1
;
$is_outstrip_twenty_four_hours
=
1
;
}
}
$data
[
'data'
][
'list'
][
$k
][
'is_outstrip_twenty_four_hours'
]
=
$is_outstrip_twenty_four_hours
;
$data
[
'data'
][
'list'
][
$k
][
'is_outstrip_twenty_four_hours'
]
=
$is_outstrip_twenty_four_hours
;
$data
[
'data'
][
'list'
][
$k
][
'user_phone'
]
=
substr_replace
(
$data
[
'data'
][
'list'
][
$k
][
'user_phone'
],
'****'
,
3
,
4
);
$data
[
'data'
][
'list'
][
$k
][
'user_phone'
]
=
substr_replace
(
$data
[
'data'
][
'list'
][
$k
][
'user_phone'
],
'****'
,
3
,
4
);
}
}
...
...
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