Pu Zhibing
2025-06-06 b1f2f102034b4433201225b67a9fc78c08e532f0
DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverMapper.xml
@@ -173,7 +173,7 @@
        a.networkCarlssueImg as networkCarlssueImg,
        a.placeOfEmployment as placeOfEmployment,
        (select id from t_city where chineseName = a.placeOfPractice or englishName = a.placeOfPractice or frenchName = a.placeOfPractice)placeOfPracticeId,
        (select `name` from t_company where 1 = 1 and if(a.companyId is null or a.companyId = 0, id = 1, if(a.franchiseeId is null or a.franchiseeId = 0, id = a.companyId, id = a.franchiseeId))) as company,
        (select `name` from t_company where 1 = 1 and if(a.companyId is null or a.companyId = 0, id = 1, id = a.companyId)) as company,
        b.carLicensePlate as licensePlate,
        b.carColor as carColor,
        b.vehicleId,
@@ -218,10 +218,10 @@
        from t_driver where flag != 3 and authState = 2
        <choose>
            <when test="companyId == 1">
                and (companyId = 1 or companyId is null or companyId = 0) and (franchiseeId = 0 or franchiseeId is null)
                and (companyId = 1 or companyId is null or companyId = 0)
            </when>
            <otherwise>
                and companyId = #{companyId} or franchiseeId = #{companyId}
                and companyId = #{companyId}
            </otherwise>
        </choose>
    </select>
@@ -318,10 +318,10 @@
        <if test="null != companyId">
            <choose>
                <when test="companyId != 1">
                    and companyId = #{companyId} or franchiseeId = #{companyId}
                    and companyId = #{companyId}
                </when>
                <otherwise>
                    and companyId is null or companyId = 0 or companyId = 1 or franchiseeId is null or franchiseeId = 0
                    and companyId is null or companyId = 0 or companyId = 1
                </otherwise>
            </choose>