liusheng
2 天以前 da026a34bcc97b2eb49607a3b02d94d8f683f997
ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml
@@ -25,23 +25,25 @@
   <select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
      select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor
      <where>
         <if test="ipaddr != null and ipaddr != ''">
            AND ipaddr like concat('%', #{ipaddr}, '%')
         </if>
         <if test="status != null and status != ''">
            AND status = #{status}
         </if>
         <if test="userName != null and userName != ''">
            AND user_name like concat('%', #{userName}, '%')
         </if>
         <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
            and date_format(login_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
         </if>
         <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
            and date_format(login_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
         </if>
      </where>
      where 1=1
      <if test="orgid != null and orgid != ''">
         AND orgid = #{orgid}
      </if>
      <if test="ipaddr != null and ipaddr != ''">
         AND ipaddr like concat('%', #{ipaddr}, '%')
      </if>
      <if test="status != null and status != ''">
         AND status = #{status}
      </if>
      <if test="userName != null and userName != ''">
         AND user_name like concat('%', #{userName}, '%')
      </if>
      <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
         and date_format(login_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
      </if>
      <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
         and date_format(login_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
      </if>
      order by info_id desc
   </select>