<repo_name>lwbldy/GitWork<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/system/controller/SysRoleController.java
package com.lwbldy.system.controller;

import com.lwbldy.common.util.PageUtils;
import com.lwbldy.common.util.R;
import com.lwbldy.mbg.model.SysRole;
import com.lwbldy.mbg.model.SysUser;
import com.lwbldy.system.service.SysRoleMenuService;
import com.lwbldy.system.service.SysRoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(tags = "角色管理控制器")
@Controller
public class SysRoleController {

    @Autowired
    private SysRoleService sysRoleService;
    @Autowired
    private SysRoleMenuService sysRoleMenuService;

    @ApiOperation(value = "跳转到列表")
    @GetMapping("sysrole/list")
    @RequiresPermissions("sysrole:list")
    public String list(){
        return "system/sysrole/list";
    }


    @ApiOperation(value = "分页查询角色")
    @PostMapping("sysrole/list")
    @ResponseBody
    @RequiresPermissions("sysrole:list")
    public R list(@RequestParam(value = "page", defaultValue = "1") Integer page,
                  @RequestParam(value = "limit", defaultValue = "15") Integer limit){
        List<SysRole> brandList = sysRoleService.listBrand(page,limit);
        return PageUtils.restPage(brandList);
    }

    @ApiOperation(value = "跳转到添加角色页面")
    @GetMapping("sysrole/save")
    @RequiresPermissions("sysrole:save")
    public String save(){
        return "system/sysrole/save";
    }

    @ApiOperation(value = "添加角色")
    @PostMapping("sysrole/save")
    @ResponseBody
    @RequiresPermissions("sysrole:save")
    public R save(SysRole sysRole,String roleMenuIds){
        int r = sysRoleService.save(sysRole,roleMenuIds);
        if(r != 0){
            return R.ok("保存成功");
        }else{
            return R.error("保存失败");
        }
    }

    @RequestMapping("sysrole/fundAll")
    @ResponseBody
    @ApiOperation(value = "查询所有角色，供用户选择角色")
    public R fundAll(){
        List list = sysRoleService.queryAll();
        return R.ok("成功").put("list",list);
    }

    @ApiOperation(value="修改角色")
    @GetMapping("sysrole/edit/{id}")
    @RequiresPermissions("sysrole:edit")
    public String edit(@PathVariable("id")long id,ModelMap map){
        map.put("id",id);
        return "system/sysrole/edit";
    }

    @ApiOperation(value="修改角色")
    @PostMapping("sysrole/edit")
    @ResponseBody
    @RequiresPermissions("sysrole:edit")
    public R edit(SysRole sysRole,String roleMenuIds){
        int r = sysRoleService.update(sysRole,roleMenuIds);
        if(r != 0){
            return R.ok("修改成功");
        }else{
            return R.error("修改失败");
        }
    }

    @GetMapping("sysrole/delete/{roleId}")
    @ResponseBody
    @RequiresPermissions("sysrole:delete")
    public R delete(@PathVariable("roleId") Long roleId){
        int r = sysRoleService.delete(roleId);
        if(r != 0){
            return R.ok("删除成功");
        }else{
            return R.error("删除失败");
        }
    }

    /**
     * 信息
     */
    @RequestMapping("sysrole/info/{roleId}")
    @ResponseBody
    @RequiresPermissions("sysrole:info")
    public R info(@PathVariable("roleId") Long roleId){
        SysRole sysRole = sysRoleService.queryById(roleId);
        //获取权限菜单
        List<Integer> rolMenuList = sysRoleMenuService.queryMenuIdList(roleId);
        return R.ok("成功").put("sysRole", sysRole).put("roleList",rolMenuList);
    }

}
<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/system/service/SysRoleMenuService.java
package com.lwbldy.system.service;

import java.util.List;

public interface SysRoleMenuService {

    /**
     * 保存或更新 角色权限
     * @param roleId
     * @param menuIdList
     */
    void saveOrUpdate(Long roleId, List<Integer> menuIdList);

    /**
     * 根据角色ID，获取菜单ID列表
     * @param roleId
     * @return
     */
    List<Integer> queryMenuIdList(long roleId);

    /**
     * 根据 角色ID 删除权限
     * @param roleId
     * @return
     */
    int deleteByRoleId(Long roleId);

}
<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/system/controller/SysUserController.java
package com.lwbldy.system.controller;

import com.lwbldy.common.shiro.ShiroUtils;
import com.lwbldy.common.util.PageUtils;
import com.lwbldy.common.util.R;
import com.lwbldy.mbg.model.SysUser;
import com.lwbldy.system.service.SysRoleService;
import com.lwbldy.system.service.SysUserRoleService;
import com.lwbldy.system.service.SysUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@Api(tags = "系统用户管理控制器")
@Controller
public class SysUserController {

    @Autowired
    private SysUserService sysUserService;
    @Autowired
    private SysUserRoleService sysUserRoleService;
    @Autowired
    private SysRoleService sysRoleService;

    @GetMapping("sysuser/list")
    @RequiresPermissions("sysuser:list")
    public String list(){
        return "/system/sysuser/list";
    }


