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
16ccf7a5
Commit
16ccf7a5
authored
Dec 29, 2017
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时间搜索
parent
c47d42f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
Transfer.php
application/index/controller/Transfer.php
+16
-4
WatchShop.php
application/index/controller/WatchShop.php
+6
-2
No files found.
application/index/controller/Transfer.php
View file @
16ccf7a5
...
...
@@ -46,14 +46,18 @@ class Transfer extends Basic
$where
=
array
();
if
(
!
empty
(
$params
[
'start_date'
]))
{
if
(
!
empty
(
$params
[
'start_date'
])
&&
empty
(
$params
[
'end_date'
])
)
{
$where
[
'create_time'
]
=
[
'> time'
,
$params
[
'start_date'
]];
}
if
(
!
empty
(
$params
[
'end_date'
]))
{
if
(
!
empty
(
$params
[
'end_date'
])
&&
empty
(
$params
[
'start_date'
])
)
{
$where
[
'create_time'
]
=
[
'< time'
,
$params
[
'end_date'
]];
}
if
(
!
empty
(
$params
[
'start_date'
])
&&
!
empty
(
$params
[
'end_date'
]))
{
$where
[
'create_time'
]
=
[
'between time'
,
[
$params
[
'start_date'
],
$params
[
'end_date'
]]];
}
if
(
!
empty
(
$params
[
'name'
]))
{
$where
[
'appellation'
]
=
[
'like'
,
$params
[
'name'
]
.
'%'
];
}
...
...
@@ -71,6 +75,7 @@ class Transfer extends Basic
$fields
=
'id,shop_name,manage_type,address_detail,province,city,district,expected_rent,appellation,tel,create_time,status'
;
$data
[
'list'
]
=
$sublet
->
getSublet
(
$pageNo
,
$pageSize
,
'id desc'
,
$fields
,
$where
);
$data
[
'total'
]
=
$sublet
->
getSubletTotal
(
$where
);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
);
}
...
...
@@ -89,10 +94,17 @@ class Transfer extends Basic
$sublet
=
new
SubletModel
();
$sublet_data
=
$sublet
->
field
(
'id,house_id'
)
->
where
(
'id'
,
$params
[
'id'
])
->
find
();
if
(
$sublet
)
{
if
(
$sublet_data
[
'id'
])
{
if
(
$sublet_data
[
'house_id'
])
{
$status
=
2
;
}
else
{
/***客户自己填写的转铺信息,在B端后台发布商铺更改为2***/
$status
=
1
;
}
$sublet
->
update
([
'id'
=>
$sublet_data
[
'id'
],
'status'
=>
$
params
[
'status'
]
'status'
=>
$
status
]);
$house
=
Db
::
table
(
'houseinfos'
)
->
field
(
'id,room_num_left'
)
->
where
(
'id'
,
$sublet_data
[
'house_id'
])
->
find
();
...
...
application/index/controller/WatchShop.php
View file @
16ccf7a5
...
...
@@ -34,14 +34,18 @@ class WatchShop extends Basic
$where
=
array
();
if
(
!
empty
(
$params
[
'start_date'
]))
{
if
(
!
empty
(
$params
[
'start_date'
])
&&
empty
(
$params
[
'end_date'
])
)
{
$where
[
'create_time'
]
=
[
'> time'
,
$params
[
'start_date'
]];
}
if
(
!
empty
(
$params
[
'end_date'
]))
{
if
(
!
empty
(
$params
[
'end_date'
])
&&
empty
(
$params
[
'start_date'
])
)
{
$where
[
'create_time'
]
=
[
'< time'
,
$params
[
'end_date'
]];
}
if
(
!
empty
(
$params
[
'start_date'
])
&&
!
empty
(
$params
[
'end_date'
]))
{
$where
[
'create_time'
]
=
[
'between time'
,
[
$params
[
'start_date'
],
$params
[
'end_date'
]]];
}
if
(
!
empty
(
$params
[
'name'
]))
{
$where
[
'appellation'
]
=
[
'like'
,
$params
[
'name'
]
.
'%'
];
}
...
...
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