SQL修正
This commit is contained in:
+9
-2
@@ -18,7 +18,14 @@
|
||||
wd.bind_user_id,
|
||||
LISTAGG(wds.wd_type, ',') WITHIN GROUP (ORDER BY wds.wd_type) AS wd_types,
|
||||
LISTAGG(wds.switch_flag, ',') WITHIN GROUP (ORDER BY wds.switch_flag) AS switch_flags,
|
||||
LISTAGG(NVL(TO_CHAR(wds.update_date, 'YYYY-MM-DD HH24:MI:SS'), '') || ',') WITHIN GROUP (ORDER BY wds.update_date) AS update_dates
|
||||
REPLACE(
|
||||
LISTAGG(
|
||||
NVL(TO_CHAR(wds.update_date, 'YYYY-MM-DD HH24:MI:SS'), '__EMPTY__'),
|
||||
','
|
||||
) WITHIN GROUP (ORDER BY wds.update_date NULLS LAST),
|
||||
'__EMPTY__',
|
||||
''
|
||||
) AS update_dates
|
||||
FROM
|
||||
QH_WAT_DEVICE wd
|
||||
LEFT JOIN
|
||||
@@ -53,7 +60,7 @@
|
||||
END,
|
||||
wd.bind_date, wd.bind_user_id
|
||||
ORDER BY
|
||||
wd.create_date DESC;
|
||||
wd.create_date DESC
|
||||
</select>
|
||||
|
||||
<select id="selectLatestByType" resultType="com.renkang.watch.entity.WatchData">
|
||||
|
||||
Reference in New Issue
Block a user