zwhui 1 jaar geleden
bovenliggende
commit
700433ac9b

+ 1 - 0
wholesale/src/main/java/com/yhlxj/dao/model/view/WebInfoView.java

@@ -8,6 +8,7 @@ import lombok.Data;
  */
 @Data
 public class WebInfoView {
+    private Long id;
     /**
      * logo
      */

+ 0 - 2
wholesale/src/main/java/com/yhlxj/service/wholesale/impl/WebInfoServiceImpl.java

@@ -109,8 +109,6 @@ public class WebInfoServiceImpl extends ServiceImpl<WebInfoMapper, WebInfo> impl
             throw new IllegalArgumentException("账号已存在");
         }
         createRecord(webInfo.getPrefix());
-        String encodePasscode = Codec.DoDigest.custom().setAlgorithm(Codec.DoDigest.Algorithm.SHA256).setStringData(webInfo.getPassword()).toBase64String();
-        webInfo.setPassword(encodePasscode);
         webInfoMapper.insert(webInfo);
         return webInfo;
     }

+ 3 - 3
wholesale/src/main/java/com/yhlxj/web/controller/manage/WholesaleController.java

@@ -90,11 +90,11 @@ public class WholesaleController {
 
     /**
      * 根据ID获取WebInfo
-     * @param id ID
      * @return 结果
      */
-    @GetMapping("/{id}")
-    public Result<WebInfo> getWebInfoById(@PathVariable Long id) {
+    @GetMapping()
+    public Result<WebInfo> getWebInfoById() {
+            Long id = StpUtil.getLoginIdAsLong();
             WebInfo webInfo = webInfoService.getWebInfoById(id);
             return GatewayResponse.SUCCESS.newBuilder().toResult(webInfo);
     }