Pu Zhibing
3 天以前 5dacdee9b54c78372b68140e2b068d03a620eab9
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/BlackboardController.java
@@ -17,6 +17,7 @@
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.Date;
/**
@@ -46,20 +47,23 @@
    private ResultUtil resultUtil;
   @Resource
   private ShiroExtUtil shiroExtUtil;
    /**
     * 跳转到黑板
     */
    @RequestMapping("")
    public String blackboard(Model model,Integer type) {
        //查询当前用户是否有"首页"菜单的权限
        Integer id = ShiroExtUtil.getUser().getId();
      Integer id = shiroExtUtil.getUser().getId();
        User user = userService.selectById(id);
        Integer menuNum = userService.getMenuNumByRole(user.getRoleid());
        if (menuNum > 0){
            return "/home.html";
        } else {
            //查询登录次数
            int count = loginLogService.selectCount(new EntityWrapper<LoginLog>().eq("userid", ShiroExtUtil.getUser().getId()));
         int count = loginLogService.selectCount(new EntityWrapper<LoginLog>().eq("userid", shiroExtUtil.getUser().getId()));
            model.addAttribute("loginNum", count);
            Role role = roleService.selectById(user.getRoleid());