无关风月
2024-07-24 085d0e9e62e524b7cf0e7b7d8ad3b51a5a7c1e81
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TUserMapper.xml
@@ -87,16 +87,18 @@
    <select id="getUserDetailById" resultType="java.util.Map">
        SELECT DATE_FORMAT(ui.insertTime,'%Y-%m-%d %H:%i') as insertTimeStr,ci.`name` as companyName,
        case when ui.isAuth = 1 then '否' else '是' end as isAuthStr,
        IFNULL(0,0) as zcNum,
        IFNULL(op.num,0) as zcNum,
        IFNULL(ot.num,0) as czNum,
        IFNULL(0,0) as kcNum,
        IFNULL(0,0) as wlNum,
        IFNULL(ol.num,0) as wlNum,
        IFNULL(td.num,0) as consumptionNum,
        IFNULL(ui.balance,0) as balanceStr,
        ui.* from t_user as ui
        LEFT JOIN (select * from t_company where flag != 3) as ci on ci.id = ui.companyId
        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 (SELECT COUNT(id) as num,userId from t_order_private_car where FIND_IN_SET(state,'8,9') GROUP BY userId) as op on op.userId = ui.id
        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 COUNT(id) as num,userId from t_order_logistics where FIND_IN_SET(state,'9') GROUP BY userId) as ol on ol.userId = ui.id
        where ui.id = #{userId}
    </select>
@@ -124,7 +126,7 @@
            select
                concat('user_',id) as id,
                phone as phone,
                IFNULL(name,nickName) as name,
                IFNULL(CONCAT(firstName, lastName),nickName) as name,
                1 as uType,
                insertTime as insertTime
                from t_user
@@ -134,7 +136,7 @@
                select
                concat('driver_',id) as id,
                phone as phone,
                name as name,
                CONCAT(firstName, lastName) as name,
                2 as uType,
                insertTime as insertTime
                from