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
176022fd
authored
Dec 04, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复脚本
parent
d508e63f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
app/Http/Services/DataService.php
app/Http/function.php
app/Http/Services/DataService.php
View file @
176022fd
...
...
@@ -1679,10 +1679,10 @@ class DataService
foreach
(
$suppliers
as
$supplier
)
{
$oldSupplierName
=
$supplier
[
'supplier_name'
];
$supplier
[
'supplier_name'
]
=
replaceSpace
(
$supplier
[
'supplier_name'
]);
if
(
$oldSupplierName
!=
$supplier
[
'supplier_name'
])
{
dd
(
$oldSupplierName
,
$supplier
[
'supplier_name'
]);
}
if
(
$oldSupplierName
===
$supplier
[
'supplier_name'
])
{
continue
;
}
$region
=
$supplier
[
'region'
];
$regionType
=
$region
==
SupplierChannelModel
::
REGION_CN
?
1
:
2
;
...
...
@@ -1691,8 +1691,7 @@ class DataService
if
(
!
empty
(
$companyInfo
))
{
$groupCode
=
array_get
(
$companyInfo
,
'group_code'
);
if
(
$groupCode
)
{
if
(
$oldSupplierName
!=
$supplier
[
'supplier_name'
])
{
dd
(
$oldSupplierName
,
$supplier
[
'supplier_name'
]);
dd
(
$oldSupplierName
,
$supplier
[
'supplier_name'
]);
continue
;
//SupplierChannelModel::where('supplier_id', $supplier['supplier_id'])->update([
// 'supplier_name' => $supplier['supplier_name'],
...
...
@@ -1702,7 +1701,6 @@ class DataService
}
}
}
}
}
app/Http/function.php
View file @
176022fd
...
...
@@ -305,7 +305,7 @@ function getSpuSkuDb($id)
//去除特殊空格
function
replaceSpace
(
$str
)
{
$str
=
str_replace
(
"
"
,
" "
,
$str
);
$str
=
str_replace
(
"
"
,
" "
,
$str
);
//头尾的空格去掉
$str
=
trim
(
$str
);
return
$str
;
...
...
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