From 394bde5e8e93f4b3ea1b971e5323436d0a987350 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 2 Jul 2020 20:25:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=88=E7=AB=AF=E8=AE=BE=E7=BD=AE=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E7=A0=81=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/system/controller/SysClientDetailsController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysClientDetailsController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysClientDetailsController.java index b6f21a9..5db6117 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysClientDetailsController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysClientDetailsController.java @@ -17,6 +17,7 @@ import com.ruoyi.common.core.web.domain.AjaxResult; import com.ruoyi.common.core.web.page.TableDataInfo; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.utils.SecurityUtils; import com.ruoyi.system.domain.SysClientDetails; import com.ruoyi.system.service.ISysClientDetailsService; @@ -67,6 +68,7 @@ public class SysClientDetailsController extends BaseController { return AjaxResult.error("新增终端'" + clientId + "'失败,编号已存在"); } + sysClientDetails.setClientSecret(SecurityUtils.encryptPassword(sysClientDetails.getClientSecret())); return toAjax(sysClientDetailsService.insertSysClientDetails(sysClientDetails)); } @@ -78,6 +80,7 @@ public class SysClientDetailsController extends BaseController @PutMapping public AjaxResult edit(@RequestBody SysClientDetails sysClientDetails) { + sysClientDetails.setClientSecret(SecurityUtils.encryptPassword(sysClientDetails.getClientSecret())); return toAjax(sysClientDetailsService.updateSysClientDetails(sysClientDetails)); }