KKSU
2024-05-07 237dc82b539966a08fca13bbedbeaafd0822aff2
src/main/resources/mapper/modules/MallOrderInfoMapper.xml
@@ -458,12 +458,12 @@
        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)
            a.status = 4
            <if test="type == 1">
                and b.invite_id=#{inviteId}
            </if>
            <if test="type == 2">
                and FIND_IN_SET(#{inviteId},b.referrer_ids)
                and b.referrer_id=#{inviteId}
            </if>
        </where>
    </select>