xiaoyong931011
2023-08-22 09d498d50765b58b048bdf0a81e4ff1765439bef
src/main/resources/mapper/dapp/MallGoodsMapper.xml
@@ -4,8 +4,10 @@
    <select id="selectMallGoodsInPage" resultType="cc.mrbird.febs.dapp.entity.MallGoods">
        select
        a.*
        a.*,
        b.name categoryName
        from mall_goods a
        left join mall_goods_category b on a.category_id = b.id
        <where>
            <if test="record != null">
                <if test="record.goodsName != null and record.goodsName != ''">
@@ -55,14 +57,17 @@
                <if test="record.goodsName != null and record.goodsName != ''">
                    and c.goods_name like CONCAT('%', CONCAT(#{record.goodsName}, '%'))
                </if>
                <if test="record.payResult != null and record.payResult != ''">
                    and a.pay_result = #{record.payResult}
                <if test="record.deliverType != null and record.deliverType != ''">
                    and a.deliver_type = #{record.deliverType}
                </if>
                <if test="record.orderType != null">
                    and a.order_type = #{record.orderType}
                </if>
                <if test="record.status != null and record.status != ''">
                    and a.status = #{record.status}
                </if>
                <if test="record.deliverState != null and record.deliverState != ''">
                    and a.deliver_state = #{record.deliverState}
                </if>
                <if test="record.orderNo != null and record.orderNo != ''">
                    and a.order_no like CONCAT('%', CONCAT(#{record.orderNo}, '%'))
@@ -85,4 +90,9 @@
        select * from mall_goods a where a.category_id = #{categaryId}
    </select>
    <select id="getMallOrderInfoById" resultType="cc.mrbird.febs.dapp.vo.AdminMallOrderVo">
        select b.* from mall_address_info b
        where b.id = (select a.address_id from mall_order_info a where a.id = #{id})
    </select>
</mapper>