完成历史查询代码
Signed-off-by: HaoziLeung <haozileung.cn@gmail.com>