优化保存

master
chenzhi 4 years ago
parent a9951bd657
commit 5a303a6a7a

@ -82,13 +82,15 @@ class TransferMerchantController extends ThinkController
$idinfo = $this->TransferMerchant->field("id,ways")->where("id = {$id}")->find();
$idsave = [
'id'=>$id,
'ways'=>$idinfo['ways']-0+$ways
'ways'=>$idinfo['ways']-0+$ways,
'update_time'=>time()
];
$this->TransferMerchant->save($idsave);
//修改之前的
$infosave = [
'id'=>$info['id'],
'ways'=>$info['ways']-$ways
'ways'=>$info['ways']-$ways,
'update_time'=>time()
];
$this->TransferMerchant->save($infosave);
}

Loading…
Cancel
Save