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
0a8595af
Commit
0a8595af
authored
Mar 02, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
带看
parent
1140f218
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
2 deletions
+42
-2
Report.php
application/api_broker/controller/Report.php
+2
-2
OReportModel.php
application/model/OReportModel.php
+40
-0
No files found.
application/api_broker/controller/Report.php
View file @
0a8595af
...
@@ -90,14 +90,14 @@ class Report extends Basic
...
@@ -90,14 +90,14 @@ class Report extends Basic
);*/
);*/
$params
=
$this
->
params
;
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
"agent_id"
])){
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"type"
])
){
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$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"
];
$params
[
"report_agent_id"
]
=
$params
[
"agent_id"
];
$result
=
$this
->
service_
->
orderList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
$result
=
$this
->
service_
->
orderList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
...
...
application/model/OReportModel.php
View file @
0a8595af
...
@@ -89,13 +89,52 @@ class OReportModel extends Model
...
@@ -89,13 +89,52 @@ class OReportModel extends Model
$where_
[
"a.status"
]
=
0
;
$where_
[
"a.status"
]
=
0
;
$where_
[
"b.is_del"
]
=
0
;
$where_
[
"b.is_del"
]
=
0
;
switch
(
$params
[
"type"
]){
case
2
:
return
$this
->
db
return
$this
->
db
->
field
(
$filed
)
->
field
(
$filed
)
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id= b.f_id"
,
"left"
)
->
join
(
"o_order b"
,
"a.id= b.f_id"
,
"left"
)
->
join
(
"o_march_in c"
,
"b.id= c.order_id"
,
"right"
)
->
where
(
$where_
)
->
where
(
$where_
)
->
group
(
"c.order_id "
)
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
page
(
$pageNo
)
->
select
();
->
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