Commit f661ece5 authored by zhuwei's avatar zhuwei

开盘广场-评论详情-回复列表

parent 6ca5447c
......@@ -124,6 +124,19 @@ class Square extends Basic
}
}
public function getSquareCommentExtList()
{
$params = $this->params;
$result= $this->s_square->getSquareCommentExtList($params);
if($result){
return $this->response("200", "成功",$result);
}else{
return $this->response("200", "成功",$result);
}
}
}
\ No newline at end of file
......@@ -238,4 +238,22 @@ class SquareService
return [ 'data' => $res];
}
public function getSquareCommentExtList($params){
$pageNo = empty($params['page_no']) ? 1 : $params['page_no'];
$pageSize = empty($params['page_size']) ? 15 : $params['page_size'];
$field = 'CommentExt.id,CommentExt.comment,CommentExt.create_time,AgentA.img,AgentA.name as agent_id_a,AgentB.name as agent_id_b';//
$get_params['CommentExt.comment_id'] = $params['id'];
$res = $this->m_coment_ext->getSquareCommentExtList($pageNo, $pageSize, $field, $get_params);
$res_total = $this->m_coment_ext->getSquareCommentExtListTotal($field, $get_params);
foreach ($res as $key => $val) {
$res[$key]['image_path'] = 'http://n.sinaimg.cn/ent/transform/20170921/FVGl-fymesmp0851702.jpg';
}
return [ 'data' => $res, 'total' => $res_total ];
}
}
\ No newline at end of file
......@@ -42,7 +42,8 @@ class BCommentExt extends Model
$result = Db::table($this->table)
->field($field)
->alias('CommentExt')
->join('a_agents Agent', 'Agent.id = Comment.agent_id', 'left')
->join('a_agents AgentA', 'AgentA.id = CommentExt.agent_id_a', 'left')
->join('a_agents AgentB', 'AgentB.id = CommentExt.agent_id_b', 'left')
->where($params)
->count();
//dump($this->getLastSql());
......
......@@ -855,12 +855,13 @@ Route::group('broker', [
'getStoreRandKingListByAgentId' => ['api_broker/RankingList/getStoreRandKingListByAgentId', ['method' => 'GET|POST']],
//开盘广场
'addSquare' => [ 'api_broker/Square/addSquare', [ 'method' => 'GET|POST' ] ],
'getSquareList' => [ 'api_broker/Square/getSquareList', [ 'method' => 'GET|POST' ] ],
'getSquareInfo' => [ 'api_broker/Square/getSquareInfo', [ 'method' => 'GET|POST' ] ],
'addComent' => [ 'api_broker/Square/addComent', [ 'method' => 'GET|POST' ] ],
'getSquareCommentList' => [ 'api_broker/Square/getSquareCommentList', [ 'method' => 'GET|POST' ] ],
'getCommenInfo' => [ 'api_broker/Square/getCommenInfo', [ 'method' => 'GET|POST' ] ],
'addSquare' => [ 'api_broker/Square/addSquare', [ 'method' => 'GET|POST' ] ],
'getSquareList' => [ 'api_broker/Square/getSquareList', [ 'method' => 'GET|POST' ] ],
'getSquareInfo' => [ 'api_broker/Square/getSquareInfo', [ 'method' => 'GET|POST' ] ],
'addComent' => [ 'api_broker/Square/addComent', [ 'method' => 'GET|POST' ] ],
'getSquareCommentList' => [ 'api_broker/Square/getSquareCommentList', [ 'method' => 'GET|POST' ] ],
'getCommenInfo' => [ 'api_broker/Square/getCommenInfo', [ 'method' => 'GET|POST' ] ],
'getSquareCommentExtList' => [ 'api_broker/Square/getSquareCommentExtList', [ 'method' => 'GET|POST' ] ],
]);
......
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