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
e9784a55
Commit
e9784a55
authored
Mar 02, 2018
by
zw
Committed by
hujun
Mar 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
带看
parent
9235b69e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
11 deletions
+51
-11
Report.php
application/api_broker/controller/Report.php
+3
-3
OReportModel.php
application/model/OReportModel.php
+48
-8
No files found.
application/api_broker/controller/Report.php
View file @
e9784a55
...
...
@@ -82,7 +82,7 @@ class Report extends Basic
* @return \think\Response
*/
public
function
reportList
(){
/*
$params = array(
/*
$params = array(
"agent_id" =>1,
"type" => 1,//1表示全部 2表示进场 3 表示收款 4成交报告
"page_no"=>1,
...
...
@@ -90,14 +90,14 @@ class Report extends Basic
);*/
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
"agent_id"
])){
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"type"
])
){
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$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,b.id as order_id,b.house_id,b.house_title"
;
$field
=
"a.id,a.user_id,a.user_phone,a.user_name,a.predict_see_time,b.id as order_id,b.
order_no,b.
house_id,b.house_title"
;
$params
[
"report_agent_id"
]
=
$params
[
"agent_id"
];
$result
=
$this
->
service_
->
orderList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
...
...
application/model/OReportModel.php
View file @
e9784a55
...
...
@@ -89,13 +89,52 @@ class OReportModel extends Model
$where_
[
"a.status"
]
=
0
;
$where_
[
"b.is_del"
]
=
0
;
return
$this
->
db
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id= b.f_id"
,
"left"
)
->
where
(
$where_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
switch
(
$params
[
"type"
]){
case
2
:
return
$this
->
db
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id= b.f_id"
,
"left"
)
->
join
(
"o_march_in c"
,
"b.id= c.order_id"
,
"right"
)
->
where
(
$where_
)
->
group
(
"c.order_id "
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
case
3
:
return
$this
->
db
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id= b.f_id"
,
"left"
)
->
join
(
"o_paylog c"
,
"b.id= c.order_id"
,
"right"
)
->
where
(
$where_
)
->
group
(
"c.order_id "
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
case
4
:
return
$this
->
db
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id= b.f_id"
,
"left"
)
->
join
(
"o_bargain c"
,
"b.id= c.order_id"
,
"right"
)
->
where
(
$where_
)
->
group
(
"c.order_id "
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
default
:
return
$this
->
db
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id= b.f_id"
,
"left"
)
->
where
(
$where_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
}
}
\ No newline at end of file
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