    @ApiOperation(value = "根据用户名分页查询用户")
    @PostMapping("sysuser/list")
    @ResponseBody
    @RequiresPermissions("sysuser:list")
    public R list(@RequestParam(value = "userName", defaultValue = "") String userName,
            @RequestParam(value = "page", defaultValue = "1") Integer page,
                  @RequestParam(value = "limit", defaultValue = "15") Integer limit){
        List<SysUser> brandList = sysUserService.listBrand(userName,page,limit);
        return PageUtils.restPage(brandList);
    }

    @ApiOperation(value = "查询用户信息")
    @RequestMapping("sysuser/info/{userId}")
    @ResponseBody
    @RequiresPermissions("sysuser:info")
    public R info(@PathVariable("userId") Long userId){
        SysUser sysUser = sysUserService.queryByPrimaryKey(userId);
        List<Long> roleIds = sysUserRoleService.queryRoleIdList(userId);
        return R.ok(sysUser).put("roleIds",roleIds);
    }

    @ApiOperation(value = "保存用户信息页面")
    @GetMapping("sysuser/save")
    @RequiresPermissions("sysuser:save")
    public String save(ModelMap map){
        map.put("roleList",sysRoleService.queryAll());
        return "system/sysuser/save";
    }

    @ApiOperation(value = "保存用户信息")
    @RequestMapping("sysuser/save")
    @ResponseBody
    @RequiresPermissions("sysuser:save")
    public R save(SysUser sysUser,String[] roleIds){

        List<Long> roleIdList = new ArrayList<>();
        if(roleIds != null && roleIds.length!=0){
            for(String s:roleIds){
                roleIdList.add(Long.parseLong(s));
            }
        }
        int r = sysUserService.save(sysUser,roleIdList);
        if(r == 1){
            return R.ok("保存成功！");
        }else{
            return R.error("保存失败！");
        }
    }

    @GetMapping("sysuser/edit/{id}")
    @RequiresPermissions("sysuser:edit")
    public String update(@PathVariable("id")long id,ModelMap map){
        map.put("id",id);
        map.put("roleList",sysRoleService.queryAll());
        return "system/sysuser/edit";
    }


    @ApiOperation(value = "修改用户信息")
    @RequestMapping("sysuser/edit")
    @ResponseBody
    @RequiresPermissions("sysuser:edit")
    public R update(SysUser sysUser,String[] roleIds){
        List<Long> roleIdList = new ArrayList<>();
        if(roleIds != null && roleIds.length!=0){
            for(String s:roleIds){
                roleIdList.add(Long.parseLong(s));
            }
        }
        int r = sysUserService.update(sysUser,roleIdList);
        if(r == 1){
            return R.ok("修改成功！");
        }else{
            return R.error("修改失败！");
        }
    }

    @ApiOperation(value = "修改密码")
    @RequestMapping("sysuser/changePWD")
    @ResponseBody
    @RequiresPermissions("sysuser:changePWD")
    public R changePWD(long userId,String newPWD){
        if (sysUserService.changePWD(userId,newPWD) >= 1){
            return R.ok("修改成功");
        }else
            return R.ok("修改失败");
    }

    @ApiOperation(value = "修改自己的密码")
    @RequestMapping("sysuser/changeMyPWD")
    @ResponseBody
    public R changeMyPWD(String newPWD){
        if (sysUserService.changePWD(ShiroUtils.getUserEntity().getUserId(),newPWD) >= 1){
            return R.ok("修改成功");
        }else
            return R.ok("修改失败");
    }

}
<file_sep>/lwb-admin-tiny/README.md
一个简单后台管理

![login](./document/resource/login.jpg)


![admin_index](./document/resource/admin_index.jpg)


![admin_menu](./document/resource/admin_menu.jpg)


![admin_menu_save](./document/resource/admin_menu_save.jpg)

![admin_role_save](./document/resource/admin_role_save.jpg)

![admin_gen](./document/resource/admin_gen.jpg)



使用	Pagehelper 分页

代码生成：

 - 配置generatorConfig.xml进行配置表信息
 - 执行com.lwbldy.mbg.Generator 生成实体类和mapper文件
 - 登录后台点击代码生成，进行配置生成代码拷贝到项目中



<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/common/config/ShiroConfig.java
package com.lwbldy.common.config;

