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
5c9006ad
Commit
5c9006ad
authored
Apr 13, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
判断是否有未结单的成交报告
parent
e26e8717
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
4 deletions
+37
-4
OrderLog.php
application/api_broker/controller/OrderLog.php
+34
-4
OBargainModel.php
application/model/OBargainModel.php
+2
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/OrderLog.php
View file @
5c9006ad
...
...
@@ -214,10 +214,10 @@ class OrderLog extends Basic
public
function
searchBargainAgents
()
{
$params
=
$this
->
params
;
/* $params = array(
"type" => 1,//1盘方,2客方,3反签,4独家,5合作方
"order_id" => 1,
);*/
/* $params = array(
"type" => 1,//1盘方,2客方,3反签,4独家,5合作方
"order_id" => 1,
);*/
if
(
!
isset
(
$params
[
"type"
])
||
!
isset
(
$params
[
"order_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
...
...
@@ -519,4 +519,33 @@ class OrderLog extends Basic
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
/**
* 获取未结单的成交报告id 最新的id
* @return \think\Response
*/
public
function
isBargainEnd
()
{
$params
=
$this
->
params
;
/* $params = array(
"order_id" => 1,//订单id
"submit_agent_id" => 1//提交人id
);*/
if
(
!
isset
(
$params
[
"order_id"
])
||
!
isset
(
$params
[
"submit_agent_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$bargainModel
=
new
OBargainModel
();
$where_
[
"father_id"
]
=
0
;
$where_
[
"order_id"
]
=
$params
[
"order_id"
];
$where_
[
"submit_agent_id"
]
=
$params
[
"submit_agent_id"
];
$where_
[
"status"
]
=
10
;
$field
=
"id"
;
$bargain
=
$bargainModel
->
getBargainDetail
(
$field
,
$where_
);
if
(
count
(
$bargain
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,[
"id"
=>
$bargain
[
0
][
"id"
]]);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
}
}
}
\ No newline at end of file
application/model/OBargainModel.php
View file @
5c9006ad
...
...
@@ -445,6 +445,7 @@ class OBargainModel extends Model
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
where
(
$params
)
->
order
(
"create_time desc"
)
->
select
();
}
}
\ No newline at end of file
application/route.php
View file @
5c9006ad
...
...
@@ -370,6 +370,7 @@ Route::group('broker', [
'searchBargainList'
=>
[
'api_broker/OrderLog/searchBargainList'
,
[
'method'
=>
'get'
]
],
'searchBargainAgents'
=>
[
'api_broker/OrderLog/searchBargainAgents'
,
[
'method'
=>
'get'
]
],
'isBargainEnd'
=>
[
'api_broker/OrderLog/isBargainEnd'
,
[
'method'
=>
'get'
]
],
'appAgentAuth'
=>
[
'api_broker/Report/appAgentAuth'
,
[
'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