|
@@ -682,26 +682,29 @@ namespace TEAMModelOS.Controllers.Learn
|
|
|
}
|
|
|
|
|
|
await StatisticsService.SendServiceBus( ($"{standard}", new List<string> { $"{one.id}" }, $"{school}", new List<string>() { StatisticsService.OfflineRecord },0) , _configuration, _serviceBus, client);
|
|
|
- string bizcode = "submitanswer";
|
|
|
- if (!string.IsNullOrWhiteSpace(homework.creatorId)) {
|
|
|
- Notification notification = new Notification
|
|
|
- {
|
|
|
- hubName = "hita",
|
|
|
- type = "msg",
|
|
|
- from = $"ies5:{_option.Location}:private",
|
|
|
- to = new List<string> { homework.creatorId },
|
|
|
- label = $"{bizcode}_homework",
|
|
|
- body = new { location = _option.Location, biz = bizcode, tmdid = one.id, tmdname = one.name, status = 1, time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() }.ToJsonString(),
|
|
|
- expires = DateTimeOffset.UtcNow.AddDays(7).ToUnixTimeSeconds()
|
|
|
- };
|
|
|
- var url = _configuration.GetValue<string>("HaBookAuth:CoreService:sendnotification");
|
|
|
- var clientID = _configuration.GetValue<string>("HaBookAuth:CoreService:clientID");
|
|
|
- var clientSecret = _configuration.GetValue<string>("HaBookAuth:CoreService:clientSecret");
|
|
|
- var location = _option.Location;
|
|
|
- var code = await _notificationService.SendNotification(clientID, clientSecret, location, url, notification);
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+ //string sql = $"select value(c) from c where c.workId='{_id}'";
|
|
|
+ //await foreach(var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS,Constant.Common).GetItemQueryIterator<Study>(queryText:sql,requestOptions:new QueryRequestOptions { PartitionKey= new PartitionKey($"Study-{homework.}")}))
|
|
|
+ //JJ 说 20223231139 暂不处理研修活动类型的作业
|
|
|
+ //string bizcode = "submitanswer";
|
|
|
+ //if (!string.IsNullOrWhiteSpace(homework.creatorId)) {
|
|
|
+ // Notification notification = new Notification
|
|
|
+ // {
|
|
|
+ // hubName = "hita",
|
|
|
+ // type = "msg",
|
|
|
+ // from = $"ies5:{_option.Location}:private",
|
|
|
+ // to = new List<string> { homework.creatorId },
|
|
|
+ // label = $"{bizcode}_homework",
|
|
|
+ // body = new { location = _option.Location, biz = bizcode, tmdid = one.id, tmdname = one.name, status = 1, time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() }.ToJsonString(),
|
|
|
+ // expires = DateTimeOffset.UtcNow.AddDays(7).ToUnixTimeSeconds()
|
|
|
+ // };
|
|
|
+ // var url = _configuration.GetValue<string>("HaBookAuth:CoreService:sendnotification");
|
|
|
+ // var clientID = _configuration.GetValue<string>("HaBookAuth:CoreService:clientID");
|
|
|
+ // var clientSecret = _configuration.GetValue<string>("HaBookAuth:CoreService:clientSecret");
|
|
|
+ // var location = _option.Location;
|
|
|
+ // var code = await _notificationService.SendNotification(clientID, clientSecret, location, url, notification);
|
|
|
+ //}
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -752,7 +755,7 @@ namespace TEAMModelOS.Controllers.Learn
|
|
|
from = $"ies5:{_option.Location}:private",
|
|
|
to = new List<string> { homework.creatorId },
|
|
|
label = $"{bizcode}_homework",
|
|
|
- body = new { location = _option.Location, biz = bizcode, tmdid = userid, tmdname = name, status = 1, time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() }.ToJsonString(),
|
|
|
+ body = new { location = _option.Location, biz = bizcode, tmdid = userid, tmdname = name,sid= homework.id ,sname = homework.name, status = 1, time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() }.ToJsonString(),
|
|
|
expires = DateTimeOffset.UtcNow.AddDays(7).ToUnixTimeSeconds()
|
|
|
};
|
|
|
var url = _configuration.GetValue<string>("HaBookAuth:CoreService:sendnotification");
|