From e76d087b2100d75e69732eaf9acaab7d4143e7c4 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 2 Jul 2020 20:26:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=88=E7=AB=AF=E8=AE=BE=E7=BD=AE=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/ISysClientDetailsService.java | 8 -------- .../impl/SysClientDetailsServiceImpl.java | 18 +++++------------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysClientDetailsService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysClientDetailsService.java index 11e88ea3..3ef835ee 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysClientDetailsService.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysClientDetailsService.java @@ -49,12 +49,4 @@ public interface ISysClientDetailsService * @return 结果 */ public int deleteSysClientDetailsByIds(String[] clientIds); - - /** - * 删除终端配置信息 - * - * @param clientId 终端配置ID - * @return 结果 - */ - public int deleteSysClientDetailsById(String clientId); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysClientDetailsServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysClientDetailsServiceImpl.java index d89fce47..383078d0 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysClientDetailsServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysClientDetailsServiceImpl.java @@ -2,9 +2,11 @@ package com.ruoyi.system.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; import org.springframework.stereotype.Service; -import com.ruoyi.system.mapper.SysClientDetailsMapper; +import com.ruoyi.common.core.constant.CacheConstants; import com.ruoyi.system.domain.SysClientDetails; +import com.ruoyi.system.mapper.SysClientDetailsMapper; import com.ruoyi.system.service.ISysClientDetailsService; /** @@ -61,6 +63,7 @@ public class SysClientDetailsServiceImpl implements ISysClientDetailsService * @return 结果 */ @Override + @CacheEvict(value = CacheConstants.CLIENT_DETAILS_KEY, key = "#sysClientDetails.clientId") public int updateSysClientDetails(SysClientDetails sysClientDetails) { return sysClientDetailsMapper.updateSysClientDetails(sysClientDetails); @@ -73,20 +76,9 @@ public class SysClientDetailsServiceImpl implements ISysClientDetailsService * @return 结果 */ @Override + @CacheEvict(value = CacheConstants.CLIENT_DETAILS_KEY, allEntries = true) public int deleteSysClientDetailsByIds(String[] clientIds) { return sysClientDetailsMapper.deleteSysClientDetailsByIds(clientIds); } - - /** - * 删除终端配置信息 - * - * @param clientId 终端配置ID - * @return 结果 - */ - @Override - public int deleteSysClientDetailsById(String clientId) - { - return sysClientDetailsMapper.deleteSysClientDetailsById(clientId); - } }