import com.lwbldy.common.shiro.MyRealm;
import org.apache.shiro.cache.ehcache.EhCacheManager;
import org.apache.shiro.mgt.SecurityManager;
import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor;
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ShiroConfig {

    /**
     * 配置进行授权和认证的 Realm，要新增一个java类来实现，下面会有，class=包名.类名，init-methood是初始化的方法
     * @return
     */
    @Bean("myRealm")
    public MyRealm myRealm(){
        MyRealm myRealm = new MyRealm();
        myRealm.setCredentialMatcher();
        return myRealm;
    }

    /**
     * 配置緩存管理器
     * @return
     */
    @Bean("cacheManager")
    public EhCacheManager ehCacheManager(){
        EhCacheManager ehCacheManager = new EhCacheManager();
        ehCacheManager.setCacheManagerConfigFile("classpath:ehcache-shiro.xml");
        return ehCacheManager;
    }

    /**
     * 配置 SecurityManager Bean.
     * @param myRealm
     * @param ehCacheManager
     * @return
     */
    @Bean("securityManager")
    public SecurityManager defaultWebSecurityManager(MyRealm myRealm,EhCacheManager ehCacheManager){
        DefaultWebSecurityManager defaultWebSecurityManager = new DefaultWebSecurityManager();
        defaultWebSecurityManager.setRealm(myRealm);
        defaultWebSecurityManager.setCacheManager(ehCacheManager);
        return defaultWebSecurityManager;
    }

    /**
     * 配置 ShiroFilter bean: 该 bean 的 id 必须和 web.xml 文件中配置的 shiro filter 的 name 一致
     * @return
     */
    @Bean
    public ShiroFilterFactoryBean shiroFilterFactoryBean(SecurityManager securityManager){
        ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean();
        //装配 securityManager
        shiroFilterFactoryBean.setSecurityManager(securityManager);
        //配置登陆页面
        shiroFilterFactoryBean.setLoginUrl("/sys/login");
        //配置登录成功后的页面
        shiroFilterFactoryBean.setSuccessUrl("/sys/index");
        //配置未经授权的页面
        shiroFilterFactoryBean.setUnauthorizedUrl("/sys/login");
        //具体配置需要拦截哪些 URL, 以及访问对应的 URL 时使用 Shiro 的什么 Filter 进行拦截.
        shiroFilterFactoryBean.setFilterChainDefinitions(
                "/**/*.html = anon\n"+
                "/**/*.css = anon\n"+
                "/**/*.js = anon\n"+
                "/lib/** = anon\n"+
                "/sys/login = anon\n"+
                "/sys/captcha = anon\n"+
                "/sys/checkCaptcha = anon\n"+
                "/static/** = anon\n"+
                "/** = authc"
        );

        return shiroFilterFactoryBean;
    }


    // 加入注解的使用，不加入这个注解不生效
    @Bean
    public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager) {
        AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = new AuthorizationAttributeSourceAdvisor();
        authorizationAttributeSourceAdvisor.setSecurityManager(securityManager);
        return authorizationAttributeSourceAdvisor;
    }

}
<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/system/controller/SysMenuController.java
package com.lwbldy.system.controller;

import com.alibaba.druid.support.json.JSONUtils;
import com.lwbldy.common.util.R;
import com.lwbldy.mbg.model.SysMenu;
import com.lwbldy.system.service.SysMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Api(tags = "菜单管理控制器")
@Controller
public class SysMenuController {

    @Autowired
    SysMenuService sysMenuService;

    @GetMapping("/sysmenu/list")
    @RequiresPermissions("sysmenu:list")
    public String list(){
        return "system/menu/list";
    }

    @PostMapping("/sysmenu/list")
    @ResponseBody
    @RequiresPermissions("sysmenu:list")
    public R menuList(){
        List<SysMenu> list = sysMenuService.listAllSysMenu();
        R r = R.ok(list);
        r.put("count",list.size());
        return r;
    }

    @ApiOperation(value="跳转到添加保存菜单")
    @GetMapping("/sysmenu/save")
    @RequiresPermissions("sysmenu:save")
    public String save(){
        return "system/menu/save";
    }

    @ApiOperation(value="获取树菜单")
    @GetMapping("/sysmenu/findTreeMenu")
    @ResponseBody
    public R findTreeMenu(){
        return R.ok(sysMenuService.queryAllTreeMenu());
    }

    @ApiOperation(value="保存菜单")
    @PostMapping("/sysmenu/save")
    @ResponseBody
    @RequiresPermissions("sysmenu:save")
    public R saveMenu(SysMenu sysMenu){
        if(sysMenuService.saveSysMenu(sysMenu) == 1){
            return R.ok();
        }else
            return R.error();
    }

    @ApiOperation(value="获取菜单实体")
    @GetMapping("/sysmenu/info/{id}")
    @ResponseBody
    @RequiresPermissions("sysmenu:info")
    public R info(@PathVariable("id") long id){
        SysMenu sysMenu = sysMenuService.queryById(id);
        return R.ok().put("sysMenu",sysMenu);
    }

    @ApiOperation(value="修改菜单")
    @GetMapping("/sysmenu/edit/{id}")
    @RequiresPermissions("sysmenu:edit")
    public String edit(@PathVariable("id")long id,ModelMap map){
        map.put("id",id);
        return "system/menu/edit";
    }

    @ApiOperation(value="修改菜单")
    @PostMapping("/sysmenu/edit")
    @ResponseBody
    @RequiresPermissions("sysmenu:edit")
    public R edit(SysMenu sysMenu){
        int r = sysMenuService.update(sysMenu);
        if(r == 1){
            return R.ok("修改成功");
        }else{
            return R.error("修改失败");
        }
    }

