fix
Hentua
2023-08-23 25828996cb8f2b971de722ce9a527c26bbc68cb2
src/main/resources/mapper/modules/MallOrderInfoMapper.xml
@@ -423,20 +423,34 @@
    </select>
    <select id="getGoodsStatisticsInPage" resultType="cc.mrbird.febs.mall.vo.AdminGoodsStatisticsVo">
    select
        goods_name goodsName,
        SUM(cnt) goodsCnt
    from mall_order_item
    <where>
    1=1
        <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>
        1=1
            <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="selectAmountOrTeamAmount" resultType="java.math.BigDecimal">
        select IFNULL(sum(IFNULL(a.amount,0)),0) from mall_order_info a
        inner join mall_member b on a.member_id=b.ID
        <where>
            a.status in (2,3,4)
            <if test="type == 1">
                and b.invite_id=#{inviteId}
            </if>
            <if test="type == 2">
                and find_in_set(#{inviteId}, b.referrer_ids)
            </if>
        </where>
    </select>
</mapper>