puzhibing
2024-03-12 032f7c07e272dae9a857ed76b480dc391dc4073f
cloud-server-management/src/main/resources/mapper/GateMapper.xml
@@ -3,14 +3,12 @@
<mapper namespace="com.dsh.course.mapper.GateMapper">
    <select id="listAll" resultType="java.util.Map">
        select t1.id as id,t1.name as name,t1.device as device,
        ifNull(CONCAT(t5.name,'-',t5.phone),'平台闸机') as operatorName,
        select t1.id as id,t1.name as name,t1.device as device,t2.type,t1.storeId,
        t2.name as storeName,t3.name as siteName
        from t_gate t1
        left join t_store t2 on t2.id = t1.storeId
        left join t_site t3  on t3.id = t1.siteId
        left join t_operator t4 on t4.id = t1.operatorId
        left join sys_user t5   on   t5.id = t4.userId
        where 1=1 and t1.isDelete = 0
        <if test="name != null and name!=''">
            and t1.name like CONCAT('%',#{name},'%')