使用事务减少库存并创建出库订单问题 [ 2.0 版本 ]
[
{
"goodsID": "663",
"goodsName": "珍稀精油",
"unitPrice": "128.00",
"salePrice": "70.00",
"picture": "uploads/customer/824411594377747.jpg",
"goodsNumber": "6952360690626",
"barCode": "6952360690626",
"integral": "null",
"colorName": "UZLA",
"unitName": "个",
"colorID": "18",
"unitID": "20",
"stockCount": "5",
"buyCount": 1,
"totalPrice": "128.00"
},
{
"goodsID": "664",
"goodsName": "KAQIER",
"unitPrice": "68.00",
"salePrice": "70.00",
"picture": "uploads/customer/974681594377883.jpg",
"goodsNumber": "0079",
"barCode": "6943322100079",
"integral": "null",
"colorName": "UZLA",
"unitName": "个",
"colorID": "18",
"unitID": "20",
"stockCount": "10",
"buyCount": 2,
"totalPrice": "136.00"
},
{
"goodsID": "693",
"goodsName": "DETLLOU",
"unitPrice": "68.00",
"salePrice": "68.00",
"picture": "uploads/customer/574191594376806.jpg",
"goodsNumber": "6971223071549",
"barCode": "6971223071549",
"integral": "null",
"colorName": "UZLA",
"unitName": "个",
"colorID": "18",
"unitID": "22",
"stockCount": "4",
"buyCount": 3,
"totalPrice": "204.00"
}
]
提交订单参数
各位 你们好,我最近搞进销存 对减少库存 问题我有点头疼 麻烦你们 帮忙提出建议,有案例分享一下
1.对应的商品 判断库存 ,不满足就提示库存不足某个商品的库存 / 如果库存满足 减少库存并 创建出库订单
2.出库过程 出现异常滚回事务
3.避免高并发数据功能
共 2 个回答
-
return19931112 回答于 2020-08-28 09:55 举报
如果并发量很高,前面还是用台redis顶一下
ali 乌鲁木齐
注册时间:2016-12-21
最后登录:2024-10-17
在线时长:17小时39分
最后登录:2024-10-17
在线时长:17小时39分
- 粉丝3
- 金钱10
- 威望40
- 积分580