Commit fffd9305 authored by zhuwei's avatar zhuwei

商学院评论列表

parent 6ff47441
......@@ -14,6 +14,7 @@ use app\index\extend\Basic;
use app\model\SFile;
use app\model\SLabel;
use app\model\SNews;
use app\model\SNewsComment;
use think\Request;
class News extends Basic
......@@ -236,4 +237,49 @@ class News extends Basic
}
}
/**
* 商学院评论列表
* @return \think\Response
*/
public function getCommentList()
{
$where['a.status'] = 0;
#时间 start_time end_time
if (!empty($this->params['end_time']) && !empty($this->params['start_time'])) {
$where['a.create_time'] = [ 'between time', [ $this->params['start_time'] . ' 00:00:00', $this->params['end_time'] . ' 23:59:59' ] ];
}
#部门 district_id
if (!empty($params['district_id'])) {
$where['b.district_id'] = $params['district_id'];
}
#门店 store_id
if (!empty($params['store_id'])) {
$where['b.store_id'] = $params['store_id'];
}
#姓名 name
if (!empty($params['name'])) {
$where['b.name'] = ['LIKE','%'.$params['name'].'%'];
}
#手机号 phone
if (!empty($params['phone'])) {
$where['b.phone'] = ['LIKE','%'.$params['phone'].'%'];
}
#标题 title
if (!empty($params['title'])) {
$where['c.title'] = ['LIKE','%'.$params['title'].'%'];
}
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$comment = new SNewsComment();
$field = 'a.id,a.comment_content,a.create_time,b.name,c.title';
$data = $comment->getCommentList($pageNo, $pageSize, 'a.id DESC', $field, $where);
return $this->response(200, "", $data);
}
}
\ No newline at end of file
......@@ -58,4 +58,25 @@ class SNewsComment extends BaseModel
->count();
}
public function getCommentList($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '')
{
$data = $this->field($field)
->alias('a')
->join('a_agents b', 'a.agent_id = b.id', 'left')
->join('s_news c', 'a.s_news_id = c.id', 'left')
->where($params)
->order($order_)
->limit($pageSize)
->page($pageNo)
->select();
// foreach ($data as $k=>$v) {
// if (isset($v['img'])) {
// $data[$k]['img'] = AGENTHEADERIMGURL . $v['img'];
// }
// }
return $data;
}
}
\ No newline at end of file
......@@ -305,24 +305,25 @@ Route::group('index', [
'adjustment' => ['index/Finance/adjustment', ['method' => 'GET']], //获取实收日期
'getPayLogData' => ['index/Finance/getPayLogData', ['method' => 'GET']], //收款各种详情
'evaluationList' => ['index/Evaluation/evaluationList', ['method' => 'POST|GET']], //评价列表 朱伟 2018-06-13
'marchInList' => ['index/MarchIn/marchInList', ['method' => 'POST|GET']], //进场记录列表 朱伟 2018-06-13
'superviseList' => ['index/Supervise/superviseList', ['method' => 'POST|GET']], //监督执行列表 朱伟 2018-06-14
'business_school' => ['index/news/index', ['method' => 'GET']], //商学院资讯列表
'addNews' => ['index/news/addNews', ['method' => 'POST']], //新增商学院资讯
'getNewsInfo' => ['index/news/getNewsInfo', ['method' => 'GET']], //商学院资讯详情
'getNewsLabel' => ['index/news/getNewsLabel', ['method' => 'GET']], //商学院资标签
'delNews' => ['index/news/delNews', ['method' => 'POST']], //删除商学院文章
'new_text' => ['index/news/newText', ['method' => 'GET']],
'delNewsFile' => ['index/news/delNewsFile', ['method' => 'POST']], //删除商学院附件
'agentEvaluateNumAndFraction' => ['index/broker/agentEvaluateNumAndFraction', ['method' => 'POST|GET']],//经纪人列表计算-评价次数和分数 朱伟 2018-07-03
'uploadImg' => ['index/UploadImg/uploadImg', ['method' => 'POST']],//全局图片上传
'followUpList' => ['index/HouseFollowUp/followUpList', ['method' => 'GET']],//商铺跟进liu
'userModalList' => ['index/Member/userDetail', ['method' => 'GET']], //客户跟进模态框,公用
'inspectionRecordList' => ['index/InspectionRecord/inspectionRecordList', ['method' => 'GET']],//约带看记录liu
'realtimePerformance' => ['index/RealTimePerformance/realtimePerformanceList', ['method' => 'GET']],//实时业绩liu
'shopinspectionLog' => ['index/ShopInspectionLog/shopinspectionLogList', ['method' => 'POST|GET']],//商铺查看日志liu
'shopinspectionLogTest' => ['index/ShopInspectionLogTest/shopinspectionLogListTest', ['method' => 'POST|GET']],//商铺查看日志测试liu
'evaluationList' => [ 'index/Evaluation/evaluationList', [ 'method' => 'POST|GET' ] ], //评价列表 朱伟 2018-06-13
'marchInList' => [ 'index/MarchIn/marchInList', [ 'method' => 'POST|GET' ] ], //进场记录列表 朱伟 2018-06-13
'superviseList' => [ 'index/Supervise/superviseList', [ 'method' => 'POST|GET' ] ], //监督执行列表 朱伟 2018-06-14
'business_school' => [ 'index/news/index', [ 'method' => 'GET' ] ], //商学院资讯列表
'addNews' => [ 'index/news/addNews', [ 'method' => 'POST' ] ], //新增商学院资讯
'getNewsInfo' => [ 'index/news/getNewsInfo', [ 'method' => 'GET' ] ], //商学院资讯详情
'getNewsLabel' => [ 'index/news/getNewsLabel', [ 'method' => 'GET' ] ], //商学院资标签
'delNews' => [ 'index/news/delNews', [ 'method' => 'POST' ] ], //删除商学院文章
'getCommentList' => [ 'index/news/getCommentList', [ 'method' => 'POST' ] ], //删除商学院文章
'new_text' => [ 'index/news/newText', [ 'method' => 'GET' ] ],
'delNewsFile' => [ 'index/news/delNewsFile', [ 'method' => 'POST' ] ], //删除商学院附件
'agentEvaluateNumAndFraction' => [ 'index/broker/agentEvaluateNumAndFraction', [ 'method' => 'POST|GET' ] ],//经纪人列表计算-评价次数和分数 朱伟 2018-07-03
'uploadImg' => [ 'index/UploadImg/uploadImg', [ 'method' => 'POST' ] ],//全局图片上传
'followUpList' => [ 'index/HouseFollowUp/followUpList', [ 'method' => 'GET' ] ],//商铺跟进liu
'userModalList' => [ 'index/Member/userDetail', [ 'method' => 'GET' ] ], //客户跟进模态框,公用
'inspectionRecordList' => [ 'index/InspectionRecord/inspectionRecordList', [ 'method' => 'GET' ] ],//约带看记录liu
'realtimePerformance' => [ 'index/RealTimePerformance/realtimePerformanceList', [ 'method' => 'GET' ] ],//实时业绩liu
'shopinspectionLog' => [ 'index/ShopInspectionLog/shopinspectionLogList', [ 'method' => 'POST|GET' ] ],//商铺查看日志liu
'shopinspectionLogTest' => [ 'index/ShopInspectionLogTest/shopinspectionLogListTest', [ 'method' => 'POST|GET' ] ],//商铺查看日志测试liu
'performancesubsidiaryList' => ['index/PerformanceSubsidiary/performancesubsidiaryList', ['method' => 'POST|GET']],//业绩明细liu
'pkList' => ['index/PkList/pkList', ['method' => 'POST|GET']],//pk榜 liu
......
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