mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-16 21:19:34 +08:00
Synchronization code
This commit is contained in:
parent
63b75c29b4
commit
86cf98d8f8
@ -1235,8 +1235,16 @@ namespace SqlSugar
|
|||||||
public ISugarQueryable<T> SampleBy(int timeNumber, SampleByUnit timeType)
|
public ISugarQueryable<T> SampleBy(int timeNumber, SampleByUnit timeType)
|
||||||
{
|
{
|
||||||
SampleByUnit sampleBy = timeType;
|
SampleByUnit sampleBy = timeType;
|
||||||
|
if (timeType == SampleByUnit.Month)
|
||||||
|
{
|
||||||
|
string sql = "SAMPLE BY " + timeNumber + sampleBy.ToString().Substring(0, 1);
|
||||||
|
this.QueryBuilder.SampleBy = sql;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
string sql = "SAMPLE BY "+timeNumber + sampleBy.ToString().Substring(0, 1).ToLower();
|
string sql = "SAMPLE BY "+timeNumber + sampleBy.ToString().Substring(0, 1).ToLower();
|
||||||
this.QueryBuilder.SampleBy = sql;
|
this.QueryBuilder.SampleBy = sql;
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
public ISugarQueryable<T> SampleBy(int timeNumber, string timeType)
|
public ISugarQueryable<T> SampleBy(int timeNumber, string timeType)
|
||||||
|
Loading…
Reference in New Issue
Block a user