xuhy
2024-12-13 4d84802f381a447171c5dda28d44a0e53e93f3f4
manage/src/main/resources/mapping/TFrameWarehousingDetailMapper.xml
@@ -10,7 +10,6 @@
        <result column="supplier" property="supplier" />
        <result column="material" property="material" />
        <result column="total" property="total" />
        <result column="count" property="count" />
        <result column="color" property="color" />
        <result column="model" property="model" />
        <result column="code" property="code" />
@@ -24,7 +23,38 @@
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, warehousingId, brand, supplier, material, total, count, color, model, code, createTime, updateTime, createBy, updateBy, isDelete, modelId
        id, warehousingId, brand, supplier, material, total, color, model, code, createTime, updateTime, createBy, updateBy, isDelete, modelId
    </sql>
    <select id="pageList" resultType="com.jilongda.manage.vo.TFrameWarehousingDetailVO">
        select tfwd.id, tfwd.warehousingId, tfwd.brand, tfwd.supplier, tfwd.material, tfwd.total, tfwd.color, tfwd.model, tfwd.code, tfwd.createTime,
               tfwd.updateTime, tfwd.createBy, tfwd.updateBy, tfwd.isDelete, tfwd.modelId
        from t_frame_warehousing_detail tfwd
        left join t_warehousing tw on tfwd.warehousingId = tw.id
        <where>
            <if test="query.brand != null and query.brand != ''">
                and tfwd.brand = #{query.brand}
            </if>
            <if test="query.supplier != null and query.supplier != ''">
                and tfwd.supplier = #{query.supplier}
            </if>
            <if test="query.color != null and query.color != ''">
                and tfwd.color = #{query.color}
            </if>
            <if test="query.model != null and query.model != ''">
                and tfwd.model like concat('%',#{query.model},'%')
            </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 tfwd.createTime between #{query.startTime} and #{query.endTime}
            </if>
            and tfwd.isDelete =  ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY tfwd.createTime DESC
    </select>
</mapper>