xiaoyong931011
2022-08-22 f196d0ec40f153b4d62b757f910f5672f1aec904
src/main/resources/mapper/modules/MallOrderInfoMapper.xml
@@ -288,4 +288,13 @@
        select IFNULL(sum(IFNULL(amount,0)),0) from mall_order_info
        where pay_result = #{payResult} and date_format(pay_time, '%Y-%m-%d') = date_format(#{date}, '%Y-%m-%d')
    </select>
    <select id="selectSumAmountByPayMethodAndSomeStatue" resultType="java.math.BigDecimal">
        select IFNULL(sum(IFNULL(amount,0)),0) from mall_order_info
        where pay_method = #{payMethod}
          and status in
        <foreach collection="statues" separator="," close=")" open="(" item="item">
            #{item}
        </foreach>
    </select>
</mapper>