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
5d8a360b
Commit
5d8a360b
authored
Apr 09, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一次操作
parent
f8dca689
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
UserService.php
application/index/service/UserService.php
+8
-5
Users.php
application/model/Users.php
+4
-0
No files found.
application/index/service/UserService.php
View file @
5d8a360b
...
...
@@ -68,6 +68,9 @@ class UserService
return
$result
;
}
$type
=
'add'
;
$future_time
=
date
(
"Y-m-d H:i:s"
,
strtotime
(
"+1 day"
));
//24小时前的时间
$data
[
'protect_time'
]
=
$future_time
;
}
else
{
$user_data
=
$this
->
user
->
getUserById
(
'id,agent_id,referrer_id,referrer_source,user_name'
,
$id
);
...
...
@@ -103,13 +106,13 @@ class UserService
$redis_service
->
userCache
(
$id
);
}
$this
->
setUserSites
(
$id
,
$data
[
'site_id'
]);
//设置站点
//
$this->setUserSites($id, $data['site_id']);//设置站点
//操作完成之后判断下是什么动作
if
(
$type
==
'add'
){
//$type等于'add'说明是新增客户,需要设置保护期截止日期
$this
->
setUserProtectTime
(
$id
);
}
//
if($type == 'add'){
//
//$type等于'add'说明是新增客户,需要设置保护期截止日期
//
$this->setUserProtectTime($id);
//
}
...
...
application/model/Users.php
View file @
5d8a360b
...
...
@@ -319,6 +319,10 @@ class Users extends Model
if
(
isset
(
$data
[
'source_intro'
]))
{
$insert_data
[
'source_intro'
]
=
$data
[
'source_intro'
];
}
if
(
isset
(
$data
[
'site_id'
]))
{
$insert_data
[
'site_id'
]
=
$data
[
'site_id'
];
}
//邀请人
if
(
!
empty
(
$data
[
'referrer_id'
])
&&
!
empty
(
$data
[
'referrer_source'
])
&&
(
$data
[
'referrer_id'
]
!=
-
1
))
{
$insert_data
[
'referrer_id'
]
=
$data
[
'referrer_id'
];
...
...
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