perf(warehouse): 优化仓库货物信息更新操作

- 在更新仓库货物信息后,添加 em.flush() 方法,确保数据及时写入数据库
- 通过 em.refresh() 方法刷新实体,确保获取最新的数据库状态
This commit is contained in:
2025-03-30 21:23:38 +08:00
parent 2966418c85
commit f05ac9192d

View File

@@ -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());