From c904f735e0b8a488ef56744c08f8e10258639bce Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期四, 05 六月 2025 15:54:58 +0800
Subject: [PATCH] #

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

diff --git a/src/main/java/com/zy/common/web/AuthController.java b/src/main/java/com/zy/common/web/AuthController.java
index 0195788..fff96c3 100644
--- a/src/main/java/com/zy/common/web/AuthController.java
+++ b/src/main/java/com/zy/common/web/AuthController.java
@@ -12,6 +12,7 @@
 import com.zy.common.model.PowerDto;
 import com.zy.common.utils.RandomValidateCodeUtil;
 import com.zy.system.entity.*;
+import com.zy.system.entity.license.LicenseVerify;
 import com.zy.system.service.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -46,10 +47,18 @@
     private PermissionService permissionService;
     @Autowired
     private RolePermissionService rolePermissionService;
+    @Autowired
+    private ConfigService configService;
 
     @RequestMapping("/login.action")
     @ManagerAuth(value = ManagerAuth.Auth.NONE, memo = "鐧诲綍")
     public R loginAction(String mobile, String password){
+        //楠岃瘉璁稿彲璇佹槸鍚︽湁鏁�
+        LicenseVerify licenseVerify = new LicenseVerify();
+        boolean verify = licenseVerify.verify();
+        if (!verify) {//璁稿彲璇佸凡澶辨晥
+            return R.parse(CodeRes.SYSTEM_20001);
+        }
         if (mobile.equals("super") && password.equals(Cools.md5(superPwd))) {
             Map<String, Object> res = new HashMap<>();
             res.put("username", mobile);
@@ -65,7 +74,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());
@@ -80,6 +89,20 @@
         return R.ok(res);
     }
 
+    @RequestMapping("/loginInformation")
+    public R getLoginPageInformation() {
+        Config loginLogo = configService.selectByCode("loginLogo");
+        Config loginCopyrightText = configService.selectByCode("loginCopyrightText");
+        Config loginCopyrightImg1 = configService.selectByCode("loginCopyrightImg1");
+
+        HashMap<String, Object> map = new HashMap<>();
+        map.put("loginLogo", loginLogo.getValue());
+        map.put("loginCopyrightText", loginCopyrightText.getValue());
+        map.put("loginCopyrightImg1", loginCopyrightImg1.getStatus() == 1 ? loginCopyrightImg1.getValue() : "");
+
+        return R.ok().add(map);
+    }
+
     @RequestMapping("/code/switch.action")
     public R code() {
         return R.ok().add(Parameter.get().getCodeSwitch());

--
Gitblit v1.9.1