Commit d691a9a5 by guominglei

修改统计快照的方法

parent 52b5f3fe
...@@ -47,4 +47,13 @@ public interface FlowStatusSnapshootMapper { ...@@ -47,4 +47,13 @@ public interface FlowStatusSnapshootMapper {
* @return * @return
*/ */
List<FlowStatusSnapshoot> findByTime(@Param("startTime")Long startTime, @Param("endTime")Long endTime); List<FlowStatusSnapshoot> findByTime(@Param("startTime")Long startTime, @Param("endTime")Long endTime);
/**
* 根据天、小时、工作流id获取快照信息
* @param date
* @param hour
* @param flowId
* @return
*/
List<FlowStatusSnapshoot> findByDateAndHourAndFlowId(@Param("date")String date, @Param("hour")String hour, @Param("flowId")Integer flowId);
} }
\ No newline at end of file
...@@ -205,7 +205,12 @@ ...@@ -205,7 +205,12 @@
where snapshoot_time &gt;= #{startTime} where snapshoot_time &gt;= #{startTime}
and snapshoot_time &lt;= #{endTime} and snapshoot_time &lt;= #{endTime}
</select> </select>
<delete id="deleteOutSnapShoot" parameterType="java.lang.Long"> <select id="findByDateAndHourAndFlowId" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from flow_status_snapshoot
where `day` = #{date} and `hour` = #{hour} and flow_id = #{flowId}
</select>
<delete id="deleteOutSnapShoot" parameterType="java.lang.Long">
delete from flow_status_snapshoot delete from flow_status_snapshoot
where snapshoot_time = #{outTime,jdbcType=BIGINT} where snapshoot_time = #{outTime,jdbcType=BIGINT}
</delete> </delete>
......
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