|
@@ -19,6 +19,7 @@ using TEAMModelOS.SDK.DI;
|
|
using TEAMModelOS.SDK.Extension;
|
|
using TEAMModelOS.SDK.Extension;
|
|
using TEAMModelOS.SDK.Models.Cosmos.BI;
|
|
using TEAMModelOS.SDK.Models.Cosmos.BI;
|
|
using TEAMModelOS.SDK.Models.Service;
|
|
using TEAMModelOS.SDK.Models.Service;
|
|
|
|
+using TEAMModelOS.SDK.Models.Table;
|
|
|
|
|
|
namespace TEAMModelBI.Controllers.BINormal
|
|
namespace TEAMModelBI.Controllers.BINormal
|
|
{
|
|
{
|
|
@@ -47,46 +48,51 @@ namespace TEAMModelBI.Controllers.BINormal
|
|
/// <param name="jsonElenent"></param>
|
|
/// <param name="jsonElenent"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[ProducesDefaultResponseType]
|
|
[ProducesDefaultResponseType]
|
|
- [AuthToken(Roles = "admin,rdc,assist,sales,company")]
|
|
|
|
|
|
+ //[AuthToken(Roles = "admin,rdc,assist,sales,company")]
|
|
[HttpPost("get-info")]
|
|
[HttpPost("get-info")]
|
|
public async Task<IActionResult> GetInfo(JsonElement jsonElenent)
|
|
public async Task<IActionResult> GetInfo(JsonElement jsonElenent)
|
|
{
|
|
{
|
|
- jsonElenent.TryGetProperty("eid", out JsonElement eid);
|
|
|
|
- jsonElenent.TryGetProperty("site", out JsonElement site);
|
|
|
|
- var cosmosClient = _azureCosmos.GetCosmosClient();
|
|
|
|
- if ($"{site}".Equals(BIConst.GlobalSite))
|
|
|
|
- cosmosClient = _azureCosmos.GetCosmosClient(name: BIConst.GlobalSite);
|
|
|
|
- List<ReadCompany> companys = new();
|
|
|
|
- StringBuilder sqlTxt = new("select c.id,c.pk,c.code,c.name,c.credit,c.picture,c.emall,c.mobile,c.password from c");
|
|
|
|
- if (!string.IsNullOrEmpty($"{eid}"))
|
|
|
|
|
|
+ try
|
|
{
|
|
{
|
|
- sqlTxt.Append($" where c.id='{eid}'");
|
|
|
|
- }
|
|
|
|
|
|
+ jsonElenent.TryGetProperty("id", out JsonElement id);
|
|
|
|
+ jsonElenent.TryGetProperty("site", out JsonElement site);
|
|
|
|
+ var cosmosClient = _azureCosmos.GetCosmosClient();
|
|
|
|
+ var tableClient = _azureStorage.GetCloudTableClient();
|
|
|
|
+ if ($"{site}".Equals(BIConst.GlobalSite))
|
|
|
|
+ {
|
|
|
|
+ cosmosClient = _azureCosmos.GetCosmosClient(name: BIConst.GlobalSite);
|
|
|
|
+ tableClient = _azureStorage.GetCloudTableClient(BIConst.GlobalSite);
|
|
|
|
+ }
|
|
|
|
|
|
- await foreach (var item in cosmosClient.GetContainer("TEAMModelOS", "Normal").GetItemQueryStreamIterator(queryText: sqlTxt.ToString(), requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("Company") }))
|
|
|
|
- {
|
|
|
|
- using var json = await JsonDocument.ParseAsync(item.ContentStream);
|
|
|
|
- if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetUInt16() > 0)
|
|
|
|
|
|
+ var table = tableClient.GetTableReference("IESOpenApi");
|
|
|
|
+ Dictionary<string, object> keyValue = new Dictionary<string, object>() { { "PartitionKey", "Company" } };
|
|
|
|
+ if (!string.IsNullOrEmpty($"{id}"))
|
|
{
|
|
{
|
|
- foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
|
|
|
|
- {
|
|
|
|
- ReadCompany readCompany = new()
|
|
|
|
- {
|
|
|
|
- id= obj.GetProperty("id").GetString(),
|
|
|
|
- pk = obj.GetProperty("pk").GetString(),
|
|
|
|
- code = obj.GetProperty("code").GetString(),
|
|
|
|
- name = obj.GetProperty("name").GetString(),
|
|
|
|
- credit = obj.GetProperty("credit").GetString(),
|
|
|
|
- picture = obj.GetProperty("picture").GetString(),
|
|
|
|
- emall = obj.GetProperty("emall").GetString(),
|
|
|
|
- mobile = obj.GetProperty("mobile").GetString(),
|
|
|
|
- };
|
|
|
|
- companys.Add(readCompany);
|
|
|
|
- }
|
|
|
|
|
|
+ keyValue.Add("RowKey", $"{id}");
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
|
|
- return Ok(new { state = 200, companys });
|
|
|
|
|
|
+ List<CompanyTable> companys = table.FindListByDictSync<CompanyTable>(keyValue);
|
|
|
|
+
|
|
|
|
+ //cosmosDB数据库
|
|
|
|
+ //List<ReadCompany> companys = new();
|
|
|
|
+ //StringBuilder sqlTxt = new("select c.id,c.pk,c.code,c.name,c.credit,c.picture,c.jti,c.secretKey,c.emall,c.mobile,c.password,c.webhookDomain,c.salt,c.createTime from c");
|
|
|
|
+ //if (!string.IsNullOrEmpty($"{id}"))
|
|
|
|
+ //{
|
|
|
|
+ // sqlTxt.Append($" where c.id='{id}'");
|
|
|
|
+ //}
|
|
|
|
+ //await foreach (var item in cosmosClient.GetContainer("TEAMModelOS", "Normal").GetItemQueryIterator<ReadCompany>(queryText: sqlTxt.ToString(), requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("Company") }))
|
|
|
|
+ //{
|
|
|
|
+ // companys.Add(item);
|
|
|
|
+ //}
|
|
|
|
+
|
|
|
|
+ return Ok(new { state = 200, companys });
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ catch (Exception e)
|
|
|
|
+ {
|
|
|
|
+ await _dingDing.SendBotMsg($"BI,{_option.Location} , /business/get-info \n {e.Message}\n{e.StackTrace} \n ", GroupNames.成都开发測試群組);
|
|
|
|
+ return BadRequest();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -94,14 +100,15 @@ namespace TEAMModelBI.Controllers.BINormal
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <param name="appCompany"></param>
|
|
/// <param name="appCompany"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- //[ProducesDefaultResponseType]
|
|
|
|
- //[AuthToken(Roles = "admin,rdc,assist,sales,company")]
|
|
|
|
|
|
+ [ProducesDefaultResponseType]
|
|
|
|
+ [AuthToken(Roles = "admin,rdc,assist,sales,company")]
|
|
[HttpPost("set-info")]
|
|
[HttpPost("set-info")]
|
|
- public async Task<IActionResult> SetCompany([FromBody]Company company, [FromHeader] string site)
|
|
|
|
|
|
+ public async Task<IActionResult> SetCompany([FromBody] CompanyTable company, [FromHeader] string site)
|
|
{
|
|
{
|
|
try
|
|
try
|
|
{
|
|
{
|
|
//var (loginId, loginName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
|
|
//var (loginId, loginName, pic, did, dname, dpic) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
|
|
|
|
+ var (tmdId, tmdName, pic, _, _, _) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
|
|
StringBuilder strMsg = new();
|
|
StringBuilder strMsg = new();
|
|
var cosmosClient = _azureCosmos.GetCosmosClient();
|
|
var cosmosClient = _azureCosmos.GetCosmosClient();
|
|
var tableClient = _azureStorage.GetCloudTableClient();
|
|
var tableClient = _azureStorage.GetCloudTableClient();
|
|
@@ -112,63 +119,230 @@ namespace TEAMModelBI.Controllers.BINormal
|
|
tableClient = _azureStorage.GetCloudTableClient(BIConst.GlobalSite);
|
|
tableClient = _azureStorage.GetCloudTableClient(BIConst.GlobalSite);
|
|
blobClient = _azureStorage.GetBlobContainerClient(containerName: "0-public", BIConst.GlobalSite);
|
|
blobClient = _azureStorage.GetBlobContainerClient(containerName: "0-public", BIConst.GlobalSite);
|
|
}
|
|
}
|
|
|
|
+ List<CompanyTable> companys = new();
|
|
|
|
+
|
|
|
|
+ var table = tableClient.GetTableReference("IESOpenApi");
|
|
|
|
+
|
|
string salt = Utils.CreatSaltString(8);
|
|
string salt = Utils.CreatSaltString(8);
|
|
string type = "";
|
|
string type = "";
|
|
- //新增企业信息
|
|
|
|
- if (string.IsNullOrEmpty(company.id))
|
|
|
|
|
|
+
|
|
|
|
+ if (string.IsNullOrEmpty(company.RowKey))
|
|
{
|
|
{
|
|
- company.id = Guid.NewGuid().ToString();
|
|
|
|
- company.code = "Company";
|
|
|
|
|
|
+ company.RowKey = Guid.NewGuid().ToString();
|
|
|
|
+ company.PartitionKey = "Company";
|
|
company.salt = salt;
|
|
company.salt = salt;
|
|
company.password = string.IsNullOrWhiteSpace(company.password) ? Utils.HashedPassword("123456", salt) : Utils.HashedPassword(company.password, salt);//Password,若梦没有则是默认密码:123456
|
|
company.password = string.IsNullOrWhiteSpace(company.password) ? Utils.HashedPassword("123456", salt) : Utils.HashedPassword(company.password, salt);//Password,若梦没有则是默认密码:123456
|
|
company.createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
|
|
company.createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
|
|
company.jti = Guid.NewGuid().ToString();
|
|
company.jti = Guid.NewGuid().ToString();
|
|
- company.secretKey = JwtAuth.CreateBusinessJwtKeyBI(_option.Location, _option.JwtSecretKey, company.id, company.jti);
|
|
|
|
- await cosmosClient.GetContainer("TEAMModelOS", "Normal").CreateItemAsync<Company>(company, new PartitionKey(company.code));
|
|
|
|
- strMsg.Append($"{company.name}【{company.id}】新增企业基础信息。");
|
|
|
|
- type = "company-add";
|
|
|
|
|
|
+ company.secretKey = JwtAuth.CreateBusinessJwtKeyBI(_option.Location, _option.JwtSecretKey, company.RowKey, company.jti);
|
|
|
|
+
|
|
|
|
+ company = await table.SaveOrUpdate<CompanyTable>(company);
|
|
|
|
+ companys.Add(company);
|
|
|
|
+ strMsg.Append($"{company.name}【{company.RowKey}】新增企业基础信息。");
|
|
|
|
+ type = "business-add";
|
|
}
|
|
}
|
|
- //修改企业信息
|
|
|
|
- else
|
|
|
|
|
|
+ else
|
|
{
|
|
{
|
|
- var respone = await cosmosClient.GetContainer("TEAMModelOS", "Normal").ReadItemStreamAsync(company.id, new PartitionKey($""));
|
|
|
|
- if (respone.Status == 200)
|
|
|
|
|
|
+ List<CompanyTable> companyTables = table.FindListByDictSync<CompanyTable>(new Dictionary<string, object> { { "PartitionKey", "Company" }, { "RowKey", $"{company.RowKey}" } });
|
|
|
|
+ if (companyTables.Count > 0)
|
|
{
|
|
{
|
|
- company.pk = "Company";
|
|
|
|
- company.code = "Company";
|
|
|
|
- company.ttl = -1;
|
|
|
|
|
|
+ foreach (var item in companyTables)
|
|
|
|
+ {
|
|
|
|
+ item.name = company.name;
|
|
|
|
+ item.credit = company.credit;
|
|
|
|
+ item.picture = company.picture;
|
|
|
|
+ //item.jti = company.jti;
|
|
|
|
+ //item.secretKey = company.secretKey;
|
|
|
|
+ item.emall = company.emall;
|
|
|
|
+ item.mobile = company.mobile;
|
|
|
|
+ //item.salt = company.salt;
|
|
|
|
+ //item.password = company.password;
|
|
|
|
+ item.webhookDomain = company.webhookDomain;
|
|
|
|
+ strMsg.Append($"{item.name}【{item.RowKey}】修改企业基础信息:{item}。");
|
|
|
|
+ companys.Add(item);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ companyTables = await table.SaveOrUpdateAll<CompanyTable>(companyTables);
|
|
|
|
+ type = "business-add";
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ company.RowKey = Guid.NewGuid().ToString();
|
|
|
|
+ company.PartitionKey = "Company";
|
|
company.salt = salt;
|
|
company.salt = salt;
|
|
company.password = string.IsNullOrWhiteSpace(company.password) ? Utils.HashedPassword("123456", salt) : Utils.HashedPassword(company.password, salt);//Password,若梦没有则是默认密码:123456
|
|
company.password = string.IsNullOrWhiteSpace(company.password) ? Utils.HashedPassword("123456", salt) : Utils.HashedPassword(company.password, salt);//Password,若梦没有则是默认密码:123456
|
|
|
|
+ company.createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
|
|
|
|
+ company.jti = Guid.NewGuid().ToString();
|
|
|
|
+ company.secretKey = JwtAuth.CreateBusinessJwtKeyBI(_option.Location, _option.JwtSecretKey, company.RowKey, company.jti);
|
|
|
|
|
|
- company = await cosmosClient.GetContainer("TEAMModelOS", "Normal").ReplaceItemAsync<Company>(company, company.id, new PartitionKey(company.code));
|
|
|
|
- strMsg.Append($"{company.name}【{company.id}】修改企业基础信息。");
|
|
|
|
- type = "company-update";
|
|
|
|
|
|
+ company = await table.SaveOrUpdate<CompanyTable>(company);
|
|
|
|
+ companys.Add(company);
|
|
|
|
+ strMsg.Append($"{company.name}【{company.RowKey}】新增企业基础信息:{company}。");
|
|
|
|
+ type = "business-add";
|
|
}
|
|
}
|
|
- else return Ok(new { state = 404, msg = "未找到该id相关的企业信息" });
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ ////存储在CosmosDB表
|
|
|
|
+ ////新增企业信息
|
|
|
|
+ //if (string.IsNullOrEmpty(company.id))
|
|
|
|
+ //{
|
|
|
|
+ // company.id = Guid.NewGuid().ToString();
|
|
|
|
+ // company.code = "Company";
|
|
|
|
+ // company.salt = salt;
|
|
|
|
+ // company.password = string.IsNullOrWhiteSpace(company.password) ? Utils.HashedPassword("123456", salt) : Utils.HashedPassword(company.password, salt);//Password,若梦没有则是默认密码:123456
|
|
|
|
+ // company.createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
|
|
|
|
+ // company.jti = Guid.NewGuid().ToString();
|
|
|
|
+ // company.secretKey = JwtAuth.CreateBusinessJwtKeyBI(_option.Location, _option.JwtSecretKey, company.id, company.jti);
|
|
|
|
+ // await cosmosClient.GetContainer("TEAMModelOS", "Normal").CreateItemAsync<Company>(company, new PartitionKey(company.code));
|
|
|
|
+ // strMsg.Append($"{company.name}【{company.id}】新增企业基础信息。");
|
|
|
|
+ // type = "business-add";
|
|
|
|
+ //}
|
|
|
|
+ ////修改企业信息
|
|
|
|
+ //else
|
|
|
|
+ //{
|
|
|
|
+ // var respone = await cosmosClient.GetContainer("TEAMModelOS", "Normal").ReadItemStreamAsync(company.id, new PartitionKey($""));
|
|
|
|
+ // if (respone.Status == 200)
|
|
|
|
+ // {
|
|
|
|
+ // company.pk = "Company";
|
|
|
|
+ // company.code = "Company";
|
|
|
|
+ // company.ttl = -1;
|
|
|
|
+ // company.salt = salt;
|
|
|
|
+ // company.password = string.IsNullOrWhiteSpace(company.password) ? Utils.HashedPassword("123456", salt) : Utils.HashedPassword(company.password, salt);//Password,若梦没有则是默认密码:123456
|
|
|
|
+
|
|
|
|
+ // company = await cosmosClient.GetContainer("TEAMModelOS", "Normal").ReplaceItemAsync<Company>(company, company.id, new PartitionKey(company.code));
|
|
|
|
+ // strMsg.Append($"{company.name}【{company.id}】修改企业基础信息。");
|
|
|
|
+ // type = "business-update";
|
|
|
|
+ // }
|
|
|
|
+ // else return Ok(new { state = 404, msg = "未找到该id相关的企业信息" });
|
|
|
|
+ //}
|
|
|
|
+
|
|
//保存操作记录
|
|
//保存操作记录
|
|
//await _azureStorage.SaveBILog(type, strMsg.ToString(), _dingDing, httpContext: HttpContext);
|
|
//await _azureStorage.SaveBILog(type, strMsg.ToString(), _dingDing, httpContext: HttpContext);
|
|
await AzureStorageBlobExtensions.SaveBILog(blobClient, tableClient, type, strMsg.ToString(), _dingDing, httpContext: HttpContext);
|
|
await AzureStorageBlobExtensions.SaveBILog(blobClient, tableClient, type, strMsg.ToString(), _dingDing, httpContext: HttpContext);
|
|
- return Ok(new { state = 200, company });
|
|
|
|
|
|
+ return Ok(new { state = 200, companys });
|
|
|
|
+ }
|
|
|
|
+ catch (Exception e)
|
|
|
|
+ {
|
|
|
|
+ await _dingDing.SendBotMsg($"BI,{_option.Location} , /business/set-info \n {e.Message}\n{e.StackTrace} \n ", GroupNames.成都开发測試群組);
|
|
|
|
+ return BadRequest();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 关联企业学校
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="jsonElement"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [ProducesDefaultResponseType]
|
|
|
|
+ [AuthToken(Roles = "admin,rdc,assist,sales,company")]
|
|
|
|
+ [HttpPost("set-companyschool")]
|
|
|
|
+ public async Task<IActionResult> SetCompanySc(JsonElement jsonElement)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ if (!jsonElement.TryGetProperty("schools", out JsonElement _schools)) return BadRequest();
|
|
|
|
+ if (!jsonElement.TryGetProperty("id", out JsonElement id)) return BadRequest();
|
|
|
|
+ var (tmdId, tmdName, pic, _, _, _) = HttpJwtAnalysis.JwtXAuthBI(HttpContext.GetXAuth("AuthToken"), _option);
|
|
|
|
+ jsonElement.TryGetProperty("site", out JsonElement site);
|
|
|
|
+ List<RecSc> recScs = _schools.ToObject<List<RecSc>>();
|
|
|
|
+ var tableClient = _azureStorage.GetCloudTableClient();
|
|
|
|
+ var blobClient = _azureStorage.GetBlobContainerClient(containerName: "0-public");
|
|
|
|
+ if ($"{site}".Equals(BIConst.GlobalSite))
|
|
|
|
+ {
|
|
|
|
+ tableClient = _azureStorage.GetCloudTableClient(BIConst.GlobalSite);
|
|
|
|
+ blobClient = _azureStorage.GetBlobContainerClient(containerName: "0-public", BIConst.GlobalSite);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ var table = tableClient.GetTableReference("IESOpenApi");
|
|
|
|
+
|
|
|
|
+ StringBuilder strMsg = new($"{tmdName}[{tmdId}]关联企业ID:{id},学校列表:");
|
|
|
|
+ List<BusinessSchool> busSchools = new();
|
|
|
|
+ foreach (var item in recScs)
|
|
|
|
+ {
|
|
|
|
+ BusinessSchool businessSchool = new() { PartitionKey = $"BusinessSchool-{id}", RowKey = $"{item.id}", name = $"{item.name}", picture = $"{item.picture}" };
|
|
|
|
+ busSchools.Add(businessSchool);
|
|
|
|
+ strMsg.Append($"{item.name}[{item.id}],");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ busSchools = await table.SaveOrUpdateAll<BusinessSchool>(busSchools);
|
|
|
|
+
|
|
|
|
+ //保存操作记录
|
|
|
|
+ //await _azureStorage.SaveBILog(type, strMsg.ToString(), _dingDing, httpContext: HttpContext);
|
|
|
|
+ await AzureStorageBlobExtensions.SaveBILog(blobClient, tableClient, "business-busschool", strMsg.ToString(), _dingDing, httpContext: HttpContext);
|
|
|
|
+ return Ok(new { state = 200, busSchools });
|
|
|
|
+ }
|
|
|
|
+ catch (Exception e)
|
|
|
|
+ {
|
|
|
|
+ await _dingDing.SendBotMsg($"BI,{_option.Location} , /business/set-companyschool \n {e.Message}\n{e.StackTrace} \n ", GroupNames.成都开发測試群組);
|
|
|
|
+ return BadRequest();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 依据企业ID查询关联的学校
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="jsonElement"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [ProducesDefaultResponseType]
|
|
|
|
+ [HttpPost("get-companyschool")]
|
|
|
|
+ public async Task<IActionResult> GetCompanySc(JsonElement jsonElement)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ if (!jsonElement.TryGetProperty("id", out JsonElement id)) return BadRequest();
|
|
|
|
+ jsonElement.TryGetProperty("site", out JsonElement site);
|
|
|
|
+
|
|
|
|
+ var tableClient = _azureStorage.GetCloudTableClient();
|
|
|
|
+ var blobClient = _azureStorage.GetBlobContainerClient(containerName: "0-public");
|
|
|
|
+ if ($"{site}".Equals(BIConst.GlobalSite))
|
|
|
|
+ {
|
|
|
|
+ tableClient = _azureStorage.GetCloudTableClient(BIConst.GlobalSite);
|
|
|
|
+ blobClient = _azureStorage.GetBlobContainerClient(containerName: "0-public", BIConst.GlobalSite);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ var table = tableClient.GetTableReference("IESOpenApi");
|
|
|
|
+ List<BusinessSchool> busSchools = await table.FindListByDict<BusinessSchool>(new Dictionary<string, object> { { "PartitionKey", $"BusinessSchool-{id}" } });
|
|
|
|
+
|
|
|
|
+ return Ok(new { state = 200, busSchools });
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
catch (Exception e)
|
|
{
|
|
{
|
|
- //await _dingDing.SendBotMsg($"BI,{_option.Location} , /company/set-info \n {e.Message}\n{e.StackTrace} \n ", GroupNames.成都开发測試群組);
|
|
|
|
|
|
+ await _dingDing.SendBotMsg($"BI,{_option.Location} , /business/get-companyschool \n {e.Message}\n{e.StackTrace} \n ", GroupNames.成都开发測試群組);
|
|
return BadRequest();
|
|
return BadRequest();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 关联时传入的学校信息
|
|
|
|
+ /// </summary>
|
|
|
|
+ public record RecSc
|
|
|
|
+ {
|
|
|
|
+ public string id { get; set; }
|
|
|
|
+ public string name { get; set; }
|
|
|
|
+ public string picture { get; set; }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 显示第三方信息
|
|
|
|
+ /// </summary>
|
|
public record ReadCompany
|
|
public record ReadCompany
|
|
{
|
|
{
|
|
public string id { get; set; }
|
|
public string id { get; set; }
|
|
- public string pk { get; set; }
|
|
|
|
public string code { get; set; }
|
|
public string code { get; set; }
|
|
public string name { get; set; }
|
|
public string name { get; set; }
|
|
public string credit { get; set; }
|
|
public string credit { get; set; }
|
|
public string picture { get; set; }
|
|
public string picture { get; set; }
|
|
|
|
+ public string jti { get; set; }
|
|
|
|
+ public string secretKey { get; set; }
|
|
public string emall { get; set; }
|
|
public string emall { get; set; }
|
|
public string mobile { get; set; }
|
|
public string mobile { get; set; }
|
|
|
|
+ public string salt { get; set; }
|
|
|
|
+ public string password { get; set; }
|
|
|
|
+ public string webhookDomain { get; set; }
|
|
|
|
+ public long createTime { get; set; }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|