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
7e177a61
Commit
7e177a61
authored
Apr 09, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
ec964a74
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
21 deletions
+48
-21
Shop.php
application/api_broker/controller/Shop.php
+1
-1
AppChat.php
application/chat/controller/AppChat.php
+34
-19
GHouses.php
application/model/GHouses.php
+12
-0
route.php
application/route.php
+1
-1
No files found.
application/api_broker/controller/Shop.php
View file @
7e177a61
...
@@ -222,7 +222,7 @@ class Shop extends Basic
...
@@ -222,7 +222,7 @@ class Shop extends Basic
}
}
$conditions
[
'a.id'
]
=
array
(
"eq"
,
$params
[
"id"
]
);
//
$conditions['a.id'] = array( "eq", $params["id"] );
$result
=
$this
->
gHousesModel
->
getHouseDetailById
(
$field
,
$conditions
);
$result
=
$this
->
gHousesModel
->
getHouseDetailById
(
$field
,
$conditions
);
...
...
application/chat/controller/AppChat.php
View file @
7e177a61
...
@@ -306,10 +306,10 @@ class AppChat extends Basic
...
@@ -306,10 +306,10 @@ class AppChat extends Basic
public
function
getHouseInfoByFrom
()
public
function
getHouseInfoByFrom
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$params
=
array
(
/*
$params = array(
'id'
=>
4762
,
'id' =>
3
,
'from' => 'b'
'from' => 'b'
);
);
*/
if
(
!
isset
(
$params
[
'id'
])
||
!
isset
(
$params
[
'from'
]))
{
if
(
!
isset
(
$params
[
'id'
])
||
!
isset
(
$params
[
'from'
]))
{
return
$this
->
response
(
"300"
,
"参数不全"
);
return
$this
->
response
(
"300"
,
"参数不全"
);
}
}
...
@@ -319,28 +319,43 @@ class AppChat extends Basic
...
@@ -319,28 +319,43 @@ class AppChat extends Basic
$gHousesModel
=
new
GHouses
();
$gHousesModel
=
new
GHouses
();
//internal_title c端
//internal_title c端
if
(
$params
[
"from"
]
==
"b"
)
{
if
(
$params
[
"from"
]
==
"b"
)
{
$field
=
"id,external_title as title,shop_area_start,shop_area_end,rent_type,rent_price"
;
$field
=
"id,external_title as title,shop_area_start,shop_area_end,rent_type,rent_price"
;
}
else
{
}
else
{
$field
=
"id,internal_title as title,shop_area_start,shop_area_end,rent_type,rent_price"
;
$field
=
"id,internal_title as title,shop_area_start,shop_area_end,rent_type,rent_price"
;
}
}
$result
=
$gHousesModel
->
getHouseDetailById
(
$field
,
$conditions
);
$result
=
$gHousesModel
->
getHouseInfoById
(
$field
,
$conditions
);
if
(
count
(
$result
)
>
0
)
{
$gHousesImgModel
=
new
GHousesImgs
();
$gHousesImgModel
=
new
GHousesImgs
();
$param
[
"house_id"
]
=
$params
[
'id'
];
$param
[
"house_id"
]
=
$params
[
'id'
];
$param
[
"img_type"
]
=
1
;
$param
[
"img_type"
]
=
1
;
$images
=
$gHousesImgModel
->
getHouseImages
(
$param
,
1
);
$images
=
$gHousesImgModel
->
getHouseImages
(
$param
,
1
);
$data
[
'$images'
]
=
IMG_PATH
.
'/img/houseinfobackgroundimg_new.png'
;
$data
[
'$images'
]
=
IMG_PATH
.
'/img/houseinfobackgroundimg_new.png'
;
if
(
count
(
$images
)
>
0
){
if
(
count
(
$images
)
>
0
)
{
$result
[
"imagename"
]
=
IMG_PATH
.
$images
[
0
][
"img_name"
];
$result
[
"imagename"
]
=
IMG_PATH
.
$images
[
0
][
"img_name"
];
}
//1.月租金 2.营业额扣点 3.每平方米租金',
$message
=
""
;
switch
(
$result
[
'rent_type'
])
{
case
1
:
$message
=
'月租金:'
.
$result
[
'rent_price'
]
.
'元/月'
;
break
;
case
2
:
$message
=
'营业额扣点:'
.
$result
[
'rent_price'
]
*
0.01
.
'%'
;
break
;
case
3
:
$message
=
'每平方米租金:'
.
$result
[
'rent_price'
]
.
'元/天/㎡'
;
break
;
}
$result
[
'price'
]
=
$message
;
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
}
else
{
return
$this
->
response
(
"400"
,
"暂无数据!"
);
}
}
}
}
...
...
application/model/GHouses.php
View file @
7e177a61
...
@@ -508,6 +508,18 @@ class GHouses extends BaseModel
...
@@ -508,6 +508,18 @@ class GHouses extends BaseModel
->
find
(
$params
[
"id"
]);
->
find
(
$params
[
"id"
]);
}
}
/**
* 楼盘info
* @param $field
* @param $params
* @return array|false|\PDOStatement|string|\think\Model
*/
public
function
getHouseInfoById
(
$field
,
$params
)
{
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
find
(
$params
[
"id"
]);
}
/**
/**
* 获取经纪人时间段中新添加的楼盘个数
* 获取经纪人时间段中新添加的楼盘个数
* @param $params
* @param $params
...
...
application/route.php
View file @
7e177a61
...
@@ -298,7 +298,7 @@ Route::group('chat', [
...
@@ -298,7 +298,7 @@ Route::group('chat', [
'delGroupUserByIds'
=>
[
'chat/Group/delGroupUserByIds'
,
[
'method'
=>
'post|get'
]
],
'delGroupUserByIds'
=>
[
'chat/Group/delGroupUserByIds'
,
[
'method'
=>
'post|get'
]
],
'addGroupManage'
=>
[
'chat/Group/addGroupManage'
,
[
'method'
=>
'post|get'
]
],
'addGroupManage'
=>
[
'chat/Group/addGroupManage'
,
[
'method'
=>
'post|get'
]
],
'delGroupManage'
=>
[
'chat/Group/delGroupManage'
,
[
'method'
=>
'post|get'
]
],
'delGroupManage'
=>
[
'chat/Group/delGroupManage'
,
[
'method'
=>
'post|get'
]
],
'pushMsg_gethouseinfo'
=>
[
'chat/AppChat/
pushMsg_gethouseinfo
'
,
[
'method'
=>
'post|get'
]
],
'pushMsg_gethouseinfo'
=>
[
'chat/AppChat/
getHouseInfoByFrom
'
,
[
'method'
=>
'post|get'
]
],
]);
]);
Route
::
group
(
'task'
,[
Route
::
group
(
'task'
,[
...
...
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