console.log('load stock');/*
分组ID:1,绑定的仓库ID:1,2,3,6,7
分组ID:2,绑定的仓库ID:8
查询的SKU:121-6153
原有总库存:500
分组1库存:500
分组2库存:0
分组3库存:0
分组4库存:0
Array
(
[0] => Array
(
[sku] => 121-6153
[sid] => 6
[price] =>
[stockpos] =>
[stock] => 500
[tem_stock] => 0
[sku_sales] => 0
[status] => 预售
)
)
更新121-6153库存:500
121-6153,总库存:500
Array
(
[121-6153] => Array
(
[0] => 6
)
)
写入1
写入2
写入3
写入7
写入8
Array
(
[0] => Array
(
[sku] => 121-6153
[sid] => 6
[price] =>
[stockpos] =>
[stock] => 500
[tem_stock] => 0
[sku_sales] => 0
[status] => 预售
)
[1] => Array
(
[sku] => 121-6153
[sid] => 1
[price] => 0
[stockpos] =>
[stock] => 0
[sku_sales] => 0
)
[2] => Array
(
[sku] => 121-6153
[sid] => 2
[price] => 0
[stockpos] =>
[stock] => 0
[sku_sales] => 0
)
[3] => Array
(
[sku] => 121-6153
[sid] => 3
[price] => 0
[stockpos] =>
[stock] => 0
[sku_sales] => 0
)
[4] => Array
(
[sku] => 121-6153
[sid] => 7
[price] => 0
[stockpos] =>
[stock] => 0
[sku_sales] => 0
)
[5] => Array
(
[sku] => 121-6153
[sid] => 8
[price] => 0
[stockpos] =>
[stock] => 0
[sku_sales] => 0
)
)
{"sku":"121-6153","sid":"6","price":null,"stockpos":null,"stock":"500","tem_stock":"0","sku_sales":0,"status":"\u9884\u552e"}
{"sku":"121-6153","sid":1,"price":0,"stockpos":"","stock":0,"sku_sales":0}
{"sku":"121-6153","sid":2,"price":0,"stockpos":"","stock":0,"sku_sales":0}
{"sku":"121-6153","sid":3,"price":0,"stockpos":"","stock":0,"sku_sales":0}
{"sku":"121-6153","sid":7,"price":0,"stockpos":"","stock":0,"sku_sales":0}
{"sku":"121-6153","sid":8,"price":0,"stockpos":"","stock":0,"sku_sales":0}
更新分组:1,SKU:121-6153库存:500
更新分组:1,SKU:121-6153库存:0
更新分组:1,SKU:121-6153库存:0
更新分组:1,SKU:121-6153库存:0
更新分组:1,SKU:121-6153库存:0
更新分组:2,SKU:121-6153库存:0
分组ID:1,SKU:{"121-6153":500}
分组ID:2,SKU:{"121-6153":0}
update `gsp_goods` set goods_storage = case when goods_serial = '121-6153' then 500 END WHERE goods_serial IN ('121-6153')
update `gsp_goods` set goods_storage_1 = case when goods_serial = '121-6153' then 500 END WHERE goods_serial IN ('121-6153');
update `gsp_goods` set goods_storage_2 = case when goods_serial = '121-6153' then 0 END WHERE goods_serial IN ('121-6153');
success at 2024-11-01 07:06:48
*/