diff --git a/src/main/java/com/lq/cms/web/IndexController.java b/src/main/java/com/lq/cms/web/IndexController.java index e201493..9f12be4 100755 --- a/src/main/java/com/lq/cms/web/IndexController.java +++ b/src/main/java/com/lq/cms/web/IndexController.java @@ -6,6 +6,7 @@ import com.lq.cms.service.SysResourceService; import com.lq.cms.service.SysUserService; import com.lq.cms.vo.SysInfoVo; import com.lq.code.entity.AjaxResult; +import com.lq.code.util.Constant; import com.lq.code.util.DateUtil; import com.lq.code.util.Md5Util; import com.lq.code.util.jdbc.JdbcUtils; @@ -54,21 +55,14 @@ public class IndexController { public ModelAndView toCmsIndix(ModelAndView modelAndView, HttpServletRequest request){ Subject subject=SecurityUtils.getSubject(); Session session = subject.getSession(); -LOGGER.info("==================="); -LOGGER.info("sessionID:"+session.getId()); -LOGGER.info("sessionTimeOut:"+session.getTimeout()); SysUser sysUser=(SysUser) subject.getPrincipal(); List list = null; - if (subject.hasRole("admin")) { + if (subject.hasRole(Constant.ROLE_ADMIN)) { list = sysResourceService.findAllMenusList(request); }else{ list = sysResourceService.findMenusListBySysUserId(sysUser.getId(), request); } -// Map map=new HashMap(); -// map.put("menus",list); -// String jsonStr=JSON.toJSONString(map); -// modelAndView.addObject("menusStr",jsonStr); modelAndView.addObject("menusList",list); modelAndView.setViewName("cms/main/index"); return modelAndView; diff --git a/src/main/java/com/lq/cms/web/sys/LogController.java b/src/main/java/com/lq/cms/web/sys/LogController.java index 16eaec5..4f9a79f 100755 --- a/src/main/java/com/lq/cms/web/sys/LogController.java +++ b/src/main/java/com/lq/cms/web/sys/LogController.java @@ -42,6 +42,7 @@ public class LogController { @RequestMapping("/list") @RequiresPermissions(INDEX_URL+ Constant.PERSSION_MARK+Constant.PERMISSION_SELECT) public Object list(SysLogVo vo){ + Map map=new HashMap(); map.put("total",sysLogService.count(vo)); map.put("rows",sysLogService.findListPage(vo)); diff --git a/src/main/java/com/lq/cms/web/sys/RoleController.java b/src/main/java/com/lq/cms/web/sys/RoleController.java index 492d63e..725edc4 100755 --- a/src/main/java/com/lq/cms/web/sys/RoleController.java +++ b/src/main/java/com/lq/cms/web/sys/RoleController.java @@ -56,7 +56,6 @@ public class RoleController { @ResponseBody public Object list(SysRoleVo vo){ Map map=new HashMap(); - map.put("total",sysRoleService.count(vo)); map.put("rows",sysRoleService.findListPage(vo)); return map; @@ -88,6 +87,10 @@ public class RoleController { public Object updatePermission(@RequestBody List list){ AjaxResult ajaxResult=new AjaxResult(); boolean result=sysRoleResourcePermissionService.updateRolePermission(list); + ajaxResult.setSuccess(result); + if (!result){ + ajaxResult.setMsg("更新失败!"); + } return ajaxResult; } diff --git a/src/main/java/com/lq/code/executor/processor/InstantiationTracingBeanPostProcessor.java b/src/main/java/com/lq/code/executor/processor/InstantiationTracingBeanPostProcessor.java index a8b5316..1a8c684 100755 --- a/src/main/java/com/lq/code/executor/processor/InstantiationTracingBeanPostProcessor.java +++ b/src/main/java/com/lq/code/executor/processor/InstantiationTracingBeanPostProcessor.java @@ -46,12 +46,10 @@ public class InstantiationTracingBeanPostProcessor implements ApplicationListene //需要执行的逻辑代码,当spring容器初始化完成后就会执行该方法。 //扫描实体类 if (isUpdateDB) { - Date starDate = new Date(); Set set = BeanUtil.getClassList(packagePath); AbstractDbBuiler dbBuiler = new MysqlBuilder(); String sql = dbBuiler.automaticUpdateDb(set); JdbcUtils.createTable(sql); - Date endDate = new Date(); } } } diff --git a/src/main/java/com/lq/code/util/mybatisPlus/CreateMapperFileUtil.java b/src/main/java/com/lq/code/util/mybatisPlus/CreateMapperFileUtil.java index db35b6e..9ba3f52 100755 --- a/src/main/java/com/lq/code/util/mybatisPlus/CreateMapperFileUtil.java +++ b/src/main/java/com/lq/code/util/mybatisPlus/CreateMapperFileUtil.java @@ -67,7 +67,7 @@ public class CreateMapperFileUtil { } public static void main(String[] args) throws IOException { - createXml(WechatUserDao.class,WechatUser.class,new MysqlBuilder()); + createXml(WechatMessageDao.class,WechatMessage.class,new MysqlBuilder()); } diff --git a/src/main/resources/pro/redis.properties b/src/main/resources/pro/redis.properties index 3cd757e..bc1f169 100644 --- a/src/main/resources/pro/redis.properties +++ b/src/main/resources/pro/redis.properties @@ -1,4 +1,4 @@ -redis.host=127.0.0.1 +redis.host=192.168.31.19 redis.port=6379 redis.pass= redis.timeout=-1 diff --git a/src/main/webapp/WEB-INF/views/jsp/cms/wechat/info/index.jsp b/src/main/webapp/WEB-INF/views/jsp/cms/wechat/info/index.jsp index 95d013f..9ff0333 100755 --- a/src/main/webapp/WEB-INF/views/jsp/cms/wechat/info/index.jsp +++ b/src/main/webapp/WEB-INF/views/jsp/cms/wechat/info/index.jsp @@ -23,6 +23,7 @@ pagination :"true", columns:[[ {field:'editId',title:'编辑',width:130,formatter:function (value,row,index) { + console.log(row); var html="编辑  "; html+="删除  "; if (row.wechatInfoType!=1){