mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-24 23:41:21 +08:00
perf(warehouse): 优化仓库货物信息更新操作
- 在更新仓库货物信息后,添加 em.flush() 方法,确保数据及时写入数据库 - 通过 em.refresh() 方法刷新实体,确保获取最新的数据库状态
This commit is contained in:
@@ -70,7 +70,7 @@ public class WarehouseGoodsService
|
||||
this.mapper.updateEntity(entity, request);
|
||||
|
||||
this.repository.save(entity);
|
||||
|
||||
em.flush();
|
||||
em.refresh(entity);
|
||||
|
||||
return getById(entity.getId());
|
||||
|
||||
Reference in New Issue
Block a user