<?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.nantian.cloud.jljc.mapper.DataAuditionMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.nantian.cloud.jljc.entity.DataAudition">
        <id column="id" property="id" />
        <result column="num" property="num" />
        <result column="enterprise_code" property="enterpriseCode" />
        <result column="cmp_name" property="cmpName" />
        <result column="task_no" property="taskNo" />
        <result column="task_state" property="taskState" />
        <result column="task_name" property="taskName" />
        <result column="userid" property="userid"/>
        <result column="update_time" property="updateTime"/>
        <result column="del_flag" property="delFlag"/>
        <result column="dept_id" property="deptId"/>
    </resultMap>

    <!-- 通用查询结果列 -->
    <select id="selectall" resultType="com.nantian.cloud.jljc.entity.DataAudition">
        select a.* from data_audition a
        <trim prefix="where" prefixOverrides="and">
            <if test="param2.enterpriseCode !=null and param2.enterpriseCode !=''">
               and a.enterprise_code = #{param2.enterpriseCode}
            </if>
            <if test="param2.cmpName !=null and param2.cmpName !=''">
                and a.cmp_name like concat ('%',#{param2.cmpName},'%')
            </if>
            <if test="param2.taskState !=null and param2.taskState !=''">
                and a.task_state = #{param2.taskState}
            </if>
            <if test="param2.taskName !=null and param2.taskName !=''">
                and a.task_name like concat ('%',#{param2.taskName},'%')
            </if>
            <if test="param2.taskNo !=null and param2.taskNo !=''">
                and a.task_no = #{param2.taskNo}
            </if>
            <if test="param2.num !=null and param2.num !=''">
                and a.num = #{param2.num}
            </if>
        </trim>
    </select>

</mapper>
