添加信息通知,回复Notification请求的信息
This commit is contained in:
commit
797738c240
3 files changed
+147
-77
No files matched your search
@@ -185,8 +185,24 @@ namespace SunlightAggregationManager.UserClass
|
||||
data_.Add("QueryDetail", Newtonsoft.Json.JsonConvert.SerializeObject(resultTable));
|
||||
ret = JsonSerializer.Serialize(data_);
|
||||
}
|
||||
if (Command == "Notification")//回复Notification请求的信息
|
||||
{
|
||||
string s_ = deserialized.GetValue("StartTime").ToString()!;
|
||||
string e_ = deserialized.GetValue("EndTime").ToString()!;
|
||||
|
||||
return ret;
|
||||
var groups = MainWindowViewModel.Selet_Memory(MainWindowViewModel._userData,
|
||||
"Groups", "User='" + deserializedPerson?.User + "'");
|
||||
|
||||
var resultTable = MainWindowViewModel.SQLiteHelpers.ExecuteDataSet("" +
|
||||
"select * from Notification WHERE Groups='" + groups + "' and Time>'" +
|
||||
s_ + "' and Time<'" + e_ + "'", null)?.Tables[0] ?? new DataTable();
|
||||
|
||||
//格式化返回信息
|
||||
data_.Add("Notification", Newtonsoft.Json.JsonConvert.SerializeObject(resultTable));
|
||||
ret = JsonSerializer.Serialize(data_);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static List<Dictionary<string, object?>>? ToList(DataTable table)//datatable转list
|
||||
|
||||
Reference in new issue
Block a user