From a9d2da6c2b7ed210127f0929db9c9040685f12b4 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Wed, 29 May 2019 11:16:42 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8DajaxFileUpload=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E4=BD=BF=E7=94=A8=E6=96=B0=E7=89=88jq=E7=9A=84bug=202?= =?UTF-8?q?.=E4=BF=AE=E5=A4=8DBaseDao=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/lq/code/dao/BaseDao.java | 4 +++- .../mybatis/mapping/WechatKeywordDao.xml | 2 +- .../mybatis/mapping/WechatMessageDao.xml | 2 +- src/main/resources/mybatis/mappingTemplate.xml | 2 +- .../WEB-INF/views/jsp/cms/sys/user/index.jsp | 2 +- .../views/jsp/cms/wechat/message/edit.jsp | 10 +++++++--- .../views/jsp/cms/wechat/message/index.jsp | 18 ++++++++++-------- .../views/jsp/cms/wechat/rule/index.jsp | 3 --- .../webapp/resources/code/js/ajaxfileupload.js | 10 ++++++---- 9 files changed, 30 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/lq/code/dao/BaseDao.java b/src/main/java/com/lq/code/dao/BaseDao.java index 4314824..8024955 100755 --- a/src/main/java/com/lq/code/dao/BaseDao.java +++ b/src/main/java/com/lq/code/dao/BaseDao.java @@ -1,5 +1,7 @@ package com.lq.code.dao; +import org.apache.ibatis.annotations.Param; + import java.util.List; /** @@ -39,7 +41,7 @@ public interface BaseDao { * 删除一条数据 * @param id */ - void delete(Long id); + void delete(@Param("id") Long id); /** * 批量保存数据 diff --git a/src/main/resources/mybatis/mapping/WechatKeywordDao.xml b/src/main/resources/mybatis/mapping/WechatKeywordDao.xml index 936f76f..fd19901 100644 --- a/src/main/resources/mybatis/mapping/WechatKeywordDao.xml +++ b/src/main/resources/mybatis/mapping/WechatKeywordDao.xml @@ -59,7 +59,7 @@ UPDATE - FROM wechat_keyword + wechat_keyword SET status = 0 WHERE diff --git a/src/main/resources/mybatis/mapping/WechatMessageDao.xml b/src/main/resources/mybatis/mapping/WechatMessageDao.xml index ff531f0..7f9b65c 100644 --- a/src/main/resources/mybatis/mapping/WechatMessageDao.xml +++ b/src/main/resources/mybatis/mapping/WechatMessageDao.xml @@ -64,7 +64,7 @@ UPDATE - FROM wechat_message + wechat_message SET status = 0 WHERE diff --git a/src/main/resources/mybatis/mappingTemplate.xml b/src/main/resources/mybatis/mappingTemplate.xml index 0e3c01b..199a2f2 100644 --- a/src/main/resources/mybatis/mappingTemplate.xml +++ b/src/main/resources/mybatis/mappingTemplate.xml @@ -53,7 +53,7 @@ UPDATE - FROM @tableName + @tableName SET status = 0 WHERE diff --git a/src/main/webapp/WEB-INF/views/jsp/cms/sys/user/index.jsp b/src/main/webapp/WEB-INF/views/jsp/cms/sys/user/index.jsp index 58caf68..3999f76 100755 --- a/src/main/webapp/WEB-INF/views/jsp/cms/sys/user/index.jsp +++ b/src/main/webapp/WEB-INF/views/jsp/cms/sys/user/index.jsp @@ -155,7 +155,7 @@ } }}); } - }) + }); } function getRoleArray() { var roleList=new Array(); 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 c01cbe4..83ff871 100755 --- 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 @@ -69,10 +69,10 @@ - + @@ -109,10 +109,12 @@ } function del(id) { - var url = 'delete'; - var obj = new Object(); - obj.id = id; - get(url,obj); + $.messager.confirm('消息提醒','确定是否删除该项数据?',function (result) { + var url = 'delete'; + var obj = new Object(); + obj.id = id; + get(url,obj); + }); } function get(url,obj) { @@ -138,15 +140,15 @@ type:"post", fileElementId:"file", data:obj, - success: function(result){ - + success:function(result){ console.log(result); if(result.success==true){ $.messager.alert('提醒','提交成功','warning'); $("#editDate").dialog('close'); $('#dataList').datagrid('reload',{}); } - }}); + } + }); } diff --git a/src/main/webapp/WEB-INF/views/jsp/cms/wechat/rule/index.jsp b/src/main/webapp/WEB-INF/views/jsp/cms/wechat/rule/index.jsp index b15a1ee..5b0f0a5 100755 --- a/src/main/webapp/WEB-INF/views/jsp/cms/wechat/rule/index.jsp +++ b/src/main/webapp/WEB-INF/views/jsp/cms/wechat/rule/index.jsp @@ -680,10 +680,7 @@ // var resultFul = messageSet.delete(messageid); bufferSet.delete(messageid); } - } - - diff --git a/src/main/webapp/resources/code/js/ajaxfileupload.js b/src/main/webapp/resources/code/js/ajaxfileupload.js index ab95b02..1f25e57 100644 --- a/src/main/webapp/resources/code/js/ajaxfileupload.js +++ b/src/main/webapp/resources/code/js/ajaxfileupload.js @@ -219,11 +219,13 @@ jQuery.extend({ // If you add mimetype in your response, // you have to delete the '
' tag.
             // The pre tag in Chrome has attribute, so have to use regex to remove
-            var data = r.responseText;
-            var rx = new RegExp("(.*?)","i");
-            var am = rx.exec(data);
+            ////////////以下为新增代码///////////////
+
+      //      var data = r.responseText;
+      //      var rx = new RegExp("(.*?)","i");
+      //      var am = rx.exec(data);
             //this is the desired data extracted
-            var data = (am) ? am[1] : "";    //the only submatch or empty
+       //     var data = (am) ? am[1] : "";    //the only submatch or empty
             eval( "data = " + data );
         }
         // evaluate scripts within html