select lr.id,lr.name,lr.code,sd.name as 'type',lr.address_code,lr.port,lr.ajj_port,lr.username,lr.password,lr.deploy_location,lr.line_name,lr.station_name,lr.sub_system,
sd2.name as brandName,
CASE lr.byx2
WHEN 0 THEN '离线'
WHEN 1 THEN '在线'
ELSE lr.byx2 END AS statusName
select lr.id,lr.name,lr.code,sd.name as 'type',lr.address_code,lr.port,lr.username,lr.password,lr.deploy_location,lr.line_name,lr.station_name
sd2.name as brandName
from li_resource lr
left join sys_dictionary sd on lr.`type` = sd.id and lr.station_id = sd.station_id
left join sys_dictionary sd2 on lr.brand = sd2.id and lr.station_id = sd2.station_id
SELECT u.*,sd.name AS jobName ,sn.name AS nationName
SELECT u.*,sd.name AS jobName ,sn.name AS nationName,
(SELECT GROUP_CONCAT(sr.role_name) from sys_role sr where sr.role_id in (select sur.role_id from sys_user_role sur where sur.user_id = u.user_id)) AS roleNames
FROM sys_user u
LEFT JOIN sys_dictionary sd ON u.job = sd.id AND sd.deleted = 0 AND sd.station_id = u.station_id