xiaoyong931011
2022-09-05 b7d02900762cd81b6ddade1885a86492ecbc13dd
src/main/resources/mapper/modules/MallMoneyFlowMapper.xml
@@ -136,4 +136,20 @@
        select a.* from mall_money_flow a
        where a.order_no = #{rechargeNo} and a.member_id = #{memberId}
    </select>
    <select id="selectAmountByFlowtypeAndType" resultType="java.math.BigDecimal">
        select ifnull(sum(amount),0) from mall_money_flow
        <where>
            a.member_id = #{memberId}
            <if test="flowType!=null and flowType!=''">
                and  a.flow_type = #{flowType}
            </if>
            <if test="type!=null and type!=''">
                and  a.type = #{type}
            </if>
            <if test="status!=null and status!=''">
                and  a.status = #{status}
            </if>
        </where>
    </select>
</mapper>