Commit fd1a9f6a by 杨树贤

优化问题

parent ef58fdcf
Showing with 1 additions and 1 deletions
...@@ -39,6 +39,7 @@ class SkuService ...@@ -39,6 +39,7 @@ class SkuService
if (isset($data['error_code']) && $data['error_code'] == 0) { if (isset($data['error_code']) && $data['error_code'] == 0) {
$redis = new RedisModel; $redis = new RedisModel;
//处理供应商 //处理供应商
$spuRedis = Redis::connection('spu');
foreach ($data['data']['goods_id'] as $k => $goodsId) { foreach ($data['data']['goods_id'] as $k => $goodsId) {
$uploadItemService = new SkuUploadItemService(); $uploadItemService = new SkuUploadItemService();
$auditData = $uploadItemService->getSkuAuditData($data['data']['goods_id']); $auditData = $uploadItemService->getSkuAuditData($data['data']['goods_id']);
...@@ -59,7 +60,6 @@ class SkuService ...@@ -59,7 +60,6 @@ class SkuService
} }
//添加sku是否过期 //添加sku是否过期
$sku['is_expire'] = $data['data']['status'][$goodsId] && $data['data']['status'][$goodsId] > 0 ? 0 : 1; $sku['is_expire'] = $data['data']['status'][$goodsId] && $data['data']['status'][$goodsId] > 0 ? 0 : 1;
$spuRedis = Redis::connection('spu');
$spu = json_decode($spuRedis->hget('spu', $sku['spu_id']), true); $spu = json_decode($spuRedis->hget('spu', $sku['spu_id']), true);
//型号处理 //型号处理
if (empty($sku['goods_name']) && !empty($spu)) { if (empty($sku['goods_name']) && !empty($spu)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment