From b00eeab31bd13ba34a03301aa441b0751d6a93e4 Mon Sep 17 00:00:00 2001
From: dubin <bindu_bean@163.com>
Date: 星期五, 19 十二月 2025 17:00:51 +0800
Subject: [PATCH] 第六排成品可以放第七排原材料
---
src/main/java/com/zy/common/web/AuthController.java | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/zy/common/web/AuthController.java b/src/main/java/com/zy/common/web/AuthController.java
index fd37885..3b9d170 100644
--- a/src/main/java/com/zy/common/web/AuthController.java
+++ b/src/main/java/com/zy/common/web/AuthController.java
@@ -15,6 +15,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;
@@ -45,10 +46,15 @@
private PermissionService permissionService;
@Autowired
private RolePermissionService rolePermissionService;
-
+ @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);
@@ -117,12 +123,18 @@
@ManagerAuth
public R menu(){
// 鑾峰彇鎵�鏈変竴绾ц彍鍗�
- List<Resource> oneLevel = resourceService.selectList(new EntityWrapper<Resource>().eq("level", 1).eq("status", 1).orderBy("sort"));
+ List<Resource> oneLevel;
User user = null;
Wrapper<Resource> resourceWrapper;
if (getUserId() == 9527) {
+ oneLevel = resourceService.selectList(new EntityWrapper<Resource>().eq("level", 1).orderBy("sort"));
resourceWrapper = new EntityWrapper<Resource>().eq("level", 2).eq("status", 1).orderBy("sort");
} else {
+ // 婵�娲荤爜楠岃瘉
+ if (!SystemProperties.SYSTEM_ACTIVATION) {
+ return R.ok();
+ }
+ oneLevel = resourceService.selectList(new EntityWrapper<Resource>().eq("level", 1).eq("status", 1).orderBy("sort"));
// 鑾峰彇褰撳墠鐢ㄦ埛鐨勬墍鏈変簩绾ц彍鍗�
user = userService.selectById(getUserId());
List<RoleResource> roleResources = roleResourceService.selectList(new EntityWrapper<RoleResource>().eq("role_id", user.getRoleId()));
--
Gitblit v1.9.1