qxp 4 лет назад
Родитель
Сommit
727082095e

+ 28 - 0
suishenbang-admin/src/test/java/com/qxp/myTest.java

@@ -0,0 +1,28 @@
+package com.qxp;
+
+import com.dgtly.DgtlyApplication;
+import com.dgtly.sync.domain.Customers;
+import com.dgtly.sync.mapper.CustomersMapper;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.util.Map;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes=DgtlyApplication.class)
+public class myTest {
+
+    @Autowired
+    private CustomersMapper customersMapper;
+
+    @Test
+    public void test(){
+        customersMapper.selectCustomerMapByChainsCode();
+
+        System.out.println("11111");
+    }
+
+}

+ 1 - 1
suishenbang-order/src/main/java/com/dgtly/order/service/impl/MetaHanaSalesOrderServiceImpl.java

@@ -38,7 +38,7 @@ public class MetaHanaSalesOrderServiceImpl implements IMetaHanaSalesOrderService
         for(MetaHanaSalesOrder m:list){
             if(timeList.containsKey(m.getDocNumber())){
 
-                m.setExpectedTime((Date)timeList.get(m.getDocNumber()));
+                m.setExpectedTime((Date)timeList.get(m.getDocNumber()).get("expected_time"));
             }
 
         }

+ 94 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/domain/WxSendMessage.java

@@ -0,0 +1,94 @@
+package com.dgtly.wxportal.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.dgtly.common.annotation.Excel;
+import com.dgtly.common.core.domain.BaseEntity;
+
+/**
+ * 企业微信发送消息历史记录对象 wx_send_message
+ * 
+ * @author qxp
+ * @date 2020-09-02
+ */
+public class WxSendMessage extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** null */
+    private Long id;
+
+    /** 发送给的用户 */
+    @Excel(name = "发送给的用户")
+    private String toUser;
+
+    /** 是否发送成功 */
+    @Excel(name = "是否发送成功")
+    private String isSuccess = "0";
+
+    /** 发送的文本 */
+    @Excel(name = "发送的文本")
+    private String sendText;
+
+    /** 类型 */
+    @Excel(name = "类型")
+    private String type ="text";
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setToUser(String toUser) 
+    {
+        this.toUser = toUser;
+    }
+
+    public String getToUser() 
+    {
+        return toUser;
+    }
+    public void setIsSuccess(String isSuccess) 
+    {
+        this.isSuccess = isSuccess;
+    }
+
+    public String getIsSuccess() 
+    {
+        return isSuccess;
+    }
+    public void setSendText(String sendText) 
+    {
+        this.sendText = sendText;
+    }
+
+    public String getSendText() 
+    {
+        return sendText;
+    }
+    public void setType(String type) 
+    {
+        this.type = type;
+    }
+
+    public String getType() 
+    {
+        return type;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("createTime", getCreateTime())
+            .append("toUser", getToUser())
+            .append("isSuccess", getIsSuccess())
+            .append("sendText", getSendText())
+            .append("type", getType())
+            .toString();
+    }
+}

+ 63 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/mapper/WxSendMessageMapper.java

