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
3b5f7a17
Commit
3b5f7a17
authored
Mar 05, 2018
by
zw
Committed by
hujun
Mar 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单详情
parent
1adfdac8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
79 additions
and
5 deletions
+79
-5
OrderLog.php
application/api_broker/controller/OrderLog.php
+28
-0
Report.php
application/api_broker/controller/Report.php
+2
-0
OrderLogService.php
application/api_broker/service/OrderLogService.php
+16
-0
OrderModel.php
application/model/OrderModel.php
+28
-5
route.php
application/route.php
+5
-0
No files found.
application/api_broker/controller/OrderLog.php
View file @
3b5f7a17
...
...
@@ -7,6 +7,7 @@ use app\api_broker\service\OrderLogService;
use
app\model\OBargainModel
;
use
app\model\OMarchInModel
;
use
app\model\ORefundModel
;
use
think\Exception
;
/**
* Created by PhpStorm.
...
...
@@ -181,6 +182,33 @@ class OrderLog extends Basic
}
/**
* 详情页
* @return \think\Response
*/
public
function
orderDetail
(){
$params
=
$this
->
params
;
$params
=
array
(
"order_id"
=>
1
,
);
if
(
!
isset
(
$params
[
"order_id"
])){
return
$this
->
response
(
"101"
,
"order_id不能为空"
);
}
$where_
[
"order_id"
]
=
$params
[
"order_id"
];
try
{
$result
=
$this
->
service_
->
selectOrderDetail
(
$where_
);
if
(
count
(
$result
)
>
0
){
return
$this
->
response
(
"200"
,
"request success"
,
$result
[
0
]);
}
else
{
return
$this
->
response
(
"200"
,
"request list is null"
,[]);
}
}
catch
(
Exception
$e
){
return
$this
->
response
(
"101"
,
"request error,msg:"
.
$e
);
}
}
/**
* 报备时间轴
* @return \think\Response
...
...
application/api_broker/controller/Report.php
View file @
3b5f7a17
...
...
@@ -186,4 +186,5 @@ class Report extends Basic
}
}
\ No newline at end of file
application/api_broker/service/OrderLogService.php
View file @
3b5f7a17
...
...
@@ -129,6 +129,22 @@ class OrderLogService
return
$arr
;
}
/**
* 订单详情主体信息
* @param $where_
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
selectOrderDetail
(
$where_
){
$orderModel
=
new
OrderModel
();
$field
=
"a.id,a.order_no,a.house_id,a.house_title,b.user_id,b.user_name,b.user_phone"
;
$result
=
$orderModel
->
selectOrderDetail
(
$field
,
$where_
);
foreach
(
$result
as
$k
=>
$v
){
$result
[
$k
][
"user_phone"
]
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$v
[
"user_phone"
]);
}
return
$result
;
}
/**
* 查询流程
* @param $order_no
...
...
application/model/OrderModel.php
View file @
3b5f7a17
...
...
@@ -58,13 +58,36 @@ class OrderModel extends Model
* @param $ids
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
selectSign
(
$ids
){
public
function
selectSign
(
$ids
)
{
return
$this
->
db_
->
field
(
'id as order_id,1 as type'
)
->
where
(
"id"
,
"in"
,
0
)
->
union
(
'SELECT order_id,2 as type FROM o_march_in where order_id in ('
.
$ids
.
') group by order_id'
)
->
union
(
'SELECT order_id,3 as type FROM o_paylog where order_id in ('
.
$ids
.
') group by order_id'
)
->
union
(
'SELECT order_id,4 as type FROM o_bargain where order_id in ('
.
$ids
.
') group by order_id'
)
->
where
(
"id"
,
"in"
,
0
)
->
union
(
'SELECT order_id,2 as type FROM o_march_in where order_id in ('
.
$ids
.
') group by order_id'
)
->
union
(
'SELECT order_id,3 as type FROM o_paylog where order_id in ('
.
$ids
.
') group by order_id'
)
->
union
(
'SELECT order_id,4 as type FROM o_bargain where order_id in ('
.
$ids
.
') group by order_id'
)
->
select
();
}
/**
* 订单详情主要信息
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
selectOrderDetail
(
$field
,
$params
)
{
$where_
=
[];
if
(
isset
(
$params
[
"order_id"
]))
{
$where_
[
"a.id"
]
=
$params
[
"order_id"
];
}
$where_
[
"a.is_del"
]
=
0
;
$where_
[
"b.status"
]
=
0
;
return
$this
->
db_
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_report b"
,
"a.f_id = b.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
}
...
...
application/route.php
View file @
3b5f7a17
...
...
@@ -283,7 +283,12 @@ Route::group('broker', [
//商铺
'getShopList'
=>
[
'api_broker/Shop/getShopList'
,
[
'method'
=>
'get|post'
]
],
'getShopDetail'
=>
[
'api_broker/Shop/getShopDetail'
,
[
'method'
=>
'get'
]
],
'reportList'
=>
[
'api_broker/Report/reportList'
,
[
'method'
=>
'get'
]
],
'orderDetail'
=>
[
'api_broker/OrderLog/orderDetail'
,
[
'method'
=>
'get|post'
]
],
'token'
=>
[
'api_broker/broker/token'
,
[
'method'
=>
'get'
]
],
'getAgentsByPhone'
=>
[
'api_broker/broker/getAgentsByPhone'
,
[
'method'
=>
'get'
]
],
'agentsPhone'
=>
[
'api_broker/CellPhone/agentsPhone'
,
[
'method'
=>
'get|post'
]
],
//获取经纪人拨打界面手机号
...
...
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