piaoshu and varchar
This commit is contained in:
parent
4c7a342cf3
commit
8105f6f144
@ -37,7 +37,7 @@ namespace asg_form.Controllers
|
||||
{
|
||||
TestDbContext testDb = new TestDbContext();
|
||||
string chinaname = user.chinaname;
|
||||
var teamgame = testDb.team_Games.Where(a => a.commentary.IndexOf(chinaname) >= 0).Select(a => new { a.id, a.team1_name, a.team2_name, a.bilibiliuri, a.commentary, a.referee ,a.opentime}).ToList();
|
||||
var teamgame = testDb.team_Games.Where(a => a.commentary.IndexOf(chinaname) >= 0).Select(a => new { a.id, a.team1_name, a.team2_name, a.bilibiliuri, a.commentary, a.referee ,a.opentime,a.team1_piaoshu,a.team2_piaoshu}).OrderByDescending(a => a.opentime).ToList();
|
||||
|
||||
return JsonConvert.SerializeObject(teamgame);
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ namespace asg_form.Controllers
|
||||
if (a)
|
||||
{
|
||||
TestDbContext ctx = new TestDbContext();
|
||||
await ctx.news.AddAsync(new T_news { Title = req_News.Title, msg = req_News.msg, FormName = user.UserName ,time=DateTime.Now});
|
||||
await ctx.news.AddAsync(new T_news { Title = req_News.Title, msg = req_News.msg, FormName = user.UserName ,time=DateTime.Now,Type=req_News.Type});
|
||||
await ctx.SaveChangesAsync();
|
||||
return "ok!";
|
||||
}
|
||||
@ -144,6 +144,7 @@ namespace asg_form.Controllers
|
||||
qwq.msg=req_News.msg;
|
||||
qwq.Title=req_News.Title;
|
||||
qwq.FormName = user.UserName;
|
||||
qwq.Type = req_News.Type;
|
||||
await ctx.SaveChangesAsync();
|
||||
|
||||
}
|
||||
@ -172,7 +173,8 @@ public class T_news
|
||||
public DateTime? time { get; set; }
|
||||
|
||||
public string msg { get; set; }
|
||||
}
|
||||
public string Type { get; set; }
|
||||
}
|
||||
|
||||
public class req_news {
|
||||
/// <summary>
|
||||
@ -183,6 +185,7 @@ public class T_news
|
||||
/// 内容,推荐使用markdown格式
|
||||
/// </summary>
|
||||
public string msg { get; set; }
|
||||
|
||||
}
|
||||
public string Type { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user