From 0d6e63794212acb692f510fafc274ad34a2edbb7 Mon Sep 17 00:00:00 2001 From: lihongjie0209 Date: Tue, 14 Nov 2023 13:56:34 +0800 Subject: [PATCH] bugfix --- .../service/CoalWashingDailyAnalysisService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/cn/lihongjie/coal/coalWashingDailyAnalysis/service/CoalWashingDailyAnalysisService.java b/src/main/java/cn/lihongjie/coal/coalWashingDailyAnalysis/service/CoalWashingDailyAnalysisService.java index 1db5472a..dac0f329 100644 --- a/src/main/java/cn/lihongjie/coal/coalWashingDailyAnalysis/service/CoalWashingDailyAnalysisService.java +++ b/src/main/java/cn/lihongjie/coal/coalWashingDailyAnalysis/service/CoalWashingDailyAnalysisService.java @@ -10,6 +10,7 @@ import cn.lihongjie.coal.coalWashingDailyAnalysis.entity.CoalWashingDailyAnalysi import cn.lihongjie.coal.coalWashingDailyAnalysis.mapper.CoalWashingDailyAnalysisMapper; import cn.lihongjie.coal.coalWashingDailyAnalysis.mapper.RoundMapper; import cn.lihongjie.coal.coalWashingDailyAnalysis.repository.CoalWashingDailyAnalysisRepository; +import cn.lihongjie.coal.common.Ctx; import jakarta.annotation.PostConstruct; @@ -40,7 +41,7 @@ public class CoalWashingDailyAnalysisService public CoalWashingDailyAnalysisDto create(CreateCoalWashingDailyAnalysisDto request) { CoalWashingDailyAnalysisEntity entity = mapper.toEntity(request); - + entity.setOrganizationId(Ctx.currentUser().getOrganizationId()); this.repository.save(entity); return getById(entity.getId()); } @@ -57,7 +58,7 @@ public class CoalWashingDailyAnalysisService public CoalWashingDailyAnalysisDto update(UpdateCoalWashingDailyAnalysisDto request) { CoalWashingDailyAnalysisEntity entity = this.repository.get(request.getId()); this.mapper.updateEntity(entity, request); - + entity.setOrganizationId(Ctx.currentUser().getOrganizationId()); this.repository.save(entity); return getById(entity.getId());