Commit c67dad8a authored by hujun's avatar hujun

Merge remote-tracking branch 'origin/test' into test

parents d3813b9b 383b0933
......@@ -104,8 +104,8 @@ class AppointmentTime extends Basic
{
/* $params = array(
"status" => 2, //看铺状态 0待经纪人确认(确认后存agents_id) 1:待看 2:已看' 如果是待看 0,1 已看是2
"user_id" => "1",//对应u_users表
"phone" => "18112347151",//phone
"user_id" => "122",//对应u_users表
"phone" => "17717536290",//phone
"pageNo" => "1",
"pageSize" => 15
);*/
......@@ -128,7 +128,7 @@ class AppointmentTime extends Basic
if ($params["status"] == 1) {
$result = $this->getWaitList($pageNo, $pageSize, $params);
} elseif ($params["status"] == 2) {
$result = $this->getYetList($pageNo, $pageSize, $params);
$result = $this->getYetListV2($pageNo, $pageSize, $params);
}
if (count($result) > 0) {
......@@ -199,5 +199,33 @@ class AppointmentTime extends Basic
return $result;
}
/**
* 已看列表
* @param $pageNo
* @param $pageSize
* @param $params
* @return false|\PDOStatement|string|\think\Collection
*/
public function getYetListV2($pageNo, $pageSize, $params)
{
$field = "a.id,a.phone,c.reception_id as agents_id,c.create_time as expect_time,a.house_id,
d.external_title as house_title,d.residue_num as room_num_left";
$where_["a.user_id"] = $params["user_id"];
$result = $this->appointmentTimeModel->getHaveToSeeList($pageNo, $pageSize, "id desc", $field, $where_);
//获取图片信息
foreach ($result as $key => $val) {
$result[$key]["api_path"] = IMG_PATH;
$param["house_id"] = $val["house_id"];
$param["img_type"] = 1; //默认主图
$result[$key]["images"] = $this->dbImg->getHouseImages($param, 1);
//todo 是否评价
$evaluateResult = $this->evaluateMode->getIsEvaluate(10, $val["id"], $params["user_id"]);
$result[$key]["is_evaluate"] = count($evaluateResult) > 0 ? 1 : 0;
}
return $result;
}
}
\ No newline at end of file
......@@ -65,11 +65,11 @@ class AttentionShop extends Basic
public function attentionList()
{
$params = $this->params;
$params = array(
/* $params = array(
"user_id" => 816,
"pageNo" => 1,
"pageSize" => 15,
);
);*/
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
......
......@@ -486,6 +486,7 @@ class OrderLog extends Basic
$insert_data['order_no'] = $bargain_data['order_no'];
$insert_data['trade_type'] = $bargain_data['trade_type'];
$insert_data['submit_agent_id'] = $bargain_data['submit_agent_id'];
$insert_data['submit_agent_name'] = $bargain_data['submit_agent_name'];
$insert_data['price'] = $bargain_data['price'];
$insert_data['commission'] = $bargain_data['commission'];
$insert_data['status'] = $bargain_data['status'];
......@@ -529,9 +530,9 @@ class OrderLog extends Basic
$bargain = $bargainModel->getBargainDetail($field, $where_);
if (count($bargain) > 0) {
return $this->response("200","request success",["id"=> $bargain[0]["id"]]);
}else{
return $this->response("200","request null");
return $this->response("200", "request success", [ "id" => $bargain[0]["id"] ]);
} else {
return $this->response("200", "request null");
}
}
}
\ No newline at end of file
......@@ -14,7 +14,7 @@ define('LOCAL_IMG_HOST','/resource/lib/Attachments/');
define('PAGESIZE', 15); //分页每页条数
define('ADMIN_URL_TL','https://admin.tonglianjituan.com/'); //B端网址
//define('TEST_ADMIN_URL_TL','https://dev.tonglianjituan.com/'); //B端网址
define('CURRENT_URL', 'http://'.$_SERVER['HTTP_HOST'].'/'); //取当前域名地址
define('CURRENT_URL', 'https://'.$_SERVER['HTTP_HOST'].'/'); //取当前域名地址
define('HEADERIMGURL', CURRENT_URL . 'static'. DS . 'head_portrait/'); //头像地址
define('AGENTHEADERIMGURL', CURRENT_URL . 'static'. DS . 'agent_head_portrait/'); //头像地址
define('CHAT_IMG_URL', CURRENT_URL . 'static'. DS . 'chat_image/'); //聊天图片地址
......
......@@ -367,6 +367,8 @@ class AAgents extends BaseModel
{
return Db::table($this->table)
->field($field)
->limit($pageSize)
->page($pageNo)
->select();
}
......
......@@ -62,6 +62,34 @@ class AppointWatchShop extends BaseModel
->select();
}
/**
* 预约看铺列表 已看列表
*
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getHaveToSeeList($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field, $params)
{
return $this
->field($field)
->alias("a")
->join("o_report b","a.applies_id = b.id","left")
->join("o_march_in c","c.report_id = b.id","right")
->join("g_houses d","d.id = a.house_id","left")
->where($params)
->order($order_)
->limit($pageSize)
->page($pageNo)
->select();
}
/**
* 预约看铺总数
*
......@@ -81,7 +109,8 @@ class AppointWatchShop extends BaseModel
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getAppointInfo($field, $params) {
public function getAppointInfo($field, $params)
{
return $this->field($field)
->where($params)
->find();
......
......@@ -44,12 +44,12 @@ class ResultsSummaryTask
public function totalAgentResults()
{
set_time_limit(0);
set_time_limit(0); // 取消脚本运行时间的超时上限
//todo 1.分页查询经纪人, 2遍历执行,判断一个经纪人在统计表最后一条统计数据的日期
//TODO 3.日期加一天并判断是否大于等于当前时间大于return 4.执行此日期的统计,5.当次日期小于当前日期,递归日期加一。继续统计
$total = $this->agentsModel->getAgentsCountByTask();
$pageSize = 50;
$pageSize = 200;
$pageTotal = ceil($total / $pageSize);
for ($pageNo = 1; $pageNo <= $pageTotal; $pageNo++) {
$resultArr = $this->agentsModel->getAgentsListByTask($pageNo, $pageSize, "id,store_id,district_id");
......@@ -65,6 +65,7 @@ class ResultsSummaryTask
unset($this->marchInModel);
unset($this->payLogModel);
}
private function executeTotal($resultArr)
......
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