    @ApiOperation(value="查询所有菜单提供给角色中的权限树使用")
    @GetMapping("/sysmenu/fundAll")
    @ResponseBody
    public List<SysMenu> fundAll(){
        return sysMenuService.listAllSysMenu();
    }

}
<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/system/dao/SysMenuDao.java
package com.lwbldy.system.dao;

import com.lwbldy.mbg.model.SysMenu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 菜单管理
 */
public interface SysMenuDao{

    List<SysMenu> selectMenuByUserId(@Param(value = "userId") Long userId);

}
<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/system/controller/SysCommonController.java
package com.lwbldy.system.controller;

import com.google.code.kaptcha.Constants;
import com.google.code.kaptcha.Producer;
import com.lwbldy.common.shiro.ShiroUtils;
import com.lwbldy.common.util.R;
import com.lwbldy.common.util.SessionNames;
import com.lwbldy.mbg.model.SysUser;
import com.lwbldy.system.service.SysMenuService;
import com.lwbldy.system.vo.MenuVO;
import io.swagger.annotations.*;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.*;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.imageio.ImageIO;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.awt.image.BufferedImage;
import java.util.List;

@Api(tags = "系统后台公共登录退出，获取验证码")
@Controller
public class SysCommonController {

    @Autowired
    private Producer captchaProducer = null;

    @Autowired
    private SysMenuService sysMenuService;

    @ApiOperation(value="后台首页")
    @GetMapping({"","/sys/index"})
    public String index(){
        return "system/index";
    }

    @ApiOperation(value="欢迎界面")
    @GetMapping("sys/welcome")
    public String welcome(){
        return "system/welcome";
    }

    @ApiOperation(value="用户登录界面")
    @GetMapping("/sys/login")
    public String login(){
        return "system/login";
    }

    @ApiOperation(value="用户登录验证")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "username", value = "用户名"),
            @ApiImplicitParam(name = "password", value = "密码"),
            @ApiImplicitParam(name = "vercode", value = "验证码"),
    })
    @PostMapping("/sys/login")
    @ResponseBody
    public R loginin(String username, String password, HttpSession session, String vercode) {
        try {
            if (StringUtils.isNotEmpty(vercode)) {
                String original =(String) session.getAttribute(Constants.KAPTCHA_SESSION_KEY);
                // 验证验证码是否成功
                if (vercode.equalsIgnoreCase(original)) {
                    Subject subject = ShiroUtils.getSubject();
                    UsernamePasswordToken token = new UsernamePasswordToken(username, password);
                    subject.login(token);
                    SysUser sysUserEntity = (SysUser) SecurityUtils.getSubject().getPrincipal();
                    sysUserEntity.setSalt(null);
                    sysUserEntity.setPassword(<PASSWORD>);
                    session.setAttribute(SessionNames.ADMIN_SESSION,sysUserEntity);
                    return R.ok("登录成功！").put("user", sysUserEntity);
                }
            }
            return R.error("验证码错误！");

        } catch (UnknownAccountException e) {
            e.printStackTrace();
            return R.error(e.getMessage());
        } catch (IncorrectCredentialsException e) {
            return R.error("账号或密码不正确");
        } catch (LockedAccountException e) {
            return R.error("账号已被锁定,请联系管理员");
        } catch (AuthenticationException e) {
            return R.error("账户验证失败");
        }
    }

    /**
     * 生成验证码
     * @param request
     * @param response
     * @throws Exception
     */
    @ApiOperation(value="获取图形验证码")
    @GetMapping(value = "/sys/captcha")
    public void getKaptchaImage(HttpServletRequest request, HttpServletResponse response) throws Exception {
        HttpSession session = request.getSession();
        response.setDateHeader("Expires", 0);
        response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");
        response.addHeader("Cache-Control", "post-check=0, pre-check=0");
        response.setHeader("Pragma", "no-cache");
        response.setContentType("image/jpeg");
        //生成验证码
        String capText = captchaProducer.createText();
        session.setAttribute(Constants.KAPTCHA_SESSION_KEY, capText);
        //向客户端写出
        BufferedImage bi = captchaProducer.createImage(capText);
        ServletOutputStream out = response.getOutputStream();
        ImageIO.write(bi, "jpg", out);
        try {
            out.flush();
        } finally {
            out.close();
        }
    }

    @ApiOperation(value="退出登录")
    @GetMapping(value = "/sys/logout")
    public String logout(HttpSession session) {
        ShiroUtils.logout();
        return "redirect:/";
    }

    @ApiOperation(value="获取菜单")
    @GetMapping(value = "/sys/menu")
    @ResponseBody
    public MenuVO menuAll(){
        SysUser sysUser = ShiroUtils.getUserEntity();
        return sysMenuService.queryMenu(sysUser.getUserId());
    }

    @ApiOperation(value="获取菜单")
    @GetMapping(value = "/sys/icon")
    public String icon(){
        return "system/icon";
    }

}
<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/system/dao/SysUserDao.java
package com.lwbldy.system.dao;

import java.util.List;

public interface SysUserDao {

    /**
     * 根据用户id查找权限
     * @param userId
     * @return
     */
    List<String> queryAllPerms(Long userId);

}
<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/system/service/SysRoleService.java
package com.lwbldy.system.service;

