Pu Zhibing
2025-06-06 b1f2f102034b4433201225b67a9fc78c08e532f0
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCarMapper.xml
@@ -59,7 +59,7 @@
        LEFT JOIN (select * from t_car_brand where state = 1) as cb on cb.id = cc.carBrandId
        LEFT JOIN (select * from t_car_model where state = 1) as cm on cm.id = cc.carModelId
        LEFT JOIN (select * from t_company where type = 2 and flag != 3) as c1 on c1.id = cc.companyId
        LEFT JOIN (select * from t_company where type = 3 and flag != 3) as c2 on c2.id = cc.franchiseeId
        LEFT JOIN (select * from t_company where type = 3 and flag != 3) as c2 on c2.id = cc.companyId
        LEFT JOIN (
        SELECT
        GROUP_CONCAT(case when type = 1 then '专车'
@@ -99,10 +99,10 @@
                and o.franchiseeName  LIKE CONCAT('%',#{franchiseeName},'%')
            </if>
            <if test="roleType != null and roleType != '' and roleType == 2">
                and (o.companyId = #{nowUserId} or FIND_IN_SET(o.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{nowUserId} GROUP BY superiorId)))
                and (o.companyId = #{nowUserId} or FIND_IN_SET(o.companyId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{nowUserId} GROUP BY superiorId)))
            </if>
            <if test="roleType != null and roleType != '' and roleType == 3">
                and o.franchiseeId = #{nowUserId}
                and o.companyId = #{nowUserId}
            </if>
        </where>
        order by o.id desc
@@ -112,7 +112,7 @@
        LEFT JOIN (select * from t_car_brand where state = 1) as cb on cb.id = cc.carBrandId
        LEFT JOIN (select * from t_car_model where state = 1) as cm on cm.id = cc.carModelId
        LEFT JOIN (select * from t_company where type = 2 and flag != 3) as c1 on c1.id = cc.companyId
        LEFT JOIN (select * from t_company where type = 3 and flag != 3) as c2 on c2.id = cc.franchiseeId
        LEFT JOIN (select * from t_company where type = 3 and flag != 3) as c2 on c2.id = cc.companyId
        LEFT JOIN (
        SELECT
        GROUP_CONCAT(case when type = 1 then '专车'
@@ -154,10 +154,10 @@
                and o.franchiseeName  LIKE CONCAT('%',#{franchiseeName},'%')
            </if>
            <if test="roleType != null and roleType != '' and roleType == 2">
                and (o.companyId = #{nowUserId} or FIND_IN_SET(o.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{nowUserId} GROUP BY superiorId)))
                and (o.companyId = #{nowUserId} or FIND_IN_SET(o.companyId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{nowUserId} GROUP BY superiorId)))
            </if>
            <if test="roleType != null and roleType != '' and roleType == 3">
                and o.franchiseeId = #{nowUserId}
                and o.companyId = #{nowUserId}
            </if>
        </where>
        order by o.id desc
@@ -169,7 +169,7 @@
        LEFT JOIN (select * from t_car_brand where state = 1) as cb on cb.id = cc.carBrandId
        LEFT JOIN (select * from t_car_model where state = 1) as cm on cm.id = cc.carModelId
        LEFT JOIN (select * from t_company where type = 2 and flag != 3) as c1 on c1.id = cc.companyId
        LEFT JOIN (select * from t_company where type = 3 and flag != 3) as c2 on c2.id = cc.franchiseeId
        LEFT JOIN (select * from t_company where type = 3 and flag != 3) as c2 on c2.id = cc.companyId
        LEFT JOIN (
        SELECT
        GROUP_CONCAT(case when type = 1 then '专车'
@@ -179,10 +179,10 @@
        <where>
            o.state = 1
            <if test="roleType != null and roleType != '' and roleType == 2">
                and (o.companyId = #{nowUserId} or FIND_IN_SET(o.franchiseeId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{nowUserId} GROUP BY superiorId)))
                and (o.companyId = #{nowUserId} or FIND_IN_SET(o.companyId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{nowUserId} GROUP BY superiorId)))
            </if>
            <if test="roleType != null and roleType != '' and roleType == 3">
                and o.franchiseeId = #{nowUserId}
                and o.companyId = #{nowUserId}
            </if>
        </where>
        order by o.id desc