Commit 5ac421ac authored by zhuwei's avatar zhuwei

bug

parent 49518ffd
......@@ -5,6 +5,7 @@ namespace app\api_broker\controller;
use app\api_broker\extend\Basic;
use app\api_broker\service\PerformanceService;
use Think\Exception;
use think\Log;
use think\Request;
/**
......@@ -170,8 +171,9 @@ class Performance extends Basic
if (!isset($params["agent_id"]) || !isset($params["start_time"]) || !isset($params["end_time"] )|| !isset($params["site_id"])) {
return $this->response("101", "请求参数错误");
}
Log::write($params, 'storeOrAgentSort'); //记录日志
//城市选择
$site_id = $params["site_id"]? $params["site_id"]: $this->siteId;
$site_id = $params["site_id"]? $params["site_id"]: '';
try {
$result = $this->service_->storeSortByDistrictId($params["agent_id"], $params["is_store"], $params["start_time"], $params["end_time"]." 23:59:59",$site_id);
return $this->response("200", "request success", $result);
......
......@@ -55,6 +55,7 @@ class Site extends Basic
*/
public function getAgentSiteList()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/*$params = array(
"agent_phone" => "13817616471"
......
......@@ -376,7 +376,9 @@ class PerformanceService
$verify = new VerifyService();
$agent_ids = $verify->getAgentsByAgentId($agent_id);
$params["a.agent_id"] = array( "in", $agent_ids );
$params['d.site_id'] = $site_id;
if (!empty($site_id)) {
$where['a.disc'] = $site_id;
}
$field = "
a.store_id,
a.agent_id,
......
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