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
a240d34c
Commit
a240d34c
authored
Jun 22, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
1d4da3d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
Sublet.php
application/api/controller/Sublet.php
+19
-10
No files found.
application/api/controller/Sublet.php
View file @
a240d34c
...
@@ -11,6 +11,7 @@ namespace app\api\controller;
...
@@ -11,6 +11,7 @@ namespace app\api\controller;
*/
*/
use
app\api\extend\Basic
;
use
app\api\extend\Basic
;
use
app\model\SubletModel
;
use
app\model\SubletModel
;
use
think\Exception
;
use
think\Request
;
use
think\Request
;
class
Sublet
extends
Basic
class
Sublet
extends
Basic
...
@@ -29,12 +30,12 @@ class Sublet extends Basic
...
@@ -29,12 +30,12 @@ class Sublet extends Basic
*/
*/
public
function
subletList
()
public
function
subletList
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/* $params = array(
/* $params = array(
"user_id" => 1,
"user_id" => 1,
"page_no" => 1,
"page_no" => 1,
"page_size" => 15
"page_size" => 15
);*/
);*/
$user_id
=
$params
[
"user_id"
];
$user_id
=
$params
[
"user_id"
];
if
(
!
$user_id
)
{
if
(
!
$user_id
)
{
return
$this
->
response
(
"101"
,
"用户id不能为空"
);
return
$this
->
response
(
"101"
,
"用户id不能为空"
);
...
@@ -45,11 +46,19 @@ class Sublet extends Basic
...
@@ -45,11 +46,19 @@ class Sublet extends Basic
$fields
=
'id,manage_type,address_detail,FORMAT(expected_rent/100,2) as expected_rent,create_time,status,house_id'
;
$fields
=
'id,manage_type,address_detail,FORMAT(expected_rent/100,2) as expected_rent,create_time,status,house_id'
;
$result
=
$this
->
subletMode
->
getSublet
(
$pageNo
,
$pageSize
,
"id desc"
,
$fields
,
$select_
);
try
{
if
(
count
(
$result
)
>
0
)
$result
=
$this
->
subletMode
->
getSublet
(
$pageNo
,
$pageSize
,
"id desc"
,
$fields
,
$select_
);
return
$this
->
response
(
"200"
,
"success"
,
$result
);
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
}
}
catch
(
Exception
$exception
)
{
return
$this
->
response
(
"101"
,
"请求异常,请稍后再试"
);
}
return
$this
->
response
(
"101"
,
"请求异常,请稍后再试"
);
}
}
public
function
addSublet
()
public
function
addSublet
()
...
...
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