Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c5abeaf0
authored
Mar 16, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
空格处理
parent
41680f18
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
app/Http/Services/DataService.php
app/Http/Transformers/SupplierTransformer.php
app/Http/Services/DataService.php
View file @
c5abeaf0
...
...
@@ -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'
])
]);
}
}
}
...
...
app/Http/Transformers/SupplierTransformer.php
View file @
c5abeaf0
...
...
@@ -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
)
:
''
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment