From ca01cb15364ade73b509670e1d5d993f1f92ffd9 Mon Sep 17 00:00:00 2001 From: qdxkrs <39894542+qdxkrs@users.noreply.github.com> Date: Wed, 22 Jun 2022 17:36:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A0=E9=99=A4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tool}/controller/AppManageController.java | 2 +- .../tool}/controller/CacheController.java | 2 +- .../controller/CropClassifyRecordController.java | 2 +- .../controller/DicBusinessServiceController.java | 2 +- .../tool}/controller/FarmingInfoController.java | 2 +- .../tool}/controller/FileDocumentController.java | 2 +- .../tool}/controller/FileServerController.java | 2 +- .../tool}/controller/HelloController.java | 2 +- .../controller/HydrologicalStationController.java | 2 +- .../controller/IndependentCheckController.java | 2 +- .../tool}/controller/IrrigationCheckController.java | 2 +- .../controller/IrrigationRecordController.java | 2 +- .../controller/IrrigationSarRecordController.java | 2 +- .../tool}/controller/ShpAdmController.java | 2 +- .../tool}/controller/SysManageController.java | 2 +- .../tool}/controller/SysUserController.java | 2 +- .../tool}/controller/TeaGardenPlotController.java | 2 +- .../tool}/controller/TifProductController.java | 2 +- .../tool}/controller/TypicalFarmerController.java | 2 +- .../tool}/controller/TypicalPlotController.java | 2 +- .../controller/TypicalPlotIrrigationController.java | 2 +- .../tool}/controller/WcsRecordController.java | 2 +- .../tool}/controller/WeatherController.java | 2 +- .../tool}/controller/WeatherStationController.java | 2 +- .../service/impl/TeaGardenPlotServiceImpl.java | 13 +++++++++---- 25 files changed, 33 insertions(+), 28 deletions(-) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/AppManageController.java (98%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/CacheController.java (94%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/CropClassifyRecordController.java (98%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/DicBusinessServiceController.java (97%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/FarmingInfoController.java (98%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/FileDocumentController.java (98%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/FileServerController.java (98%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/HelloController.java (94%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/HydrologicalStationController.java (98%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/IndependentCheckController.java (98%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/IrrigationCheckController.java (98%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/IrrigationRecordController.java (98%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/IrrigationSarRecordController.java (99%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/ShpAdmController.java (98%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/SysManageController.java (97%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/SysUserController.java (99%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/TeaGardenPlotController.java (98%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/TifProductController.java (98%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/TypicalFarmerController.java (99%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/TypicalPlotController.java (99%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/TypicalPlotIrrigationController.java (99%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/WcsRecordController.java (98%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/WeatherController.java (98%) rename src/main/java/com/xkrs/microservice/{ => common/tool}/controller/WeatherStationController.java (97%) diff --git a/src/main/java/com/xkrs/microservice/controller/AppManageController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/AppManageController.java similarity index 98% rename from src/main/java/com/xkrs/microservice/controller/AppManageController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/AppManageController.java index 310dc00..3ac9ed8 100644 --- a/src/main/java/com/xkrs/microservice/controller/AppManageController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/AppManageController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.FileAppEntity; diff --git a/src/main/java/com/xkrs/microservice/controller/CacheController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/CacheController.java similarity index 94% rename from src/main/java/com/xkrs/microservice/controller/CacheController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/CacheController.java index 8ade5a5..4824257 100644 --- a/src/main/java/com/xkrs/microservice/controller/CacheController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/CacheController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.service.CacheService; import org.springframework.context.i18n.LocaleContextHolder; diff --git a/src/main/java/com/xkrs/microservice/controller/CropClassifyRecordController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/CropClassifyRecordController.java similarity index 98% rename from src/main/java/com/xkrs/microservice/controller/CropClassifyRecordController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/CropClassifyRecordController.java index 08d992f..74cbf82 100644 --- a/src/main/java/com/xkrs/microservice/controller/CropClassifyRecordController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/CropClassifyRecordController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.CropClassifyRecordEntity; diff --git a/src/main/java/com/xkrs/microservice/controller/DicBusinessServiceController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/DicBusinessServiceController.java similarity index 97% rename from src/main/java/com/xkrs/microservice/controller/DicBusinessServiceController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/DicBusinessServiceController.java index 753423a..3df002b 100644 --- a/src/main/java/com/xkrs/microservice/controller/DicBusinessServiceController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/DicBusinessServiceController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.*; diff --git a/src/main/java/com/xkrs/microservice/controller/FarmingInfoController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/FarmingInfoController.java similarity index 98% rename from src/main/java/com/xkrs/microservice/controller/FarmingInfoController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/FarmingInfoController.java index bc639fa..9bfd662 100644 --- a/src/main/java/com/xkrs/microservice/controller/FarmingInfoController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/FarmingInfoController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.FarmingInfoEntity; diff --git a/src/main/java/com/xkrs/microservice/controller/FileDocumentController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/FileDocumentController.java similarity index 98% rename from src/main/java/com/xkrs/microservice/controller/FileDocumentController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/FileDocumentController.java index 43e80bc..4d47c64 100644 --- a/src/main/java/com/xkrs/microservice/controller/FileDocumentController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/FileDocumentController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.FileDocumentEntity; diff --git a/src/main/java/com/xkrs/microservice/controller/FileServerController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/FileServerController.java similarity index 98% rename from src/main/java/com/xkrs/microservice/controller/FileServerController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/FileServerController.java index d5e8f3d..18fd5c5 100644 --- a/src/main/java/com/xkrs/microservice/controller/FileServerController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/FileServerController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.model.vo.FileServerResultVo; import com.xkrs.microservice.service.FileServerService; diff --git a/src/main/java/com/xkrs/microservice/controller/HelloController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/HelloController.java similarity index 94% rename from src/main/java/com/xkrs/microservice/controller/HelloController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/HelloController.java index 1022dc2..2643e3b 100644 --- a/src/main/java/com/xkrs/microservice/controller/HelloController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/HelloController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import org.springframework.context.i18n.LocaleContextHolder; diff --git a/src/main/java/com/xkrs/microservice/controller/HydrologicalStationController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/HydrologicalStationController.java similarity index 98% rename from src/main/java/com/xkrs/microservice/controller/HydrologicalStationController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/HydrologicalStationController.java index a4d3930..0b0900b 100644 --- a/src/main/java/com/xkrs/microservice/controller/HydrologicalStationController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/HydrologicalStationController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.HydrologicalStationEntity; diff --git a/src/main/java/com/xkrs/microservice/controller/IndependentCheckController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/IndependentCheckController.java similarity index 98% rename from src/main/java/com/xkrs/microservice/controller/IndependentCheckController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/IndependentCheckController.java index 91decfe..b923653 100644 --- a/src/main/java/com/xkrs/microservice/controller/IndependentCheckController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/IndependentCheckController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.IndependentCheckEntity; diff --git a/src/main/java/com/xkrs/microservice/controller/IrrigationCheckController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/IrrigationCheckController.java similarity index 98% rename from src/main/java/com/xkrs/microservice/controller/IrrigationCheckController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/IrrigationCheckController.java index 9796602..7144ad1 100644 --- a/src/main/java/com/xkrs/microservice/controller/IrrigationCheckController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/IrrigationCheckController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.IrrigationCheckEntity; diff --git a/src/main/java/com/xkrs/microservice/controller/IrrigationRecordController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/IrrigationRecordController.java similarity index 98% rename from src/main/java/com/xkrs/microservice/controller/IrrigationRecordController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/IrrigationRecordController.java index ba91c0c..69ed770 100644 --- a/src/main/java/com/xkrs/microservice/controller/IrrigationRecordController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/IrrigationRecordController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.IrrigationRecordEntity; diff --git a/src/main/java/com/xkrs/microservice/controller/IrrigationSarRecordController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/IrrigationSarRecordController.java similarity index 99% rename from src/main/java/com/xkrs/microservice/controller/IrrigationSarRecordController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/IrrigationSarRecordController.java index 5c86492..1d32499 100644 --- a/src/main/java/com/xkrs/microservice/controller/IrrigationSarRecordController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/IrrigationSarRecordController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.IrrigationSarRecordEntity; diff --git a/src/main/java/com/xkrs/microservice/controller/ShpAdmController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/ShpAdmController.java similarity index 98% rename from src/main/java/com/xkrs/microservice/controller/ShpAdmController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/ShpAdmController.java index 9349e16..be1e4aa 100644 --- a/src/main/java/com/xkrs/microservice/controller/ShpAdmController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/ShpAdmController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.vo.ShpCityVo; diff --git a/src/main/java/com/xkrs/microservice/controller/SysManageController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/SysManageController.java similarity index 97% rename from src/main/java/com/xkrs/microservice/controller/SysManageController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/SysManageController.java index 0d8d4a9..9ff14f4 100644 --- a/src/main/java/com/xkrs/microservice/controller/SysManageController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/SysManageController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import nl.basjes.parse.useragent.UserAgent; diff --git a/src/main/java/com/xkrs/microservice/controller/SysUserController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/SysUserController.java similarity index 99% rename from src/main/java/com/xkrs/microservice/controller/SysUserController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/SysUserController.java index b474b8a..144ac50 100644 --- a/src/main/java/com/xkrs/microservice/controller/SysUserController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/SysUserController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.SysRoleEntity; diff --git a/src/main/java/com/xkrs/microservice/controller/TeaGardenPlotController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/TeaGardenPlotController.java similarity index 98% rename from src/main/java/com/xkrs/microservice/controller/TeaGardenPlotController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/TeaGardenPlotController.java index aa00339..c0a93e7 100644 --- a/src/main/java/com/xkrs/microservice/controller/TeaGardenPlotController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/TeaGardenPlotController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.TeaGardenPlotEntity; diff --git a/src/main/java/com/xkrs/microservice/controller/TifProductController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/TifProductController.java similarity index 98% rename from src/main/java/com/xkrs/microservice/controller/TifProductController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/TifProductController.java index cc551be..4255581 100644 --- a/src/main/java/com/xkrs/microservice/controller/TifProductController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/TifProductController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.TifProductEntity; diff --git a/src/main/java/com/xkrs/microservice/controller/TypicalFarmerController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/TypicalFarmerController.java similarity index 99% rename from src/main/java/com/xkrs/microservice/controller/TypicalFarmerController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/TypicalFarmerController.java index 0ab85f3..406a042 100644 --- a/src/main/java/com/xkrs/microservice/controller/TypicalFarmerController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/TypicalFarmerController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.TypicalFarmerEntity; diff --git a/src/main/java/com/xkrs/microservice/controller/TypicalPlotController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/TypicalPlotController.java similarity index 99% rename from src/main/java/com/xkrs/microservice/controller/TypicalPlotController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/TypicalPlotController.java index 993c1ce..cefb367 100644 --- a/src/main/java/com/xkrs/microservice/controller/TypicalPlotController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/TypicalPlotController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.TypicalPlotEntity; diff --git a/src/main/java/com/xkrs/microservice/controller/TypicalPlotIrrigationController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/TypicalPlotIrrigationController.java similarity index 99% rename from src/main/java/com/xkrs/microservice/controller/TypicalPlotIrrigationController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/TypicalPlotIrrigationController.java index dde01ff..197be34 100644 --- a/src/main/java/com/xkrs/microservice/controller/TypicalPlotIrrigationController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/TypicalPlotIrrigationController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.TypicalPlotIrrigationEntity; diff --git a/src/main/java/com/xkrs/microservice/controller/WcsRecordController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/WcsRecordController.java similarity index 98% rename from src/main/java/com/xkrs/microservice/controller/WcsRecordController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/WcsRecordController.java index 695dfa8..66eb6ca 100644 --- a/src/main/java/com/xkrs/microservice/controller/WcsRecordController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/WcsRecordController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.entity.WcsRecordEntity; diff --git a/src/main/java/com/xkrs/microservice/controller/WeatherController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/WeatherController.java similarity index 98% rename from src/main/java/com/xkrs/microservice/controller/WeatherController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/WeatherController.java index bc84cc3..79c6456 100644 --- a/src/main/java/com/xkrs/microservice/controller/WeatherController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/WeatherController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.common.tool.PageBean; diff --git a/src/main/java/com/xkrs/microservice/controller/WeatherStationController.java b/src/main/java/com/xkrs/microservice/common/tool/controller/WeatherStationController.java similarity index 97% rename from src/main/java/com/xkrs/microservice/controller/WeatherStationController.java rename to src/main/java/com/xkrs/microservice/common/tool/controller/WeatherStationController.java index bc39e5a..0ef1cc5 100644 --- a/src/main/java/com/xkrs/microservice/controller/WeatherStationController.java +++ b/src/main/java/com/xkrs/microservice/common/tool/controller/WeatherStationController.java @@ -1,4 +1,4 @@ -package com.xkrs.microservice.controller; +package com.xkrs.microservice.common.tool.controller; import com.xkrs.microservice.common.encapsulation.PromptMessageEnum; import com.xkrs.microservice.model.vo.ForecastWeather7DayVo; diff --git a/src/main/java/com/xkrs/microservice/service/impl/TeaGardenPlotServiceImpl.java b/src/main/java/com/xkrs/microservice/service/impl/TeaGardenPlotServiceImpl.java index 5468f81..ff9f54a 100644 --- a/src/main/java/com/xkrs/microservice/service/impl/TeaGardenPlotServiceImpl.java +++ b/src/main/java/com/xkrs/microservice/service/impl/TeaGardenPlotServiceImpl.java @@ -8,8 +8,10 @@ import com.xkrs.microservice.util.CopyPropertiesUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.List; @@ -57,7 +59,8 @@ public class TeaGardenPlotServiceImpl implements TeaGardenPlotService { * 新增典型地块记录 * @param teaGardenPlotQo */ - @Cacheable(keyGenerator = "keyGenerator", unless="#result == null") + @Transactional(rollbackFor=Exception.class) + @CacheEvict(value = "TeaGardenPlotServiceCache",allEntries = true) @Override public void add(TeaGardenPlotQo teaGardenPlotQo){ TeaGardenPlotEntity teaGardenPlotEntity = new TeaGardenPlotEntity(); @@ -73,7 +76,8 @@ public class TeaGardenPlotServiceImpl implements TeaGardenPlotService { * 更新典型地块记录 * @param teaGardenPlotQo */ - @Cacheable(keyGenerator = "keyGenerator", unless="#result == null") + @Transactional(rollbackFor=Exception.class) + @CacheEvict(value = "TeaGardenPlotServiceCache",allEntries = true) @Override public void update(TeaGardenPlotQo teaGardenPlotQo){ TeaGardenPlotEntity teaGardenPlotEntity = new TeaGardenPlotEntity(); @@ -90,11 +94,12 @@ public class TeaGardenPlotServiceImpl implements TeaGardenPlotService { * @param id * @return */ - @Cacheable(keyGenerator = "keyGenerator", unless="#result == null") + @Transactional(rollbackFor=Exception.class) + @CacheEvict(value = "TeaGardenPlotServiceCache",allEntries = true) @Override public int delete(Integer id){ Optional teaGardenPlotEntityOptional = teaGardenPlotDao.findById(id); - if(teaGardenPlotEntityOptional.isPresent()){ + if(teaGardenPlotEntityOptional.isEmpty()){ return 1; } teaGardenPlotDao.deleteById(id);