Commit 49a1417e authored by hujun's avatar hujun

收款记录条件修改

parent db99e9d5
......@@ -69,11 +69,11 @@ class Collection extends Basic
}
if (!empty($this->params['store_id'])) {
$where['f.id'] = $this->params['store_id'];
$where['e.store_id'] = $this->params['store_id'];
}
if (!empty($this->params['district_id'])) {
$where['g.id'] = $this->params['district_id'];
$where['e.district_id'] = $this->params['district_id'];
}
if (!empty($this->params['report_phone'])) {
......
......@@ -312,6 +312,7 @@ class OPayLogModel extends Model
->join('g_houses d','b.house_id = d.id','left')
->join('a_agents e','a.agent_id=e.id','left')
->join('a_store f','e.store_id=f.id','left')
->join('a_district g','f.district_id=g.id','left')
->where($params)
->count();
} else {
......@@ -319,6 +320,9 @@ class OPayLogModel extends Model
->join("o_order b","a.order_id = b.id","left")
->join("o_report c","b.f_id = c.id","left")
->join('g_houses d','b.house_id = d.id','left')
->join('a_agents e','c.report_agent_id=e.id','left')
->join('a_store f','e.store_id=f.id','left')
->join('a_district g','f.district_id=g.id','left')
->where($params)
->count();
}
......
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