|
@@ -2604,13 +2604,14 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
long authEnd = (jsonElement.TryGetProperty("authEnd", out JsonElement _authEnd)) ? _authEnd.GetInt64() : 0; //授權結束日期
|
|
|
string idType = (jsonElement.TryGetProperty("idType", out JsonElement _idType)) ? _idType.GetString() : "school"; //ID類型 school:學校 tmid:TMID
|
|
|
List<string> ids = (jsonElement.TryGetProperty("ids", out JsonElement _ids)) ? _ids.ToObject<List<string>>() : new List<string>(); //特定ID列表
|
|
|
+ string dataCenter = (_option.Location.Contains("China")) ? "China" : "Global";
|
|
|
//取得CS學校授權
|
|
|
DateTime dateNow = DateTime.UtcNow;
|
|
|
string prodCodeJsonStr = JsonConvert.SerializeObject(prodCode);
|
|
|
var clientCS = _azureCosmos.GetCosmosClient(name: "CoreServiceV2");
|
|
|
List<string> sqlWhereList = new List<string>();
|
|
|
-
|
|
|
//服務授權
|
|
|
+ sqlWhereList.Add($"c.saleClient.dataCenter = '{dataCenter}'");
|
|
|
if (idType.Equals("school")) sqlWhereList.Add("c.saleClient.schoolCode != null");
|
|
|
else if (idType.Equals("tmid")) sqlWhereList.Add("c.saleClient.tmid != null");
|
|
|
///產品列表
|
|
@@ -2707,6 +2708,7 @@ namespace TEAMModelBI.Controllers.BISchool
|
|
|
|
|
|
//軟體授權
|
|
|
sqlWhereList = new List<string>();
|
|
|
+ sqlWhereList.Add($"c.saleClient.dataCenter = '{dataCenter}'");
|
|
|
if (idType.Equals("school")) sqlWhereList.Add("c.saleClient.schoolCode != null");
|
|
|
else if (idType.Equals("tmid")) sqlWhereList.Add("c.saleClient.tmid != null");
|
|
|
///產品列表
|