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
04290ef1
Commit
04290ef1
authored
Nov 21, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化-我的客户预约看铺
parent
ab3bbc82
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
11 deletions
+45
-11
AppointmentShop.php
application/api_broker/controller/AppointmentShop.php
+37
-11
FollowUp.php
application/api_broker/controller/FollowUp.php
+1
-0
FollowUp.php
application/model/FollowUp.php
+7
-0
No files found.
application/api_broker/controller/AppointmentShop.php
View file @
04290ef1
...
@@ -10,15 +10,16 @@ namespace app\api_broker\controller;
...
@@ -10,15 +10,16 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\api_broker\extend\Basic
;
use
app\model\AAgents
;
use
app\model\AppointWatchShop
;
use
app\model\AppointWatchShop
;
use
app\model\GHouses
;
use
app\model\GHouses
;
use
app\model\HouseInfos
;
use
app\model\FollowUp
;
use
app\model\Users
;
use
think\Request
;
use
think\Request
;
class
AppointmentShop
extends
Basic
class
AppointmentShop
extends
Basic
{
{
private
$m_watch
;
private
$m_watch
;
public
function
__construct
(
Request
$request
=
null
)
public
function
__construct
(
Request
$request
=
null
)
{
{
parent
::
__construct
(
$request
);
parent
::
__construct
(
$request
);
...
@@ -30,21 +31,45 @@ class AppointmentShop extends Basic
...
@@ -30,21 +31,45 @@ class AppointmentShop extends Basic
*
*
* @return \think\Response
* @return \think\Response
*/
*/
public
function
getOurAppointment
()
{
public
function
getOurAppointment
()
{
$code
=
200
;
$msg
=
""
;
$list
=
[];
$where
[
'a.appoint_agent_id'
]
=
1
;
$where
[
'a.appoint_agent_id'
]
=
1
;
// $where['a.appoint_agent_id'] = $this->agentId;
// $where['a.appoint_agent_id'] = $this->agentId;
$where
[
'a.is_cancel'
]
=
0
;
$where
[
'a.is_cancel'
]
=
0
;
$page_no
=
empty
(
$this
->
params
[
'page_no'
])
?
1
:
$this
->
params
[
'page_no'
];
$page_no
=
empty
(
$this
->
params
[
'page_no'
])
?
1
:
$this
->
params
[
'page_no'
];
$page_size
=
empty
(
$this
->
params
[
'page_size'
])
?
15
:
$this
->
params
[
'page_size'
];
$page_size
=
empty
(
$this
->
params
[
'page_size'
])
?
15
:
$this
->
params
[
'page_size'
];
$field
=
'a.house_id,a.appellation,a.phone,a.expect_time,a.other_require,b.create_time,'
;
$field
=
'a.id,a.house_id,a.appellation,a.phone,a.expect_time,a.other_require,b.create_time,'
;
$field
.=
'b.user_name,b.id as use_id'
;
$field
.=
'b.user_name,b.id as use_id,a.applies_id'
;
$list
=
$this
->
m_watch
->
getAppointWatchOur
(
$page_no
,
$page_size
,
'a.id desc'
,
$field
,
$where
);
try
{
$m_house
=
new
GHouses
();
$list
=
$this
->
m_watch
->
getAppointWatchOur
(
$page_no
,
$page_size
,
'a.id desc'
,
$field
,
$where
);
foreach
(
$list
as
$k
=>
$v
)
{
$m_house
=
new
GHouses
();
$list
[
$k
][
'house_title'
]
=
$m_house
->
getHouseValue
(
'internal_title'
,
[
'id'
=>
$v
[
'house_id'
]]);
$m_follow
=
new
FollowUp
();
$m_agent
=
new
AAgents
();
foreach
(
$list
as
$k
=>
$v
)
{
if
(
$v
[
'as is_report'
]
>
0
)
{
$list
[
$k
][
'is_report'
]
=
1
;
}
else
{
$list
[
$k
][
'is_report'
]
=
0
;
}
$list
[
$k
][
'house_title'
]
=
$m_house
->
getHouseValue
(
'internal_title'
,
[
'id'
=>
$v
[
'house_id'
]]);
$follow_up
=
$m_follow
->
getAllList
(
'admin_id,content,create_time'
,
[
'sublet_id'
=>
$v
[
'id'
]]);
foreach
(
$follow_up
as
$k
=>
$v
)
{
$follow_up
[
$k
][
'name'
]
=
$m_agent
->
getAgentsById
(
$v
[
'admin_id'
],
'name'
);
unset
(
$follow_up
[
$k
][
'admin_id'
]);
}
$list
[
$k
][
'follow_up_list'
]
=
$follow_up
;
unset
(
$list
[
$k
][
'applies_id'
]);
}
}
catch
(
\Exception
$e
)
{
$code
=
101
;
$msg
=
$e
->
getMessage
();
}
}
return
$this
->
response
(
200
,
''
,
$list
);
return
$this
->
response
(
$code
,
$msg
,
$list
);
}
}
}
}
\ No newline at end of file
application/api_broker/controller/FollowUp.php
View file @
04290ef1
...
@@ -3,6 +3,7 @@ namespace app\api_broker\controller;
...
@@ -3,6 +3,7 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\FollowUpService
;
use
app\api_broker\service\FollowUpService
;
use
app\model\OFollowUp
;
/**
/**
* Created by PhpStorm.
* Created by PhpStorm.
...
...
application/model/FollowUp.php
View file @
04290ef1
...
@@ -14,4 +14,10 @@ use think\Model;
...
@@ -14,4 +14,10 @@ use think\Model;
class
FollowUp
extends
Model
class
FollowUp
extends
Model
{
// 设置当前模型对应的完整数据表名称
{
// 设置当前模型对应的完整数据表名称
protected
$table
=
'u_follow_up'
;
protected
$table
=
'u_follow_up'
;
public
function
getAllList
(
$field
,
$where
)
{
return
$this
->
field
(
$field
)
->
where
(
$where
)
->
select
();
}
}
}
\ 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