我sql 寫太差 所以end-1天 GetExceptionTable

This commit is contained in:
b110212000 2022-02-11 17:34:25 +08:00
parent d4e1e68552
commit e5fbd487f7

View File

@ -404,7 +404,7 @@ namespace SolarPower.Repository.Implement
post.StartTime = post.Range.Split('-')[0] + " 00:00:00";
post.EndTime = post.Range.Split('-')[1] + " 23:59:59";
start = Convert.ToDateTime(post.StartTime);
end = Convert.ToDateTime(post.EndTime);
end = Convert.ToDateTime(post.EndTime).AddDays(-1);
var startime = (Int64)(start.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
var endtime = (Int64)(end.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
sql += @$" AND `timestamp` BETWEEN {startime*1000} AND {endtime*1000}";