修改解说
This commit is contained in:
		
							parent
							
								
									00f8d9e796
								
							
						
					
					
						commit
						73bae31dbd
					
				@ -56,7 +56,11 @@ namespace asg_form.Controllers
 | 
			
		||||
            var user = await userManager.FindByIdAsync(id);
 | 
			
		||||
            if (user.officium == "Commentator")
 | 
			
		||||
            {
 | 
			
		||||
             
 | 
			
		||||
                if (user.Integral == null)
 | 
			
		||||
                {
 | 
			
		||||
                    user.Integral = 0;
 | 
			
		||||
                    await userManager.UpdateAsync(user);
 | 
			
		||||
                }
 | 
			
		||||
                TestDbContext testDb = new TestDbContext();
 | 
			
		||||
                string chinaname = user.chinaname;
 | 
			
		||||
                var teamgame = await testDb.team_Games.FirstAsync(a => a.id == gameid);
 | 
			
		||||
@ -107,6 +111,11 @@ namespace asg_form.Controllers
 | 
			
		||||
        {
 | 
			
		||||
            string id = this.User.FindFirst(ClaimTypes.NameIdentifier)!.Value;
 | 
			
		||||
            var user = await userManager.FindByIdAsync(id);
 | 
			
		||||
            if (user.Integral == null)
 | 
			
		||||
            {
 | 
			
		||||
                user.Integral = 0;
 | 
			
		||||
                await userManager.UpdateAsync(user);
 | 
			
		||||
            }
 | 
			
		||||
            if (user.officium == "Commentator")
 | 
			
		||||
            {
 | 
			
		||||
                TestDbContext testDb = new TestDbContext();
 | 
			
		||||
 | 
			
		||||
@ -116,6 +116,22 @@ namespace asg_form.Controllers.Store
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        [Route("api/v1/Store/my")]
 | 
			
		||||
        [HttpGet]
 | 
			
		||||
        [Authorize]
 | 
			
		||||
        public async Task<ActionResult<object>> mybuy()
 | 
			
		||||
        {
 | 
			
		||||
            long id = this.User.FindFirst(ClaimTypes.NameIdentifier)!.Value.ToInt64();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            using (TestDbContext sb = new TestDbContext())
 | 
			
		||||
            {
 | 
			
		||||
                var a = sb.T_Storeinfo.Where(a=>a.buyerid==id).ToListAsync();
 | 
			
		||||
                return Ok(a);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
 | 
			
		||||
@ -10,6 +10,13 @@
 | 
			
		||||
    <PublishAot>False</PublishAot>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <Compile Remove="Controllers\PlayerC\**" />
 | 
			
		||||
    <Content Remove="Controllers\PlayerC\**" />
 | 
			
		||||
    <EmbeddedResource Remove="Controllers\PlayerC\**" />
 | 
			
		||||
    <None Remove="Controllers\PlayerC\**" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <None Include="..\.editorconfig" Link=".editorconfig" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
@ -50,7 +57,6 @@
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <Folder Include="Controllers\PlayerC\" />
 | 
			
		||||
    <Folder Include="Model\" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user