调整商品溯源
This commit is contained in:
parent
4a8d90d1a6
commit
c9684b2f8b
@ -120,7 +120,7 @@ class ProductSourceLinkLogic extends BaseLogic
|
|||||||
public static function outbound(array $info)
|
public static function outbound(array $info)
|
||||||
{
|
{
|
||||||
$query = ProductSourceLinkInfo::where('product_id', $info['product']['product_id'])->where('current_nums', '>', 0);
|
$query = ProductSourceLinkInfo::where('product_id', $info['product']['product_id'])->where('current_nums', '>', 0);
|
||||||
if (!empty($info['store_id'])) {
|
if (!empty($info['is_store_order']) && $info['store_id']) {
|
||||||
$query->where('store_id', $info['store_id'])->whereIn('types', [ProductSourceLinkInfo::TypeStoreIn, ProductSourceLinkInfo::TypeS2S]);
|
$query->where('store_id', $info['store_id'])->whereIn('types', [ProductSourceLinkInfo::TypeStoreIn, ProductSourceLinkInfo::TypeS2S]);
|
||||||
} else {
|
} else {
|
||||||
$query->whereIn('types', [ProductSourceLinkInfo::TypeIn, ProductSourceLinkInfo::TypeS2W, ProductSourceLinkInfo::TypeW2W]);
|
$query->whereIn('types', [ProductSourceLinkInfo::TypeIn, ProductSourceLinkInfo::TypeS2W, ProductSourceLinkInfo::TypeW2W]);
|
||||||
|
@ -646,6 +646,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
'product_id' => $v['product_id'],
|
'product_id' => $v['product_id'],
|
||||||
'nums' => $v['cart_num'],
|
'nums' => $v['cart_num'],
|
||||||
],
|
],
|
||||||
|
'is_store_order' => true,
|
||||||
'store_id' => $v['store_id'],
|
'store_id' => $v['store_id'],
|
||||||
'link_id' => $v['id'],
|
'link_id' => $v['id'],
|
||||||
'types' => ProductSourceLinkInfo::TypeOrder,
|
'types' => ProductSourceLinkInfo::TypeOrder,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user