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
b86340a8
Commit
b86340a8
authored
Dec 15, 2017
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预约看铺bug
parent
193be7ef
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
AppointmentTime.php
application/api/controller/AppointmentTime.php
+8
-8
AppointWatchShop.php
application/model/AppointWatchShop.php
+3
-3
route.php
application/route.php
+1
-1
No files found.
application/api/controller/AppointmentTime.php
View file @
b86340a8
...
@@ -44,15 +44,15 @@ class AppointmentTime extends Basic
...
@@ -44,15 +44,15 @@ class AppointmentTime extends Basic
"house_title" => "楼盘1",
"house_title" => "楼盘1",
"appellation" => "张三",
"appellation" => "张三",
"phone" => "13817616312",
"phone" => "13817616312",
"expect_time" => time()
,
"expect_time" => time() + 1000
,
"other_require" => "没有其他要求"
"other_require" => "没有其他要求"
);*/
);*/
//todo 验证楼盘信息
//todo 验证楼盘信息
if
(
isset
(
$params
[
"house_id"
])
&&
isset
(
$params
[
"house_title"
]))
{
if
(
isset
(
$params
[
"house_id"
])
&&
isset
(
$params
[
"house_title"
]))
{
$where_
[
"id"
]
=
$params
[
"house_id"
];
$where_
[
"id"
]
=
$params
[
"house_id"
];
$where_
[
"title"
]
=
$params
[
"title"
];
//
$where_["title"] = $params["title"];
$where_
[
'show_all'
]
=
array
(
'eq'
,
0
);
//
$where_['show_all'] = array( 'eq', 0 );
$houseInfo
=
$this
->
houseInfoModel
->
getHouseDetail
(
"id"
,
$where_
);
$houseInfo
=
$this
->
houseInfoModel
->
getHouseDetail
(
"id"
,
$where_
);
if
(
count
(
$houseInfo
)
<=
0
)
{
if
(
count
(
$houseInfo
)
<=
0
)
{
return
$this
->
response
(
"101"
,
"楼盘ID或楼盘名错误"
);
return
$this
->
response
(
"101"
,
"楼盘ID或楼盘名错误"
);
...
@@ -65,7 +65,7 @@ class AppointmentTime extends Basic
...
@@ -65,7 +65,7 @@ class AppointmentTime extends Basic
return
$this
->
response
(
"101"
,
"手机号为空或手机号无效"
);
return
$this
->
response
(
"101"
,
"手机号为空或手机号无效"
);
}
}
if
(
!
isset
(
$params
[
"expect_time"
])
||
$params
[
'expect_time'
]
<=
Time
::
today
())
{
if
(
!
isset
(
$params
[
"expect_time"
])
||
$params
[
'expect_time'
]
<=
time
())
{
return
$this
->
response
(
"101"
,
"预约时间为空,或者小于当前时间"
);
return
$this
->
response
(
"101"
,
"预约时间为空,或者小于当前时间"
);
}
}
$result
=
$this
->
appointmentTimeModel
->
insertAppointWatchShop
(
$params
);
$result
=
$this
->
appointmentTimeModel
->
insertAppointWatchShop
(
$params
);
...
@@ -121,10 +121,10 @@ class AppointmentTime extends Basic
...
@@ -121,10 +121,10 @@ class AppointmentTime extends Basic
}
}
if
(
count
(
$result
)
>
0
)
{
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
else
{
}
else
{
return
$this
->
response
(
"200"
,
"此条件没有找到数据"
);
return
$this
->
response
(
"200"
,
"此条件没有找到数据"
);
}
}
}
}
...
...
application/model/AppointWatchShop.php
View file @
b86340a8
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
app\model
;
namespace
app\model
;
use
think\Model
;
use
think\Model
;
use
think\Db
;
class
AppointWatchShop
extends
Model
class
AppointWatchShop
extends
Model
{
{
...
@@ -21,10 +22,9 @@ class AppointWatchShop extends Model
...
@@ -21,10 +22,9 @@ class AppointWatchShop extends Model
*/
*/
public
function
insertAppointWatchShop
(
$arr
)
public
function
insertAppointWatchShop
(
$arr
)
{
{
$appointWatchShop
=
$this
->
db
;
Db
::
startTrans
();
Db
::
startTrans
();
try
{
try
{
$id
=
$
appointWatchShop
->
save
(
$arr
);
$id
=
$
this
->
save
(
$arr
);
Db
::
commit
();
Db
::
commit
();
return
[
"code"
=>
"200"
,
"msg"
=>
$id
];
return
[
"code"
=>
"200"
,
"msg"
=>
$id
];
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
...
@@ -43,7 +43,7 @@ class AppointWatchShop extends Model
...
@@ -43,7 +43,7 @@ class AppointWatchShop extends Model
*/
*/
public
function
getAppointWatchShopList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$params
)
public
function
getAppointWatchShopList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$params
)
{
{
return
$this
->
db
return
$this
->
field
(
$field
)
->
field
(
$field
)
->
where
(
$params
)
->
where
(
$params
)
->
order
(
$order_
)
->
order
(
$order_
)
...
...
application/route.php
View file @
b86340a8
...
@@ -95,7 +95,7 @@ Route::group('api', [
...
@@ -95,7 +95,7 @@ Route::group('api', [
//post AppointmentTime
//post AppointmentTime
'getAppointmentSeeShopList'
=>
[
'api/appointmentTime/getAppointmentSeeShopList'
,
[
'method'
=>
'post'
]
],
'getAppointmentSeeShopList'
=>
[
'api/appointmentTime/getAppointmentSeeShopList'
,
[
'method'
=>
'post'
]
],
'addAppointmentSeeShop'
=>
[
'api/appointmentTime/addAppointmentSeeShop'
,
[
'method'
=>
'post'
]
],
'addAppointmentSeeShop'
=>
[
'api/appointmentTime/addAppointmentSeeShop'
,
[
'method'
=>
'post
|get
'
]
],
//tradeLog
//tradeLog
...
...
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