From 9fde9f917552f659d41fcfce5094f429a29b8ead Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期四, 16 一月 2025 16:26:54 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 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..0e81641 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(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 (null != shop.getPid() && shop.getPid()==0){
+ shop.setPid(null);
+ }
+ return R.ok(shop);
}
@DeleteMapping("/deleteShop")
@@ -498,7 +503,8 @@
userShop.setRoleType(1);
List<UserShop> data = userShopClient.getUserShop(userShop).getData();
SysUser userData = sysUserClient.getSysUser(data.get(0).getUserId()).getData();
- userData.setPassword(userData.getPhonenumber().substring(5));
+ String s = MD5Generator.generateMD5(userData.getPhonenumber().substring(5));
+ userData.setPassword(s);
sysUserClient.resetPassword(userData);
}
return R.ok();
--
Gitblit v1.7.1