xuhy
2023-04-13 35bb07ddedd5cd446d8859b851c21bdad29c3246
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TRevenueMapper.xml
@@ -127,9 +127,9 @@
            cw.type = 2 AND cw.businessType = #{type} AND cw.code = #{code}
    </select>
    <select id="getDataStatisticsIncomeOrCommission" resultType="com.stylefeng.guns.modular.system.controller.resp.PerformanceTableResp">
        SELECT date_format(r.createTime, '%Y-%m') AS monthTime,SUM(r.amount) AS amount,d.name AS userName
        SELECT date_format(r.createTime, '%Y-%m') AS monthTime,SUM(r.amount) AS amount,d.userName
        FROM t_revenue r
        LEFT JOIN t_driver d ON r.userId = d.id
        LEFT JOIN (SELECT id,name AS userName from t_driver) d ON r.userId = d.id
        LEFT JOIN t_order o ON r.orderId = o.id
        <where>
            <if test="agentId != null">
@@ -169,9 +169,9 @@
        ORDER BY amount DESC
    </select>
    <select id="getDataStatisticsIncomeOrCommissionByIds" resultType="com.stylefeng.guns.modular.system.controller.resp.PerformanceTableResp">
        SELECT date_format(r.createTime, '%Y-%m') AS monthTime,SUM(r.amount) AS amount,d.name AS userName
        SELECT date_format(r.createTime, '%Y-%m') AS monthTime,SUM(r.amount) AS amount,d.userName
        FROM t_revenue r
        LEFT JOIN t_driver d ON r.userId = d.id
        LEFT JOIN (SELECT id,name AS userName from t_driver) d ON r.userId = d.id
        LEFT JOIN t_order o ON r.orderId = o.id
        <where>
            <if test="ids != null and ids.size() > 0">