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
a23bffd5
Commit
a23bffd5
authored
Oct 24, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
cabe4c12
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
4 deletions
+24
-4
Member.php
application/index/controller/Member.php
+3
-3
UPhoneFollowPp.php
application/model/UPhoneFollowPp.php
+16
-0
Users.php
application/model/Users.php
+5
-1
No files found.
application/index/controller/Member.php
View file @
a23bffd5
...
...
@@ -393,19 +393,19 @@ class Member extends Basic{
public
function
pcAddFollow
(){
$status
=
200
;
$msg
=
'成功!'
;
$table
=
new
UPhoneFollowPp
;
$params
=
$this
->
request
->
param
();
if
(
empty
(
$params
[
'content'
])
||
empty
(
$params
[
'user_id'
]))
{
return
$this
->
response
(
101
,
$msg
=
'缺少参数'
,
$params
);
}
$params
[
'id'
]
=
''
;
//
$params['id'] = '';
$params
[
'labels_id'
]
=
0
;
$params
[
'agent_id'
]
=
Session
::
get
(
"user_info.id"
);
$params
[
'type'
]
=
1
;
$params
[
'user_status'
]
=
$params
[
'user_status'
];
$table
->
allowField
(
true
)
->
save
(
$params
);
$model
=
new
UPhoneFollowPp
(
$this
->
siteId
);
$result
=
$model
->
savePhoneFollow
(
$params
);
$user
=
new
Users
();
$user
->
update_user_status
([
'id'
=>
$params
[
'user_id'
],
'user_status'
=>
$params
[
'user_status'
]]);
...
...
application/model/UPhoneFollowPp.php
View file @
a23bffd5
...
...
@@ -334,4 +334,20 @@ class UPhoneFollowPp extends BaseModel
return
$return
;
}
/**
* 查询数据
* 朱伟 2018-10-24
*/
public
function
getPhoneFollowData
(
$field
,
$params
,
$order
)
{
$result
=
$this
->
UPhoneFollowPp
->
field
(
$field
)
->
order
(
$order
)
->
where
(
$params
)
->
limit
(
1
)
->
select
();
//dump($this->getLastSql());
return
$result
;
}
}
application/model/Users.php
View file @
a23bffd5
...
...
@@ -176,7 +176,11 @@ class Users extends Model
$user_data
=
$this
->
field
(
'id,user_nick,user_phone'
)
->
where
(
'id'
,
$data
[
$k
][
'referrer_id'
])
->
find
();
$data
[
$k
][
'name'
]
=
$user_data
[
'user_nick'
];
$data
[
$k
][
'phone'
]
=
$user_data
[
'user_phone'
];
$data
[
$k
][
'follow_time'
]
=
$user_follow
->
where
(
'user_id'
,
$data
[
$k
][
'id'
])
->
order
(
'id desc'
)
->
value
(
'create_time'
);
$params_
[
'user_id'
]
=
$data
[
$k
][
'id'
];
$order
=
'id desc'
;
$res
=
$user_follow
->
getPhoneFollowData
(
'create_time'
,
$params_
,
$order
);
$data
[
$k
][
'follow_time'
]
=
$res
[
0
][
'create_time'
];
}
return
$data
;
}
...
...
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