<?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="org.jeecg.modules.stm.audit.mapper.AuditItemRelCheckMapper">

    <select id="queryCompItemCheckMethods" resultType="java.util.Map">
        SELECT distinct C.content,C.des,B.checkid,B.citemid,C.id
        FROM audit_compliane_item A
            INNER JOIN audit_item_rel_check B  ON A.id = B.citemid
            INNER JOIN audit_check_method C  ON B.checkid = C.id
        <where>
            <if test="query.fileId!=null">
                A.file_id = #{query.fileId}
            </if>
            <if test="query.id!=null">
                and A.id = #{query.id}
            </if>
        </where>
    </select>
</mapper>