From 833824c4a12ab73f91aa22d4b636a4875dcde6c2 Mon Sep 17 00:00:00 2001 From: 13405411873 <1994398261@qq.com> Date: Thu, 31 Oct 2024 17:58:08 +0800 Subject: [PATCH] =?UTF-8?q?try=20catch=20=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AppSwiperController.java | 25 +++++++++++++++++++ .../service/impl/SysConfigServiceImpl.java | 6 +---- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java index a771df4c..c4c0152f 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java @@ -151,4 +151,29 @@ public class AppSwiperController extends BaseController map.put("user", sysUser); return CommonResult.success(map); } +// @GetMapping("/getJcWorkerInfo") +// public CommonResult getJcWorkerInfo() +// { +// +// LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); +// SysUser user = SecurityUtils.getLoginUser().getUser(); +// queryWrapper.eq(PartnerWorker::getUserId,user.getUserId()); +// PartnerWorker worker = jcWorkerService.getOne(queryWrapper); +// if (ObjectUtil.isNotEmpty(worker)){ +// LambdaQueryWrapper queryWrapper1 =new LambdaQueryWrapper<>(); +// queryWrapper1.eq(ShopMallPartners::getPartnerId,worker.getPartnerId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0"); +// ShopMallPartners partner = partnersService.getOne(queryWrapper1); +// if (ObjectUtil.isEmpty(partner)){ +// return error("信息有误"); +// } +// ajax.put("partnerInfo", partner); +// }else { +// return error("信息有误"); +// } +// SysUser sysUser = userService.selectUserById(user.getUserId()); +// +// ajax.put("user", sysUser); +// +// return ajax; +// } } diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/SysConfigServiceImpl.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/SysConfigServiceImpl.java index f24faf17..96b372e5 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/SysConfigServiceImpl.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/SysConfigServiceImpl.java @@ -66,15 +66,11 @@ public class SysConfigServiceImpl implements ISysConfigService { */ @Override public String selectConfigByKey(String configKey) { - String configValue = Convert.toStr(redisCache2.getCacheObject(getCacheKey(configKey))); - if (StringUtils.isNotEmpty(configValue)) { - return configValue; - } + SysConfig config = new SysConfig(); config.setConfigKey(configKey); SysConfig retConfig = configMapper2.selectConfig(config); if (StringUtils.isNotNull(retConfig)) { - redisCache2.setCacheObject(getCacheKey(configKey), retConfig.getConfigValue()); return retConfig.getConfigValue(); } return StringUtils.EMPTY;