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
5ec3dba7
Commit
5ec3dba7
authored
Jun 06, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
06ed6709
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
13 deletions
+43
-13
OfficeOrderLogService.php
application/api_broker/service/OfficeOrderLogService.php
+3
-3
OfficeOrderModel.php
application/model/OfficeOrderModel.php
+40
-10
No files found.
application/api_broker/service/OfficeOrderLogService.php
View file @
5ec3dba7
...
@@ -417,8 +417,8 @@ class OfficeOrderLogService
...
@@ -417,8 +417,8 @@ class OfficeOrderLogService
{
{
$orderModel
=
new
OfficeOrderModel
();
$orderModel
=
new
OfficeOrderModel
();
$field
=
"a.id,a.order_no,a.house_id,a.house_title,b.id as report_id,b.user_id,c.user_name as user_nick,c.user_phone,
$field
=
"a.id,a.order_no,a.house_id,a.house_title,b.id as report_id,b.user_id,c.user_name as user_nick,c.user_phone,
c.user_pic,c.sex,
d.internal_address as
house_address"
;
c.user_pic,c.sex,
CONCAT(d.address,f.room_number)
house_address"
;
$result
=
$orderModel
->
selectOrderDetail
(
$field
,
$where_
);
$result
=
$orderModel
->
selectOrderDetail
V2
(
$field
,
$where_
);
foreach
(
$result
as
$k
=>
$v
)
{
foreach
(
$result
as
$k
=>
$v
)
{
//$result[$k]["user_phone"] = preg_replace('/(\d{3})\d{4}(\d{4})/','$1****$2',$v["user_phone"]);
//$result[$k]["user_phone"] = preg_replace('/(\d{3})\d{4}(\d{4})/','$1****$2',$v["user_phone"]);
$result
[
$k
][
"user_pic"
]
=
HEADERIMGURL
.
$v
[
"user_pic"
];
$result
[
$k
][
"user_pic"
]
=
HEADERIMGURL
.
$v
[
"user_pic"
];
...
@@ -1223,7 +1223,7 @@ class OfficeOrderLogService
...
@@ -1223,7 +1223,7 @@ class OfficeOrderLogService
$condition
.=
"and a.house_title like '%"
.
trim
(
$params
[
'search_keyword'
])
.
"%' "
;
$condition
.=
"and a.house_title like '%"
.
trim
(
$params
[
'search_keyword'
])
.
"%' "
;
break
;
break
;
case
5
:
case
5
:
$condition
.=
"and c.
internal_address
like '%"
.
trim
(
$params
[
'search_keyword'
])
.
"%' "
;
$condition
.=
"and c.
title
like '%"
.
trim
(
$params
[
'search_keyword'
])
.
"%' "
;
break
;
break
;
case
6
://
客户编号
case
6
://
客户编号
$condition
.=
"and b.user_id = "
.
trim
(
$params
[
'search_keyword'
]);
$condition
.=
"and b.user_id = "
.
trim
(
$params
[
'search_keyword'
]);
...
...
application/model/OfficeOrderModel.php
View file @
5ec3dba7
...
@@ -84,11 +84,15 @@ class OfficeOrderModel extends Model
...
@@ -84,11 +84,15 @@ class OfficeOrderModel extends Model
->
select
();
->
select
();
}
}
/**
/**
* 订单详情主要信息
* 订单详情主要信息
* @param $field
* @param $field
* @param $params
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
*/
public
function
selectOrderDetail
(
$field
,
$params
)
public
function
selectOrderDetail
(
$field
,
$params
)
{
{
...
@@ -101,9 +105,35 @@ class OfficeOrderModel extends Model
...
@@ -101,9 +105,35 @@ class OfficeOrderModel extends Model
return
$this
->
db_
return
$this
->
db_
->
field
(
$field
)
->
field
(
$field
)
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"o_report b"
,
"a.f_id = b.id"
,
"left"
)
->
join
(
"office_o_report b"
,
"a.f_id = b.id"
,
"left"
)
->
join
(
"u_users c"
,
"b.user_id = c.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
}
/**
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
selectOrderDetailV2
(
$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
(
"office_o_report b"
,
"a.f_id = b.id"
,
"left"
)
->
join
(
"u_users c"
,
"b.user_id = c.id"
,
"left"
)
->
join
(
"u_users c"
,
"b.user_id = c.id"
,
"left"
)
->
join
(
"g_houses d"
,
"d.id = a.house_id"
,
"left"
)
->
join
(
"office_g_room d"
,
"d.id = a.house_id"
,
"left"
)
->
join
(
"office_g_building d"
,
"f.id = d.building_id"
,
"left"
)
->
where
(
$where_
)
->
where
(
$where_
)
->
select
();
->
select
();
}
}
...
@@ -127,9 +157,9 @@ class OfficeOrderModel extends Model
...
@@ -127,9 +157,9 @@ class OfficeOrderModel extends Model
SELECT
SELECT
$field
$field
FROM
FROM
`o_order` `a`
`o
ffice_o
_order` `a`
LEFT JOIN `o_report` `b` ON `a`.`f_id` = `b`.`id`
LEFT JOIN `o
ffice_o
_report` `b` ON `a`.`f_id` = `b`.`id`
LEFT JOIN `
g_houses
` `c` ON `a`.`house_id` = `c`.`id`
LEFT JOIN `
office_g_room
` `c` ON `a`.`house_id` = `c`.`id`
WHERE
WHERE
$params
$params
)
)
...
@@ -138,9 +168,9 @@ class OfficeOrderModel extends Model
...
@@ -138,9 +168,9 @@ class OfficeOrderModel extends Model
SELECT
SELECT
$field
$field
FROM
FROM
`o_order` `a`
`o
ffice_o
_order` `a`
LEFT JOIN `o_report` `b` ON `a`.`f_id` = `b`.`id`
LEFT JOIN `o
ffice_o
_report` `b` ON `a`.`f_id` = `b`.`id`
LEFT JOIN `
g_houses
` `c` ON `a`.`house_id` = `c`.`id`
LEFT JOIN `
office_g_room
` `c` ON `a`.`house_id` = `c`.`id`
WHERE
WHERE
$where_
$where_
)
)
...
@@ -168,8 +198,8 @@ class OfficeOrderModel extends Model
...
@@ -168,8 +198,8 @@ class OfficeOrderModel extends Model
return
$this
return
$this
->
field
(
$field
)
->
field
(
$field
)
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"o_report b"
,
"a.f_id = b.id"
,
"left"
)
->
join
(
"o
ffice_o
_report b"
,
"a.f_id = b.id"
,
"left"
)
->
join
(
"
g_houses
c"
,
"a.house_id = c.id"
,
"left"
)
->
join
(
"
office_g_room
c"
,
"a.house_id = c.id"
,
"left"
)
->
where
(
$params
)
->
where
(
$params
)
->
order
(
"a.id desc"
)
->
order
(
"a.id desc"
)
->
page
(
$pageNo
)
->
page
(
$pageNo
)
...
...
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