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
8cd2d589
authored
Jul 11, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
初始化脚本
parent
36dd61a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
app/Http/Services/DataService.php
app/Http/Services/DataService.php
View file @
8cd2d589
...
...
@@ -1564,13 +1564,21 @@ class DataService
public
function
initSkuRulers
()
{
//全部供应商修改默认值
SupplierChannelModel
::
where
(
'supplier_id'
,
12270
)
->
update
([
//
SupplierChannelModel::where('supplier_id', '>', 0)->update([
//
SupplierChannelModel::where('supplier_id', 12270)->update([
SupplierChannelModel
::
where
(
'supplier_id'
,
'>'
,
0
)
->
update
([
'sku_audit_ruler'
=>
json_encode
([
'skip'
=>
1
,
'audit_ruler'
=>
[
"1"
=>
1
],
])
]);
$redis
=
Redis
::
connection
(
'sku'
);
$supplierIds
=
SupplierChannelModel
::
where
(
'supplier_id'
,
'>'
,
0
)
->
pluck
(
'supplier_id'
)
->
toArray
();
foreach
(
$supplierIds
as
$supplierId
)
{
$redis
->
hset
(
'supplier_sku_audit_ruler'
,
$supplierId
,
json_encode
([
'skip'
=>
1
,
'audit_ruler'
=>
[
"1"
=>
1
],
]));
}
}
}
\ No newline at end of file
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