Commit e1a15f1e authored by hujun's avatar hujun

状态更新

parent eb7c3a43
......@@ -3236,7 +3236,7 @@ class Finance extends Basic
return $this->response($code, '存在调整,不能删除');
}
$num = $m_pay_adjustment->editData(['is_del'=>1], $this->params['id']);
$num = $m_pay_adjustment->updatePayLogAdjustment(['is_del'=>1, 'id'=>$this->params['id']]);
if ($num > 0) {
$m_pay = new OPayLogModel();
......
......@@ -151,4 +151,25 @@ class OPayLogAdjustment extends BaseModel{
->where($params)
->sum('a.money');
}
/**
* @param $params
* @return int|string
*/
public function updatePayLogAdjustment($params)
{
$id = $params["id"];
unset($params["id"]);
Db::startTrans();
try {
$id = $this->db_->where([ "id" => $id ])->update($params);
Db::commit();
return $id;
} catch (\Exception $e) {
echo $this->getLastSql();
dump("error:" . $e);
Db::rollback();
return 0;
}
}
}
\ 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