Commit 878ddf0f by 杨树贤

统计数量

parent 4a513df6
...@@ -1194,4 +1194,14 @@ class DataService ...@@ -1194,4 +1194,14 @@ class DataService
}); });
})->export('csv'); })->export('csv');
} }
public function statisticsSkuNumber()
{
$dataManagerSupplierCodeList = DataManageModel::where('is_type', 0)->where('canal','!=','')->pluck('canal')->toArray();
//sku上架总数含api接口
$skuNum1 = SupplierChannelModel::where('is_type',0)->sum('sku_num');
//sku上架总数,不含api接口
$skuNum2 = SupplierChannelModel::where('is_type',0)->whereNotIn('supplier_code',$dataManagerSupplierCodeList)->sum('sku_num');
dd($skuNum1,$skuNum2);
}
} }
\ No newline at end of file
...@@ -67,7 +67,7 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function () ...@@ -67,7 +67,7 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
}); });
Route::match(['get', 'post'], '/test', function () { Route::match(['get', 'post'], '/test', function () {
(new \App\Http\Services\DataService())->exportHasCooperationAgreementSupplierList(); (new \App\Http\Services\DataService())->statisticsSkuNumber();
// \App\Model\SupplierChannelModel::where('supplier_name', '深圳市金开盛电子有限公司')->update([ // \App\Model\SupplierChannelModel::where('supplier_name', '深圳市金开盛电子有限公司')->update([
// 'status' => 2, // 'status' => 2,
// 'update_time' => time(), // 'update_time' => time(),
......
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