<?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="com.xhpc.general.mapper.XhpcStatisticsExcelMapper">

    <select id="selectByDay" resultType="map">

        select date_format(create_time, '%Y-%m-%d') as time, sum(charging_degree) as chargingDegree,
        sum(charging_time) as chargingTime, sum(charging_number) as chargingNumber,
        sum(power_price) as powerPrice, sum(service_price) as servicePrice,
        sum(total_price) as totalPrice, sum(promotion_discount) as promotionDiscount,
        sum(act_power_price) as actPowerPrice, sum(act_service_price) as actServicePrice,
        sum(act_power_price + act_service_price) as actTotalPrice,
        sum(act_price) as actPrice, sum(internet_commission) as internetCommission,
        sum(internet_svc_commission) as internetSvcCommission, sum(platform_commission) as platformCommission,
        sum(platform_svc_commisssion) as platformSvcCommission, sum(operation_commission) as operationCommission,
        sum(operation_svc_commission) as operationSvcCommission
        from xhpc_statistics_station
        GROUP BY time;
    </select>

</mapper>
