Commit d05b6a8a authored by zhuwei's avatar zhuwei

周报日报1

parent 4ca139a3
......@@ -26,6 +26,49 @@ class PerformanceReport extends Basic
}
/**
* 获取日报或者周报列表
* @return \think\Response
*/
public function getPerformanceReportList()
{
$params = $this->params;
/*$params = array(
"type" => 0,
);*/
// if (!isset($params["type"])) {
// return $this->response("101", "请求参数错误");
// }
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$type = !empty($params["type"]) ? $params["type"] : 0;
$field = 'RAgentReport.id,';
$field .= 'RAgentReport.img_url,';
$field .= 'Agent.name';
$get_params['RAgentReport.type'] = $type;//类型 0周报 1日报
$get_params['RAgentReport.is_del'] = 0;
$order = "RAgentReport.create_time desc";
$res = $this->rAgentReport->getPerformanceReportList($pageNo, $pageSize, $field, $get_params, $order);
// $res_total = $this->aCollectHouse->getCollectListTotal($field,$get_params);
// $look_shop_service = new LookShopService();
// foreach ($res as $key => $val) {
// $isLook = $look_shop_service->isLooked($params["agents_id"], $val["id"]);
// $res[$key]["is_look"] = $isLook;
// $res[$key]["rent_price"] = $val["rent_price"] * 0.01;
// $res[$key]["rent_price"] = $val["rent_price"] * 0.01;
// }
//
return $this->response("200", "成功",$res);
}
......
......@@ -12,4 +12,23 @@ namespace app\model;
class RAgentReport extends BaseModel
{
/**
* 查询数据
* 朱伟 2018-09-28
*/
public function getPerformanceReportList($pageNo,$pageSize,$field,$params,$order)
{
$result = $this
->field($field)
->alias('RAgentReport')
->join('a_agents Agent','RAgentReport.agent_id=Agent.id','left')
->where($params)
->limit($pageSize)
->page($pageNo)
->order($order)
->select();
//dump($this->getLastSql());
return $result;
}
}
\ No newline at end of file
......@@ -318,12 +318,15 @@ Route::group('index', [
'ceshi' => [ 'index/ImageDepot/ceshi', [ 'method' => 'get | post' ] ],//
//运营数相关接口
'operationChatUserNum' => [ 'index/OperationData/chatUserNum', [ 'method' => 'get | post' ] ],//
'operationUserPhoneNum' => [ 'index/OperationData/userPhoneNum', [ 'method' => 'get | post' ] ],//
'operationLoginNum' => [ 'index/OperationData/loginNum', [ 'method' => 'get | post' ] ],//
'operationHouseNum' => [ 'index/OperationData/houseNum', [ 'method' => 'get | post' ] ],//
'operationHouseBargainNum' => [ 'index/OperationData/houseBargainNum', [ 'method' => 'get | post' ] ],//
'getFirstLoginTotal' => [ 'index/InviteTotal/getFirstLoginTotal', [ 'method' => 'get | post' ] ],//
'operationChatUserNum' => [ 'index/OperationData/chatUserNum', [ 'method' => 'get | post' ] ],
'operationUserPhoneNum' => [ 'index/OperationData/userPhoneNum', [ 'method' => 'get | post' ] ],
'operationLoginNum' => [ 'index/OperationData/loginNum', [ 'method' => 'get | post' ] ],
'operationHouseNum' => [ 'index/OperationData/houseNum', [ 'method' => 'get | post' ] ],
'operationHouseBargainNum' => [ 'index/OperationData/houseBargainNum', [ 'method' => 'get | post' ] ],
'getFirstLoginTotal' => [ 'index/InviteTotal/getFirstLoginTotal', [ 'method' => 'get | post' ] ],
//后台业绩日报,周报
'getPerformanceReportList' => [ 'index/PerformanceReport/getPerformanceReportList', [ '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