Browse Source

信件查询查询SQL优化

master
21819 2 years ago
parent
commit
335c59acd1
  1. 1
      mailbox-lan/src/main/resources/mapper/WorkMapper.xml

1
mailbox-lan/src/main/resources/mapper/WorkMapper.xml

@ -49,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-- m.mail_category ,m.mail_level,m.three_dept_id,m.three_dept_name,m.flow_key,m.flow_before_name,m.mail_labels,m.flow_name,m.current_operator,
-- f.limited_time - ROUND(EXTRACT(EPOCH FROM (CURRENT_TIMESTAMP - m.flow_limited_last_handler_time))) flow_limited_remaining_time
-- from mail m
-- left join work w on m.id = w.mail_id
-- left join flow_node f on m.flow_key = f.key
SELECT
m.*,f.limited_time - ROUND(extract(EPOCH FROM (CURRENT_TIMESTAMP - m.flow_limited_last_handler_time))) AS flow_limited_remaining_time

Loading…
Cancel
Save