<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="vip.xiaonuo.money.mapper.MoneyCostMapper">

    <select id="getMoneyDetailMonth" resultType="vip.xiaonuo.money.param.DsBusSaleMoneyParam">
   SELECT ROUND(IFNULL(SUM(sale), 0)/10000, 2)  saleMoney ,  ROUND(IFNULL(SUM(manage), 0)/10000, 2)   guanLiMoney , ROUND(IFNULL(SUM(finance), 0)/10000, 2)  caiWuMoney ,
   DATE_FORMAT(create_time, '%Y-%m') AS ymonth
        FROM `money_cost`
           ${ew.customSqlSegment}

    </select>


    <select id="getMoneyDetailYear" resultType="vip.xiaonuo.money.param.DsBusSaleMoneyParam">
   SELECT ROUND(IFNULL(SUM(sale), 0)/10000, 2)  saleMoney ,  ROUND(IFNULL(SUM(manage), 0)/10000, 2)   guanLiMoney , ROUND(IFNULL(SUM(finance), 0)/10000, 2)  caiWuMoney ,
   DATE_FORMAT(create_time, '%Y') AS ymonth
        FROM `money_cost`
           ${ew.customSqlSegment}


    </select>
</mapper>
