Pu Zhibing
2 天以前 949bf4798368d0fce115993427e03758d4b3c897
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml
@@ -158,10 +158,10 @@
        LEFT JOIN t_car_brand as cb on cb.id = ci.carBrandId
        LEFT JOIN t_company as cc on cc.id = ot.companyId
        LEFT JOIN t_server_carmodel as sc on sc.id = ot.serverCarModelId
        LEFT JOIN (SELECT ii.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 = 2 and ii.orderType = 1 GROUP BY ii.incomeId) as income1 on income1.incomeId = ot.id
        LEFT JOIN (SELECT * FROM t_income where userType = 2 and type = 2 and orderType = 1 GROUP BY incomeId) as income2 on income2.incomeId = ot.id
        LEFT JOIN (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 = 2 and ii.orderType = 1 GROUP BY ii.incomeId,cc.type) as income1 on income1.incomeId = ot.id
        LEFT JOIN (SELECT sum(money) as money,incomeId FROM t_income where userType = 2 and type = 2 and orderType = 1 GROUP BY incomeId) as income2 on income2.incomeId = ot.id
        where ot.id = #{orderId}
    </select>