Pu Zhibing
2024-12-27 7732cac9da04bb75e9f655b6fd7e068e14bfc1cc
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml
@@ -175,11 +175,11 @@
        LEFT JOIN t_server_carmodel as sc on sc.id = ot.serverCarModelId
        LEFT JOIN t_order_cancel as oc on ot.id = oc.orderId and oc.orderType = 1
        LEFT JOIN (
            SELECT ii.money,ii.incomeId,cc.type FROM t_income as ii
            SELECT sum(ii.money) as money,ii.incomeId,cc.type FROM t_income as ii
            LEFT JOIN t_company as cc on ii.objectId = cc.id
            where ii.userType = 1 and ii.type != 1 and ii.orderType = 1
            where ii.userType = 1 and ii.type != 1 and ii.orderType = 1 group by ii.incomeId, cc.type
        ) as income1 on income1.incomeId = ot.id
        LEFT JOIN (SELECT incomeId, money FROM t_income where userType = 2 and type != 1 and orderType = 1) as income2 on income2.incomeId = ot.id
        LEFT JOIN (SELECT incomeId, sum(money) as money FROM t_income where userType = 2 and type != 1 and orderType = 1 group by incomeId) as income2 on income2.incomeId = ot.id
        LEFT JOIN t_settlement_detail sd on ot.id = sd.orderId and sd.orderType = 1
        where ot.id = #{orderId}
    </select>