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
cc35a0f8
Commit
cc35a0f8
authored
Dec 14, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
带看列表显示商铺地址
parent
3a767e49
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
7 deletions
+35
-7
Report.php
application/api_broker/controller/Report.php
+2
-1
ReportService.php
application/api_broker/service/ReportService.php
+32
-6
GHouses.php
application/model/GHouses.php
+1
-0
No files found.
application/api_broker/controller/Report.php
View file @
cc35a0f8
...
...
@@ -125,7 +125,8 @@ class Report extends Basic
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$field
=
"a.id,a.user_id,a.user_phone,a.user_name,a.predict_see_time,a.create_time,b.id as order_id,b.order_no,b.house_id,b.house_title"
;
$field
=
"a.id,a.user_id,a.user_phone,a.user_name,a.predict_see_time,a.create_time,b.id as order_id,b.order_no,
b.house_id,b.house_title"
;
$params
[
"report_agent_id"
]
=
$params
[
"agent_id"
];
$result
=
[];
...
...
application/api_broker/service/ReportService.php
View file @
cc35a0f8
...
...
@@ -128,15 +128,20 @@ class ReportService
$result
=
$this
->
oReportModel
->
selectReportList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
$ids_str
=
""
;
$house_id_str
=
""
;
if
(
count
(
$result
)
>
0
)
{
foreach
(
$result
as
$k
=>
$v
)
{
//$result[$k]["user_phone"] = preg_replace('/(\d{3})\d{4}(\d{4})/', '$1****$2', $v["user_phone"]);
$ids_str
.=
$v
[
"order_id"
]
.
","
;
$ids_str
.=
$v
[
"order_id"
]
.
","
;
$house_id_str
.=
$v
[
"house_id"
]
.
","
;
}
$ids_str
=
rtrim
(
$ids_str
,
","
);
$ids_str
=
rtrim
(
$ids_str
,
","
);
$house_id_str
=
rtrim
(
$house_id_str
,
","
);
$sign_arr
=
$this
->
orderSign
(
$ids_str
);
$sign_arr
=
$this
->
orderSign
(
$ids_str
);
$house_arr
=
$this
->
houseInfo
(
$house_id_str
);
foreach
(
$result
as
$k
=>
$v
)
{
$result
[
$k
][
"sign"
]
=
""
;
...
...
@@ -145,6 +150,11 @@ class ReportService
$result
[
$k
][
"sign"
]
.=
$this
->
signTitle
(
$value
[
"type"
])
.
","
;
}
}
foreach
(
$house_arr
as
$item
)
{
if
(
$v
[
"house_id"
]
==
$item
[
"id"
])
{
$result
[
$k
][
"house_address"
]
.=
$item
[
"internal_title"
];
}
}
}
return
$result
;
...
...
@@ -166,16 +176,20 @@ class ReportService
{
$params
=
[];
$result
=
$this
->
oReportModel
->
selectReportList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
$ids_str
=
""
;
$ids_str
=
""
;
$house_id_str
=
""
;
if
(
count
(
$result
)
>
0
)
{
foreach
(
$result
as
$k
=>
$v
)
{
//$result[$k]["user_phone"] = preg_replace('/(\d{3})\d{4}(\d{4})/', '$1****$2', $v["user_phone"]);
$ids_str
.=
$v
[
"order_id"
]
.
","
;
$house_id_str
.=
$v
[
"house_id"
]
.
","
;
}
$ids_str
=
rtrim
(
$ids_str
,
","
);
$ids_str
=
rtrim
(
$ids_str
,
","
);
$house_id_str
=
rtrim
(
$house_id_str
,
","
);
$sign_arr
=
$this
->
orderSign
(
$ids_str
);
$house_arr
=
$this
->
houseInfo
(
$house_id_str
);
foreach
(
$result
as
$k
=>
$v
)
{
$result
[
$k
][
"sign"
]
=
""
;
...
...
@@ -183,6 +197,11 @@ class ReportService
if
(
$v
[
"order_id"
]
==
$value
[
"order_id"
])
{
$result
[
$k
][
"sign"
]
.=
$this
->
signTitle
(
$value
[
"type"
])
.
","
;
}
foreach
(
$house_arr
as
$item
)
{
if
(
$v
[
"house_id"
]
==
$item
[
"id"
])
{
$result
[
$k
][
"house_address"
]
.=
$item
[
"internal_title"
];
}
}
}
}
...
...
@@ -258,6 +277,13 @@ class ReportService
return
$this
->
orderModel
->
selectSign
(
$ids_str
);
}
public
function
houseInfo
(
$house_id_str
)
{
$houseModel
=
new
GHouses
();
$params
[
"id"
]
=
array
(
"in"
,(
$house_id_str
));
return
$houseModel
->
getHouseInfo
(
"id,internal_title"
,
$params
);
}
public
function
signTitle
(
$type
)
{
switch
(
$type
)
{
...
...
application/model/GHouses.php
View file @
cc35a0f8
...
...
@@ -1643,4 +1643,5 @@ class GHouses extends BaseModel
->
where
(
$where_
)
->
find
();
}
}
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