当前位置:网站首页>关于#数据库#的问题,如何解决?
关于#数据库#的问题,如何解决?
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,这样子就不会获取到了
边栏推荐
- ArrayList underlying source code
- Physical orbit simulation
- [JS component] dazzle radio box and multi box
- How the ET framework uses it to develop games
- 论文笔记:STMARL: A Spatio-Temporal Multi-AgentReinforcement Learning Approach for Cooperative Traffic
- [JS component] calendar
- Leetcode-15- sum of three numbers (medium)
- How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of DBCD, ROC, vroc, Cr and psy index strategy income
- spiral matrix visit Search a 2D Matrix
- 深度学习训练多少轮?迭代多少次?
猜你喜欢

5G工业网关在煤矿行业的应用优势

Mysql database password modification

Deep learning model pruning

Pipeline pipeline project construction

五篇经典好文,值得一看
![[latex] insert picture](/img/0b/3304aaa03d3fea3ebb93b0348c3131.png)
[latex] insert picture

How to choose stocks? Which indicator strategy is reliable? Quantitative analysis and comparison of strategic returns of vrsi, bbiboll, WR, bias and RSI indicators

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?

在国企做软件测试工程师是一种什么样的体验:每天过的像打仗一样

HashSet underlying source code
随机推荐
Self use notes for problem brushing learning
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
Androi天气
HashSet underlying source code
Et5.0 configuring Excel
pytorch和tensorflow有什么区别?
304. Merge two ordered arrays
What is pytorch? Explain the basic concepts of pytorch
. The way to prove the effect of throwing exceptions on performance in. Net core
Rotating camera
[JS component] floating text
How the ET framework uses it to develop games
Common skills for quantitative investment - drawing 2: drawing the moving average
redis
Mysql database password modification
Minimum spanning tree problem
三栏简约typecho主题Lanstar/蓝星typecho主题
Undirected graph -- computing the degree of a node in compressed storage
什么是 dummy change?
Leetcode-18- sum of four numbers (medium)