修改部分

master
星期八 6 years ago
parent f9f7a92def
commit 73313a28ae
  1. 10
      src/main/java/com/lq/cms/web/IndexController.java
  2. 1
      src/main/java/com/lq/cms/web/sys/LogController.java
  3. 5
      src/main/java/com/lq/cms/web/sys/RoleController.java
  4. 2
      src/main/java/com/lq/code/executor/processor/InstantiationTracingBeanPostProcessor.java
  5. 2
      src/main/java/com/lq/code/util/mybatisPlus/CreateMapperFileUtil.java
  6. 2
      src/main/resources/pro/redis.properties
  7. 1
      src/main/webapp/WEB-INF/views/jsp/cms/wechat/info/index.jsp

@ -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<MenusComposite> list = null;
if (subject.hasRole("admin")) {
if (subject.hasRole(Constant.ROLE_ADMIN)) {
list = sysResourceService.findAllMenusList(request);
}else{
list = sysResourceService.findMenusListBySysUserId(sysUser.getId(), request);
}
// Map<String,Object> map=new HashMap<String,Object>();
// map.put("menus",list);
// String jsonStr=JSON.toJSONString(map);
// modelAndView.addObject("menusStr",jsonStr);
modelAndView.addObject("menusList",list);
modelAndView.setViewName("cms/main/index");
return modelAndView;

@ -42,6 +42,7 @@ public class LogController {
@RequestMapping("/list")
@RequiresPermissions(INDEX_URL+ Constant.PERSSION_MARK+Constant.PERMISSION_SELECT)
public Object list(SysLogVo vo){
Map<String,Object> map=new HashMap();
map.put("total",sysLogService.count(vo));
map.put("rows",sysLogService.findListPage(vo));

@ -56,7 +56,6 @@ public class RoleController {
@ResponseBody
public Object list(SysRoleVo vo){
Map<String,Object> 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<SysRoleResourcePermissionVo> list){
AjaxResult ajaxResult=new AjaxResult();
boolean result=sysRoleResourcePermissionService.updateRolePermission(list);
ajaxResult.setSuccess(result);
if (!result){
ajaxResult.setMsg("更新失败!");
}
return ajaxResult;
}

@ -46,12 +46,10 @@ public class InstantiationTracingBeanPostProcessor implements ApplicationListene
//需要执行的逻辑代码,当spring容器初始化完成后就会执行该方法。
//扫描实体类
if (isUpdateDB) {
Date starDate = new Date();
Set<Class> set = BeanUtil.getClassList(packagePath);
AbstractDbBuiler dbBuiler = new MysqlBuilder();
String sql = dbBuiler.automaticUpdateDb(set);
JdbcUtils.createTable(sql);
Date endDate = new Date();
}
}
}

@ -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());
}

@ -1,4 +1,4 @@
redis.host=127.0.0.1
redis.host=192.168.31.19
redis.port=6379
redis.pass=
redis.timeout=-1

@ -23,6 +23,7 @@
pagination :"true",
columns:[[
{field:'editId',title:'编辑',width:130,formatter:function (value,row,index) {
console.log(row);
var html="<a href='#' onclick='openEdit(\"编辑\","+row.id+")'>编辑</a>&nbsp&nbsp";
html+="<a href='#' onclick='del("+row.id+")'>删除</a>&nbsp&nbsp";
if (row.wechatInfoType!=1){

Loading…
Cancel
Save