如何在mybatis中使用自定义函数作为查询表。我希望有一个朋友可以解决这个问题。谢谢!
select
t1.ELECTRONICSNAME,
t1.organName,
decode(t1.sex,0,'男','女') sex,
nvl(t1.criminal,' ') CRIMINAL,
t1.telephone,
t1.positionInfo,
t1.longitude,
t1.latitude
(
SELECT LISTAGG(B.BORDERNAME,',') WITHIN GROUP(ORDER BY B.BORDERNAME) BORDERNAME
FROM t_Sqjz_Bordersetting_Other BS
LEFT JOIN (SELECT BORDERNAME, BORDERID
FROM t_Sqjz_Border_Other T
GROUP BY BORDERNAME, BORDERID) B
ON BS.BORDERID = B.BORDERID
WHERE BS.Relationid = T1.ELECTRONICSID
and BS.Type = 0
) BORDERNAME,
NVL(t1.POSITIONID,-1) ID,
case when t1.POSITIONINFO is null then 1 else 0 end positioninfo_status,
sr.simcode,
t1.tableName
from
table (SELECT_NEWEST_P4DESK(#{organId},null,null,null,
#{state},null,#{locateType},0,0,#{endRecord})
) t1
left join t_SQJZ_RYMC sr
on t1.electronicsId=sr.id