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
383b0933
Commit
383b0933
authored
Apr 15, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
c端已看
parent
9032fce2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
4 deletions
+62
-4
AppointmentTime.php
application/api/controller/AppointmentTime.php
+32
-3
AppointWatchShop.php
application/model/AppointWatchShop.php
+30
-1
No files found.
application/api/controller/AppointmentTime.php
View file @
383b0933
...
...
@@ -104,8 +104,8 @@ class AppointmentTime extends Basic
{
/* $params = array(
"status" => 2, //看铺状态 0待经纪人确认(确认后存agents_id) 1:待看 2:已看' 如果是待看 0,1 已看是2
"user_id" => "1
",//对应u_users表
"phone" => "18112347151
",//phone
"user_id" => "122
",//对应u_users表
"phone" => "17717536290
",//phone
"pageNo" => "1",
"pageSize" => 15
);*/
...
...
@@ -128,7 +128,7 @@ class AppointmentTime extends Basic
if
(
$params
[
"status"
]
==
1
)
{
$result
=
$this
->
getWaitList
(
$pageNo
,
$pageSize
,
$params
);
}
elseif
(
$params
[
"status"
]
==
2
)
{
$result
=
$this
->
getYetList
(
$pageNo
,
$pageSize
,
$params
);
$result
=
$this
->
getYetList
V2
(
$pageNo
,
$pageSize
,
$params
);
}
if
(
count
(
$result
)
>
0
)
{
...
...
@@ -199,5 +199,33 @@ class AppointmentTime extends Basic
return
$result
;
}
/**
* 已看列表
* @param $pageNo
* @param $pageSize
* @param $params
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getYetListV2
(
$pageNo
,
$pageSize
,
$params
)
{
$field
=
"a.id,a.phone,c.reception_id as agents_id,c.create_time as expect_time,a.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_
);
//获取图片信息
foreach
(
$result
as
$key
=>
$val
)
{
$result
[
$key
][
"api_path"
]
=
IMG_PATH
;
$param
[
"house_id"
]
=
$val
[
"house_id"
];
$param
[
"img_type"
]
=
1
;
//默认主图
$result
[
$key
][
"images"
]
=
$this
->
dbImg
->
getHouseImages
(
$param
,
1
);
//todo 是否评价
$evaluateResult
=
$this
->
evaluateMode
->
getIsEvaluate
(
10
,
$val
[
"id"
],
$params
[
"user_id"
]);
$result
[
$key
][
"is_evaluate"
]
=
count
(
$evaluateResult
)
>
0
?
1
:
0
;
}
return
$result
;
}
}
\ No newline at end of file
application/model/AppointWatchShop.php
View file @
383b0933
...
...
@@ -62,6 +62,34 @@ class AppointWatchShop extends BaseModel
->
select
();
}
/**
* 预约看铺列表 已看列表
*
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getHaveToSeeList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$params
)
{
return
$this
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_report b"
,
"a.applies_id = b.id"
,
"left"
)
->
join
(
"o_march_in c"
,
"c.report_id = b.id"
,
"right"
)
->
join
(
"g_houses d"
,
"d.id = a.house_id"
,
"left"
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
/**
* 预约看铺总数
*
...
...
@@ -81,7 +109,8 @@ class AppointWatchShop extends BaseModel
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getAppointInfo
(
$field
,
$params
)
{
public
function
getAppointInfo
(
$field
,
$params
)
{
return
$this
->
field
(
$field
)
->
where
(
$params
)
->
find
();
...
...
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