定价问题
This commit is contained in:
parent
20db40c362
commit
510d23ceaf
@ -96,7 +96,7 @@ class LogSyncJob implements ShouldQueue
|
||||
$package = $this->getPackage($value['content']);
|
||||
$company = $this->getCompany(CommonService::stringifyCompanyId($value['company']));
|
||||
$unit_price = intval($value['order_account'] * 100);
|
||||
$product = $this->getProduct($package, $value['company'], $unit_price);
|
||||
$product = $this->getProduct($package, $value['company'], $value['order_account']);
|
||||
$type = self::$types[$value['type']];
|
||||
$pay_channel = self::$payChannels[$value['pay_type']];
|
||||
|
||||
@ -228,7 +228,7 @@ class LogSyncJob implements ShouldQueue
|
||||
*/
|
||||
protected function getProduct($package, $companyId, $price)
|
||||
{
|
||||
$sn = strtoupper($package['sn'] . '_' . $companyId . '_' . $price);
|
||||
$sn = strtoupper($package['sn'] . '_' . $companyId . '_' . intval($price * 100));
|
||||
|
||||
if (!$product = $this->products[$sn]) {
|
||||
$product = app(ProductService::class)->store([
|
||||
@ -239,6 +239,7 @@ class LogSyncJob implements ShouldQueue
|
||||
'renewal_price' => $price,
|
||||
]);
|
||||
$this->products[$sn] = $product;
|
||||
app(ProductRepository::class)->forgetCached();
|
||||
}
|
||||
|
||||
return $product;
|
||||
|
Loading…
x
Reference in New Issue
Block a user