lixiaojun
2024-05-08 920f3164474befe4721a4365e19638ff2e2aabda
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
namespace Yw.DAL
{
    /// <summary>
    /// 运行实时记录
    /// </summary>
    public interface IRunRealRecord
    {
 
        #region 常规获取
 
        /// <summary>
        /// 获取最近几条列表
        /// </summary>
        List<Entity.RunRealRecord> GetLastList(DateTime? StartTime, DateTime? EndTime, int Number = 1, bool? Run = null);
 
        /// <summary>
        /// 获取某日的最近几条数据
        /// </summary>
        List<Entity.RunRealRecord> GetLastListByDay(DateTime Day, int Number = 1, bool? Run = null);
 
        /// <summary>
        /// 获取日期区间的最近几条数据
        /// </summary>
        List<Entity.RunRealRecord> GetLastListByDayRange(DateTime StartDay, DateTime EndDay, int Number = 1, bool? Run = null);
 
        /// <summary>
        /// 获取时间区间的最近几条数据
        /// </summary>
        List<Entity.RunRealRecord> GetLastListByTimeRange(DateTime StartTime, DateTime EndTime, int Number = 1, bool? Run = null);
 
        /// <summary>
        /// 获取
        /// </summary>
        List<Entity.RunRealRecord> Get(DateTime? StartTime, DateTime? EndTime, bool? Run = null);
 
        /// <summary>
        /// 获取某日的数据
        /// </summary>
        List<Entity.RunRealRecord> GetByDay(DateTime Day, bool? Run = null);
 
        /// <summary>
        /// 获取日期区间内的数据
        /// </summary>
        List<Entity.RunRealRecord> GetByDayRange(DateTime StartDay, DateTime EndDay, bool? Run = null);
 
        /// <summary>
        /// 获取时间区间的数据
        /// </summary>
        List<Entity.RunRealRecord> GetByTimeRange(DateTime StartTime, DateTime EndTime, bool? Run = null);
 
        /// <summary>
        /// 获取分页列表 
        /// </summary>
        List<Entity.RunRealRecord> GetPageList(DateTime? StartTime, DateTime? EndTime, bool? Run, int PageIndex, int PageSize, ref int Total);
 
        #endregion
 
        #region 通过 ObjectType 和 ObjectID 获取
 
        /// <summary>
        /// 通过 ObjectType 和 ObjectID 获取最近几条记录
        /// </summary>
        List<Entity.RunRealRecord> GetLastListByObjectTypeAndObjectID(string ObjectType, long ObjectID, int Number = 1, bool? Run = null);
 
        /// <summary>
        /// 通过 ObjectType 和 ObjectID 获取
        /// </summary>
        List<Entity.RunRealRecord> GetByObjectTypeAndObjectID(string ObjectType, long ObjectID, DateTime? StartTime, DateTime? EndTime, bool? Run = null);
 
        /// <summary>
        /// 通过 ObjectType 和 ObjectID 获取 (限制数量)
        /// </summary>
        List<Entity.RunRealRecord> GetLimitByObjectTypeAndObjectID(string ObjectType, long ObjectID, DateTime? StartTime, DateTime? EndTime, int limit, bool? Run = null);
 
        /// <summary>
        /// 通过 ObjectType 和 ObjectID 获取某日的数据
        /// </summary>
        List<Entity.RunRealRecord> GetByObjectTypeAndObjectIDOfDay(string ObjectType, long ObjectID, DateTime Day, bool? Run = null);
 
        /// <summary>
        /// 通过 ObjectType 和 ObjectID 获取某日的数据 (限制数量)
        /// </summary>
        List<Entity.RunRealRecord> GetLimitByObjectTypeAndObjectIDOfDay(string ObjectType, long ObjectID, DateTime Day, int limit, bool? Run = null);
 
        /// <summary>
        /// 通过 ObjectType 和 ObjectID 获取日期区间内的数据
        /// </summary>
        List<Entity.RunRealRecord> GetByObjectTypeAndObjectIDOfDayRange(string ObjectType, long ObjectID, DateTime StartDay, DateTime EndDay, bool? Run = null);
 
        /// <summary>
        /// 通过 ObjectType 和 ObjectID 获取日期区间内的数据 (限制数量)
        /// </summary>
        List<Entity.RunRealRecord> GetLimitByObjectTypeAndObjectIDOfDayRange(string ObjectType, long ObjectID, DateTime StartDay, DateTime EndDay, int limit, bool? Run = null);
 
        /// <summary>
        /// 通过 ObjectType 和 ObjectID 获取时间区间内的数据
        /// </summary>
        List<Entity.RunRealRecord> GetByObjectTypeAndObjectIDOfTimeRange(string ObjectType, long ObjectID, DateTime StartTime, DateTime EndTime, bool? Run = null);
 
        /// <summary>
        /// 通过 ObjectType 和 ObjectID 获取时间区间内的数据(限制数量)
        /// </summary>
        List<Entity.RunRealRecord> GetLimitByObjectTypeAndObjectIDOfTimeRange(string ObjectType, long ObjectID, DateTime StartTime, DateTime EndTime, int limit, bool? Run = null);
 
        /// <summary>
        /// 通过 ObjectType 和 ObjectID 获取分页列表
        /// </summary>
        List<Entity.RunRealRecord> GetPageListByObjectTypeAndObjectID(string ObjectType, long ObjectID, DateTime? StartTime, DateTime? EndTime, bool? Run, int PageIndex, int PageSize, ref int Total);
 
 
        #endregion
 
        #region InsertOrUpdate
 
        /// <summary>
        /// 插入
        /// </summary>
        bool InsertOrUpdate(Entity.RunRealRecord entity);
 
        /// <summary>
        /// 批量插入
        /// </summary>
        bool InsertOrUpdate(List<Entity.RunRealRecord> list);
 
 
        #endregion
 
 
 
 
    }
}