From 5bf280608884bffb95d7ca03023dac996c007da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=87=92=E6=95=A3=E4=BB=99=E4=BA=BA?= <31238785+LazyFury@users.noreply.github.com> Date: Wed, 9 Aug 2023 18:19:14 +0800 Subject: [PATCH] Update StoreOrderRefundServices.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit applyexpress 取post时设置了default,值为空时也会覆写数据库,如果禁止添加应该无论如何都unset,或者扩展其他字段 --- crmeb/app/services/order/StoreOrderRefundServices.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crmeb/app/services/order/StoreOrderRefundServices.php b/crmeb/app/services/order/StoreOrderRefundServices.php index b366faa4e..354b05bd4 100644 --- a/crmeb/app/services/order/StoreOrderRefundServices.php +++ b/crmeb/app/services/order/StoreOrderRefundServices.php @@ -877,8 +877,8 @@ public function editRefundExpress($data) 'change_message' => '用户已退货,订单号:' . $data['refund_express'], 'change_time' => time() ]); - if ($data['refund_img'] != '') unset($data['refund_img']); - if ($data['refund_explain'] != '') unset($data['refund_explain']); + unset($data['refund_img']); + unset($data['refund_explain']); $res2 = false !== $this->dao->update(['id' => $id], $data); $res = $res1 && $res2; if (!$res)