diff --git a/src/main/java/cn/lihongjie/coal/warehouseGoods/service/WarehouseGoodsService.java b/src/main/java/cn/lihongjie/coal/warehouseGoods/service/WarehouseGoodsService.java index 278b73bc..79e27fed 100644 --- a/src/main/java/cn/lihongjie/coal/warehouseGoods/service/WarehouseGoodsService.java +++ b/src/main/java/cn/lihongjie/coal/warehouseGoods/service/WarehouseGoodsService.java @@ -60,6 +60,7 @@ public class WarehouseGoodsService WarehouseGoodsEntity entity = mapper.toEntity(request); this.repository.save(entity); + em.flush(); em.refresh(entity); return getById(entity.getId()); }