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
894dbf8c
Commit
894dbf8c
authored
Sep 14, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
3af43eb4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
12 deletions
+47
-12
AppointmentTime.php
application/api/controller/AppointmentTime.php
+31
-8
AttentionShop.php
application/api/controller/AttentionShop.php
+16
-4
No files found.
application/api/controller/AppointmentTime.php
View file @
894dbf8c
...
...
@@ -8,6 +8,7 @@ use app\model\AppointWatchShop;
use
app\model\Evaluate
;
use
app\model\GHouses
;
use
app\model\GHousesImgs
;
use
app\model\GImageDepot
;
use
app\model\HouseInfos
;
use
app\model\OReportModel
;
use
think\helper\Time
;
...
...
@@ -30,6 +31,7 @@ class AppointmentTime extends Basic
protected
$appliesModel
;
protected
$evaluateMode
;
protected
$reportModel
;
protected
$imageDepotModel
;
function
__construct
(
$request
=
null
)
{
...
...
@@ -41,6 +43,7 @@ class AppointmentTime extends Basic
$this
->
appliesModel
=
new
Applies
();
$this
->
evaluateMode
=
new
Evaluate
();
$this
->
reportModel
=
new
OReportModel
();
$this
->
imageDepotModel
=
new
GImageDepot
();
}
/**
...
...
@@ -212,17 +215,27 @@ class AppointmentTime extends Basic
public
function
getYetListV2
(
$pageNo
,
$pageSize
,
$params
)
{
$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, d.is_show,d.status"
;
d.external_title as house_title,d.residue_num as room_num_left, d.is_show,d.status
,d.external_image_id
"
;
$where_
[
"a.user_id"
]
=
$params
[
"user_id"
];
// $result = $this->appointmentTimeModel->getHaveToSeeList($pageNo, $pageSize, "id desc", $field, $where_);
$result
=
$this
->
reportModel
->
getHaveToSeeList
(
$pageNo
,
$pageSize
,
"id desc"
,
$field
,
$where_
);
//获取图片信息
foreach
(
$result
as
$key
=>
$val
)
{
$result
[
$key
][
"api_path"
]
=
IMG_PATH
;
$param
[
"house_id"
]
=
$val
[
"house_id"
];
$result
[
$key
][
"api_path"
]
=
SHOP_IMAGE_DEPOT_URL
;
/*
$param["house_id"] = $val["house_id"];
$param["img_type"] = 1; //默认主图
$result
[
$key
][
"images"
]
=
$this
->
dbImg
->
getHouseImages
(
$param
,
1
);
$result[$key]["images"] = $this->dbImg->getHouseImages($param, 1);*/
$result
[
$key
][
"images"
]
=
[];
if
(
$val
[
"external_image_id"
])
{
$param
[
"id"
]
=
array
(
"in"
,
$val
[
"external_image_id"
]
);
$param
[
"img_status"
]
=
0
;
$field
=
'id,0 as house_id,img_type,label,img_name,img_status'
;
$res
=
$this
->
imageDepotModel
->
getImageDepotById
(
$field
,
$param
,
1
);
$result
[
$key
][
"images"
]
=
count
(
$res
)
>
0
?
$res
:
[];
}
//todo 是否评价
$evaluateResult
=
$this
->
evaluateMode
->
getIsEvaluate
(
10
,
$val
[
"id"
],
$params
[
"user_id"
]);
$result
[
$key
][
"is_evaluate"
]
=
count
(
$evaluateResult
)
>
0
?
1
:
0
;
...
...
@@ -239,7 +252,7 @@ class AppointmentTime extends Basic
public
function
getWaitListV2
(
$pageNo
,
$pageSize
,
$params
)
{
$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"
;
d.external_title as house_title,d.residue_num as room_num_left
,d.external_image_id
"
;
$where_
[
"user_id"
]
=
$params
[
"user_id"
];
...
...
@@ -247,10 +260,20 @@ class AppointmentTime extends Basic
//获取图片信息
foreach
(
$result
as
$key
=>
$val
)
{
$result
[
$key
][
"api_path"
]
=
IMG_PATH
;
$param
[
"house_id"
]
=
$val
[
"house_id"
];
$result
[
$key
][
"api_path"
]
=
SHOP_IMAGE_DEPOT_URL
;
/*
$param["house_id"] = $val["house_id"];
$param["img_type"] = 1; //默认主图
$result
[
$key
][
"images"
]
=
$this
->
dbImg
->
getHouseImages
(
$param
,
1
);
$result[$key]["images"] = $this->dbImg->getHouseImages($param, 1);*/
$result
[
$key
][
"images"
]
=
[];
if
(
$val
[
"external_image_id"
])
{
$param
[
"id"
]
=
array
(
"in"
,
$val
[
"external_image_id"
]
);
$param
[
"img_status"
]
=
0
;
$field
=
'id,0 as house_id,img_type,label,img_name,img_status'
;
$res
=
$this
->
imageDepotModel
->
getImageDepotById
(
$field
,
$param
,
1
);
$result
[
$key
][
"images"
]
=
count
(
$res
)
>
0
?
$res
:
[];
}
//todo 是否评价
$evaluateResult
=
$this
->
evaluateMode
->
getIsEvaluate
(
10
,
$val
[
"id"
],
$params
[
"user_id"
]);
$result
[
$key
][
"is_evaluate"
]
=
count
(
$evaluateResult
)
>
0
?
1
:
0
;
...
...
application/api/controller/AttentionShop.php
View file @
894dbf8c
...
...
@@ -5,6 +5,7 @@ namespace app\api\controller;
use
app\api\extend\Basic
;
use
app\model\AttentionModel
;
use
app\model\GHousesImgs
;
use
app\model\GImageDepot
;
use
think\Request
;
use
app\model\HouseImgs
;
...
...
@@ -21,6 +22,7 @@ class AttentionShop extends Basic
protected
$attentionModel
;
protected
$dbImg
;
protected
$imgModel
;
protected
$imageDepotModel
;
public
function
__construct
(
$request
=
null
)
{
...
...
@@ -28,6 +30,7 @@ class AttentionShop extends Basic
$this
->
attentionModel
=
new
AttentionModel
();
$this
->
dbImg
=
new
HouseImgs
();
$this
->
imgModel
=
new
GHousesImgs
();
$this
->
imageDepotModel
=
new
GImageDepot
();
}
/**
...
...
@@ -77,7 +80,7 @@ class AttentionShop extends Basic
$order_
=
'a.create_time desc'
;
//b.room_num_left 前端显示已下架,不可点击到详情
$field
=
"a.id,a.house_id,b.external_title as title,b.shop_area_start as room_area,b.shop_area_end as room_area2,b.rent_price as price,
b.shop_sign as shangpu_tags,b.shop_type as shangpu_type,b.residue_num as room_num_left,b.rent_type"
;
b.shop_sign as shangpu_tags,b.shop_type as shangpu_type,b.residue_num as room_num_left,b.rent_type
,b.external_image_id
"
;
if
(
!
isset
(
$params
[
"user_id"
]))
{
return
$this
->
response
(
"101"
,
"用户id不能为空"
);
...
...
@@ -90,11 +93,20 @@ class AttentionShop extends Basic
}
foreach
(
$result
as
$key
=>
$val
)
{
$result
[
$key
][
"price"
]
=
$val
[
"price"
]
*
0.01
;
$result
[
$key
][
"api_path"
]
=
IMG_PATH
;
$imgParam
[
"house_id"
]
=
$val
[
"house_id"
];
$result
[
$key
][
"api_path"
]
=
SHOP_IMAGE_DEPOT_URL
;
/*
$imgParam["house_id"] = $val["house_id"];
$imgParam["img_type"] = 1; //默认主图
$imgArr = $this->imgModel->getHouseImages($imgParam, 1);
$result
[
$key
][
"images"
]
=
$imgArr
;
$result[$key]["images"] = $imgArr;*/
if
(
$val
[
"external_image_id"
])
{
$param
[
"id"
]
=
array
(
"in"
,
$val
[
"external_image_id"
]
);
$param
[
"img_status"
]
=
0
;
$field
=
'id,0 as house_id,img_type,label,img_name,img_status'
;
$res
=
$this
->
imageDepotModel
->
getImageDepotById
(
$field
,
$param
,
1
);
$result
[
$key
][
"images"
]
=
count
(
$res
)
>
0
?
$res
:
[];
}
}
...
...
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