Commit a46e5618 by 杨树贤

修复bug

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