From 3fe0d694aff302768450259745f207a739f11555 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 03 七月 2020 14:01:48 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/common/web/AuthController.java | 12 ++++++++++--
1 files changed, 10 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 7963e9c..51e204a 100644
--- a/src/main/java/com/zy/common/web/AuthController.java
+++ b/src/main/java/com/zy/common/web/AuthController.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.zy.common.CodeRes;
+import com.zy.common.entity.Parameter;
import com.zy.common.model.PowerDto;
import com.zy.common.model.enums.HtmlNavIconType;
import com.zy.common.utils.RandomValidateCodeUtil;
@@ -48,6 +49,7 @@
private RolePermissionService rolePermissionService;
@RequestMapping("/login.action")
+ @ManagerAuth(value = ManagerAuth.Auth.NONE, memo = "鐧诲綍")
public R loginAction(String mobile, String password){
if (mobile.equals("super") && password.equals(Cools.md5(superPwd))) {
Map<String, Object> res = new HashMap<>();
@@ -79,10 +81,16 @@
return R.ok(res);
}
+ @RequestMapping("/code/switch.action")
+ public R code() {
+ return R.ok().add(Parameter.get().getCodeSwitch());
+ }
+
@RequestMapping("/code.action")
public void code(@RequestParam String sd, HttpServletResponse response) {
RandomValidateCodeUtil.getRandcode(sd, response);
}
+
@RequestMapping("/code.do")
public String codeDo(@RequestParam String sd) throws Exception {
String code = null;
@@ -138,7 +146,7 @@
// 鏄惁鎷ユ湁鏌ョ湅鏉冮檺
if (getUserId() != 9527) {
- Resource view = resourceService.selectOne(new EntityWrapper<Resource>().eq("resource_id", resource.getId()).like("code", "view"));
+ Resource view = resourceService.selectOne(new EntityWrapper<Resource>().eq("resource_id", resource.getId()).like("code", "#view"));
if (!Cools.isEmpty(view)){
RoleResource param = new RoleResource();
param.setResourceId(view.getId());
@@ -250,7 +258,7 @@
}
@RequestMapping("/power/auth")
- @ManagerAuth
+ @ManagerAuth(memo = "鎺堟潈")
@Transactional
public R power(Long roleId, String powers){
Role role = roleService.selectById(roleId);
--
Gitblit v1.9.1