chenyanan 1 年間 前
コミット
7219e07ed1

+ 7 - 20
suishenbang-admin/src/main/resources/templates/system/alertConfiguration/configuration.html

@@ -16,19 +16,16 @@
                             </li>
                             <li class="select-time">
                                 <p>弹框开始时间:</p>
-                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginAlertStartTime]"/>
-                                <span>-</span>
-                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endAlertStartTime]"/>
+                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="alertStartTime"/>
+
                             </li>
                             <li class="select-time">
                                 <p>弹框结束时间:</p>
-                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginAlertEndTime]"/>
-                                <span>-</span>
-                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endAlertEndTime]"/>
+                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="alertEndTime"/>
                             </li>
                             <li>
                                 <p>用户类型</p>
-                                <select name="userType" th:with="type=${@dict.getType('')}">
+                                <select name="userType" th:with="type=${@dict.getType('sys_lantern_permission')}">
                                     <option value="">所有</option>
                                     <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                 </select>
@@ -91,7 +88,9 @@
                 },
                 {
                     field : 'alertContent', 
-                    title : '弹框内容'
+                    title : '弹框内容',
+                    width : '300px',
+                    height: '20px'
                 },
                 {
                     field : 'alertStartTime', 
@@ -128,18 +127,6 @@
                             return statusTools(row);
                         }
                     },
-                {
-                    field : 'alertStatus', 
-                    title : '是否启动',
-                    formatter: function(value, row, index) {
-                        if (value.indexOf('1') != -1 && value.indexOf('0') == -1) {
-                            return '启动';
-                        }
-                        if (value.indexOf('1') == -1 && value.indexOf('0') != -1) {
-                            return '未启动';
-                        }
-                    }
-                },
                 {
                     title: '操作',
                     align: 'center',

+ 3 - 3
suishenbang-system/src/main/resources/mapper/system/AlertConfigurationMapper.xml

@@ -27,9 +27,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectAlertConfigurationVo"/>
         <where>  
             <if test="isDelete != null "> and is_delete = #{isDelete}</if>
-            <if test="alertContent != null  and alertContent != ''"> and alert_content = #{alertContent}</if>
-            <if test="alertStartTime != null "> and alert_start_time = #{alertStartTime}</if>
-            <if test="alertEndTime != null "> and alert_end_time = #{alertEndTime}</if>
+            <if test="alertContent != null  and alertContent != ''"> and alert_content like concat('%', #{alertContent}, '%')</if>
+            <if test="alertStartTime != null "> and alert_start_time &gt;= #{alertStartTime}</if>
+            <if test="alertEndTime != null "> and alert_end_time &lt; #{alertEndTime}</if>
             <if test="alertNum != null "> and alert_num = #{alertNum}</if>
             <if test="userType != null  and userType != ''"> and user_type = #{userType}</if>
             <if test="alertStatus != null  and alertStatus != ''"> and alert_status = #{alertStatus}</if>