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
60a5552d
Commit
60a5552d
authored
Jul 10, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
where
parent
6522307a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
AppointmentTime.php
application/api/controller/AppointmentTime.php
+9
-3
WatchShop.php
application/index/controller/WatchShop.php
+1
-1
Users.php
application/model/Users.php
+2
-2
No files found.
application/api/controller/AppointmentTime.php
View file @
60a5552d
...
...
@@ -6,6 +6,7 @@ use app\api\extend\Basic;
use
app\api_broker\service\PushMessageService
;
use
app\model\Applies
;
use
app\model\AppointWatchShop
;
use
app\model\ASite
;
use
app\model\Evaluate
;
use
app\model\GHouses
;
use
app\model\GHousesImgs
;
...
...
@@ -54,7 +55,7 @@ class AppointmentTime extends Basic
public
function
addAppointmentSeeShop
()
{
$params
=
$this
->
params
;
/*
$params = array(
$params
=
array
(
"user_id"
=>
116
,
"house_id"
=>
49
,
"house_title"
=>
"楼盘1"
,
...
...
@@ -62,7 +63,7 @@ class AppointmentTime extends Basic
"phone"
=>
"13817616312"
,
"expect_time"
=>
time
()
+
1000
,
"other_require"
=>
"没有其他要求"
);
*/
);
//todo 验证楼盘信息
if
(
isset
(
$params
[
"house_id"
])
&&
isset
(
$params
[
"house_title"
]))
{
...
...
@@ -82,8 +83,13 @@ class AppointmentTime extends Basic
if
(
!
isset
(
$params
[
"expect_time"
])
||
$params
[
'expect_time'
]
<=
time
())
{
return
$this
->
response
(
"101"
,
"预约时间为空,或者小于当前时间"
);
}
$m_user
=
new
Users
();
$appoint_agent_id
=
$m_user
->
getAgentBySiteIdCity
(
'c.id'
,
[
'a.id'
=>
$this
->
userId
,
'd.city'
=>
$houseInfo
[
'city'
]]);
$m_site
=
new
ASite
();
$site_id
=
$m_site
->
getSiteById
(
'id'
,
[
'city'
=>
$this
->
user_city
]);
$user_where
[
'a.id'
]
=
$this
->
userId
;
$user_where
[
'b.site_id'
]
=
$site_id
;
$appoint_agent_id
=
$m_user
->
getAgentByCity
(
'c.id'
,
$user_where
);
if
(
empty
(
$appoint_agent_id
[
'id'
]))
{
$m_house_agent
=
new
GHousesToAgents
();
$appoint_agent_id
=
$m_house_agent
->
getAgentHouseValue
(
'agents_id'
,[
'houses_id'
=>
$params
[
"house_id"
],
'type'
=>
2
]);
...
...
application/index/controller/WatchShop.php
View file @
60a5552d
...
...
@@ -78,7 +78,7 @@ class WatchShop extends Basic
}
if
(
$params
[
'check_status'
]
==
2
)
{
$where
[
'a.appoint_agent_id'
]
=
$
where
[
'd.agent_id'
]
=
$
this
->
userId
;
$where
[
'a.appoint_agent_id'
]
=
$this
->
userId
;
$data
[
'list'
]
=
$applies
->
getAppointWatchOurList
(
$pageNo
,
$pageSize
,
'id DESC'
,
'a.*'
,
$where
);
$data
[
'total'
]
=
$applies
->
getAppointWatchOurTotal
(
$where
);
}
...
...
application/model/Users.php
View file @
60a5552d
...
...
@@ -1095,13 +1095,13 @@ class Users extends Model
* @param $params
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getAgentBySiteIdCity
(
$field
,
$params
){
public
function
getAgentByCity
(
$field
,
$params
){
$params
[
'b.is_del'
]
=
0
;
return
Db
::
name
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"u_user_agent b"
,
"a.id = b.user_id"
,
"left"
)
->
join
(
"a_agents c"
,
"a.agent_id=b.id"
,
"left"
)
->
join
(
'a_site d'
,
'c.site_id = d.id'
,
'left'
)
->
where
(
$params
)
->
limit
(
1
)
->
select
();
...
...
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