123456789101112131415161718192021222324252627 |
- <?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.zhgd.scs.mapper.EnvDeviceMapper">
- <select id="getList" resultType="com.zhgd.scs.domain.EnvDevice">
- SELECT * FROM env_device
- WHERE project_id=#{projectId}
- <if test="devid!=null and devid!=''">
- AND devid LIKE concat('%',#{devid},'%')
- </if>
- <if test="name!=null and name!=''">
- AND dev_name LIKE concat('%',#{name},'%')
- </if>
- <if test="startTime!=null and endTime!=null">
- AND in_time BETWEEN #{startTime} AND #{endTime}
- </if>
- <if test="state != null">
- AND state = #{state}
- </if>
- <if test="inOutState != null">
- AND in_out_state = #{inOutState}
- </if>
- ORDER BY in_out_state DESC, state DESC, in_time DESC,id DESC
- </select>
- </mapper>
|