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
24848b15
Commit
24848b15
authored
Jan 28, 2019
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询当前调整的成交报告
parent
70597021
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
0 deletions
+70
-0
OrderLog.php
application/api_broker/controller/OrderLog.php
+28
-0
OrderLogService.php
application/api_broker/service/OrderLogService.php
+36
-0
OBargainModel.php
application/model/OBargainModel.php
+3
-0
route.php
application/route.php
+3
-0
No files found.
application/api_broker/controller/OrderLog.php
View file @
24848b15
...
...
@@ -642,6 +642,34 @@ class OrderLog extends Basic
}
/**
* 搜索我的成交报告
* @return \think\Response
*/
public
function
searchBargainListByOrderId
()
{
$params
=
$this
->
params
;
/* $params = array(
"order_id" => 11231,
);*/
if
(
!
isset
(
$params
[
"order_id"
])
)
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
try
{
$result
=
$this
->
service_
->
getBargainListByOrderId
(
$params
);
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
}
}
catch
(
Exception
$e
)
{
return
$this
->
response
(
"101"
,
"request error,msg:"
.
$e
);
}
}
/**
* 搜索经纪人
* @return \think\Response
...
...
application/api_broker/service/OrderLogService.php
View file @
24848b15
...
...
@@ -1374,6 +1374,42 @@ class OrderLogService
}
/**
* 根据订单id搜索成交报告
* @param $params
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getBargainListByOrderId
(
$order_id
)
{
$params
[
"order_id"
]
=
$order_id
;
$bargainModel
=
new
OBargainModel
();
$filed
=
"a.id,a.father_id,a.house_number,a.commission,a.agent_id,a.create_time,b.user_phone,b.user_name,b.user_id,c.id as order_id,
d.id as house_id,d.internal_title,d.internal_address"
;
$result
=
$bargainModel
->
selectBargainList
(
$filed
,
$params
,
1
,
15
);
$list
=
[];
foreach
(
$result
as
$k
=>
$v
)
{
$father_id
=
$v
[
"father_id"
];
if
(
$father_id
>
0
&&
in_array
(
$father_id
,
$list
))
{
unset
(
$result
[
$k
]);
}
else
{
$result
[
$k
][
"create_time"
]
=
date
(
"Y-m-d"
,
strtotime
(
$v
[
"create_time"
]));
$result
[
$k
][
"id"
]
=
$v
[
"father_id"
]
==
0
?
$v
[
"id"
]
:
$v
[
"father_id"
];
array_push
(
$list
,
$father_id
);
}
}
$sortResult
=
[];
foreach
(
$result
as
$k
=>
$v
)
{
$sortResult
[]
=
$v
;
}
return
$sortResult
;
}
private
function
recursion
(
$params
,
$cent_commissions
,
$i
)
{
...
...
application/model/OBargainModel.php
View file @
24848b15
...
...
@@ -249,6 +249,9 @@ class OBargainModel extends Model
if
(
isset
(
$params
[
"account_statement"
]))
{
$where_
[
"a.account_statement"
]
=
$params
[
"account_statement"
];
}
if
(
isset
(
$params
[
"order_id"
]))
{
$where_
[
"a.order_id"
]
=
$params
[
"order_id"
];
}
if
(
isset
(
$params
[
"father_id"
]))
{
$where_
[
"a.father_id"
]
=
$params
[
"father_id"
];
...
...
application/route.php
View file @
24848b15
...
...
@@ -648,6 +648,9 @@ Route::group('broker', [
'searchAgents'
=>
[
'api_broker/OrderLog/searchAgents'
,
[
'method'
=>
'get'
]],
'searchBargainList'
=>
[
'api_broker/OrderLog/searchBargainList'
,
[
'method'
=>
'get'
]],
'searchBargainListByOrderId'
=>
[
'api_broker/OrderLog/searchBargainListByOrderId'
,
[
'method'
=>
'get'
]],
'getListByHouseId'
=>
[
'api_broker/OrderLog/getListByHouseId'
,
[
'method'
=>
'get'
]],
'searchBargainAgents'
=>
[
'api_broker/OrderLog/searchBargainAgents'
,
[
'method'
=>
'get'
]],
...
...
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