无关风月
2024-12-18 4756b2959df094e4f49aa85f95ec2b1ef6478e2a
manage/src/main/resources/mapping/TLensWarehousingDetailMapper.xml
@@ -26,5 +26,42 @@
    <sql id="Base_Column_List">
        id, brand, supplier, series, refractiveIndex, ballMirror, columnMirror, type, total, createTime, updateTime, createBy, updateBy, isDelete, count, seriesId
    </sql>
    <select id="pageLensList" resultType="com.jilongda.manage.vo.TLensWarehousingDetailVO">
        select tlwd.id, tlwd.warehousingId, tlwd.brand, tlwd.supplier, tlwd.series, tlwd.total, tlwd.refractiveIndex, tlwd.ballMirror, tlwd.code, tlwd.createTime,tlwd.columnMirror,
        tlwd.updateTime, tlwd.createBy, tlwd.updateBy, tlwd.isDelete, tlwd.modelId, tlwd.type
        from t_lens_warehousing_detail tlwd
        left join t_warehousing tw on tlwd.warehousingId = tw.id
        <where>
            <if test="query.brand != null and query.brand != ''">
                and tlwd.brand = #{query.brand}
            </if>
            <if test="query.series != null and query.series != ''">
                and tlwd.series = #{query.series}
            </if>
            <if test="query.type != null and query.type != ''">
                and tlwd.type = #{query.type}
            </if>
            <if test="query.refractiveIndex != null and query.refractiveIndex != ''">
                and tlwd.refractiveIndex = #{query.refractiveIndex}
            </if>
            <if test="query.ballMirror != null and query.ballMirror != ''">
                and tlwd.ballMirror = #{query.ballMirror}
            </if>
            <if test="query.columnMirror != null and query.columnMirror != ''">
                and tlwd.columnMirror = #{query.columnMirror}
            </if>
            <if test="query.storeId != null">
                and tw.storeId = #{query.storeId}
            </if>
            <if test="query.status != null">
                and tw.status = #{query.status}
            </if>
            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
                and tlwd.createTime between #{query.startTime} and #{query.endTime}
            </if>
            and tlwd.isDelete =  ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY tlwd.createTime DESC
    </select>
</mapper>