diff --git a/src/main/java/com/lq/cms/vo/WechatMessageVo.java b/src/main/java/com/lq/cms/vo/WechatMessageVo.java index 0c3864c..b3702e4 100644 --- a/src/main/java/com/lq/cms/vo/WechatMessageVo.java +++ b/src/main/java/com/lq/cms/vo/WechatMessageVo.java @@ -1,6 +1,7 @@ package com.lq.cms.vo; import com.lq.cms.emun.WechatMessageTypeEnum; +import com.lq.code.util.DateUtil; import java.util.Date; @@ -8,7 +9,7 @@ public class WechatMessageVo extends AdminBaseVo{ //消息类型 private String messageType; - + //消息类型(中文描述) private String messageTypeStr; //消息标题 private String title; @@ -22,6 +23,8 @@ public class WechatMessageVo extends AdminBaseVo{ private String toUrl; //创建用户 private Long userId; + //创建时间 + private String createTimeStr; public String getMessageType() { return messageType; @@ -89,4 +92,18 @@ public class WechatMessageVo extends AdminBaseVo{ public void setUserId(Long userId) { this.userId = userId; } + + public String getCreateTimeStr() { + Date createTime = this.getCreateTime(); + if (createTime!=null){ + return DateUtil.getDateToStr(createTime); + } + return null; + } + + + +// public void setCreateTimeStr(String createTimeStr) { +// this.createTimeStr = createTimeStr; +// } } diff --git a/src/main/java/com/lq/cms/web/AdminBaseController.java b/src/main/java/com/lq/cms/web/AdminBaseController.java index b88e875..ef96142 100644 --- a/src/main/java/com/lq/cms/web/AdminBaseController.java +++ b/src/main/java/com/lq/cms/web/AdminBaseController.java @@ -22,6 +22,7 @@ public abstract class AdminBaseController { public static final Logger LOGGER = LoggerFactory.getLogger(AdminBaseController.class); + /** * 获取service * @return @@ -71,9 +72,9 @@ public abstract class AdminBaseController { return ajaxResult; } - @GetMapping("/delete/{id}") + @GetMapping("/delete") @ResponseBody - public AjaxResult delete(@PathVariable("id")Long id){ + public AjaxResult delete(Long id){ Subject subject = SecurityUtils.getSubject(); subject.checkPermission(getIndexUrl()+":"+ PermissionTyepEnum.DELETE.getConstant()); AjaxResult ajaxResult = new AjaxResult(); diff --git a/src/main/java/com/lq/code/interceptor/PageInteceptor.java b/src/main/java/com/lq/code/interceptor/PageInteceptor.java index 79607cc..4126b93 100644 --- a/src/main/java/com/lq/code/interceptor/PageInteceptor.java +++ b/src/main/java/com/lq/code/interceptor/PageInteceptor.java @@ -59,7 +59,7 @@ public class PageInteceptor implements Interceptor { if (dialect.equals("oracle")){ db = new OracleBuiler(); } - String countSql= db.countSql(sql); +// String countSql= db.countSql(sql); String pageSql=db.concatPageSql(sql,pageInterface); metaStatementHandler.setValue("delegate.boundSql.sql",pageSql); diff --git a/src/main/resources/mybatis/mapping/SysUserDao.xml b/src/main/resources/mybatis/mapping/SysUserDao.xml index 2fdd29b..3f32caa 100644 --- a/src/main/resources/mybatis/mapping/SysUserDao.xml +++ b/src/main/resources/mybatis/mapping/SysUserDao.xml @@ -78,7 +78,7 @@ - DELETE + UPDATE sys_user SET status = 0 WHERE diff --git a/src/main/resources/mybatis/mapping/WechatInfoDao.xml b/src/main/resources/mybatis/mapping/WechatInfoDao.xml index df068bd..0c69619 100644 --- a/src/main/resources/mybatis/mapping/WechatInfoDao.xml +++ b/src/main/resources/mybatis/mapping/WechatInfoDao.xml @@ -54,7 +54,7 @@ DELETE - FROM wechat_info + wechat_info WHERE id=#{id} AND diff --git a/src/main/resources/spring/spring-shiro.xml b/src/main/resources/spring/spring-shiro.xml index 2b98d8e..eb61a11 100644 --- a/src/main/resources/spring/spring-shiro.xml +++ b/src/main/resources/spring/spring-shiro.xml @@ -29,7 +29,7 @@ - + @@ -40,6 +40,8 @@ + + @@ -66,7 +68,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/jsp/cms/wechat/message/edit.jsp b/src/main/webapp/WEB-INF/views/jsp/cms/wechat/message/edit.jsp index 2eb2153..43f6f7a 100644 --- a/src/main/webapp/WEB-INF/views/jsp/cms/wechat/message/edit.jsp +++ b/src/main/webapp/WEB-INF/views/jsp/cms/wechat/message/edit.jsp @@ -35,13 +35,24 @@ - 消息内容: - + 文本内容: + + + + + + + + + 图片文件: + - 图片路径: - + + + + @@ -58,4 +69,23 @@ + diff --git a/src/main/webapp/WEB-INF/views/jsp/cms/wechat/message/index.jsp b/src/main/webapp/WEB-INF/views/jsp/cms/wechat/message/index.jsp index 6c482ae..16c5669 100644 --- a/src/main/webapp/WEB-INF/views/jsp/cms/wechat/message/index.jsp +++ b/src/main/webapp/WEB-INF/views/jsp/cms/wechat/message/index.jsp @@ -23,7 +23,7 @@ pagination :"true", columns:[[ {field:'id',title:'编号',width:35}, - {field:'messageType',title:'消息类型',width:100}, + {field:'messageTypeStr',title:'消息类型',width:100}, {field:'title',title:'消息标题',width:100}, {field:'content',title:'消息内容',width:100}, {field:'imageUrl',title:'图片路径',width:100}, @@ -56,7 +56,7 @@ } $("#editDate").dialog({ title:title, - width:400, + width:500, height:400, closed:false, cache:false, @@ -105,6 +105,29 @@ return obj; } + function del(id) { + var url = 'delete'; + var obj = new Object(); + obj.id = id; + get(url,obj); + } + + function get(url,obj) { + $.ajax({ + url: url, + dataType:"json", + type:"get", + data:obj, + success: function(result){ + if(result.success==true){ + $.messager.alert('提醒','提交成功','warning'); + $("#editDate").dialog('close'); + $('#dataList').datagrid('reload',{}); + } + }}); + + } + function post(url,obj) { $.ajax({ url: url, diff --git a/ssm.iml b/ssm.iml index b9e0e31..356b28d 100644 --- a/ssm.iml +++ b/ssm.iml @@ -10,6 +10,10 @@ + + + + @@ -22,6 +26,7 @@ +