Commit c5abeaf0 by 杨树贤

空格处理

parent 41680f18
......@@ -394,6 +394,9 @@ class DataService
foreach ($suppliers as $supplier) {
if (mb_strlen($supplier['supplier_name']) != mb_strlen(trim($supplier['supplier_name']))) {
echo '有空格的供应商 : ' . $supplier['supplier_name'] . mb_strlen($supplier['supplier_name']) . "_" . mb_strlen(trim($supplier['supplier_name'])) . PHP_EOL;
SupplierChannelModel::where('supplier_id', $supplier['supplier_id'])->update([
'supplier_name' => trim($supplier['supplier_name'])
]);
}
}
}
......
......@@ -191,6 +191,8 @@ class SupplierTransformer
//转换表单数据
public function transformPostData($channel)
{
$channel['supplier_name'] = trim($channel['supplier_name']);
if (!empty($channel['stockup_type'])) {
$stockupType = array_keys($channel['stockup_type']);
$stockupType = !empty($stockupType) ? implode(",", $stockupType) : '';
......
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