From b7f8b37b0183d58839e262a02adde0d73dcef9c7 Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Mon, 21 Jun 2021 15:17:01 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=907.0.4=E3=80=91=E3=80=90c=E3=80=91?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=B7=E6=96=B0=E7=BC=93=E5=AD=98=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modular/service/impl/CustomerServiceImpl.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/kernel-s-customer/customer-business/src/main/java/cn/stylefeng/roses/kernel/customer/modular/service/impl/CustomerServiceImpl.java b/kernel-s-customer/customer-business/src/main/java/cn/stylefeng/roses/kernel/customer/modular/service/impl/CustomerServiceImpl.java index 1f96e57b9..8f452750f 100644 --- a/kernel-s-customer/customer-business/src/main/java/cn/stylefeng/roses/kernel/customer/modular/service/impl/CustomerServiceImpl.java +++ b/kernel-s-customer/customer-business/src/main/java/cn/stylefeng/roses/kernel/customer/modular/service/impl/CustomerServiceImpl.java @@ -235,6 +235,9 @@ public class CustomerServiceImpl extends ServiceImpl i String encrypt = passwordStoredEncryptApi.encrypt(password); customer.setPassword(encrypt); this.updateById(customer); + + // 清除缓存中的用户信息 + customerInfoCacheOperatorApi.remove(String.valueOf(customer.getCustomerId())); } @Override @@ -248,6 +251,9 @@ public class CustomerServiceImpl extends ServiceImpl i public void del(CustomerRequest customerRequest) { Customer customer = this.queryCustomer(customerRequest); this.removeById(customer.getCustomerId()); + + // 清除缓存中的用户信息 + customerInfoCacheOperatorApi.remove(String.valueOf(customer.getCustomerId())); } @Override @@ -255,6 +261,9 @@ public class CustomerServiceImpl extends ServiceImpl i Customer customer = this.queryCustomer(customerRequest); BeanUtil.copyProperties(customerRequest, customer); this.updateById(customer); + + // 清除缓存中的用户信息 + customerInfoCacheOperatorApi.remove(String.valueOf(customer.getCustomerId())); } @Override @@ -292,6 +301,9 @@ public class CustomerServiceImpl extends ServiceImpl i String encryptPwd = passwordStoredEncryptApi.encrypt(customerInfoRequest.getNewPassword()); customer.setPassword(encryptPwd); this.updateById(customer); + + // 清除缓存中的用户信息 + customerInfoCacheOperatorApi.remove(String.valueOf(customer.getCustomerId())); } @Override @@ -308,6 +320,9 @@ public class CustomerServiceImpl extends ServiceImpl i customer.setAvatar(customerInfoRequest.getAvatar()); customer.setAvatarObjectName(fileInfo.getFileObjectName()); this.updateById(customer); + + // 清除缓存中的用户信息 + customerInfoCacheOperatorApi.remove(String.valueOf(customer.getCustomerId())); } @Override