From 1ef6817089e2095b2cff7667740330d27ca3d68e Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 01 八月 2020 11:17:33 +0800
Subject: [PATCH] #当前本版十分完美、冻结

---
 src/main/java/com/zy/common/web/AuthController.java |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/zy/common/web/AuthController.java b/src/main/java/com/zy/common/web/AuthController.java
index 1ce49d5..31232e4 100644
--- a/src/main/java/com/zy/common/web/AuthController.java
+++ b/src/main/java/com/zy/common/web/AuthController.java
@@ -17,10 +17,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
 import java.util.*;
@@ -66,7 +63,7 @@
         if (user.getStatus()!=1){
             return R.parse(CodeRes.USER_10002);
         }
-        if (!Cools.md5(user.getPassword()).equals(password)){
+        if (!user.getPassword().equals(password)){
             return R.parse(CodeRes.USER_10003);
         }
         String token = Cools.enToken(System.currentTimeMillis() + mobile, user.getPassword());
@@ -74,6 +71,7 @@
         UserLogin userLogin = new UserLogin();
         userLogin.setUserId(user.getId());
         userLogin.setToken(token);
+        userLogin.setCreateTime(new Date());
         userLoginService.insert(userLogin);
         Map<String, Object> res = new HashMap<>();
         res.put("username", user.getUsername());
@@ -115,7 +113,7 @@
     }
 
     @RequestMapping("/menu/auth")
-    @ManagerAuth(memo = "棣栭〉鑿滃崟")
+    @ManagerAuth
     public R menu(){
         // 鑾峰彇鎵�鏈変竴绾ц彍鍗�
         List<Resource> oneLevel = resourceService.selectList(new EntityWrapper<Resource>().eq("level", 1).eq("status", 1).orderBy("sort"));
@@ -326,5 +324,10 @@
         return R.ok(resources);
     }
 
+    @PostMapping(value = "/system/secret/auth")
+    @ManagerAuth(memo = "鏇存柊绉橀挜")
+    public R systemSecret(@RequestParam(value = "secret") String secret) {
+        return R.ok(secret);
+    }
 
 }

--
Gitblit v1.9.1