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
0269ee40
Commit
0269ee40
authored
Aug 23, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户详情
parent
f93a0df4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
5 deletions
+52
-5
Broker.php
application/api_broker/controller/Broker.php
+47
-1
Performance.php
application/api_broker/controller/Performance.php
+1
-1
Remark.php
application/index/controller/Remark.php
+0
-0
GOperatingRecords.php
application/model/GOperatingRecords.php
+4
-3
No files found.
application/api_broker/controller/Broker.php
View file @
0269ee40
...
...
@@ -427,7 +427,9 @@ class Broker extends Basic
$orderLog
=
new
OrderLogService
();
$records
=
new
GOperatingRecords
();
$records_result
=
$records
->
user_history
(
$user_id
);
$param_
[
'user_id'
]
=
$user_id
;
$records_result
=
$records
->
user_history
(
$param_
);
$data
[
'user_info'
]
=
$user_res
;
$data
[
'user_date'
]
=
$orderLog
->
selectListByUserId
(
$user_id
,
''
);
$data
[
'user_history'
]
=
$records_result
;
...
...
@@ -444,6 +446,50 @@ class Broker extends Basic
if
(
$res
&&
(
$res
[
0
][
'status'
]
==
1
))
{
//如果存在
$data
[
"is_collect"
]
=
1
;
}
$param_
[
'type'
]
=
5
;
$records_invite_result
=
$records
->
user_history
(
$param_
);
$data
[
'user_invite_history'
]
=
$records_invite_result
;
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
/*$ser = new UserExpiredTimeService();
$res = $ser->getExpiredTimeByUser($v["user_id"]);
$data['data']['list'][$k]['is_outstrip_twenty_four_hours'] = $res ? 0 : 1 ;*/
$is_outstrip_twenty_four_hours
=
0
;
if
((
time
()
-
strtotime
(
$user_res
[
'u_create_time'
]))
>
(
60
*
60
*
24
))
{
$is_outstrip_twenty_four_hours
=
1
;
}
$data
[
'is_outstrip_twenty_four_hours'
]
=
$is_outstrip_twenty_four_hours
;
//todo 查询客户邀请人 1 邀请人是客户还是经纪人 2 经纪人:邀请人姓名,手机号 客户:姓名 id
/*引荐人来源 10:会员 20:b端经纪人*/
if
(
$user_res
[
'referrer_source'
]
==
0
)
{
$user_invite_info
=
[];
}
elseif
(
$user_res
[
'referrer_source'
]
==
10
)
{
$userArr
=
$user
->
selectUser
(
$user_res
[
'referrer_id'
],
"id,user_phone"
);
if
(
!
$userArr
)
{
$user_invite_info
=
[];
}
else
{
$user_invite_info
[
'referrer_source'
]
=
$user_res
[
'referrer_source'
];
$user_invite_info
[
'user_phone'
]
=
$userArr
[
'user_phone'
];
$user_invite_info
[
'id'
]
=
$userArr
[
'id'
];
}
}
else
{
$model
=
new
AAgents
();
$result
=
$model
->
searchAgentsByKeyword
(
"id,name,phone"
,
[
"id"
=>
$user_res
[
'referrer_id'
]
]);
if
(
!
$result
)
{
$user_invite_info
=
[];
}
else
{
$user_invite_info
[
'referrer_source'
]
=
$user_res
[
'referrer_source'
];
$user_invite_info
[
'name'
]
=
$result
[
0
][
'name'
];
$user_invite_info
[
'phone'
]
=
$result
[
0
][
'phone'
];
}
}
$data
[
'user_invite_info'
]
=
$user_invite_info
;
return
$this
->
response
(
"200"
,
"success!"
,
$data
);
}
...
...
application/api_broker/controller/Performance.php
View file @
0269ee40
...
...
@@ -362,7 +362,7 @@ class Performance extends Basic
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/*
$params = array(
/*
$params = array(
"type" => 1, //1个人,2经纪人
"agent_id" => 80,
"start_time" => "2018-06-12",
...
...
application/index/controller/Remark.php
View file @
0269ee40
This diff is collapsed.
Click to expand it.
application/model/GOperatingRecords.php
View file @
0269ee40
...
...
@@ -55,17 +55,18 @@ class GOperatingRecords extends BaseModel
* @param $user_id
* @return array|false|\PDOStatement|string|\think\Collection
*/
public
function
user_history
(
$
user_id
)
public
function
user_history
(
$
param
)
{
if
(
empty
(
$
user_id
))
{
if
(
empty
(
$
param
[
'user_id'
]
))
{
return
[];
}
try
{
$data
=
$this
->
field
(
'name,remark,create_time'
)
->
where
(
'user_id'
,
$user_id
)
->
where
(
$param
)
->
order
(
'create_time'
,
'desc'
)
->
select
();
//echo $this->getLastSql();
}
catch
(
\Exception
$e
)
{
$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