12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?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.huaxia.imes.mapper.MesLineMapper">
- <!--获取总条数-->
- <select id="countByParams" resultType="int">
- SELECT COUNT(*)
- FROM mes_line
- <where>
- <if test="params.boy != null">
- <if test="params.boy.lineName != null and params.boy.lineName != ''">
- line_name like concat('%', #{params.boy.lineName}, '%')
- </if>
- <if test="params.boy.startTime != null">
- and create_time gl;
- #{params.boy.startTime}
- </if>
- <if test="params.boy.endTime != null">
- and create_time le;
- #{params.boy.endTime}
- </if>
- </if>
- </where>
- </select>
- <!--开始分页查询-->
- <select id="queryListPage" resultType="com.huaxia.imes.pojo.MesLineVO">
- SELECT *
- FROM mes_line
- <where>
- <if test="params.boy != null">
- <if test="params.boy.lineName != null and params.boy.lineName != ''">
- line_name like concat('%', #{params.boy.lineName}, '%')
- </if>
- <if test="params.boy.startTime != null">
- and create_time gl;
- #{params.boy.startTime}
- </if>
- <if test="params.boy.endTime != null">
- and create_time le;
- #{params.boy.endTime}
- </if>
- </if>
- </where>
- ORDER BY id
- OFFSET #{params.offset} ROWS
- FETCH NEXT #{params.size} ROWS ONLY
- </select>
- </mapper>
|