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
169e1219
authored
May 30, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
无限制的存储和展示问题
parent
23f313ae
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
app/Http/Services/SkuService.php
resources/views/script/SupplierListScript.blade.php
app/Http/Services/SkuService.php
View file @
169e1219
...
...
@@ -361,7 +361,7 @@ class SkuService
$redis
=
new
RedisModel
();
//批量设置
if
(
$setType
==
1
)
{
$supplierIds
=
SupplierChannelModel
::
where
(
'supplier_group'
,
$supplierGroup
)
->
where
(
'is_type'
,
0
)
$supplierIds
=
SupplierChannelModel
::
where
(
'supplier_group'
,
$supplierGroup
)
->
where
(
'is_type'
,
0
)
->
pluck
(
'supplier_id'
)
->
toArray
();
$supplierIds
=
collect
(
$supplierIds
)
->
chunk
(
300
)
->
toArray
();
foreach
(
$supplierIds
as
$supplierIdList
)
{
...
...
@@ -382,6 +382,7 @@ class SkuService
$redis
->
hset
(
'supplier_sku_upload_ruler_v2'
,
$supplierId
,
$ruler
);
}
$cpTimeDay
=
$cpTimeDay
==
-
1
?
'无限制'
:
$cpTimeDay
;
(
new
LogService
())
->
BatchAddLogs
(
$supplierIdList
,
LogModel
::
UPDATE_OPERATE
,
'批量配置供应商sku上架有效期'
,
'上架有效期修改为'
.
$cpTimeDay
.
'天'
);
}
}
...
...
@@ -405,6 +406,7 @@ class SkuService
}
$ruler
[
'upload_validity_period'
]
=
$cpTimeDay
;
(
new
SupplierService
())
->
saveSkuCpTimeRulerToRedis
(
$supplierId
,
$ruler
);
$cpTimeDay
=
$cpTimeDay
==
-
1
?
'无限制'
:
$cpTimeDay
;
(
new
LogService
())
->
AddLog
(
$supplierId
,
LogModel
::
UPDATE_OPERATE
,
'批量配置供应商sku上架有效期'
,
'上架有效期修由'
.
$originDays
.
'改为'
.
$cpTimeDay
.
'天'
);
}
}
...
...
resources/views/script/SupplierListScript.blade.php
View file @
169e1219
...
...
@@ -171,7 +171,7 @@
},
{
field
:
'average_sku_num'
,
title
:
'日均上架数'
,
align
:
'center'
,
width
:
100
},
{
field
:
'cp_time_day'
,
title
:
'有效期最高天数'
,
align
:
'center'
,
width
:
120
,
templet
:
function
(
data
)
{
return
data
.
cp_time_day
?
data
.
cp_time_day
+
'天'
:
'
'
;
return
data
.
cp_time_day
==
-
1
?
'无限制'
:
data
.
cp_time_day
+
'天
'
;
}},
{
field
:
'create_name'
,
title
:
'创建人'
,
align
:
'center'
,
width
:
70
},
{
field
:
'update_time'
,
title
:
'最近修改时间'
,
align
:
'center'
,
width
:
145
},
...
...
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