Commit 83d6b3c3 authored by clone's avatar clone

下架标签,订单,预约,关注列表

parent 8daedc60
......@@ -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"];
}
......
......@@ -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
......@@ -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);
......
......@@ -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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment