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
2e960fd4
authored
Aug 25, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
完善下架日志
parent
72d50cdb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
app/Http/Services/SkuService.php
app/Model/ManualPutawaySkuLog.php
resources/views/script/SkuListScript.blade.php
app/Http/Services/SkuService.php
View file @
2e960fd4
...
...
@@ -36,8 +36,8 @@ class SkuService extends BaseService
$map
[
'no_rule'
]
=
1122
;
try
{
// $return = curl($url, $map, 1);
$url
=
base64_encode
(
$url
.
'?'
.
http_build_query
(
$map
));
$return
=
curl
(
config
(
'website.FootstoneCurlUrl'
)
.
$url
);
$url
=
base64_encode
(
$url
.
'?'
.
http_build_query
(
$map
));
$return
=
curl
(
config
(
'website.FootstoneCurlUrl'
)
.
$url
);
}
catch
(
\Exception
$e
)
{
return
$e
->
getMessage
();
}
...
...
@@ -45,7 +45,7 @@ class SkuService extends BaseService
$data
=
json_decode
(
$return
,
true
);
$list
=
[];
if
(
isset
(
$data
[
'error_code'
])
&&
$data
[
'error_code'
]
==
0
)
{
$url
=
config
(
'website.GoodsServerUrl'
)
.
'/synchronization?goods_id='
.
implode
(
','
,
$data
[
'data'
][
'goods_id'
]);
$url
=
config
(
'website.GoodsServerUrl'
)
.
'/synchronization?goods_id='
.
implode
(
','
,
$data
[
'data'
][
'goods_id'
]);
$return
=
curl
(
$url
,
$map
,
1
);
$skuListData
=
json_decode
(
$return
,
true
);
if
(
isset
(
$skuListData
[
'errcode'
])
&&
$skuListData
[
'errcode'
]
==
0
)
{
...
...
@@ -331,9 +331,12 @@ class SkuService extends BaseService
'sku_id'
=>
$skuId
,
'cp_time'
=>
$data
[
'cp_time'
],
];
ManualPutawaySkuLog
::
addManualPutawaySkuLog
(
$skuId
,
$supplierCodes
[
$key
]);
ManualPutawaySkuLog
::
addManualPutawaySkuLog
(
$skuId
,
$supplierCodes
[
$key
]);
}
}
else
{
foreach
(
$skuIds
as
$key
=>
$skuId
)
{
ManualPutawaySkuLog
::
addManualPutawaySkuLog
(
$skuId
,
$supplierCodes
[
$key
]);
}
$queueName
=
'lie_footstone_batch_downsku_queue'
;
$queueData
[
'down_type'
]
=
2
;
$queueData
[
'data'
]
=
$skuIds
;
...
...
app/Model/ManualPutawaySkuLog.php
View file @
2e960fd4
...
...
@@ -22,9 +22,9 @@ class ManualPutawaySkuLog extends Model
}
//先判断是否存在
$manualPutawaySkuLog
=
self
::
where
(
'sku_id'
,
$skuId
)
->
where
(
'supplier_code'
,
$supplierCode
)
->
first
();
$manualPutawaySkuLog
=
self
::
where
(
'sku_id'
,
$skuId
)
->
first
();
if
(
$manualPutawaySkuLog
)
{
self
::
where
(
'sku_id'
,
$skuId
)
->
where
(
'supplier_code'
,
$supplierCode
)
->
update
([
self
::
where
(
'sku_id'
,
$skuId
)
->
update
([
'is_new'
=>
1
,
'update_time'
=>
time
(),
]);
...
...
resources/views/script/SkuListScript.blade.php
View file @
2e960fd4
...
...
@@ -417,6 +417,7 @@
url
:
'/api/sku/batchUpdateSkuStatus'
,
timeout
:
30000
,
//超时时间设置,单位毫秒
data
:
{
'supplier_codes'
:
supplierCodes
.
join
(
','
),
'sku_ids'
:
skuIds
.
join
(
','
),
'operate_type'
:
-
1
,
},
...
...
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