Commit 658b91fa authored by zhuwei's avatar zhuwei

业绩

parent 3eb736bc
......@@ -257,18 +257,20 @@ class TAgentTotalModel extends Model
$group_ = "";
switch ($type) {
case 1:
$group_ = "agent_id";
$group_ = "a.agent_id";
break;
case 2:
$group_ = "store_id";
$group_ = "a.store_id";
break;
case 3:
$group_ = "district_id";
$group_ = "a.district_id";
break;
}
$result = $this->db_
->field($field)
->alias('a')
->join('a_district d', 'a.district_id = d.id', 'left')
->where($params)
->group($group_)
->count();
......@@ -282,18 +284,20 @@ class TAgentTotalModel extends Model
$group_ = "";
switch ($type) {
case 1:
$group_ = "agent_id";
$group_ = "a.agent_id";
break;
case 2:
$group_ = "store_id";
$group_ = "a.store_id";
break;
case 3:
$group_ = "district_id";
$group_ = "a.district_id";
break;
}
$result = $this->db_
->field($field)
->alias('a')
->join('a_district d', 'a.district_id = d.id', 'left')
->where($params)
->group($group_)
->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