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
1972a087
authored
Jul 15, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
批量修改海外代购
parent
375ba967
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
2 deletions
app/Http/Services/DataService.php
app/Http/routes.php
app/Http/Services/DataService.php
View file @
1972a087
...
...
@@ -706,7 +706,7 @@ class DataService
if
(
empty
(
$skuName
))
{
dump
(
'sku_id找不到'
);
}
dump
(
$skuName
);
dump
(
$skuName
);
}
});
});
...
...
@@ -738,4 +738,55 @@ class DataService
]);
}
public
static
function
batchSetPurchaseType
()
{
$supplierNameList
=
[
'Digi-key electronics asia pacific'
,
'DIGI-KEY ELECTRONICS ASIAPACIFIC LTD'
,
'DIGI-KEY ELECTRONICS ASIA PACIFIC 2'
,
'DIGI-KEY ELECTRONICS ASIA PACIFIC LTD'
,
'Mouser Electronics, Inc.'
,
'昴氏(上海)电子贸易有限公司'
,
'Arrow Electronics, Inc'
,
'ARROW ELECTRONICS INC.'
,
'ARROW ELECTRONICS'
,
'Chip One Stop, Inc.'
,
'CHIP ONE STOP (HONG KONG) LIMITED'
,
'驰万电子(深圳)有限公司'
,
'ROCHESTER ELECTRONICS (SHANGHAI BRANCH)'
,
'Master electronics group limited'
,
'欧时电子元件(上海)有限公司'
,
'RS COMPONENTS'
,
'RS COMPONENTS LIMITED'
,
'RS COMPONENTS LTD'
,
'WALDOM ELECTRONICS APAC'
,
'WaldomElectronicsAsiaPacific(S)PteLtd'
,
'Waldom Electronics Asia Pacific (S) Pte Ltd'
,
'Waldom Electronics Asia Pacific(S) Pte Ltd'
,
'TI STORE'
,
'德州仪器(上海)有限公司'
,
'FUTURE ELECTRONICS (HK) LTD.'
,
'FUTURE ELECTRONICS (HONGKONG)LTD'
,
'FUTURE ELECTRONICS (HONG KONG) LIMITED'
,
'FUTURE LINKING SOLUTION TECH CO., LIMITED'
,
'富昌电子(上海)有限公司'
,
'富昌电子(上海)有限公司'
,
'eluomeng limited'
,
'易络盟电子(中国)有限公司'
,
'易络盟电子(中国)有限公司'
,
];
foreach
(
$supplierNameList
as
$supplierName
)
{
$supplier
=
SupplierChannelModel
::
where
(
'supplier_name'
,
$supplierName
)
->
first
();
if
(
empty
(
$supplier
))
{
dump
(
$supplierName
);
continue
;
}
if
(
$supplier
)
{
SupplierChannelModel
::
where
(
'supplier_name'
,
$supplierName
)
->
update
([
'purchase_type'
=>
2
,
]);
}
}
}
}
app/Http/routes.php
View file @
1972a087
...
...
@@ -90,5 +90,5 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
});
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
DataService
::
repairSupplierChannel
();
DataService
::
batchSetPurchaseType
();
});
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