Commit 8c7e47a8 authored by hangjun83's avatar hangjun83

openapi 震坤行

parent 3d1e44f8
...@@ -46,6 +46,11 @@ class RhawnChemicalsService ...@@ -46,6 +46,11 @@ class RhawnChemicalsService
return $this->rhawnRawRepository->getProductPackagesThroughGroupByPackUnit(); return $this->rhawnRawRepository->getProductPackagesThroughGroupByPackUnit();
} }
public function getChemicalRawThroughtCode($rawCode)
{
return $this->rhawnRawRepository->getRawProductsThroughtCode($rawCode);
}
/** /**
* 保存震坤行同步商品数据 * 保存震坤行同步商品数据
...@@ -99,7 +104,7 @@ class RhawnChemicalsService ...@@ -99,7 +104,7 @@ class RhawnChemicalsService
public function updateSyncRunTime($goods) public function updateSyncRunTime($goods)
{ {
$dbConnect = DB::connection('rhawn_mysql'); $dbConnect = DB::connection('rhawn_mysql');
$dbConnect->table('zkh_goods')->where('zg_id',$goods['zg_id'])->update(['zg_sync_time' => time()]); return $dbConnect->table('zkh_goods')->where('zg_id',$goods['zg_id'])->update(['zg_sync_time' => time()]);
} }
public function getRawProductsThroughPid($pId) public function getRawProductsThroughPid($pId)
......
...@@ -87,7 +87,10 @@ class ZhenKhService ...@@ -87,7 +87,10 @@ class ZhenKhService
} }
} }
} }
$this->rhawnService->updateSyncRunTime($goods); $result = $this->rhawnService->updateSyncRunTime($goods);
if($result){
SimpleLogs::writeLog($goods['zg_sku'].'的价格和库存上报完成。完成时间:'.date('Y-m-d H:i:s',time()),__CLASS__.':consumerUpdateReportPriceAndStock');
}
}catch (\Throwable $exception) { }catch (\Throwable $exception) {
$this->apiService->throwableAfter([ $this->apiService->throwableAfter([
......
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