当前位置:网站首页>关于#数据库#的问题,如何解决?
关于#数据库#的问题,如何解决?
2022-06-13 01:04:00 【CSDN问答】
在实际工作中遇到这种问题,比如批量锁仓功能,同一个订单单别,单号不同序号,同时去操作一个储位,通过for循环去操作,第一次for循环,订单单别5101,订单单号202206060946,订单序号0001,第一次查询的时候获取到CS-ZD-001库位,库位的可用库存数量为800,然后第一次将其减去800,剩下0,且库位状态更改为Y占用,但是我第二次for循环再次查询的时候,还是获取到当前这个CS-ZD-001的库位,因为是挂载在事务,他并没有提交到数据库,有什么好的逻辑或者方法可以解决吗,我希望是第二次查询的时候是CS-ZD-001的可用库存数量为0,且状态变为Y,这样子就不会获取到了
边栏推荐
- pytorch和tensorflow有什么区别?
- Biological unlocking - Fingerprint entry process
- Three threads print digital demo alternately
- Common skills for quantitative investment - drawing 2: drawing the moving average
- spiral matrix visit Search a 2D Matrix
- Expression tree - medium order printout
- Cards are unpredictable
- [JS component] calendar
- [latex] insérer une image
- Leetcode-19- delete the penultimate node of the linked list (medium)
猜你喜欢
五篇经典好文,值得一看
Et5.0 configuring Excel
Introduction to ROS from introduction to mastery (zero) tutorial
Matrix fast power
spiral matrix visit Search a 2D Matrix
408 true question - division sequence
[003] embedded learning: creating project templates - using stm32cubemx
Common skills for quantitative investment - indicators Chapter 3: detailed explanation of RSI indicators, their code implementation and drawing
[latex] insert picture
With a market value of more than trillion yuan and a sales volume of more than 100000 yuan for three consecutive months, will BYD become the strongest domestic brand?
随机推荐
How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of strategic returns of vrsi, bbiboll, WR, bias and RSI indicators
[JS] solve the problem that removeeventlistener is invalid after the class listening event from new is bound to this
redis
Androi天气
Today's sleep quality record 74 points
The scope builder coroutinescope, runblocking and supervisorscope of kotlin collaboration processes run synchronously. How can other collaboration processes not be suspended when the collaboration pro
Key point detection data preparation and model design based on u-net Network -- detection model of four key points of industrial components
How the ET framework uses it to develop games
Dynamic planning - good article link
三栏简约typecho主题Lanstar/蓝星typecho主题
MySQL performance analysis - explain
How to handle different types of data
How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of strategic returns of BBI, MTM, obv, CCI and priceosc indicators
ROS从入门到精通(零) 教程导读
(01).NET MAUI实战 建项目
STM32 USB Basics
The seventh finals of the Blue Bridge Cup
Leetcode-16- sum of the nearest three numbers (medium)
单片机串口中断以及消息收发处理——对接受信息进行判断实现控制
(01). Net Maui actual construction project