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
864bdde6
Commit
864bdde6
authored
Aug 28, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
63547634
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
2 deletions
+32
-2
Performance.php
application/api_broker/controller/Performance.php
+3
-1
PerformanceService.php
application/api_broker/service/PerformanceService.php
+3
-1
OReportModel.php
application/model/OReportModel.php
+26
-0
No files found.
application/api_broker/controller/Performance.php
View file @
864bdde6
...
...
@@ -545,7 +545,9 @@ class Performance extends Basic
if
(
$result
[
"code"
]
==
101
)
{
return
$this
->
response
(
"101"
,
$result
[
"date"
]);
}
else
{
return
$this
->
response
(
"200"
,
"success"
,
$result
[
"date"
]);
//return $this->response("200", "success", $result["date"]);
return
$this
->
response
(
"200"
,
"success"
,
[
"date"
=>
$result
[
"date"
]
,
"total"
=>
$result
[
"total"
]
]);
}
}
...
...
application/api_broker/service/PerformanceService.php
View file @
864bdde6
...
...
@@ -799,11 +799,13 @@ class PerformanceService
return
[
"code"
=>
101
,
"date"
=>
"传入的参数错误"
];
$field
=
"a.id,a.user_name,a.user_phone,a.predict_see_time,a.create_time,a.report_agent_name,c.internal_title as house_title,c.shop_type,e.store_name,b.id as order_id"
;
$reportList
=
$this
->
reportModel
->
getAddReportListPcInfo
(
$params
,
$field
,
$page_no
,
$page_size
);
$reportListTotal
=
$this
->
reportModel
->
getAddReportListPcInfoTotal
(
$params
,
$field
);
foreach
(
$reportList
as
$key
=>
$val
)
{
$reportList
[
$key
][
"user_name"
]
=
$val
[
"user_name"
]
?
$val
[
"user_name"
]
:
''
;
$reportList
[
$key
][
"user_phone"
]
=
preg_replace
(
'/(\d{3})\d{4}(\d{4})/'
,
'$1****$2'
,
$val
[
"user_phone"
]);
}
return
[
"code"
=>
200
,
"date"
=>
$reportList
];
//return [ "code" => 200, "date" => $reportList ];
return
[
"code"
=>
200
,
"date"
=>
$reportList
,
"total"
=>
$reportListTotal
];
}
...
...
application/model/OReportModel.php
View file @
864bdde6
...
...
@@ -662,6 +662,32 @@ class OReportModel extends Model
return
$result
;
}
public
function
getAddReportListPcInfoTotal
(
$params
,
$field
)
{
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"a.report_agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
]))
{
$where_
[
"a.create_time"
]
=
$params
[
"create_time"
];
}
if
(
isset
(
$params
[
"house_ids"
]))
{
$where_
[
"b.house_id"
]
=
array
(
"in"
,
$params
[
"house_ids"
]
);
}
$where_
[
"a.status"
]
=
0
;
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"g_houses c"
,
"b.house_id = c.id"
,
"left"
)
->
join
(
'a_store e'
,
'a.report_store_id = e.id'
,
'left'
)
->
where
(
$where_
)
->
count
();
//echo Db::table($this->table)->getLastSql();
return
$result
;
}
/**
* @param $field
* @param $params
...
...
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