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
aed133bf
Commit
aed133bf
authored
Jun 26, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
274707e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
17 deletions
+56
-17
AppointmentTime.php
application/api/controller/AppointmentTime.php
+12
-14
OReportModel.php
application/model/OReportModel.php
+44
-3
No files found.
application/api/controller/AppointmentTime.php
View file @
aed133bf
...
...
@@ -105,15 +105,14 @@ class AppointmentTime extends Basic
*/
public
function
getAppointmentSeeShopList
()
{
/* $params = array(
"status" => 2, //看铺状态 0待经纪人确认(确认后存agents_id) 1:待看 2:已看' 如果是待看 0,1 已看是2
"user_id" => "11142",//对应u_users表
"phone" => "13661753534",//phone
"pageNo" => "1",
"pageSize" => 15
);*/
$params
=
$this
->
params
;
/* $params = array(
"status" => 1, //看铺状态 0待经纪人确认(确认后存agents_id) 1:待看 2:已看' 如果是待看 0,1 已看是2
"user_id" => "11142",//对应u_users表
"phone" => "13661753534",//phone
"pageNo" => "1",
"pageSize" => 15
);*/
if
(
!
isset
(
$params
[
"status"
]))
{
return
$this
->
response
(
"101"
,
"请求状态不能为空"
);
...
...
@@ -212,11 +211,11 @@ class AppointmentTime extends Basic
*/
public
function
getYetListV2
(
$pageNo
,
$pageSize
,
$params
)
{
$field
=
"a.id,a.report_agent_phone as phone,a.report_agent_id as agents_id,a.predict_see_time as expect_time,b.house_id,
$field
=
"a.id,a.report_agent_phone as phone,a.report_agent_id as agents_id,a.predict_see_time as expect_time,b.house_id,
d.external_title as house_title,d.residue_num as room_num_left"
;
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
// $result = $this->appointmentTimeModel->getHaveToSeeList($pageNo, $pageSize, "id desc", $field, $where_);
$result
=
$this
->
reportModel
->
getHaveToSeeList
(
$pageNo
,
$pageSize
,
"id desc"
,
$field
,
$where_
);
// $result = $this->appointmentTimeModel->getHaveToSeeList($pageNo, $pageSize, "id desc", $field, $where_);
$result
=
$this
->
reportModel
->
getHaveToSeeList
(
$pageNo
,
$pageSize
,
"id desc"
,
$field
,
$where_
);
//获取图片信息
foreach
(
$result
as
$key
=>
$val
)
{
...
...
@@ -243,9 +242,8 @@ class AppointmentTime extends Basic
d.external_title as house_title,d.residue_num as room_num_left"
;
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
$where_
[
"c.id"
]
=
array
(
'EXP'
,
'IS NULL'
);
$result
=
$this
->
reportModel
->
getWaitToSeeList
(
$pageNo
,
$pageSize
,
"id desc"
,
$field
,
$where_
);
$where_
[
"user_id"
]
=
$params
[
"user_id"
];
$result
=
$this
->
reportModel
->
getWaitToSeeList
(
$pageNo
,
$pageSize
,
"id desc"
,
$field
,
$where_
);
//获取图片信息
foreach
(
$result
as
$key
=>
$val
)
{
...
...
application/model/OReportModel.php
View file @
aed133bf
...
...
@@ -515,7 +515,7 @@ class OReportModel extends Model
*/
public
function
getWaitToSeeList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$params
)
{
$data
=
$this
/*
$data = $this
->field($field)
->alias("a")
->join("o_order b", "b.f_id = a.id", "left")
...
...
@@ -525,8 +525,49 @@ class OReportModel extends Model
->order($order_)
->limit($pageSize)
->page($pageNo)
->
select
();
//echo $this->getLastSql();
->select();*/
$start_index
=
(
$pageNo
-
1
)
*
$pageSize
;
if
(
isset
(
$params
[
"user_id"
]))
{
$user_id
=
$params
[
"user_id"
];
}
$sql
=
"select * from ((
SELECT
`a`.`id`,
a.user_id,
a.report_agent_id AS agents_id,
a.predict_see_time AS expect_time,
`b`.`house_id`,
d.external_title AS house_title,
d.residue_num AS room_num_left
FROM
`o_report` `a`
LEFT JOIN `o_order` `b` ON `b`.`f_id` = `a`.`id`
LEFT JOIN `o_march_in` `c` ON `c`.`report_id` = `b`.`id`
LEFT JOIN `g_houses` `d` ON `d`.`id` = `b`.`house_id`
WHERE
`a`.`user_id` =
$user_id
AND (`c`.`id` IS NULL)
)
UNION
(
SELECT
a.id,
a.agents_id,
a.expect_time,
a.house_id,
a.user_id,
b.external_title AS house_title,
b.residue_num AS room_num_left
FROM
u_appoint_watch_shop a
LEFT JOIN g_houses b ON a.house_id = b.id
WHERE
a.user_id =
$user_id
and a.status in (0,1)
) ) as aaa limit
$start_index
,
$pageSize
"
;
$data
=
$this
->
db
->
query
(
$sql
);
return
$data
;
}
...
...
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