import com.lwbldy.mbg.model.SysRole;

import java.util.List;

public interface SysRoleService {

    /**
     * 根据Id查询角色
     * @param id
     * @return
     */
    SysRole queryById(long id);

    /**
     * 分页查询角色
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<SysRole> listBrand(int pageNum, int pageSize);

    /**
     * 保存角色
     * @param sysRole
     * @param roleMenuIds
     * @return
     */
    int save(SysRole sysRole, String roleMenuIds);

    /**
     * 更新角色
     * @param sysRole
     * @param roleMenuIds
     * @return
     */
    int update(SysRole sysRole, String roleMenuIds);


    /**
     * 根据id删除目录
     * @param roleId
     * @return
     */
    int delete(Long roleId);

    /**
     * 查询所有角色
     * @return
     */
    List<SysRole> queryAll();

}
<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/system/service/impl/SysRoleServiceImpl.java
package com.lwbldy.system.service.impl;

import com.github.pagehelper.PageHelper;
import com.lwbldy.mbg.mapper.SysRoleMapper;
import com.lwbldy.mbg.model.SysRole;
import com.lwbldy.mbg.model.SysRoleExample;
import com.lwbldy.system.service.SysRoleMenuService;
import com.lwbldy.system.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service("sysRoleService")
public class SysRoleServiceImpl implements SysRoleService {

    @Autowired
    private SysRoleMapper sysRoleMapper;

    @Autowired
    SysRoleMenuService sysRoleMenuService;

    @Override
    public SysRole queryById(long id) {
        return sysRoleMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<SysRole> listBrand(int pageNum, int pageSize) {
        //开启分页查询
        PageHelper.startPage(pageNum, pageSize);
        SysRoleExample sysRoleExample = new SysRoleExample();
        sysRoleExample.setOrderByClause("role_id desc");
        return sysRoleMapper.selectByExample(sysRoleExample);
    }

    @Override
    public int save(SysRole sysRole, String roleMenuIds) {
        sysRole.setCreateTime(new Date());
        int r = sysRoleMapper.insert(sysRole);
        if(r == 0){
            return r;
        }
        System.out.println("roleMenuIds:"+roleMenuIds);
        if(roleMenuIds == null || roleMenuIds.length() == 0)
            return 1;


        String[] roleMenuIdsArr = roleMenuIds.split(",");
        List<Integer> roleMenuIdList = new ArrayList<Integer>();
        for (String menuId : roleMenuIdsArr){
            roleMenuIdList.add(Integer.parseInt(menuId));
        }
        sysRoleMenuService.saveOrUpdate(sysRole.getRoleId(),roleMenuIdList);
        return r;
    }

    @Override
    public int update(SysRole sysRole, String roleMenuIds) {
        //先更新
        int r = sysRoleMapper.updateByPrimaryKey(sysRole);
        if(r == 0){
            return r;
        }
        if(roleMenuIds == null || roleMenuIds.length() == 0)
            return 1;
        String[] roleMenuIdsArr = roleMenuIds.split(",");
        List<Integer> roleMenuIdList = new ArrayList<Integer>();
        for (String menuId : roleMenuIdsArr){
            roleMenuIdList.add(Integer.parseInt(menuId));
        }
        sysRoleMenuService.saveOrUpdate(sysRole.getRoleId(),roleMenuIdList);
        return r;
    }

    @Override
    public int delete(Long roleId) {
        sysRoleMenuService.deleteByRoleId(roleId);
        return sysRoleMapper.deleteByPrimaryKey(roleId);
    }

    @Override
    public List<SysRole> queryAll() {
        SysRoleExample sysRoleExample = new SysRoleExample();
        sysRoleExample.setOrderByClause("role_id desc");
        return sysRoleMapper.selectByExample(sysRoleExample);
    }
}
<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/system/dao/SysUserRoleDao.java
package com.lwbldy.system.dao;

import com.lwbldy.mbg.model.SysUserRole;

import java.util.List;

/**
 * 用户与角色对应关系
 */
public interface SysUserRoleDao {

    /**
     * 根据用户ID，获取角色ID列表
     */
    List<Long> queryRoleIdList(Long userId);

    /**
     * 根据用户ID 删除角色
     * @param userId 用户ID
     * @return
     */
    int deleteByUserId(Long userId);

    //保存多行数据
    int saveBatch(List<SysUserRole> list);

}
<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/system/vo/MenuVO.java
package com.lwbldy.system.vo;

import lombok.Getter;
import lombok.Setter;

import java.util.List;

@Getter
@Setter
public class MenuVO {

    private Long menuId;
    private String title;//显示的标题
    private String icon;//显示的图标
    private String href;//链接
    private Long parentId;
    private String target = "_self";// 在哪里打开
    private List<MenuVO> child;

}
<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/common/shiro/MyRealm.java
package com.lwbldy.common.shiro;

import com.lwbldy.mbg.model.SysMenu;
import com.lwbldy.mbg.model.SysUser;
import com.lwbldy.system.service.SysMenuService;
import com.lwbldy.system.service.SysUserService;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authc.*;
import org.apache.shiro.authc.credential.CredentialsMatcher;
import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;
import org.apache.shiro.util.ByteSource;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.*;

/**
 * 自定义 拦截器
 */
public class MyRealm extends AuthorizingRealm {

