mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +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)
|
||||
{
|
||||
SampleByUnit sampleBy = timeType;
|
||||
string sql = "SAMPLE BY "+timeNumber + sampleBy.ToString().Substring(0, 1).ToLower();
|
||||
this.QueryBuilder.SampleBy = sql;
|
||||
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();
|
||||
this.QueryBuilder.SampleBy = sql;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
public ISugarQueryable<T> SampleBy(int timeNumber, string timeType)
|
||||
|
Loading…
Reference in New Issue
Block a user