|
@@ -179,11 +179,11 @@ namespace TEAMModelOS.Controllers
|
|
|
}
|
|
|
}
|
|
|
int year = DateTimeOffset.UtcNow.Year;
|
|
|
- (int status, GroupList stuList, Member member) data = await GroupListService.CodeJoinList(client, _azureRedis, $"{_stuListNo}", id, type: 1, $"{school}", year, $"{name}", $"{picture}", $"{lang}", seatNo, $"{_courseId}");
|
|
|
+ (int status, GroupList stuList, Member member) data = await GroupListService.CodeJoinList(client, _azureRedis, $"{_stuListNo}", id, type: 1, $"{school}", year, $"{name}", $"{picture}", $"{lang}", seatNo, $"{_courseId}","hita");
|
|
|
//没有TmdUser时
|
|
|
if (data.status == 0)
|
|
|
{
|
|
|
- await GroupListService.UpsertList(data.stuList, _azureCosmos, _configuration, _serviceBus);
|
|
|
+ await GroupListService.UpsertList(data.stuList, _azureCosmos, _configuration, _serviceBus,_client: "hita");
|
|
|
|
|
|
List<string> ids = new List<string>();
|
|
|
if (data.stuList.scope.Equals("private") && !string.IsNullOrEmpty(data.stuList.creatorId))
|
|
@@ -263,11 +263,11 @@ namespace TEAMModelOS.Controllers
|
|
|
type = 1;
|
|
|
}
|
|
|
int seatNo =0;
|
|
|
- (int status, GroupList stuList, Member member) data = await GroupListService.CodeJoinList(client, _azureRedis, $"{_stuListNo}", userid, type, school, year, _name, _picture, head_lang,seatNo);
|
|
|
+ (int status, GroupList stuList, Member member) data = await GroupListService.CodeJoinList(client, _azureRedis, $"{_stuListNo}", userid, type, school, year, _name, _picture, head_lang,seatNo,_client:"web");
|
|
|
if (data.status == 0)
|
|
|
{
|
|
|
|
|
|
- await GroupListService.UpsertList(data.stuList, _azureCosmos, _configuration, _serviceBus);
|
|
|
+ await GroupListService.UpsertList(data.stuList, _azureCosmos, _configuration, _serviceBus, "web");
|
|
|
|
|
|
List<string> ids = new List<string>();
|
|
|
if (data.stuList.scope.Equals("private") && !string.IsNullOrEmpty(data.stuList.creatorId))
|
|
@@ -1393,7 +1393,7 @@ namespace TEAMModelOS.Controllers
|
|
|
{
|
|
|
foreach (var t in takes)
|
|
|
{
|
|
|
- GroupListService.JoinList(list, t.userid, t.type, t.school, t.year,t.seatNo);
|
|
|
+ await GroupListService.JoinList(_azureRedis, list, t.userid, t.type, t.school, t.year,t.seatNo, _client: "web");
|
|
|
string stuKey = !string.IsNullOrWhiteSpace(school) ? $"GroupList:StudentWaitinglist:{school}_{t.userid}" : $"GroupList:StudentWaitinglist:{t.userid}";
|
|
|
string stuFiled = $"{list.scope}:{list.id}";
|
|
|
var data = await _azureRedis.GetRedisClient(8).HashGetAsync(stuKey, stuFiled);
|
|
@@ -1455,31 +1455,31 @@ namespace TEAMModelOS.Controllers
|
|
|
case bool when $"{list.type}".Equals("teach", StringComparison.OrdinalIgnoreCase):
|
|
|
list.type = "teach";
|
|
|
list = await GroupListService.CheckListNo(list, _azureCosmos, _dingDing, _option);
|
|
|
- list = await GroupListService.UpsertList(list, _azureCosmos, _configuration, _serviceBus);
|
|
|
+ list = await GroupListService.UpsertList(list, _azureCosmos, _configuration, _serviceBus, "web");
|
|
|
break;
|
|
|
//教研组名单,只有加入学校的老师名单 成员账号类型是醍摩豆ID,保存在学校表,分区键为GroupList-hbcn
|
|
|
case bool when $"{list.type}".Equals("research", StringComparison.OrdinalIgnoreCase):
|
|
|
list.type = "research";
|
|
|
list.scope = "school";
|
|
|
- list = await GroupListService.UpsertList(list, _azureCosmos, _configuration, _serviceBus);
|
|
|
+ list = await GroupListService.UpsertList(list, _azureCosmos, _configuration, _serviceBus, "web");
|
|
|
break;
|
|
|
//个人好友名单,成员账号类型可以是学校学生账号和醍摩豆ID,分区键为GroupList
|
|
|
case bool when $"{list.type}".Equals("friend", StringComparison.OrdinalIgnoreCase):
|
|
|
list.type = "friend";
|
|
|
list.scope = "private";
|
|
|
- list = await GroupListService.UpsertList(list, _azureCosmos, _configuration, _serviceBus);
|
|
|
+ list = await GroupListService.UpsertList(list, _azureCosmos, _configuration, _serviceBus, "web");
|
|
|
break;
|
|
|
//社交群组类型(包含学校交流群组,个人交流群组),成员账号类型可以是学校学生账号和醍摩豆ID,,分区键为GroupList-hbcn
|
|
|
case bool when $"{list.type}".Equals("group", StringComparison.OrdinalIgnoreCase):
|
|
|
list.type = "group";
|
|
|
list = await GroupListService.CheckListNo(list, _azureCosmos, _dingDing, _option);
|
|
|
- list = await GroupListService.UpsertList(list, _azureCosmos, _configuration, _serviceBus);
|
|
|
+ list = await GroupListService.UpsertList(list, _azureCosmos, _configuration, _serviceBus , "web");
|
|
|
break;
|
|
|
//研修类型成员账号类型可以是学校学生账号和醍摩豆ID,,分区键为GroupList-hbcn
|
|
|
case bool when $"{list.type}".Equals("yxtrain", StringComparison.OrdinalIgnoreCase):
|
|
|
list.type = "yxtrain";
|
|
|
list.scope = "school";
|
|
|
- list = await GroupListService.UpsertList(list, _azureCosmos, _configuration, _serviceBus);
|
|
|
+ list = await GroupListService.UpsertList(list, _azureCosmos, _configuration, _serviceBus, "web");
|
|
|
break;
|
|
|
default:
|
|
|
return Ok(new { error = 400, msg = "参数错误!" });
|
|
@@ -1521,7 +1521,7 @@ namespace TEAMModelOS.Controllers
|
|
|
}
|
|
|
try
|
|
|
{
|
|
|
- await GroupListService.DeleteGrouplistEvent($"{id}", datacode, tbname, client, _configuration, _serviceBus);
|
|
|
+ await GroupListService.DeleteGrouplistEvent($"{id}", datacode, tbname, client, _configuration, _serviceBus, "web");
|
|
|
}
|
|
|
catch (Exception ex) { }
|
|
|
return Ok(new { id });
|
|
@@ -1686,7 +1686,7 @@ namespace TEAMModelOS.Controllers
|
|
|
var mb = groupList.members.Find(x => x.type==value.type && x.id.Equals(value.userid));
|
|
|
if (mb== null)
|
|
|
{
|
|
|
- var joindata = GroupListService.JoinList(groupList, value.userid, value.type, value.school, value.year);
|
|
|
+ var joindata =await GroupListService.JoinList( _azureRedis,groupList, value.userid, value.type, value.school, value.year, _client: "hita");
|
|
|
if (joindata.status==0) {
|
|
|
add=true;
|
|
|
}
|
|
@@ -1715,7 +1715,7 @@ namespace TEAMModelOS.Controllers
|
|
|
}
|
|
|
if (add)
|
|
|
{
|
|
|
- await GroupListService.UpsertList(groupList, _azureCosmos, _configuration, _serviceBus);
|
|
|
+ await GroupListService.UpsertList(groupList, _azureCosmos, _configuration, _serviceBus, _client: "hita");
|
|
|
}
|
|
|
}
|
|
|
}
|