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
f90507b7
authored
Jun 01, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复数据
parent
3f2dce8a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
5 deletions
app/Http/Services/LogService.php
app/Http/Services/SkuService.php
app/Http/routes.php
app/Http/Services/LogService.php
View file @
f90507b7
...
...
@@ -51,6 +51,28 @@ class LogService
return
$model
->
insert
(
$data
);
}
public
function
BatchAddIgnoreAuditLogs
(
$supplierIds
,
$type
,
$action
,
$content
,
$remark
=
''
)
{
$adminId
=
request
()
->
user
->
userId
;
$adminName
=
request
()
->
user
->
name
;
$data
=
[];
foreach
(
$supplierIds
as
$supplierId
)
{
$data
[]
=
[
'supplier_id'
=>
$supplierId
,
'type'
=>
$type
,
'action'
=>
$action
,
'content'
=>
$content
,
'remark'
=>
$remark
,
'admin_id'
=>
$adminId
,
'admin_name'
=>
$adminName
,
'ignore_audit_check'
=>
1
,
'add_time'
=>
time
(),
];
}
$model
=
new
LogModel
();
return
$model
->
insert
(
$data
);
}
//添加忽略审核的日志
public
function
AddIgnoreAuditCheckLog
(
$supplierId
,
$type
,
$action
,
$content
,
$remark
=
''
)
{
...
...
app/Http/Services/SkuService.php
View file @
f90507b7
...
...
@@ -383,7 +383,7 @@ class SkuService
}
$cpTimeDay
=
$cpTimeDay
==
-
1
?
'无限制'
:
$cpTimeDay
;
(
new
LogService
())
->
BatchAddLogs
(
$supplierIdList
,
LogModel
::
UPDATE_OPERATE
,
'批量配置供应商sku上架有效期'
,
'上架有效期修改为'
.
$cpTimeDay
.
'天'
);
(
new
LogService
())
->
BatchAdd
IgnoreAudit
Logs
(
$supplierIdList
,
LogModel
::
UPDATE_OPERATE
,
'批量配置供应商sku上架有效期'
,
'上架有效期修改为'
.
$cpTimeDay
.
'天'
);
}
}
...
...
@@ -407,7 +407,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
.
'天'
);
(
new
LogService
())
->
Add
IgnoreAuditCheck
Log
(
$supplierId
,
LogModel
::
UPDATE_OPERATE
,
'批量配置供应商sku上架有效期'
,
'上架有效期修由'
.
$originDays
.
'改为'
.
$cpTimeDay
.
'天'
);
}
}
}
...
...
app/Http/routes.php
View file @
f90507b7
...
...
@@ -70,9 +70,9 @@ Route::match(['get', 'post'], '/test', function () {
(
new
\App\Http\Services\DataService
())
->
statisticsSkuNumber
();
// (new \App\Http\Services\DataService())->initialMainBrandsLimit();
// (new \App\Http\Services\DataService())->initialMainBrandsToSkuRuler();
\App\Model\SupplierChannelModel
::
where
(
'supplier_code'
,
'L0010173
'
)
->
update
([
'stockup_type'
=>
''
,
]);
\App\Model\LogModel
::
where
(
'action'
,
'批量配置供应商sku上架有效期
'
)
->
update
([
'ignore_audit_check'
=>
1
]);
// \App\Model\SupplierChannelModel::where('supplier_name', '厦门市三安集成电路有限公司')->update([
// 'status' => 2,
// 'update_time' => time(),
...
...
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