Commit 39104b710708ba8b58eb26ee646c409623b3b459

Authored by 娄高锋
1 parent 934e1fcb

调度历史消息,使用有索引的字段查询

src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
@@ -48,13 +48,13 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI @@ -48,13 +48,13 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI
48 48
49 @Query(value="select d.device_id,d.sender,d.txt_content,d.timestamp,d.line_code from " 49 @Query(value="select d.device_id,d.sender,d.txt_content,d.timestamp,d.line_code from "
50 + " bsth_v_directive_60 d where d.rq = ?1 and d.line_code = ?2 " 50 + " bsth_v_directive_60 d where d.rq = ?1 and d.line_code = ?2 "
51 - + " and d.device_id like %?4% ",nativeQuery=true) 51 + + " and d.device_id like %?3% ",nativeQuery=true)
52 List<Object[]> historyMessage(String rq, String line, String code); 52 List<Object[]> historyMessage(String rq, String line, String code);
53 53
54 //带指令类型字段 54 //带指令类型字段
55 @Query(value="select d.device_id,d.sender,d.txt_content,d.timestamp,d.line_code from " 55 @Query(value="select d.device_id,d.sender,d.txt_content,d.timestamp,d.line_code from "
56 + " bsth_v_directive_60 d where d.rq = ?1 and d.line_code = ?2 " 56 + " bsth_v_directive_60 d where d.rq = ?1 and d.line_code = ?2 "
57 - + " and d.device_id like %?4% and d.dispatch_instruct =?5 ",nativeQuery=true) 57 + + " and d.device_id like %?3% and d.dispatch_instruct =?4 ",nativeQuery=true)
58 List<Object[]> historyMessage(String rq, String line, String code, short dispatchInstruct); 58 List<Object[]> historyMessage(String rq, String line, String code, short dispatchInstruct);
59 59
60 @Query(value="SELECT r.xl_name,r.lp_name,r.cl_zbh,count(*) as cs " 60 @Query(value="SELECT r.xl_name,r.lp_name,r.cl_zbh,count(*) as cs "