    @Autowired
    SysUserService sysUserService;
    @Autowired
    SysMenuService sysMenuService;

    /**
     * 授权(验证权限时调用)
     * @param principals
     * @return
     */
    @Override
    protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
        SysUser user = (SysUser) principals.getPrimaryPrincipal();
        Long userId = user.getUserId();
        List<String> permsList = null;

        //系统管理员，拥有最高权限
        if(userId == 1){
            List<SysMenu> menuList = sysMenuService.listAllSysMenu();
            permsList = new ArrayList<String>(menuList.size());
            //获得所有权限
            for(SysMenu menu : menuList){
                permsList.add(menu.getPerms());
            }
        }else {
            permsList = sysUserService.queryAllPerms(userId);
        }

        //用户权限列表
        Set<String> permsSet = new HashSet<String>();
        for(String perms : permsList){
            if(StringUtils.isBlank(perms)){
                continue;
            }
            permsSet.addAll(Arrays.asList(perms.trim().split(",")));
        }

        SimpleAuthorizationInfo info = new SimpleAuthorizationInfo();
        info.setStringPermissions(permsSet);
        return info;
    }


    /**
     * 认证(登录时调用)
     * @param authcToken
     * @return
     * @throws AuthenticationException
     */
    @Override
    protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authcToken) throws AuthenticationException {
        UsernamePasswordToken token = (UsernamePasswordToken)authcToken;
        String userNam = token.getUsername();
        SysUser user = sysUserService.queryByName(userNam);

        //账号不存在
        if(user == null) {
            throw new UnknownAccountException("账号或密码不正确");
        }

        if(user.getStatus() == null || user.getStatus() == 0){
            throw new LockedAccountException("用户被锁定");
        }
        SimpleAuthenticationInfo info = new SimpleAuthenticationInfo(user, user.getPassword(), ByteSource.Util.bytes(user.getSalt()), getName());
        return info;
    }

    //init-method 配置.
    public void setCredentialMatcher(){
        HashedCredentialsMatcher credentialsMatcher = new HashedCredentialsMatcher();
        credentialsMatcher.setHashAlgorithmName(ShiroUtils.hashAlgorithmName);//MD5算法加密
        credentialsMatcher.setHashIterations(ShiroUtils.hashIterations);//1024次循环加密
        setCredentialsMatcher(credentialsMatcher);
    }


    //用来测试的算出密码password盐值加密后的结果，下面方法用于新增用户添加到数据库操作的，我这里就直接用main获得，直接数据库添加了，省时间
    public static void main(String[] args) {

    }

    @Override
    public void setCredentialsMatcher(CredentialsMatcher credentialsMatcher) {
        HashedCredentialsMatcher shaCredentialsMatcher = new HashedCredentialsMatcher();
        shaCredentialsMatcher.setHashAlgorithmName(ShiroUtils.hashAlgorithmName);
        shaCredentialsMatcher.setHashIterations(ShiroUtils.hashIterations);
        super.setCredentialsMatcher(shaCredentialsMatcher);
    }

}
<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/LwbAdminTinyApplication.java
package com.lwbldy;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class LwbAdminTinyApplication {

	public static void main(String[] args) {
		SpringApplication.run(LwbAdminTinyApplication.class, args);
	}

}
<file_sep>/lwb-admin-tiny/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.2.2.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>
	<groupId>com.lwbldy</groupId>
	<artifactId>lwb-admin-tiny</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>war</packaging>
	<name>lwb-admin-tiny</name>
	<description>一个可用的简单后台框架，shiro权限管理，自定义代码生成，springboot tomcat 运行，myBatis pagehelper 分页</description>

	<properties>
		<java.version>1.8</java.version>
		<common-version>2.6</common-version>
		<pagehelper-version>1.2.10</pagehelper-version>
	</properties>

	<dependencies>

		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>${common-version}</version>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>${common-version}</version>
		</dependency>
		<dependency>
			<groupId>commons-configuration</groupId>
			<artifactId>commons-configuration</artifactId>
			<version>1.10</version>
		</dependency>

		<!-- SpringBoot 依赖 -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>

		<!-- SpringBoot 热编译 -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-devtools</artifactId>
			<optional>true</optional>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-tomcat</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>org.junit.vintage</groupId>
					<artifactId>junit-vintage-engine</artifactId>
				</exclusion>
			</exclusions>
		</dependency>


		<!-- tomcat jsp 支持 -->
		<dependency>
			<groupId>org.apache.tomcat.embed</groupId>
			<artifactId>tomcat-embed-jasper</artifactId>
		</dependency>

		<!-- jstl标签库 -->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
		</dependency>

		<!--MyBatis分页插件，包含了mybatis-->
		<dependency>
			<groupId>com.github.pagehelper</groupId>
			<artifactId>pagehelper-spring-boot-starter</artifactId>
			<version>${pagehelper-version}</version>
		</dependency>

		<!-- MyBatis 代码生成器 -->
		<dependency>
			<groupId>org.mybatis.generator</groupId>
			<artifactId>mybatis-generator-core</artifactId>
			<version>1.3.3</version>
		</dependency>

		<!-- mysql 依赖 -->
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.39</version>
		</dependency>

		<!-- 引入druid依赖 -->
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>druid-spring-boot-starter</artifactId>
			<version>1.1.17</version>
		</dependency>

		<!--Swagger-UI API文档生产工具-->
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger2</artifactId>
			<version>2.7.0</version>
		</dependency>
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger-ui</artifactId>
			<version>2.7.0</version>
		</dependency>

		<!-- shiro 权限管理 -->
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-spring</artifactId>
			<version>1.3.2</version>
		</dependency>
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-ehcache</artifactId>
			<version>1.3.2</version>
		</dependency>

		<!--  验证码 -->
		<dependency>
			<groupId>com.github.penggle</groupId>
			<artifactId>kaptcha</artifactId>
			<version>2.3.2</version>
		</dependency>

		<!-- 代码生成器所需jar -->
		<dependency>
			<artifactId>velocity</artifactId>
			<groupId>org.apache.velocity</groupId>
			<version>1.7</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-commons</artifactId>
			<version>2.0.7.RELEASE</version>
		</dependency>

		<!-- https://www.hutool.club/ 工具类使用 -->
		<!--<dependency>-->
			<!--<groupId>cn.hutool</groupId>-->
			<!--<artifactId>hutool-all</artifactId>-->
			<!--<version>5.1.0</version>-->
		<!--</dependency>-->

		<!--lombok依赖-->
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<optional>true</optional>
		</dependency>

		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
			<version>1.2.39</version>
		</dependency>

	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<!-- 开启热更新 -->
				<configuration>
					<fork>true</fork>
				</configuration>
			</plugin>
		</plugins>

		<resources>
			<!-- 打包时将jsp文件拷贝到META-INF目录下-->
			<resource>
				<!-- 指定处理哪个目录下的资源文件 -->
				<directory>${basedir}/src/main/webapp</directory>
				<!--注意此次必须要放在此目录下才能被访问到-->
				<targetPath>META-INF/resources</targetPath>
				<includes>
					<!-- 所有文件和文件夹 -->
					<include>**/**</include>
				</includes>
			</resource>

			<resource>
				<directory>src/main/resources</directory>
				<includes>
					<include>**/**</include>
				</includes>
			</resource>

			<resource>
				<directory>src/main/java</directory>
				<includes>
					<include>**/**.xml</include>
				</includes>
			</resource>
		</resources>
	</build>

</project>
<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/system/service/SysUserService.java
package com.lwbldy.system.service;

import com.github.pagehelper.PageHelper;
import com.lwbldy.mbg.model.SysUser;
import com.lwbldy.mbg.model.SysUserExample;
import org.springframework.util.StringUtils;

import java.util.List;

/**
 * 系统用户service
 */
