CrazyIter_Bin 1 年之前
父節點
當前提交
47e376dd80

+ 3 - 3
TEAMModelOS.SDK/Models/Service/GroupListService.cs

@@ -191,7 +191,7 @@ namespace TEAMModelOS.SDK
         /// <param name="type"></param>
         /// <param name="school"></param>
         /// <returns></returns>
-        public static async Task<(int status, GroupList stuList,Member member)> CodeJoinList(CosmosClient client,AzureRedisFactory _azureRedis, string _stuListNo, string userid, int type, string school,int year,string name ,string picture,string lang )
+        public static async Task<(int status, GroupList stuList,Member member)> CodeJoinList(CosmosClient client,AzureRedisFactory _azureRedis, string _stuListNo, string userid, int type, string school,int year,string name ,string picture,string lang,string courseId= null)
         {
             var queryNo = $"SELECT  value(c)  FROM c where  c.no ='{_stuListNo}'";
             (int status, GroupList stuList,Member member) data = (-1, null,null);
@@ -212,7 +212,6 @@ namespace TEAMModelOS.SDK
                     //状态=4 表示未开放加入。
                     return (4, item, null) ;
                 }
-              
                if (item.review ==1)
                 {
 
@@ -242,7 +241,7 @@ namespace TEAMModelOS.SDK
                             groupName= item.name,
                             applyTime=now
                         };
-
+                        string sql = "select value c from c join b in c.schedules where b.groupId='60f92012-72cf-4d5c-a66a-552678303fad'"; 
                         string key = $"GroupList:GroupWaitingList:{item.scope}:{item.id}";
                         string filed = !string.IsNullOrWhiteSpace(school) ? $"{school}_{userid}" : userid;
                         await _azureRedis.GetRedisClient(8).HashSetAsync(key, filed, waitingList.ToJsonString());
@@ -294,6 +293,7 @@ namespace TEAMModelOS.SDK
             /// 申请状态,-1 申请中,0 通过,1 拒绝,2 已过期。 
             /// </summary>
             public int status { get; set; } = -1;
+           public List<IdName> courses  { get; set; }= new List<IdName>();
         }
         public static (int status, GroupList stuList, Member member) JoinList(GroupList stuList, string userid, int type, string school,int year)
         {

+ 5 - 3
TEAMModelOS/Controllers/Both/GroupListController.cs

@@ -103,6 +103,7 @@ namespace TEAMModelOS.Controllers
         {
             if (!json.TryGetProperty("stuListNo", out JsonElement _stuListNo)) return BadRequest();
             json.TryGetProperty("school", out JsonElement school);
+            json.TryGetProperty("courseId", out JsonElement _courseId);
             var client = _azureCosmos.GetCosmosClient();
             json.TryGetProperty("id_token", out JsonElement id_token);
             var jwt = new JwtSecurityToken(id_token.GetString());
@@ -136,7 +137,7 @@ 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}");
+            (int status, GroupList stuList, Member member) data = await GroupListService.CodeJoinList(client, _azureRedis, $"{_stuListNo}", id, type: 1, $"{school}", year, $"{name}", $"{picture}", $"{lang}",$"{_courseId}");
             //没有TmdUser时
             if (data.status == 0)
             {
@@ -1284,8 +1285,9 @@ namespace TEAMModelOS.Controllers
                                     {
                                         await _azureRedis.GetRedisClient(8).HashDeleteAsync(stuKey, $"{group.groupScope}:{group.groupId}");
                                     }
-                                    else {
-                                        if (now>group.qrcodeExpire) 
+                                    else
+                                    {
+                                        if (now>group.qrcodeExpire)
                                         {
                                             group.status=2;
                                             await _azureRedis.GetRedisClient(8).HashDeleteAsync(stuKey, $"{group.groupScope}:{group.groupId}");

File diff suppressed because it is too large
+ 92 - 10
TEAMModelOS/Controllers/System/WeChatPayController.cs


+ 1 - 0
TEAMModelOS/TEAMModelOS.csproj

@@ -9,6 +9,7 @@
 	<PackageReference Include="EPPlus" Version="6.2.6" />
     <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
 	<PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="2.20.0" />
+	<PackageReference Include="System.Security.Cryptography.Algorithms" Version="4.3.1" />
   </ItemGroup>
   <ItemGroup>
     <None Remove="ClientApp\src\static\BaseDataDefault.json" />