wenminjie
2026-07-15 999e0159112d9405bad7fcd839b339e006a3530d
ruoyi-system/target/classes/mapper/system/TTrainLibraryMapper.xml
@@ -68,5 +68,43 @@
        order by create_time desc
    </select>
    <!-- 新增:查询所有数据(不分页) -->
    <select id="listAll" resultType="com.ruoyi.system.vo.TTrainLibraryVO">
        select
        <include refid="Base_Column_List"/>
        from t_train_library
        <where>
            <if test="query.strainCode != null and query.strainCode != ''">
                and strain_code like concat('%', #{query.strainCode}, '%')
            </if>
            <if test="query.strainName != null and query.strainName != ''">
                and strain_name like concat('%', #{query.strainName}, '%')
            </if>
            <if test="query.status != null">
                and status = #{query.status}
            </if>
            <if test="query.type != null">
                and `type` = #{query.type}
            </if>
            <if test="query.isDraft != null">
                and is_draft = #{query.isDraft}
            </if>
            <if test="query.projectIds != null and query.projectIds.size() > 0">
                and project_id in
                <foreach item="item" collection="query.projectIds" separator="," open="(" close=")" index="">
                    #{item}
                </foreach>
            </if>
            <!-- 时间范围查询 -->
            <if test="query.startTime != null and query.startTime != ''">
                and create_time >= #{query.startTime}
            </if>
            <if test="query.endTime != null and query.endTime != ''">
                and create_time &lt;= #{query.endTime}
            </if>
            AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        order by strain_code desc
    </select>
</mapper>