Commit bfdc5bf5 authored by hujun's avatar hujun

查询

parent 89b2904a
...@@ -659,7 +659,7 @@ class Finance extends Basic ...@@ -659,7 +659,7 @@ class Finance extends Basic
$partial_commission[$k2]['income_time_add'] = $income_time_add; $partial_commission[$k2]['income_time_add'] = $income_time_add;
} }
} else { } else {
$income_time = $m_real->getBargainIncome($this->params['id'], 'id,income_time'); $income_time = $m_real->getIncome(['id'=>$v2['real_income_id']], 'id,income_time');
if (empty($income_time)) { if (empty($income_time)) {
$partial_commission[$k2]['income_time'] = []; $partial_commission[$k2]['income_time'] = [];
} else { } else {
......
...@@ -52,6 +52,21 @@ class ORealIncome extends BaseModel ...@@ -52,6 +52,21 @@ class ORealIncome extends BaseModel
->find(); ->find();
} }
/**
* @param int $bargain_id
* @param string $field
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getIncome($where, $field = 'id as fee_id,money,income_time') {
$where['is_del'] = 0;
return $this->field($field)
->where($where)
->find();
}
/** /**
* @param int $field * @param int $field
* @param array $where * @param array $where
......
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