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
83d6b3c3
Commit
83d6b3c3
authored
Dec 19, 2017
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下架标签,订单,预约,关注列表
parent
8daedc60
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
17 deletions
+30
-17
AppointmentTime.php
application/api/controller/AppointmentTime.php
+4
-0
AttentionShop.php
application/api/controller/AttentionShop.php
+20
-16
TradeLog.php
application/api/controller/TradeLog.php
+5
-0
AttentionModel.php
application/model/AttentionModel.php
+1
-1
No files found.
application/api/controller/AppointmentTime.php
View file @
83d6b3c3
...
...
@@ -128,6 +128,10 @@ class AppointmentTime extends Basic
$param
[
"house_id"
]
=
$val
[
"house_id"
];
$param
[
"imgtype"
]
=
1
;
//默认主图
$result
[
$key
][
"images"
]
=
$this
->
dbImg
->
getHouseImages
(
$param
,
1
);
$houseInfo
=
$this
->
houseInfoModel
->
getHouseDetail
(
"room_num_left"
,
array
(
"id"
=>
$val
[
"house_id"
]));
$result
[
$key
][
"room_num_left"
]
=
$houseInfo
[
"room_num_left"
];
}
...
...
application/api/controller/AttentionShop.php
View file @
83d6b3c3
...
...
@@ -34,12 +34,12 @@ class AttentionShop extends Basic
public
function
addOrUpdateAttention
()
{
$params
=
$this
->
params
;
/* $params = array(
// "id" => 2,
"user_id" => 3,
"house_id" => 2,
// "is_del" => 0
);*/
/* $params = array(
// "id" => 2,
"user_id" => 3,
"house_id" => 2,
// "is_del" => 0
);*/
$msg
=
isset
(
$params
[
'id'
])
?
"修改"
:
"新增"
;
$result
=
$this
->
attentionModel
->
addOrUpdateAttentionShop
(
$params
);
if
(
$result
[
'code'
]
==
200
)
{
...
...
@@ -57,18 +57,18 @@ class AttentionShop extends Basic
public
function
attentionList
()
{
$params
=
$this
->
params
;
/*
$params = array(
"user_id" => 1
,
"pageNo" => 1,
"pageSize" => 15,
);*/
/*
$params = array(
"user_id" => 47
,
"pageNo" => 1,
"pageSize" => 15,
);*/
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$order_
=
'a.create_time desc'
;
$field
=
"a.id,
b.title,b.area,b.room_area2,b.price,b.shangpu_tags
"
;
//b.room_num_left 前端显示已下架,不可点击到详情
$field
=
"a.id,
a.house_id,b.title,b.area,b.room_area2,b.price,b.shangpu_tags,b.room_num_left
"
;
if
(
!
isset
(
$params
[
"user_id"
]))
{
return
$this
->
response
(
"101"
,
"用户id不能为空"
);
...
...
@@ -83,11 +83,16 @@ class AttentionShop extends Basic
$result
[
$key
][
"api_path"
]
=
IMG_PATH
;
$imgParam
[
"house_id"
]
=
$val
[
"house_id"
];
$imgParam
[
"imgtype"
]
=
1
;
//默认主图
$result
[
$key
][
"images"
]
=
$this
->
dbImg
->
getHouseImages
(
$imgParam
,
1
);
$imgArr
=
$this
->
dbImg
->
getHouseImages
(
$imgParam
,
1
);
if
(
count
(
$imgArr
)
>
0
){
$result
[
$key
][
"images"
]
=
$imgArr
[
0
];
}
else
{
$result
[
$key
][
"images"
]
=
""
;
}
}
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
}
\ No newline at end of file
application/api/controller/TradeLog.php
View file @
83d6b3c3
...
...
@@ -5,6 +5,7 @@ namespace app\api\controller;
use
app\api\extend\Basic
;
use
app\model\Evaluate
;
use
app\model\HouseImgs
;
use
app\model\HouseInfos
;
use
app\model\JournalAccounts
;
/**
...
...
@@ -20,12 +21,14 @@ class TradeLog extends Basic
protected
$journalAccountsMode
;
protected
$dbImg
;
protected
$evaluateMode
;
protected
$houseInfoModel
;
public
function
__construct
(
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
journalAccountsMode
=
new
JournalAccounts
();
$this
->
dbImg
=
new
HouseImgs
();
$this
->
houseInfoModel
=
new
HouseInfos
();
$this
->
evaluateMode
=
new
Evaluate
();
}
...
...
@@ -63,6 +66,8 @@ class TradeLog extends Basic
$evaluateResult
=
$this
->
evaluateMode
->
getIsEvaluate
(
20
,
$val
[
"house_id"
],
$param
[
"user_id"
]);
$result
[
"is_evaluate"
]
=
count
(
$evaluateResult
)
>
0
?
1
:
0
;
$houseInfo
=
$this
->
houseInfoModel
->
getHouseDetail
(
"room_num_left"
,
array
(
"id"
=>
$val
[
"house_id"
]));
$result
[
$key
][
"room_num_left"
]
=
$houseInfo
[
"room_num_left"
];
}
return
$this
->
response
(
"200"
,
"request"
,
$result
);
...
...
application/model/AttentionModel.php
View file @
83d6b3c3
...
...
@@ -88,7 +88,7 @@ class AttentionModel extends Model
public
function
myAttentionList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$param
)
{
$params
[
"a.user_id"
]
=
$param
[
"user_id"
];
$params
[
"b.room_num_left"
]
=
array
(
"<>"
,
0
);
//剩余数为0 的商品不显示
//
$params["b.room_num_left"] = array( "<>", 0 ); //剩余数为0 的商品不显示
$params
[
"b.show_all"
]
=
array
(
"eq"
,
0
);
//只显示公开的楼盘
return
$this
->
field
(
$field
)
->
alias
(
"a"
)
...
...
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