public interface SysUserService {
    /**
     * 查询用户的所有权限
     * @param userId  用户ID
     */
    List<String> queryAllPerms(Long userId);

    /**
     * 根据用户名查询用户信息
     * @param name
     * @return
     */
    SysUser queryByName(String name);

    /**
     * 按条件分页查询系统用户
     * @param userName
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<SysUser> listBrand(String userName,int pageNum, int pageSize);

    /**
     * 根据用户id查询系统用户
     * @param userId
     * @return
     */
    SysUser queryByPrimaryKey(Long userId);

    int save(SysUser sysUser,List<Long> roleIds);

    int update(SysUser sysUser,List<Long> roleIds);

    /**
     * 修改密码
     * @param userId
     * @param newPWD
     * @return
     */
    int changePWD(long userId,String newPWD);

}
<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/system/service/impl/SysUserRoleServiceImpl.java
package com.lwbldy.system.service.impl;

import com.lwbldy.mbg.mapper.SysUserRoleMapper;
import com.lwbldy.mbg.model.SysUserRole;
import com.lwbldy.system.dao.SysUserRoleDao;
import com.lwbldy.system.service.SysUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@Service("sysUserRoleService")
public class SysUserRoleServiceImpl implements SysUserRoleService {

    @Autowired
    private SysUserRoleDao sysUserRoleDao;

    @Autowired
    private SysUserRoleMapper sysUserRoleMapper;

    @Override
    public void saveOrUpdate(Long userId, List<Long> roleIdList) {
        //先删除原来的用户角色
        sysUserRoleDao.deleteByUserId(userId);

        if(roleIdList == null || roleIdList.size() == 0){
            return;
        }
        //再保存用户角色
        List<SysUserRole> sysUserRoles = new ArrayList<SysUserRole>();
        for(long roleid : roleIdList){
            SysUserRole sysUserRole = new SysUserRole();
            sysUserRole.setUserId(userId);
            sysUserRole.setRoleId(roleid);
            sysUserRoles.add(sysUserRole);
        }
        sysUserRoleDao.saveBatch(sysUserRoles);
    }

