From c8e867dc1d5f7c9ddfcc85caf276521fd67a21b6 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Mon, 20 May 2019 07:01:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=85=AC=E4=BC=97=E5=8F=B7?= =?UTF-8?q?=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/lq/cms/vo/WechatMessageBo.java | 36 +++++++++++++++++++ .../web/wechat/WechatMessageController.java | 8 +++-- .../views/jsp/cms/wechat/rule/index.jsp | 4 +-- 3 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 src/main/java/com/lq/cms/vo/WechatMessageBo.java diff --git a/src/main/java/com/lq/cms/vo/WechatMessageBo.java b/src/main/java/com/lq/cms/vo/WechatMessageBo.java new file mode 100644 index 0000000..ffcec35 --- /dev/null +++ b/src/main/java/com/lq/cms/vo/WechatMessageBo.java @@ -0,0 +1,36 @@ +package com.lq.cms.vo; + +import java.util.List; + +/** + * @Author: qi + * @Description: + * @Date: Create in 6:49 AM 2019/5/20 + */ +public class WechatMessageBo { + + /** + * 微信公众号消息总数 + */ + private Integer wechatMessageCount; + /** + * 公众号消息 + */ + private List wechatMessageVoList; + + public Integer getWechatMessageCount() { + return wechatMessageCount; + } + + public void setWechatMessageCount(Integer wechatMessageCount) { + this.wechatMessageCount = wechatMessageCount; + } + + public List getWechatMessageVoList() { + return wechatMessageVoList; + } + + public void setWechatMessageVoList(List wechatMessageVoList) { + this.wechatMessageVoList = wechatMessageVoList; + } +} diff --git a/src/main/java/com/lq/cms/web/wechat/WechatMessageController.java b/src/main/java/com/lq/cms/web/wechat/WechatMessageController.java index afc6e17..9c4ae9b 100755 --- a/src/main/java/com/lq/cms/web/wechat/WechatMessageController.java +++ b/src/main/java/com/lq/cms/web/wechat/WechatMessageController.java @@ -3,6 +3,7 @@ package com.lq.cms.web.wechat; import com.lq.cms.emun.WechatMessageTypeEnum; import com.lq.cms.service.AdminBaseService; import com.lq.cms.service.WechatMessageService; +import com.lq.cms.vo.WechatMessageBo; import com.lq.cms.vo.WechatMessageVo; import com.lq.cms.web.AdminBaseController; import com.lq.code.entity.AjaxResult; @@ -46,9 +47,12 @@ public class WechatMessageController extends AdminBaseController wechatMessageVoList = wechatMessageService.findAllWechatMessageVo(); + List wechatMessageVoList = wechatMessageService.findAllWechatMessageVo(); + WechatMessageBo wechatMessageBo = new WechatMessageBo(); + wechatMessageBo.setWechatMessageVoList(wechatMessageVoList); + wechatMessageBo.setWechatMessageCount(wechatMessageVoList.size()); AjaxResult ajaxResult = new AjaxResult(); - ajaxResult.setData(wechatMessageVoList); + ajaxResult.setData(wechatMessageBo); return ajaxResult; } 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 a44c26a..a653206 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 @@ -443,8 +443,6 @@ }); - - //字数显示 function showTextNum(textArceId,textMessageId,textErrorId){ var str = $(textArceId).html(); @@ -635,7 +633,7 @@ function appendAlertHtml(data){ var isShow ; - var wechatMessageList = data; + var wechatMessageList = data.wechatMessageVoList; var html = '

图文('+data.wechatMessageCount+')

'; html += '
'; for(var i = 0 ;i < wechatMessageList.length;i++){