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
790e7e98
Commit
790e7e98
authored
Jul 08, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
选择客方
parent
423b506b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
OrderLog.php
application/api_broker/controller/OrderLog.php
+1
-1
OrderLogService.php
application/api_broker/service/OrderLogService.php
+10
-4
Users.php
application/model/Users.php
+11
-0
No files found.
application/api_broker/controller/OrderLog.php
View file @
790e7e98
...
...
@@ -362,7 +362,7 @@ class OrderLog extends Basic
}
try
{
$list
=
$this
->
service_
->
searchBargainAgents
(
$params
[
"type"
],
$params
[
"order_id"
]);
$list
=
$this
->
service_
->
searchBargainAgents
(
$params
[
"type"
],
$params
[
"order_id"
]
,
$this
->
siteId
);
if
(
count
(
$list
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$list
);
}
else
{
...
...
application/api_broker/service/OrderLogService.php
View file @
790e7e98
...
...
@@ -1562,9 +1562,13 @@ class OrderLogService
* 成交报告客户搜索
* @param $type
* @param $order_id
* @return false|null|\PDOStatement|string|\think\Collection
* @param $site_id
* @return false|\PDOStatement|string|\think\Collection|null
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
searchBargainAgents
(
$type
,
$order_id
)
public
function
searchBargainAgents
(
$type
,
$order_id
,
$site_id
)
{
$orderModel
=
new
OrderModel
();
$field
=
"a.id,a.order_no,a.house_id,a.house_title,b.id as report_id,b.user_id,c.user_nick,c.user_phone,
...
...
@@ -1586,10 +1590,12 @@ class OrderLogService
$list
=
$houseAgents
->
getAgentsByHouseId
(
$field
,
$params
);
break
;
case
2
:
$fields
=
"c.id,c.phone,c.name"
;
$userModel
=
new
Users
();
$params
[
"a.id"
]
=
$result
[
0
][
"user_id"
];
$params
[
"b.status"
]
=
0
;
$list
=
$userModel
->
getAgentByUserId
(
$field
,
$params
);
$params
[
"c.status"
]
=
0
;
$params
[
"b.site_id"
]
=
$site_id
;
$list
=
$userModel
->
getAgentBySiteId
(
$fields
,
$params
);
break
;
case
3
:
//反签 == 报备人
$reportModel
=
new
OReportModel
();
...
...
application/model/Users.php
View file @
790e7e98
...
...
@@ -1085,5 +1085,16 @@ class Users extends Model
return
$result
;
}
public
function
getAgentBySiteId
(
$field
,
$params
){
return
Db
::
name
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"u_user_agent b"
,
"a.id = b.user_id"
,
"left"
)
->
join
(
"a_agents c"
,
"a.agent_id=b.id"
,
"left"
)
->
where
(
$params
)
->
limit
(
1
)
->
select
();
}
}
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