    @Override
    public List<Long> queryRoleIdList(Long userId) {
        return sysUserRoleDao.queryRoleIdList(userId);
    }
}
<file_sep>/lwb-admin-tiny/document/sql/sql.sql
/*
SQLyog v10.2 
MySQL - 5.5.53 : Database - lwbcase
*********************************************************************
*/


/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`lwbcase` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;

USE `lwbcase`;

/*Table structure for table `sys_menu` */

DROP TABLE IF EXISTS `sys_menu`;

CREATE TABLE `sys_menu` (
  `menu_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `parent_id` bigint(20) DEFAULT NULL COMMENT '父菜单ID，一级菜单为0',
  `name` varchar(50) DEFAULT NULL COMMENT '菜单名称',
  `url` varchar(200) DEFAULT NULL COMMENT '菜单URL',
  `perms` varchar(500) DEFAULT NULL COMMENT '授权(多个用逗号分隔，如：user:list,user:create)',
  `type` int(11) DEFAULT NULL COMMENT '类型   0：目录   1：菜单   2：按钮',
  `icon` varchar(50) DEFAULT NULL COMMENT '菜单图标',
  `order_num` int(11) DEFAULT NULL COMMENT '排序',
  `tager` varchar(20) DEFAULT NULL COMMENT '打开方式',
  PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 COMMENT='菜单管理';

/*Data for the table `sys_menu` */

insert  into `sys_menu`(`menu_id`,`parent_id`,`name`,`url`,`perms`,`type`,`icon`,`order_num`,`tager`) values (1,0,'系统管理','','',0,'fa fa-gear',1,''),(2,1,'菜单管理','/sysmenu/list','sysmenu:list',1,'fa fa-user',0,'_self'),(3,2,'添加','','sysmenu:save',2,'',0,NULL),(4,2,'修改','','sysmenu:edit,sysmenu:info',2,'',0,NULL),(5,1,'角色管理','/sysrole/list','sysrole:list',1,'fa fa-users',0,'_self'),(6,1,'用户管理','/sysuser/list','sysuser:list',1,'fa fa-user',0,'_self'),(7,5,'添加','','sysrole:save',2,'',0,'_self'),(8,5,'修改','','sysrole:edit,sysrole:info',2,'',0,'_self'),(9,5,'删除','','sysrole:delete',2,'',0,'_self'),(10,6,'添加','','sysuser:save',2,'',0,'_self'),(11,6,'修改','','sysuser:edit,sysuser:info',2,'',0,'_self'),(12,6,'修改密码','','sysuser:changePWD',2,'',0,'_self'),(28,1,'swagger','/swagger-ui.html','',1,'',0,'_blank'),(29,1,'数据库监控','/druid','',1,'',0,'_blank');

/*Table structure for table `sys_role` */

DROP TABLE IF EXISTS `sys_role`;

CREATE TABLE `sys_role` (
  `role_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `role_name` varchar(100) DEFAULT NULL COMMENT '角色名称',
  `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  `dept_id` bigint(20) DEFAULT NULL COMMENT '部门ID',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='角色';

/*Data for the table `sys_role` */

/*Table structure for table `sys_role_menu` */

DROP TABLE IF EXISTS `sys_role_menu`;

CREATE TABLE `sys_role_menu` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
  `menu_id` bigint(20) DEFAULT NULL COMMENT '菜单ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 COMMENT='角色与菜单对应关系';

/*Data for the table `sys_role_menu` */

/*Table structure for table `sys_user` */

DROP TABLE IF EXISTS `sys_user`;

CREATE TABLE `sys_user` (
  `user_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL COMMENT '用户名',
  `password` varchar(100) DEFAULT NULL COMMENT '密码',
  `salt` varchar(20) DEFAULT NULL COMMENT '盐',
  `email` varchar(100) DEFAULT NULL COMMENT '邮箱',
  `mobile` varchar(100) DEFAULT NULL COMMENT '手机号',
  `status` tinyint(4) DEFAULT NULL COMMENT '状态  0：禁用   1：正常',
  `dept_id` bigint(20) DEFAULT NULL COMMENT '部门ID',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='系统用户';

/*Data for the table `sys_user` */

insert  into `sys_user`(`user_id`,`username`,`password`,`salt`,`email`,`mobile`,`status`,`dept_id`,`create_time`) values (1,'admin','<PASSWORD>a<PASSWORD>','<PASSWORD>','<EMAIL>','15070784873',1,1,'2016-11-11 11:11:11');

/*Table structure for table `sys_user_role` */

DROP TABLE IF EXISTS `sys_user_role`;

CREATE TABLE `sys_user_role` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
  `role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COMMENT='用户与角色对应关系';

/*Data for the table `sys_user_role` */

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
<file_sep>/lwb-admin-tiny/src/main/java/com/lwbldy/common/util/SessionNames.java
package com.lwbldy.common.util;

public interface SessionNames {

    String ADMIN_SESSION = "adminUser";

}
