fix
Helius
2022-06-17 c9f8acb6c1c02ace51cf4ecb55ccc1bc7e1e1b2a
fix
2 files modified
5 ■■■■■ changed files
src/main/resources/mapper/modules/MallMemberMapper.xml 2 ●●● patch | view | raw | blame | history
src/main/resources/mapper/modules/MallMoneyFlowMapper.xml 3 ●●●● patch | view | raw | blame | history
src/main/resources/mapper/modules/MallMemberMapper.xml
@@ -84,7 +84,7 @@
            (select sum(e.amount)
             from mall_order_info e
                      inner join mall_member b on e.member_id=b.ID
                      inner join mall_order_item c on e.id = c.order_id and c.is_normal=2
                      inner join mall_order_item c on e.id = c.order_id -- and c.is_normal=2
             where e.status in (2, 3, 4) and e.order_type=1 and (b.invite_id=a.invite_id or b.referrer_id=a.invite_id)) amount,
            (select count(1) from mall_member e
                      inner join mall_order_info b on e.id=b.member_id and b.status in (2, 3, 4)
src/main/resources/mapper/modules/MallMoneyFlowMapper.xml
@@ -105,7 +105,8 @@
    </update>
    <select id="selectProfitByDateAndMemberId" resultType="java.math.BigDecimal">
        select ifnull(sum(a.amount),0) from mall_money_flow a where member_id=#{memberId} and type in (1,2) and date_format(a.CREATED_TIME, '%Y-%m-%d') = date_format(now(), '%Y-%m-%d');
        select ifnull(sum(a.amount),0) from mall_money_flow a
        where member_id=#{memberId} and flow_type=4 and date_format(a.CREATED_TIME, '%Y-%m-%d') = date_format(now(), '%Y-%m-%d') and amount > 0
    </select>
    <select id="selectCommissionIncome" resultType="java.math.BigDecimal">