From e3e341f6891e08a3942b8002e5e04af1131442ae Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期一, 26 五月 2025 11:15:20 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/common/web/AuthController.java | 24 +++++++++++++++++++++++-
1 files changed, 23 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..8bd90e0 100644
--- a/src/main/java/com/zy/common/web/AuthController.java
+++ b/src/main/java/com/zy/common/web/AuthController.java
@@ -13,6 +13,7 @@
import com.zy.common.utils.RandomValidateCodeUtil;
import com.zy.system.entity.*;
import com.zy.system.service.*;
+import com.zy.system.timer.LicenseTimer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
@@ -46,10 +47,17 @@
private PermissionService permissionService;
@Autowired
private RolePermissionService rolePermissionService;
+ @Autowired
+ private ConfigService configService;
+ @Autowired
+ private LicenseTimer licenseTimer;
@RequestMapping("/login.action")
@ManagerAuth(value = ManagerAuth.Auth.NONE, memo = "鐧诲綍")
public R loginAction(String mobile, String password){
+ if (!licenseTimer.getSystemSupport()) {//璁稿彲璇佸凡澶辨晥
+ 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 +73,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 +88,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