|
@@ -97,11 +97,11 @@ namespace TEAMModelOS.Controllers
|
|
|
public static async Task<ResponseData<dynamic>> GetLessonRecordCount(AzureCosmosFactory _azureCosmos, IConfiguration _configuration, AzureServiceBusFactory _serviceBus,
|
|
|
Option _option, DingDing _dingDing, string id, string school, JsonElement json)
|
|
|
{
|
|
|
- json.TryGetProperty("roles", out JsonElement _roles);
|
|
|
- List<string> roles = new List<string>();
|
|
|
- if (_roles.ValueKind.Equals(JsonValueKind.Array))
|
|
|
+ json.TryGetProperty("identity", out JsonElement _identity);
|
|
|
+ string identity = "";
|
|
|
+ if (!string.IsNullOrWhiteSpace($"{_identity}"))
|
|
|
{
|
|
|
- roles = _roles.ToJsonString().ToObject<List<string>>();
|
|
|
+ identity = $"{_identity}";
|
|
|
}
|
|
|
json.TryGetProperty("managePage", out JsonElement _managePage);
|
|
|
bool managePage = false;
|
|
@@ -147,7 +147,7 @@ namespace TEAMModelOS.Controllers
|
|
|
int count = 0;
|
|
|
|
|
|
string sqlShow = "";
|
|
|
- if (roles.Count == 1 && roles.Contains("student"))
|
|
|
+ if (identity.Equals("student"))
|
|
|
{
|
|
|
string autoSql = "";
|
|
|
if (autoTch.Any())
|
|
@@ -235,11 +235,11 @@ namespace TEAMModelOS.Controllers
|
|
|
Option _option, DingDing _dingDing, string id, string school, JsonElement json)
|
|
|
{
|
|
|
|
|
|
- json.TryGetProperty("roles", out JsonElement _roles);
|
|
|
- List<string> roles = new List<string>();
|
|
|
- if (_roles.ValueKind.Equals(JsonValueKind.Array))
|
|
|
+ json.TryGetProperty("identity", out JsonElement _identity);
|
|
|
+ string identity = "";
|
|
|
+ if (!string.IsNullOrWhiteSpace($"{_identity}"))
|
|
|
{
|
|
|
- roles = _roles.ToJsonString().ToObject<List<string>>();
|
|
|
+ identity =$"{_identity}";
|
|
|
}
|
|
|
|
|
|
json.TryGetProperty("managePage", out JsonElement _managePage);
|
|
@@ -313,7 +313,7 @@ namespace TEAMModelOS.Controllers
|
|
|
try
|
|
|
{
|
|
|
string sqlShow = "";
|
|
|
- if (roles.Count == 1 && roles.Contains("student"))
|
|
|
+ if (identity.Equals("student"))
|
|
|
{
|
|
|
string autoSql = "";
|
|
|
if (autoTch.Any())
|