无关风月
2 天以前 ce0651907f18a57dae80065e01589e975530f53e
ruoyi-system/src/main/resources/mapper/system/TQaTestItemReportMapper.xml
@@ -7,6 +7,7 @@
        <id column="id" property="id" />
        <result column="item_id" property="itemId" />
        <result column="report_content" property="reportContent" />
        <result column="report_code" property="reportCode" />
        <result column="develop_person" property="developPerson" />
        <result column="develop_date" property="developDate" />
        <result column="report_text" property="reportText" />
@@ -23,7 +24,45 @@
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, item_id, report_content, develop_person, develop_date, report_text, audit_person_id, audit_time, audit_remark, status, create_time, update_time, create_by, update_by, disabled
        id, item_id, report_content,report_code, develop_person, develop_date, report_text, audit_person_id, audit_time, audit_remark, status, create_time, update_time, create_by, update_by, disabled
    </sql>
    <select id="getList" resultType="com.ruoyi.system.vo.TQaTestItemReportVO">
        select
        <include refid="Base_Column_List" />
        from t_qa_test_item_report
        where item_id = #{itemId}
        order by create_time desc
    </select>
    <select id="pageList" resultType="com.ruoyi.system.vo.TQaTestItemReportVO">
        select tqtir.id, tqtir.item_id, tqtir.report_content,tqtir.report_code, tqtir.develop_person, tqtir.develop_date, tqtir.report_text,
        tqtir.audit_person_id, tqtir.audit_time, tqtir.audit_remark, tqtir.status, tqtir.create_time, tqtir.update_time,
        tqtir.create_by, tqtir.update_by, tqtir.disabled,tqti.item_name as itemName, tqti.item_code as itemCode,
        tpt.team_name as teamName
        from t_qa_test_item_report tqtir
        left join t_qa_test_item tqti on tqti.id = tqtir.item_id
        left join t_project_team tpt on tpt.id = tqti.team_id
        <where>
            <if test="query.teamName != null and query.teamName != ''">
                and tpt.team_name like concat('%', #{query.teamName}, '%')
            </if>
            <if test="query.itemName != null and query.itemName != ''">
                and tqti.item_name like concat('%', #{query.itemName}, '%')
            </if>
            <if test="query.itemCode != null and query.itemCode != ''">
                and tqti.item_code like concat('%', #{query.itemCode}, '%')
            </if>
            <if test="query.reportContent != null and query.reportContent != ''">
                and tqtir.report_content = #{query.reportContent}
            </if>
            <if test="query.status != null and query.status != -1">
                and tqtir.status = #{query.status}
            </if>
            <if test="query.status == null">
                and tqtir.status != -1
            </if>
            AND tqtir.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY tqtir.create_time DESC
    </select>
</mapper>