From e5a94c9d747fa73ec7eb16b284ed5bc4b057bacc Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期三, 15 一月 2025 22:34:11 +0800 Subject: [PATCH] 加密 --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java index 8d7dd62..91516e9 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java @@ -12,6 +12,7 @@ import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.web.controller.BaseController; import com.ruoyi.common.security.service.TokenService; +import com.ruoyi.common.security.utils.MD5Generator; import com.ruoyi.common.security.utils.SecurityUtils; import com.ruoyi.order.feignClient.OrderClient; import com.ruoyi.order.vo.VerifiableShopVo; @@ -173,7 +174,8 @@ user.setRoleType(2); user.setObjectId(shopId); user.setAppUserId(appUser.getId()); - user.setPassword(phone.substring(5)); + String s = MD5Generator.generateMD5(phone.substring(5)); + user.setPassword(SecurityUtils.encryptPassword(s)); user.setCreateTime(new Date()); Long userId = sysUserClient.saveShopUser(user).getData(); @@ -206,8 +208,11 @@ @GetMapping("/getDetailById") @ApiOperation(value = "门店详情", tags = {"管理后台-门店管理"}) public R<Shop> getDetailById(@RequestParam("id") Integer id){ - Shop byId = shopService.getById(id); - return R.ok(byId); + Shop shop = shopService.getById(id); + if (shop.getPid()==0){ + shop.setPid(null); + } + return R.ok(shop); } @DeleteMapping("/deleteShop") -- Gitblit v1.7.1