@@ -0,0 +1,63 @@
+package com.dgtly.wxportal.mapper;
+
+import com.dgtly.wxportal.domain.WxSendMessage;
+import java.util.List;
+
+/**
+ * 企业微信发送消息历史记录Mapper接口
+ * 
+ * @author qxp
+ * @date 2020-09-02
+ */
+public interface WxSendMessageMapper 
+{
+    /**
+     * 查询企业微信发送消息历史记录
+     * 
+     * @param id 企业微信发送消息历史记录ID
+     * @return 企业微信发送消息历史记录
+     */
+    public WxSendMessage selectWxSendMessageById(Long id);
+
+    /**
+     * 查询企业微信发送消息历史记录列表
+     * 
+     * @param wxSendMessage 企业微信发送消息历史记录
+     * @return 企业微信发送消息历史记录集合
+     */
+    public List<WxSendMessage> selectWxSendMessageList(WxSendMessage wxSendMessage);
+
+    /**
+     * 新增企业微信发送消息历史记录
+     * 
+     * @param wxSendMessage 企业微信发送消息历史记录
+     * @return 结果
+     */
+    public int insertWxSendMessage(WxSendMessage wxSendMessage);
+
+    /**
+     * 修改企业微信发送消息历史记录
+     * 
+     * @param wxSendMessage 企业微信发送消息历史记录
+     * @return 结果
+     */
+    public int updateWxSendMessage(WxSendMessage wxSendMessage);
+
+    /**
+     * 删除企业微信发送消息历史记录
+     * 
+     * @param id 企业微信发送消息历史记录ID
+     * @return 结果
+     */
+    public int deleteWxSendMessageById(Long id);
+
+    /**
+     * 批量删除企业微信发送消息历史记录
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteWxSendMessageByIds(String[] ids);
+
+    public int bathInsertWxSendMessage(List<WxSendMessage> wmList);
+}

+ 61 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/IWxSendMessageService.java

@@ -0,0 +1,61 @@
+package com.dgtly.wxportal.service;
+
+import com.dgtly.wxportal.domain.WxSendMessage;
+import java.util.List;
+
+/**
+ * 企业微信发送消息历史记录Service接口
+ * 
+ * @author qxp
+ * @date 2020-09-02
+ */
+public interface IWxSendMessageService 
+{
+    /**
+     * 查询企业微信发送消息历史记录
+     * 
+     * @param id 企业微信发送消息历史记录ID
+     * @return 企业微信发送消息历史记录
+     */
+    public WxSendMessage selectWxSendMessageById(Long id);
+
+    /**
+     * 查询企业微信发送消息历史记录列表
+     * 
+     * @param wxSendMessage 企业微信发送消息历史记录
+     * @return 企业微信发送消息历史记录集合
+     */
+    public List<WxSendMessage> selectWxSendMessageList(WxSendMessage wxSendMessage);
+
+    /**
+     * 新增企业微信发送消息历史记录
+     * 
+     * @param wxSendMessage 企业微信发送消息历史记录
+     * @return 结果
+     */
+    public int insertWxSendMessage(WxSendMessage wxSendMessage);
+
+    /**
+     * 修改企业微信发送消息历史记录
+     * 
+     * @param wxSendMessage 企业微信发送消息历史记录
+     * @return 结果
+     */
+    public int updateWxSendMessage(WxSendMessage wxSendMessage);
+
+    /**
+     * 批量删除企业微信发送消息历史记录
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteWxSendMessageByIds(String ids);
+
+    /**
+     * 删除企业微信发送消息历史记录信息
+     * 
+     * @param id 企业微信发送消息历史记录ID
+     * @return 结果
+     */
+    public int deleteWxSendMessageById(Long id);
+}

+ 97 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/WxSendMessageServiceImpl.java

@@ -0,0 +1,97 @@
+package com.dgtly.wxportal.service.impl;
+
+import java.util.List;
+import com.dgtly.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.dgtly.wxportal.mapper.WxSendMessageMapper;
+import com.dgtly.wxportal.domain.WxSendMessage;
+import com.dgtly.wxportal.service.IWxSendMessageService;
+import com.dgtly.common.core.text.Convert;
+
+/**
+ * 企业微信发送消息历史记录Service业务层处理
+ * 
+ * @author qxp
+ * @date 2020-09-02
+ */
+@Service
+public class WxSendMessageServiceImpl implements IWxSendMessageService 
+{
+    @Autowired
+    private WxSendMessageMapper wxSendMessageMapper;
+
+    /**
+     * 查询企业微信发送消息历史记录
+     * 
+     * @param id 企业微信发送消息历史记录ID
+     * @return 企业微信发送消息历史记录
+     */
+    @Override
+    public WxSendMessage selectWxSendMessageById(Long id)
+    {
+        return wxSendMessageMapper.selectWxSendMessageById(id);
+    }
+
+    /**
+     * 查询企业微信发送消息历史记录列表
+     * 
+     * @param wxSendMessage 企业微信发送消息历史记录
+     * @return 企业微信发送消息历史记录
+     */
+    @Override
+    public List<WxSendMessage> selectWxSendMessageList(WxSendMessage wxSendMessage)
+    {
+        return wxSendMessageMapper.selectWxSendMessageList(wxSendMessage);
+    }
+
+    /**
+     * 新增企业微信发送消息历史记录
+     * 
+     * @param wxSendMessage 企业微信发送消息历史记录
+     * @return 结果
+     */
+    @Override
+    public int insertWxSendMessage(WxSendMessage wxSendMessage)
+    {
+        wxSendMessage.setCreateTime(DateUtils.getNowDate());
+        return wxSendMessageMapper.insertWxSendMessage(wxSendMessage);
+    }
+
+    /**
+     * 修改企业微信发送消息历史记录
+     * 
+     * @param wxSendMessage 企业微信发送消息历史记录
+     * @return 结果
+     */
+    @Override
+    public int updateWxSendMessage(WxSendMessage wxSendMessage)
+    {
+        wxSendMessage.setUpdateTime(DateUtils.getNowDate());
+        return wxSendMessageMapper.updateWxSendMessage(wxSendMessage);
+    }
+
+    /**
+     * 删除企业微信发送消息历史记录对象
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    @Override
+    public int deleteWxSendMessageByIds(String ids)
+    {
+        return wxSendMessageMapper.deleteWxSendMessageByIds(Convert.toStrArray(ids));
+    }
+
+    /**
+     * 删除企业微信发送消息历史记录信息
+     * 
+     * @param id 企业微信发送消息历史记录ID
+     * @return 结果
+     */
+    @Override
+    public int deleteWxSendMessageById(Long id)
+    {
+        return wxSendMessageMapper.deleteWxSendMessageById(id);
+    }
+}

+ 22 - 1
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/utils/qywxutils/QyWxSendMessageUtil.java

@@ -8,7 +8,10 @@ import com.dgtly.system.service.ISysConfigService;
 import com.dgtly.system.service.ISysUserService;
 import com.dgtly.system.service.impl.SysConfigServiceImpl;
 import com.dgtly.system.service.impl.SysUserServiceImpl;
+import com.dgtly.wxportal.domain.WxSendMessage;
 import com.dgtly.wxportal.exception.QyWeixinException;
+import com.dgtly.wxportal.mapper.WxSendMessageMapper;
+import com.dgtly.wxportal.service.IWxSendMessageService;
 import com.dgtly.wxportal.utils.qywxutils.messageModel.QyWxBaseMessage;
 import com.dgtly.wxportal.utils.qywxutils.messageModel.QyWxTextMessage;
 import org.slf4j.Logger;
@@ -17,6 +20,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Component;
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -34,7 +39,7 @@ public class QyWxSendMessageUtil {
     @Autowired
     private SysConfigServiceImpl configService;
     @Autowired
-    private SysUserServiceImpl sysUserService;
+    private WxSendMessageMapper wxSendMessageMapper;
 
 
     public boolean sendMessage(QyWxBaseMessage message){
@@ -54,23 +59,39 @@ public class QyWxSendMessageUtil {
 
     @Async
     public void sendNoticeMessage(Set<String> customerCodes,JSONObject obj, Map<String,Map<String,Object>> maps,String temple){
+        List<WxSendMessage> wmList = new ArrayList<>();
         if(customerCodes.size()>0){
             for(String code:customerCodes){
                 if(maps.containsKey(code)&&maps.get(code).get("touser")!=null&&!maps.get(code).get("touser").toString().trim().equals("")){
+                    WxSendMessage wm= new WxSendMessage();
                     QyWxTextMessage qyWxTextMessage = new QyWxTextMessage();
                     qyWxTextMessage.setTouser(maps.get(code).get("touser").toString());
+                    wm.setToUser(qyWxTextMessage.getTouser());
                     qyWxTextMessage.setText(String.format(temple,obj.getString(code)));
+                    wm.setSendText(qyWxTextMessage.getText().getContent());
                     try{
                         sendMessage(qyWxTextMessage);
+                        wm.setIsSuccess("1");
                     }catch (Exception e){
                         log.error("对"+maps.get(code).get("touser")+"发送消息失败",e);
+                    }finally {
+                        wmList.add(wm);
                     }
                 }else{
                     log.error("经销商code为:"+code+"的经销商未发现相应人员!!");
                 }
             }
         }
+        if(wmList.size()>0){
+            try{
+                wxSendMessageMapper.bathInsertWxSendMessage(wmList);
+            }catch (Exception e){
 
+                log.error("发送微信信息时插入记录出错!!",e);
+            }
+
+
+        }
 
 
     }

+ 85 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/resources/mapper/wxportal/WxSendMessageMapper.xml

@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dgtly.wxportal.mapper.WxSendMessageMapper">
+    
+    <resultMap type="WxSendMessage" id="WxSendMessageResult">
+        <result property="id"    column="id"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="toUser"    column="to_user"    />
+        <result property="isSuccess"    column="is_success"    />
+        <result property="sendText"    column="send_text"    />
+        <result property="type"    column="type"    />
+    </resultMap>
+
+    <sql id="selectWxSendMessageVo">
+        select id, create_time, to_user, is_success, send_text, type from wx_send_message
+    </sql>
+
+    <select id="selectWxSendMessageList" parameterType="WxSendMessage" resultMap="WxSendMessageResult">
+        <include refid="selectWxSendMessageVo"/>
+        <where>  
+            <if test="toUser != null  and toUser != ''"> and to_user = #{toUser}</if>
+            <if test="isSuccess != null  and isSuccess != ''"> and is_success = #{isSuccess}</if>
+            <if test="sendText != null  and sendText != ''"> and send_text = #{sendText}</if>
+            <if test="type != null  and type != ''"> and type = #{type}</if>
+        </where>
+    </select>
+    
+    <select id="selectWxSendMessageById" parameterType="Long" resultMap="WxSendMessageResult">
+        <include refid="selectWxSendMessageVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertWxSendMessage" parameterType="WxSendMessage">
+        insert into wx_send_message
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null ">id,</if>
+            <if test="createTime != null ">create_time,</if>
+            <if test="toUser != null  and toUser != ''">to_user,</if>
+            <if test="isSuccess != null  and isSuccess != ''">is_success,</if>
+            <if test="sendText != null  and sendText != ''">send_text,</if>
+            <if test="type != null  and type != ''">type,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null ">#{id},</if>
+            <if test="createTime != null ">#{createTime},</if>
+            <if test="toUser != null  and toUser != ''">#{toUser},</if>
+            <if test="isSuccess != null  and isSuccess != ''">#{isSuccess},</if>
+            <if test="sendText != null  and sendText != ''">#{sendText},</if>
+            <if test="type != null  and type != ''">#{type},</if>
+         </trim>
+    </insert>
+
+    <update id="updateWxSendMessage" parameterType="WxSendMessage">
+        update wx_send_message
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="createTime != null ">create_time = #{createTime},</if>
+            <if test="toUser != null  and toUser != ''">to_user = #{toUser},</if>
+            <if test="isSuccess != null  and isSuccess != ''">is_success = #{isSuccess},</if>
+            <if test="sendText != null  and sendText != ''">send_text = #{sendText},</if>
+            <if test="type != null  and type != ''">type = #{type},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteWxSendMessageById" parameterType="Long">
+        delete from wx_send_message where id = #{id}
+    </delete>
+
+    <delete id="deleteWxSendMessageByIds" parameterType="String">
+        delete from wx_send_message where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <insert id="bathInsertWxSendMessage">
+        insert into wx_send_message(create_time, to_user,is_success,send_text,type) values
+        <foreach item="item" index="index" collection="list" separator=",">
+            (now(),#{item.toUser},#{item.isSuccess},#{item.sendText},#{item.type})
+        </foreach>
+    </insert>
+    
+</mapper>

+ 94 - 0
suishenbang-wxportal/suishenbang-wxportal-manager/src/main/java/com/dgtly/wxportal/controller/WxSendMessageController.java

@@ -0,0 +1,94 @@
+package com.dgtly.wxportal.controller;
+
+import java.util.List;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.dgtly.common.annotation.Log;
+import com.dgtly.common.enums.BusinessType;
+import com.dgtly.wxportal.domain.WxSendMessage;
+import com.dgtly.wxportal.service.IWxSendMessageService;
+import com.dgtly.common.core.controller.BaseController;
+import com.dgtly.common.core.domain.AjaxResult;
+import com.dgtly.common.utils.poi.ExcelUtil;
+import com.dgtly.common.core.page.TableDataInfo;
+
+/**
+ * 企业微信发送消息历史记录Controller
+ * 
+ * @author qxp
+ * @date 2020-09-02
+ */
+@Controller
+@RequestMapping("/wxmessage")
+public class WxSendMessageController extends BaseController
+{
+    private String prefix = "wxportal/wxmessage";
+
+    @Autowired
+    private IWxSendMessageService wxSendMessageService;
+
+    @RequiresPermissions("wxportal")
+    @GetMapping()
+    public String wxmessage()
+    {
+        return prefix + "/wxmessage";
+    }
+
+    /**
+     * 查询企业微信发送消息历史记录列表
+     */
+    @RequiresPermissions("wxportal:wxmessage:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(WxSendMessage wxSendMessage)
+    {
+        startPage();
+        List<WxSendMessage> list = wxSendMessageService.selectWxSendMessageList(wxSendMessage);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出企业微信发送消息历史记录列表
+     */
+    @RequiresPermissions("wxportal:wxmessage:export")
+    @PostMapping("/export")
+    @ResponseBody
+    public AjaxResult export(WxSendMessage wxSendMessage)
+    {
+        List<WxSendMessage> list = wxSendMessageService.selectWxSendMessageList(wxSendMessage);
+        ExcelUtil<WxSendMessage> util = new ExcelUtil<WxSendMessage>(WxSendMessage.class);
+        return util.exportExcel(list, "wxmessage");
+    }
+
+    /**
+     * 新增企业微信发送消息历史记录
+     */
+    @GetMapping("/add")
+    public String add()
+    {
+        return prefix + "/add";
+    }
+
+
+
+    /**
+     * 修改企业微信发送消息历史记录
+     */
+    @GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") Long id, ModelMap mmap)
+    {
+        WxSendMessage wxSendMessage = wxSendMessageService.selectWxSendMessageById(id);
+        mmap.put("wxSendMessage", wxSendMessage);
+        return prefix + "/edit";
+    }
+
+
+
+}

+ 50 - 0
suishenbang-wxportal/suishenbang-wxportal-manager/src/main/resources/templates/wxportal/wxmessage/edit.html

@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('修改企业微信发送消息历史记录')" />
+</head>
+<body class="white-bg">
+    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
+        <form class="form-horizontal m" id="form-wxmessage-edit" th:object="${wxSendMessage}">
+            <input name="id" th:field="*{id}" type="hidden">
+            <div class="form-group">
+                <label class="col-sm-3 control-label">发送给的用户:</label>
+                <div class="col-sm-8">
+                    <textarea name="toUser" class="form-control">[[*{toUser}]]</textarea>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">是否发送成功:</label>
+                <div class="col-sm-8">
+                    <input name="isSuccess" th:field="*{isSuccess}" class="form-control" type="text">
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">发送的文本:</label>
+                <div class="col-sm-8">
+                    <textarea name="sendText" class="form-control">[[*{sendText}]]</textarea>
+                </div>
+            </div>
+            <div class="form-group">    
+                <label class="col-sm-3 control-label">类型:</label>
+                <div class="col-sm-8">
+                    <input name="isSuccess" th:field="*{type}" class="form-control" type="text">
+                </div>
+            </div>
+        </form>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script type="text/javascript">
+        var prefix = ctx + "wxmessage/wxmessage";
+        $('input').attr('disabled',true);
+        $('textarea').attr('disabled',true);
+        $("#form-wxmessage-edit").validate({
+            focusCleanup: true
+        });
+
+        function submitHandler() {
+
+        }
+    </script>
+</body>
+</html>

+ 92 - 0
suishenbang-wxportal/suishenbang-wxportal-manager/src/main/resources/templates/wxportal/wxmessage/wxmessage.html

@@ -0,0 +1,92 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <th:block th:include="include :: header('企业微信发送消息历史记录列表')" />
+</head>
+<body class="gray-bg">
+     <div class="container-div">
+        <div class="row">
+            <div class="col-sm-12 search-collapse">
+                <form id="formId">
+                    <div class="select-list">
+                        <ul>
+                            <li>
+                                <p>是否发送成功:</p>
+                                <input type="text" name="isSuccess"/>
+                            </li>
+                            <li>
+                                <p>类型:</p>
+                                <select name="type" th:with="type=${@dict.getType('')}">
+                                    <option value="">所有</option>
+                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+                                </select>
+                            </li>
+                            <li>
+                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
+                            </li>
+                        </ul>
+                    </div>
+                </form>
+            </div>
+
+            <div class="btn-group-sm" id="toolbar" role="group">
+
+            </div>
+            <div class="col-sm-12 select-table table-striped">
+                <table id="bootstrap-table"></table>
+            </div>
+        </div>
+    </div>
+    <th:block th:include="include :: footer" />
+    <script th:inline="javascript">
+        var editFlag = [[${@permission.hasPermi('wxportal:wxmessage:edit')}]];
+        var prefix = ctx + "wxmessage";
+
+        $(function() {
+            var options = {
+                url: prefix + "/list",
+                createUrl: prefix + "/add",
+                updateUrl: prefix + "/edit/{id}",
+                removeUrl: prefix + "/remove",
+                exportUrl: prefix + "/export",
+                modalName: "企业微信发送消息历史记录",
+                columns: [{
+                    checkbox: true
+                },
+                {
+                    field : 'id', 
+                    title : 'null',
+                    visible: false
+                },
+                {
+                    field : 'toUser', 
+                    title : '发送给的用户'
+                },
+                {
+                    field : 'isSuccess', 
+                    title : '是否发送成功'
+                },
+                {
+                    field : 'sendText', 
+                    title : '发送的文本'
+                },
+                {
+                    field : 'type', 
+                    title : '类型'
+                },
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        var actions = [];
+                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看</a> ');
+                        return actions.join('');
+                    }
+                }]
+            };
+            $.table.init(options);
+        });
+    </script>
+</body>
+</html>