Commit b0abae59 authored by zw's avatar zw

Merge remote-tracking branch 'origin/1224-v3.0.3' into 1224-v3.0.3

# Conflicts: # application/model/ORefundModel.php
parents 4dd91900 51a4a1c2
......@@ -808,6 +808,14 @@ class Finance extends Basic
$where['a.agent_id'] = $this->params['agent_id'];
}
if (isset($this->params['is_self']) && $this->params['is_self'] != -1) {
if ($this->params['is_self']) {
$where['e.operation_id'] = $this->userId;
} else {
$where['e.operation_id'] = ['<>', $this->userId];
}
}
$fields = 'a.create_time,a.id,a.order_id,a.pay_log_id,a.refund_money,a.type,a.agent_id,a.agent_name,b.house_id,a.status,';
$fields .= 'd.income_time,a.type,c.store_id';
$list = $refund->getCheckRefundList($pageNo, $pageSize, 'a.id DESC', $fields, $where);
......
......@@ -245,4 +245,28 @@ class ORefundModel extends Model{
return $data;
}
/**
* @param $params
* @return float|int
*/
public function getSumMoney($params) {
return $this->db_->alias('a')
->join('o_order b', 'a.order_id = b.id', 'left')
->join('a_agents c', 'a.agent_id = c.id', 'left')
->join('o_paylog d', 'a.pay_log_id = d.id', 'left')
->join('o_refund_log e', 'a.id = e.refund_id', 'left')
->where($params)
->group('a.id')
->sum('a.refund_money');
}
/**
* @param $data
* @param $where
* @return ORefundModel
*/
public function updateData($data, $where) {
return $this->where($where)->update($data);
}
}
\ No newline at end of file
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