From 80ba36b0aebdd1c99d126e034be9bcea5768a12f Mon Sep 17 00:00:00 2001 From: yjz <3131811435@qq.com> Date: Wed, 15 Nov 2023 09:16:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AF=B9?= =?UTF-8?q?=E6=AF=94):=2078391?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LawsCustomCompareInfoController.java | 5 +++++ .../service/ILawsCustomCompareInfoService.java | 6 ++++++ .../impl/LawsCustomCompareInfoServiceImpl.java | 16 ++++++++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/laws/customcompare/controller/LawsCustomCompareInfoController.java b/laws-modules/src/main/java/com/jero/modules/laws/customcompare/controller/LawsCustomCompareInfoController.java index a74030d1..b81d0c1c 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/customcompare/controller/LawsCustomCompareInfoController.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/customcompare/controller/LawsCustomCompareInfoController.java @@ -180,6 +180,7 @@ public class LawsCustomCompareInfoController { @RequiresPermissions("customComparison:edit") public Result> saveCell(@RequestBody LawsCustomCompareCell lawsCustomCompareCell) { lawsCustomCompareCellService.saveOrUpdate(lawsCustomCompareCell); + lawsCustomCompareInfoService.editCompareCreateTime(lawsCustomCompareCell.getInfoId()); return Result.OK(MessageUtils.getMessage(ResultCommon.OK)); } @@ -193,6 +194,7 @@ public class LawsCustomCompareInfoController { @RequiresPermissions("customComparison:edit") public Result> saveCellCompareResult(@RequestBody LawsCustomCompareInventory lawsCustomCompareCell) { lawsCustomCompareInventoryService.saveOrUpdate(lawsCustomCompareCell); + lawsCustomCompareInfoService.editCompareCreateTime(lawsCustomCompareCell.getInfoId()); return Result.OK(MessageUtils.getMessage(ResultCommon.OK)); } @@ -219,6 +221,7 @@ public class LawsCustomCompareInfoController { @RequiresPermissions("customComparison:edit") public Result save(@RequestBody LawsCustomCompareInfo lawsCustomCompareInfo) { lawsCustomCompareInfoService.saveOrUpdate(lawsCustomCompareInfo); + lawsCustomCompareInfoService.editCompareCreateTime(lawsCustomCompareInfo.getId()); return Result.OK(MessageUtils.getMessage(ResultCommon.OK)); } @@ -233,6 +236,7 @@ public class LawsCustomCompareInfoController { public Result delById(@RequestBody Map map) { if (map.containsKey("id")){ lawsCustomCompareInfoService.delById((String) map.get("id")); + lawsCustomCompareInfoService.editCompareCreateTime((String) map.get("id")); } return Result.OK(MessageUtils.getMessage(ResultCommon.OK)); } @@ -248,6 +252,7 @@ public class LawsCustomCompareInfoController { public Result delInventoryById(@RequestBody Map map) { if (map.containsKey("id")){ lawsCustomCompareInventoryService.removeById((String) map.get("id")); + lawsCustomCompareInfoService.editCompareCreateTime((String) map.get("id")); } return Result.OK(MessageUtils.getMessage(ResultCommon.OK)); } diff --git a/laws-modules/src/main/java/com/jero/modules/laws/customcompare/service/ILawsCustomCompareInfoService.java b/laws-modules/src/main/java/com/jero/modules/laws/customcompare/service/ILawsCustomCompareInfoService.java index f2c30334..4ddaa238 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/customcompare/service/ILawsCustomCompareInfoService.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/customcompare/service/ILawsCustomCompareInfoService.java @@ -107,5 +107,11 @@ public interface ILawsCustomCompareInfoService extends IService map); + + /** + * 自定义对比-更新对比时间 + * @param id + */ + void editCompareCreateTime(String id); } diff --git a/laws-modules/src/main/java/com/jero/modules/laws/customcompare/service/impl/LawsCustomCompareInfoServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/customcompare/service/impl/LawsCustomCompareInfoServiceImpl.java index b91c2a1d..e6d1a194 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/customcompare/service/impl/LawsCustomCompareInfoServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/customcompare/service/impl/LawsCustomCompareInfoServiceImpl.java @@ -247,6 +247,7 @@ public class LawsCustomCompareInfoServiceImpl extends ServiceImpl() .eq(LawsCustomCompareInfoStandard::getInfoId, infoId) .eq(LawsCustomCompareInfoStandard::getStandardId, standardId)); + editCompareCreateTime(standardId); } @Override @@ -434,6 +436,14 @@ public class LawsCustomCompareInfoServiceImpl extends ServiceImpl() + .eq(LawsCustomCompareInfo::getId, id) + .set(LawsCustomCompareInfo::getCreateTime, new Date())); } private void createTableCellContent(XSSFSheet sheet, List standardVOS, List featureList, List compareList, List list, CellStyle cellStyle) { @@ -496,14 +506,16 @@ public class LawsCustomCompareInfoServiceImpl extends ServiceImpl