KKSU
2023-12-21 1e51f33490015a769197c448e02c11f95e721c9f
src/main/resources/mapper/modules/MallOrderInfoMapper.xml
@@ -468,19 +468,42 @@
    </select>
    <select id="getGoodsStatisticsInPage" resultType="cc.mrbird.febs.mall.vo.AdminGoodsStatisticsVo">
    select
        goods_name goodsName,
        SUM(cnt) goodsCnt
    from mall_order_item
    <where>
        <if test="record.orderIdsStr != null">
            and order_id in
                <foreach collection="record.orderIdsStr" item="id" index="index" open="(" close=")" separator=",">
                    #{id}
                </foreach>
        </if>
    </where>
        GROUP BY goods_id
        ORDER BY goods_id desc
</select>
        select
            goods_name goodsName,
            SUM(cnt) goodsCnt
        from mall_order_item
        <where>
            <if test="record.orderIdsStr != null">
                and order_id in
                    <foreach collection="record.orderIdsStr" item="id" index="index" open="(" close=")" separator=",">
                        #{id}
                    </foreach>
            </if>
        </where>
            GROUP BY goods_id
            ORDER BY goods_id desc
    </select>
    <select id="getAppOrderListInPage" resultType="cc.mrbird.febs.mall.vo.ApiGetOrderListVo">
        select
               a.id,
               a.amount
        from mall_order_info a
        <where>
            a.is_app = 1
            <if test="record.status != null">
                and a.status = #{record.status}
            </if>
        </where>
    </select>
    <select id="getAppOrderByOrderId" resultType="cc.mrbird.febs.mall.vo.ApiGetOrderListVo">
        select
               a.id,
               a.amount
        from mall_order_info a
        where
            a.is_app = 1
            and id = #{orderId}
    </select>
</mapper>