修改解说

This commit is contained in:
luolangaga 2024-08-17 17:37:47 +08:00
parent 00f8d9e796
commit 73bae31dbd
3 changed files with 33 additions and 2 deletions

View File

@ -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();

View File

@ -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>

View File

@ -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>