Commit 254fdffc authored by zw's avatar zw

门店业绩bug

parent f1fd216b
...@@ -434,8 +434,9 @@ class PerformanceService ...@@ -434,8 +434,9 @@ class PerformanceService
if (count($list) > 0) { if (count($list) > 0) {
foreach ($list as $key => $item) { foreach ($list as $key => $item) {
$fields = "a.name,b.store_name"; $fields = "c.name,b.store_name";
$where_["a.store_id"] = $item["store_id"]; $where_["a.store_id"] = $item["store_id"];
$where_["c.id"] = $item["agent_id"];
$info = $this->agentModel->getStoreOrAgentInfo($fields, $where_); $info = $this->agentModel->getStoreOrAgentInfo($fields, $where_);
if (count($info) > 0) { if (count($info) > 0) {
$list[$key]["store_name"] = $info[0]["store_name"]; $list[$key]["store_name"] = $info[0]["store_name"];
......
...@@ -568,6 +568,7 @@ class AAgents extends BaseModel ...@@ -568,6 +568,7 @@ class AAgents extends BaseModel
->field($field) ->field($field)
->alias("a") ->alias("a")
->join("a_store b", "a.store_id = b.id", "left") ->join("a_store b", "a.store_id = b.id", "left")
->join("a_agents c", "a.store_id = c.store_id", "left")
->where($params) ->where($params)
->where('a.level', [ '=', 20 ], [ '=', 40 ], 'or') ->where('a.level', [ '=', 20 ], [ '=', 40 ], 'or')
->select(); ->select();
......
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