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
b8dbf71b
Commit
b8dbf71b
authored
Jun 11, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预约看铺报备了就显示在待看
parent
0e235366
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
21 deletions
+57
-21
AppointmentTime.php
application/api/controller/AppointmentTime.php
+15
-9
AppointWatchShop.php
application/model/AppointWatchShop.php
+0
-1
OReportModel.php
application/model/OReportModel.php
+42
-11
No files found.
application/api/controller/AppointmentTime.php
View file @
b8dbf71b
...
...
@@ -9,6 +9,7 @@ use app\model\Evaluate;
use
app\model\GHouses
;
use
app\model\GHousesImgs
;
use
app\model\HouseInfos
;
use
app\model\OReportModel
;
use
think\helper\Time
;
use
app\model\HouseImgs
;
...
...
@@ -28,6 +29,7 @@ class AppointmentTime extends Basic
protected
$dbImg
;
protected
$appliesModel
;
protected
$evaluateMode
;
protected
$reportModel
;
function
__construct
(
$request
=
null
)
{
...
...
@@ -38,6 +40,7 @@ class AppointmentTime extends Basic
$this
->
dbImg
=
new
GHousesImgs
();
$this
->
appliesModel
=
new
Applies
();
$this
->
evaluateMode
=
new
Evaluate
();
$this
->
reportModel
=
new
OReportModel
();
}
/**
...
...
@@ -102,15 +105,15 @@ class AppointmentTime extends Basic
*/
public
function
getAppointmentSeeShopList
()
{
/*
$params = array(
"status" =>
2
, //看铺状态 0待经纪人确认(确认后存agents_id) 1:待看 2:已看' 如果是待看 0,1 已看是2
"user_id" => "1
2
2",//对应u_users表
"phone" => "1
7717536290
",//phone
$params
=
array
(
"status"
=>
1
,
//看铺状态 0待经纪人确认(确认后存agents_id) 1:待看 2:已看' 如果是待看 0,1 已看是2
"user_id"
=>
"1
114
2"
,
//对应u_users表
"phone"
=>
"1
3661753534
"
,
//phone
"pageNo"
=>
"1"
,
"pageSize"
=>
15
);
*/
);
$params
=
$this
->
params
;
//
$params = $this->params;
if
(
!
isset
(
$params
[
"status"
]))
{
return
$this
->
response
(
"101"
,
"请求状态不能为空"
);
...
...
@@ -126,7 +129,7 @@ class AppointmentTime extends Basic
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$result
=
[];
if
(
$params
[
"status"
]
==
1
)
{
$result
=
$this
->
getWaitList
(
$pageNo
,
$pageSize
,
$params
);
$result
=
$this
->
getWaitList
V2
(
$pageNo
,
$pageSize
,
$params
);
}
elseif
(
$params
[
"status"
]
==
2
)
{
$result
=
$this
->
getYetListV2
(
$pageNo
,
$pageSize
,
$params
);
}
...
...
@@ -236,12 +239,15 @@ class AppointmentTime extends Basic
*/
public
function
getWaitListV2
(
$pageNo
,
$pageSize
,
$params
)
{
$field
=
"a.id,a.
phone,c.reception_id as agents_id,c.create_time as expect_time,a
.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_
);
$where_
[
"c.id"
]
=
array
(
'EXP'
,
'IS NULL'
);
$result
=
$this
->
reportModel
->
getWaitToSeeList
(
$pageNo
,
$pageSize
,
"id desc"
,
$field
,
$where_
);
dump
(
$result
);
//获取图片信息
foreach
(
$result
as
$key
=>
$val
)
{
$result
[
$key
][
"api_path"
]
=
IMG_PATH
;
...
...
application/model/AppointWatchShop.php
View file @
b8dbf71b
...
...
@@ -89,7 +89,6 @@ class AppointWatchShop extends BaseModel
->
page
(
$pageNo
)
->
select
();
}
/**
* 预约看铺总数
*
...
...
application/model/OReportModel.php
View file @
b8dbf71b
...
...
@@ -112,9 +112,9 @@ class OReportModel extends Model
return
$this
->
db
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"a_agents e"
,
"a.report_agent_id=e.id"
,
"left"
)
->
join
(
"a_store b"
,
"e.store_id=b.id"
,
"left"
)
->
join
(
"a_district c"
,
"e.district_id=c.id"
,
"left"
)
->
join
(
"a_agents e"
,
"a.report_agent_id=e.id"
,
"left"
)
->
join
(
"a_store b"
,
"e.store_id=b.id"
,
"left"
)
->
join
(
"a_district c"
,
"e.district_id=c.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
}
...
...
@@ -152,9 +152,9 @@ class OReportModel extends Model
return
$this
->
db
->
field
(
$filed
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"a_agents c"
,
"a.report_agent_id = c.id"
,
"left"
)
->
join
(
"a_store d"
,
"c.store_id = d.id"
,
"left"
)
->
join
(
"o_order b"
,
"a.id = b.f_id"
,
"left"
)
->
join
(
"a_agents c"
,
"a.report_agent_id = c.id"
,
"left"
)
->
join
(
"a_store d"
,
"c.store_id = d.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
}
...
...
@@ -440,11 +440,12 @@ class OReportModel extends Model
return
$agent_data
;
}
public
function
getAgentByOrderId
(
$field
,
$params
){
public
function
getAgentByOrderId
(
$field
,
$params
)
{
return
Db
::
name
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"a_agents b"
,
"a.report_agent_id = b.id"
,
"left"
)
->
join
(
"a_agents b"
,
"a.report_agent_id = b.id"
,
"left"
)
->
where
(
$params
)
->
select
();
}
...
...
@@ -454,16 +455,45 @@ class OReportModel extends Model
* @param $params
* @return int|string
*/
public
function
getAddFollowUpNumByAgentId
(
$params
){
public
function
getAddFollowUpNumByAgentId
(
$params
)
{
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
]))
{
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"report_agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
]))
{
if
(
isset
(
$params
[
"create_time"
]))
{
$where_
[
"create_time"
]
=
$params
[
"create_time"
];
}
return
Db
::
name
(
$this
->
table
)
->
where
(
$where_
)
->
count
();
}
/**
* 预约看铺待看列表
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getWaitToSeeList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$params
)
{
$data
=
$this
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"b.f_id = a.id"
,
"left"
)
->
join
(
"o_march_in c"
,
"c.report_id = b.id"
,
"left"
)
->
join
(
"g_houses d"
,
"d.id = b.house_id"
,
"left"
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
//echo $this->getLastSql();
return
$data
;
}
}
\ 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