Commit 2472da0f authored by hujun's avatar hujun

确认分佣不覆盖之前的数据

parent cb5e27c3
...@@ -847,9 +847,12 @@ class Finance extends Basic ...@@ -847,9 +847,12 @@ class Finance extends Basic
if ($check->vip($this->userId, 'account_commission')) { if ($check->vip($this->userId, 'account_commission')) {
return $this->response(101, '没有权限!'); return $this->response(101, '没有权限!');
} }
$partial_data = $m_partial->getPartialDetail('confirm_date', ['id'=>$item['commission_id']]);
if (empty($partial_data['confirm_date'])) {
$update_arr[$i]['confirm_date'] = date("Y-m-d H:i:s", time()); $update_arr[$i]['confirm_date'] = date("Y-m-d H:i:s", time());
$update_arr[$i]['confirm_status'] = 1; $update_arr[$i]['confirm_status'] = 1;
} }
}
$i++; $i++;
$log_data[] = "[分佣比例(%):{$item['scale']}][应分佣金(元):{$item['should_commission']}][实分佣金(元):{$item['real_fee']}]" . $log_data[] = "[分佣比例(%):{$item['scale']}][应分佣金(元):{$item['should_commission']}][实分佣金(元):{$item['real_fee']}]" .
......
...@@ -428,4 +428,18 @@ class OPartialCommission extends BaseModel ...@@ -428,4 +428,18 @@ class OPartialCommission extends BaseModel
return $result; return $result;
} }
/**
* @param $field
* @param $where
* @return array|false|\PDOStatement|string|\think\Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getPartialDetail($field, $where) {
return $this->field($field)
->where($where)
->find();
}
} }
\ 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