|
@@ -1,6 +1,9 @@
|
|
package com.pj.project.app_role;
|
|
package com.pj.project.app_role;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+
|
|
|
|
+import cn.dev33.satoken.stp.StpUtil;
|
|
|
|
+import com.pj.current.satoken.AuthConst;
|
|
import com.pj.utils.so.SoMap;
|
|
import com.pj.utils.so.SoMap;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -75,13 +78,23 @@ public class AppRoleController {
|
|
List<AppRole> list = appRoleService.getList(so.startPage());
|
|
List<AppRole> list = appRoleService.getList(so.startPage());
|
|
return AjaxJson.getPageData(so.getDataCount(), list);
|
|
return AjaxJson.getPageData(so.getDataCount(), list);
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /** 改状态 */
|
|
|
|
+ @RequestMapping("updateStatus")
|
|
|
|
+ @SaCheckPermission(AppRole.PERMISSION_CODE)
|
|
|
|
+ public AjaxJson updateStatus(long id, int status) {
|
|
|
|
+ // 修改状态
|
|
|
|
+ SP.publicMapper.updateColumnById(AppRole.TABLE_NAME, "status", status, id);
|
|
|
|
+ // 如果是禁用,就停掉其秘钥有效果性,使其账号的登录状态立即无效
|
|
|
|
+ return AjaxJson.getSuccess();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|