Browse Source

访问时间

duyj 3 years ago
parent
commit
e029781d98

+ 6 - 0
suishenbang-admin/src/main/resources/templates/system/magnetLog/magnetLog.html

@@ -34,6 +34,12 @@
                                 <p>磁铁名称:</p>
                                 <input type="text" name="magnetName"/>
                             </li>
+                            <li class="select-time">
+                                <label>访问时间: </label>
+                                <input type="text" class="time-input" id="startTime" placeholder="开始日期" name="params[beginTime]"/>
+                                <span>-</span>
+                                <input type="text" class="time-input" id="endTime" placeholder="结束日期" name="params[endTime]"/>
+                            </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>

+ 6 - 5
suishenbang-admin/src/main/resources/templates/system/user/user.html

@@ -83,11 +83,12 @@
 								</li>
 								<li>
 									经销商类型:<select name="sysUserExt.identity">
-									<option value="">所有</option>
-									<option value="1">DIY</option>
-									<option value="2">厨卫</option>
-									<option value="3">两者都是</option>
-								</select>
+												<option value="">所有</option>
+												<option value="1">DIY</option>
+												<option value="2">厨卫</option>
+												<option value="3">两者都是</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>

+ 6 - 0
suishenbang-system/src/main/resources/mapper/system/SysMagnetLogMapper.xml

@@ -31,6 +31,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orgName != null  and orgName != ''"> and org_name like concat('%', #{orgName}, '%')</if>
             <if test="level != null  and level != ''"> and level = #{level}</if>
             <if test="magnetName != null  and magnetName != ''"> and magnet_name like concat('%', #{magnetName}, '%')</if>
+            <if test="params.beginTime != null and params.beginTime != ''">
+                and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+            </if>
+            <if test="params.endTime != null and params.endTime != ''">
+                and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+            </if>
         </where>
         order by create_time desc
     </select>