Commit 97861203 authored by hanbing's avatar hanbing

[update] 优化干线评价接口性能

parent a1f2138e
......@@ -79,8 +79,6 @@ public class EvaluateServiceImpl implements EvaluateService {
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
Date nowDate = calendar.getTime();
// todo 固定当前时间为 2023-05-21 19:00:00
nowDate = DateUtil.parse("2023-05-21 19:00:00");
// 向前推n分钟作为结束时间
int leftMinute = DateUtil.minute(nowDate) % 5;
......
......@@ -24,4 +24,6 @@ public interface BaseCrossDirInfoMapper {
List<String> selectLaneIds(String crossId, Integer dirCode);
Integer selectDirEmergencyCount(String crossId, List<String> laneIds, int startTimeStamp, int endTimeStamp);
List<BaseCrossDirInfoPO> selectByInOutType(Integer code);
}
......@@ -43,7 +43,7 @@
<when test="laneIds != null and laneIds.size() > 0">
(
SELECT COUNT(*)
FROM holo_roadnet_jinan.t_event_info
FROM holo_roadnet.t_event_info
WHERE type IN ('33', '34', '35', '6')
AND UNIX_TIMESTAMP(start_time) <![CDATA[ >= ]]> #{startTimeStamp}
AND UNIX_TIMESTAMP(start_time) <![CDATA[ <= ]]> #{endTimeStamp}
......@@ -60,5 +60,11 @@
</choose>
</select>
<select id="selectByInOutType" resultType="net.wanji.databus.dao.entity.BaseCrossDirInfoPO">
select <include refid="baseColumnList"></include>
from t_base_cross_dir_info
where in_out_type = #{code}
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment