Pu Zhibing
2025-04-17 f4e12a183070e9fc1db174dfb7f1c9a59f7763a1
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TUserMapper.xml
@@ -46,6 +46,14 @@
        LEFT JOIN (select * from t_company where flag != 3) as ci on ci.id = ui.companyId
        LEFT JOIN (SELECT COUNT(id) as num,userId from t_order_taxi where FIND_IN_SET(state,'8,9') GROUP BY userId) as ot on ot.userId = ui.id
        LEFT JOIN (SELECT sum(money) as num,userId from t_pub_transaction_details where userType = 1 and type = 1 and state = 2 GROUP BY userId) as td on td.userId = ui.id
        LEFT JOIN t_invite inv1 on (ui.id = inv1.userId and inv1.userType = 1)
        left join t_user uu on (inv1.inviteUserId = uu.id)
        LEFT JOIN t_invite inv2 on (ui.id = inv2.userId and inv2.userType = 2)
        left join t_driver dd on (inv2.inviteUserId = dd.id)
        where 1 = 1
        <if test="inviteUser != null and inviteUser != ''">
            and (uu.phone  LIKE CONCAT('%',#{inviteUser},'%') or dd.phone  LIKE CONCAT('%',#{inviteUser},'%'))
        </if>
        ) as o
        <where>
            o.flag != 3