Commit a46e5618 by 杨树贤

修复bug

parent 182117d0
......@@ -42,6 +42,9 @@ class SupplierReceiptApiController extends Controller
//先去表单验证
$validator = new ReceiptValidator();
$requestData = $request->all();
$requestData = array_map(function ($item) {
return trim($item);
}, $requestData);
$validateResult = $validator->checkSave($requestData);
if ($validateResult) {
$this->response(-1, $validateResult);
......
......@@ -32,7 +32,7 @@ class SupplierAddressService
} else {
$result = $addressModel->insert($shippingData);
}
if (!$result) {
if ($result === false) {
return $result;
}
$returnData = [
......
......@@ -264,7 +264,6 @@ class SupplierService
$supplierAddressService->updateUnitedAddress($supplierId, $channel['supplier_address'], $address['shipping_address'], $address['return_address']);
$model->where('supplier_id', $supplierId)->update($channel);
//保存地址
$supplierAddressService->saveAddress($address);
......
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 sign in to comment