|
|
@ -48,7 +48,7 @@ class PurchaseLimitService implements PurchaseLimitServiceInterface |
|
|
$money = $goods->money; |
|
|
$money = $goods->money; |
|
|
} |
|
|
} |
|
|
//库存校验 is_max 无限库存
|
|
|
//库存校验 is_max 无限库存
|
|
|
if($goods->is_max == 2 && ($num + $params['num']) > $inventory) |
|
|
|
|
|
|
|
|
if($goods->is_max != Goods::INVENTORY_NOLIMIT && ($num + $params['num']) > $inventory) |
|
|
{ |
|
|
{ |
|
|
$error = [ |
|
|
$error = [ |
|
|
'error' => '库存不足' |
|
|
'error' => '库存不足' |
|
|
@ -150,7 +150,7 @@ class PurchaseLimitService implements PurchaseLimitServiceInterface |
|
|
$inventory = $goods->inventory; |
|
|
$inventory = $goods->inventory; |
|
|
} |
|
|
} |
|
|
//库存校验 is_max 无限库存
|
|
|
//库存校验 is_max 无限库存
|
|
|
if($goods->is_max == 2 && $params['num'] > $inventory) |
|
|
|
|
|
|
|
|
if($goods->is_max != Goods::INVENTORY_NOLIMIT && $params['num'] > $inventory) |
|
|
{ |
|
|
{ |
|
|
$error = [ |
|
|
$error = [ |
|
|
'error' => '库存不足' |
|
|
'error' => '库存不足' |
|
|
@ -168,6 +168,20 @@ class PurchaseLimitService implements PurchaseLimitServiceInterface |
|
|
// }
|
|
|
// }
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function getStoreIdByMarketId($params) |
|
|
|
|
|
{ |
|
|
|
|
|
$res = [ |
|
|
|
|
|
'id' => 7, |
|
|
|
|
|
'item' => 1, |
|
|
|
|
|
'item_text' => 'page', |
|
|
|
|
|
'logo' => 'http://lanzutest.lanzulive.com/attachment/images/2/2020/08/PY55Y3Mz17yJo17rv1Z7vImX1V5159.jpg', |
|
|
|
|
|
'redirect_url' => '/zh_cjdianc/pages/takeout/takeoutindex?store_id=123', |
|
|
|
|
|
'src' => '/zh_cjdianc/pages/takeout/takeoutindex?store_id=123', |
|
|
|
|
|
'src2' => '/zh_cjdianc/pages/takeout/takeoutindex?store_id=123', |
|
|
|
|
|
]; |
|
|
|
|
|
return $res; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public function test($params) |
|
|
public function test($params) |
|
|
{ |
|
|
{ |
|
|
return $params; |
|
|
return $params; |
|
|
|