|
@@ -462,7 +462,7 @@ namespace TEAMModelBI.Controllers.DingDingStruc
|
|
|
{
|
|
|
if (!jsonElement.TryGetProperty("partitionKey", out JsonElement partitionKey)) return BadRequest();
|
|
|
jsonElement.TryGetProperty("userId", out JsonElement userId);
|
|
|
- if (!jsonElement.TryGetProperty("tmdId", out JsonElement tmdId)) return BadRequest();
|
|
|
+ jsonElement.TryGetProperty("tmdId", out JsonElement tmdId);
|
|
|
if (!jsonElement.TryGetProperty("permissions", out JsonElement _permissions)) return BadRequest();
|
|
|
if (!jsonElement.TryGetProperty("roles", out JsonElement _roles)) return BadRequest();
|
|
|
var (_tmdId, _tmdName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
|
|
@@ -474,11 +474,20 @@ namespace TEAMModelBI.Controllers.DingDingStruc
|
|
|
List<string> roles = new();//角色列表
|
|
|
List<string> permissions = new();//权限列表
|
|
|
StringBuilder stringBuilder = new($"{_tmdName}【{_tmdId}】醍摩豆账号");
|
|
|
- Dictionary<string, object> dic = new() { { "PartitionKey", $"{partitionKey}" }, { "tmdId", $"{tmdId}" } };
|
|
|
+ Dictionary<string, object> dic = new() { { "PartitionKey", $"{partitionKey}" } };
|
|
|
if (!string.IsNullOrEmpty($"{userId}"))
|
|
|
{
|
|
|
dic.Add("userId", $"{userId}");
|
|
|
}
|
|
|
+ if (!string.IsNullOrEmpty($"{tmdId}"))
|
|
|
+ {
|
|
|
+ dic.Add("tmdId", $"{tmdId}");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (string.IsNullOrEmpty($"{userId}") && string.IsNullOrEmpty($"{tmdId}"))
|
|
|
+ {
|
|
|
+ return BadRequest();
|
|
|
+ }
|
|
|
|
|
|
var tempUser = await table.FindListByDict<DingDingUserInfo>(dic);
|
|
|
|