优化保存

master
chenzhi 4 years ago
parent 30d6f53582
commit a9951bd657

@ -73,18 +73,12 @@ class TransferMerchantController extends ThinkController
if($ways == 1){
$info = $this->TransferMerchant->getStatementPaymentInfo();
}elseif($ways == 2){
$info = $this->TransferMerchant->getUnderPaymentInfo();
}
$flag = false;
if($info['id'] == $id){
$this->ajaxReturn([
'status' => 1,
'message' => '保存成功'
]);
if($ways == 2){
$info = $this->TransferMerchant->getUnderPaymentInfo();
}
if($info['id'] != $id){
$idinfo = $this->TransferMerchant->field("id,ways")->where("id = {$id}")->find();
$idsave = [
'id'=>$id,
@ -97,6 +91,7 @@ class TransferMerchantController extends ThinkController
'ways'=>$info['ways']-$ways
];
$this->TransferMerchant->save($infosave);
}
$this->ajaxReturn([
'status' => 1,

Loading…
Cancel
Save