<?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.njcn.prepare.harmonic.mapper.mysql.line.ThsSuperviseMapper">
    <!--查询技术监督列表-->
    <select id="querySuperviseList" parameterType="com.njcn.prepare.harmonic.pojo.dto.SuperviseDto"
            resultType="com.njcn.prepare.harmonic.pojo.vo.SuperviseVo">
        select ts.* from ths_supervise ts where 1=1
        <if test="param.searchBeginTime != null and param.searchBeginTime != ''">
            AND DATE_FORMAT(ts.create_time, '%Y-%m-%d') &gt;= DATE_FORMAT(#{param.searchBeginTime}, '%Y-%m-%d')
        </if>
        <if test="param.searchEndTime != null and param.searchEndTime != ''">
            AND DATE_FORMAT(ts.create_time, '%Y-%m-%d') &lt;= DATE_FORMAT(#{param.searchEndTime}, '%Y-%m-%d')
        </if>
        <if test="param.searchState != null">
            AND ts.progress=#{param.searchState}
        </if>
        order by ts.create_time desc
    </select>
</mapper>
