From 7d77513eed7e9497c7fbfbbdbe0127fee95260fd Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Wed, 15 Dec 2021 20:25:36 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E3=80=907.1.6=E3=80=91=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=A7=98=E9=92=A5=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CustomerServiceImpl.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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 277f6ed27..367ba9851 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 @@ -364,17 +364,8 @@ public class CustomerServiceImpl extends ServiceImpl i // 获取当前登录用户 Long userId = LoginContext.me().getLoginUser().getUserId(); - return this.createOrUpdateCustomerSecret(userId); - } - - @Override - public String createOrUpdateCustomerSecret(Long customerId) { - if (customerId == null) { - return null; - } - // 查看当前用户是否有秘钥 - Customer customer = this.getById(customerId); + Customer customer = this.getById(userId); if (StrUtil.isEmpty(customer.getSecretKey())) { throw new CustomerException(CustomerExceptionEnum.NO_SECRET); } @@ -384,6 +375,15 @@ public class CustomerServiceImpl extends ServiceImpl i throw new CustomerException(CustomerExceptionEnum.SECRET_EXPIRED); } + return this.createOrUpdateCustomerSecret(userId); + } + + @Override + public String createOrUpdateCustomerSecret(Long customerId) { + if (customerId == null) { + return null; + } + // 重新生成秘钥 String randomString = RandomUtil.randomString(32); From bb4dfd4256ce57b3e9913736c5fd92d3c7553810 Mon Sep 17 00:00:00 2001 From: yxx Date: Fri, 17 Dec 2021 11:17:01 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4=E5=80=92?= =?UTF-8?q?=E5=BA=8F=E6=8E=92=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modular/loginlog/service/impl/SysLoginLogServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel-d-log/log-business-login-log/src/main/java/cn/stylefeng/roses/kernel/system/modular/loginlog/service/impl/SysLoginLogServiceImpl.java b/kernel-d-log/log-business-login-log/src/main/java/cn/stylefeng/roses/kernel/system/modular/loginlog/service/impl/SysLoginLogServiceImpl.java index 56fc68587..53220bd91 100644 --- a/kernel-d-log/log-business-login-log/src/main/java/cn/stylefeng/roses/kernel/system/modular/loginlog/service/impl/SysLoginLogServiceImpl.java +++ b/kernel-d-log/log-business-login-log/src/main/java/cn/stylefeng/roses/kernel/system/modular/loginlog/service/impl/SysLoginLogServiceImpl.java @@ -195,6 +195,9 @@ public class SysLoginLogServiceImpl extends ServiceImpl Date: Mon, 20 Dec 2021 21:20:58 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E3=80=907.1.6=E3=80=91=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resource/framework/ApiResourceApplicationRunner.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/kernel-s-system/system-business-resource/src/main/java/cn/stylefeng/roses/kernel/system/modular/resource/framework/ApiResourceApplicationRunner.java b/kernel-s-system/system-business-resource/src/main/java/cn/stylefeng/roses/kernel/system/modular/resource/framework/ApiResourceApplicationRunner.java index dd6be86a0..4f7f05546 100644 --- a/kernel-s-system/system-business-resource/src/main/java/cn/stylefeng/roses/kernel/system/modular/resource/framework/ApiResourceApplicationRunner.java +++ b/kernel-s-system/system-business-resource/src/main/java/cn/stylefeng/roses/kernel/system/modular/resource/framework/ApiResourceApplicationRunner.java @@ -2,13 +2,18 @@ package cn.stylefeng.roses.kernel.system.modular.resource.framework; import cn.stylefeng.roses.kernel.system.modular.resource.service.ApiResourceService; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; +import javax.annotation.Resource; + /** + * 刷新表中的数据 + *

+ * 把表中的resource_code中的app code和当前启动的app code对应 + * * @author majianguo * @date 2021/12/2 11:58 */ @@ -17,7 +22,7 @@ import org.springframework.stereotype.Component; @Order(Integer.MAX_VALUE - 1) public class ApiResourceApplicationRunner implements ApplicationRunner { - @Autowired + @Resource private ApiResourceService apiResourceService; @Override