Commit c0ab3ef7 by 杨树贤

内存问题

parent daad3722
Showing with 4 additions and 0 deletions
......@@ -290,6 +290,8 @@ class DataService
//导入公司性质
public function importSupplierGroup($isUpdate = false)
{
ini_set('memory_limit', -1);
$filePath = public_path('data') . DIRECTORY_SEPARATOR . 'supplier_group.xlsx';
try {
Excel::selectSheetsByIndex(0)->load($filePath, function ($reader) use ($isUpdate) {
......@@ -346,6 +348,8 @@ class DataService
//生成云芯账号
public function generateYunxinAccount($isUpdate = false)
{
ini_set('memory_limit', -1);
$suppliers = SupplierChannelModel::where('outside_contact_type', 3)->get()->toArray();
// $suppliers = SupplierChannelModel::where('is_type', 0)->limit(100)->get()->toArray();
foreach ($suppliers as $supplier) {
......
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