Commit 28426dfe authored by hangjun83's avatar hangjun83

BJS

parent 30057e99
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace App\Services; namespace App\Services;
use App\Support\Facades\SimpleLogs;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
...@@ -98,11 +99,12 @@ class BhProductsService ...@@ -98,11 +99,12 @@ class BhProductsService
$dbConnect->commit(); $dbConnect->commit();
app(SysLogService::class)->addApiLogs('p_id : '.$id.' cas : '.$chemicalsRow->c_cas. ' 更新成功,更新时间:'.date('Y-m-d H:i:s',time())); SimpleLogs::writeLog('Bide p_id : '.$id.' cas : '.$chemicalsRow->c_cas. ' 更新成功,更新时间:'.date('Y-m-d H:i:s',time()),__CLASS__.':storeBjsProducts');
return true; return true;
}catch(\Exception $exception){ }catch(\Exception $exception){
SimpleLogs::writeLog($exception->getMessage(),__CLASS__.':storeBjsProducts', 'error');
$dbConnect->rollback(); $dbConnect->rollback();
throw $exception; throw $exception;
} }
...@@ -174,7 +176,7 @@ class BhProductsService ...@@ -174,7 +176,7 @@ class BhProductsService
$pro_data['p_tod'] = $p_tod; $pro_data['p_tod'] = $p_tod;
$pro_data['p_weight'] = '0.01'; $pro_data['p_weight'] = '0.01';
$pro_data['p_status'] = 1; $pro_data['p_status'] = 1;
$pro_data['p_show'] = 1; $pro_data['p_show'] = 0;
$pro_data['prom_from'] = 0; $pro_data['prom_from'] = 0;
$pro_data['prom_to'] = 0; $pro_data['prom_to'] = 0;
...@@ -185,7 +187,7 @@ class BhProductsService ...@@ -185,7 +187,7 @@ class BhProductsService
$productRow = current($productRow); $productRow = current($productRow);
$pro_data['p_status'] = 1; $pro_data['p_status'] = 1;
$pro_data['p_show'] = 1; $pro_data['p_show'] = 0;
$pro_data['p_price'] = $product['Price']; $pro_data['p_price'] = $product['Price'];
$pro_data['p_tod'] = $p_tod; $pro_data['p_tod'] = $p_tod;
$pro_data['modifytime'] = time(); $pro_data['modifytime'] = time();
...@@ -199,11 +201,12 @@ class BhProductsService ...@@ -199,11 +201,12 @@ class BhProductsService
$dbConnect->commit(); $dbConnect->commit();
app(SysLogService::class)->addApiLogs('p_id : '.$id.' cas : '.$chemicalsRow->c_cas. ' 更新成功,更新时间:'.date('Y-m-d H:i:s',time())); SimpleLogs::writeLog('Bjs p_id : '.$id.' cas : '.$chemicalsRow->c_cas. ' 更新成功,更新时间:'.date('Y-m-d H:i:s',time()),__CLASS__.':storeBjsProducts');
return true; return true;
}catch(\Exception $exception){ }catch(\Exception $exception){
SimpleLogs::writeLog($exception->getMessage(),__CLASS__.':storeBjsProducts', 'error');
$dbConnect->rollback(); $dbConnect->rollback();
throw $exception; throw $exception;
} }
......
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 to comment