Commit c7866116 by wangonghui

修改对应的足球数据模板的值

parent b6196506
......@@ -129,26 +129,31 @@ namespace VIZ.TVP.FTB.Module
/// 获取赛季数据接口
/// </summary>
/// <returns></returns>
public static Seasons Post_MatchSeasonData_Path(string selectFootballType)
public async static Task<Seasons> Post_MatchSeasonData_Path(string selectFootballType)
{
try
{
string MatchDataPath = strUrl + "matchSeason";
Dictionary<string, string> dict = new Dictionary<string, string>();
Seasons seasons = new Seasons();
await Task.Run(() =>
{
string MatchDataPath = strUrl + "matchSeason";
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("competitionId", selectFootballType);
dict.Add("competitionId", selectFootballType);
string newKey = Utils.GetKey(appID, appKey);
string result = JsonHelper.Post(MatchDataPath, dict, newKey);
string newKey = Utils.GetKey(appID, appKey);
string result = JsonHelper.Post(MatchDataPath, dict, newKey);
Log.Info("足球赛季数据==>" + result);
JsonSerializerSettings settings = new JsonSerializerSettings();
settings.NullValueHandling = NullValueHandling.Ignore;
Log.Info("足球赛季数据==>" + result);
JsonSerializerSettings settings = new JsonSerializerSettings();
settings.NullValueHandling = NullValueHandling.Ignore;
Seasons seasons = JsonConvert.DeserializeObject<Seasons>(result, settings);
var sortSeason = seasons.matchseason.OrderByDescending(a => a.seasonName).ToList();
seasons.matchseason = sortSeason;
Console.WriteLine("足球赛季数据=========>" + MatchDataPath);
seasons = JsonConvert.DeserializeObject<Seasons>(result, settings);
var sortSeason = seasons.matchseason.OrderByDescending(a => a.seasonName).ToList();
seasons.matchseason = sortSeason;
Console.WriteLine("足球赛季数据=========>" + MatchDataPath);
});
return seasons;
}
catch(Exception ex)
......@@ -166,37 +171,42 @@ namespace VIZ.TVP.FTB.Module
/// <param name="footballType"></param>
/// <param name="seasonId"></param>
/// <returns></returns>
public static ShootPlayerRanks Post_ShootPlayerRankData(string footballType, string seasonId)
public async static Task<ShootPlayerRanks> Post_ShootPlayerRankData(string footballType, string seasonId)
{
try
{
string shootPath = strUrl + "player/getplayerstats";
ShootPlayerRanks shootPlayerRanks = new ShootPlayerRanks();
await Task.Run(() =>
{
string shootPath = strUrl + "player/getplayerstats";
Dictionary<string, string> dict = new Dictionary<string, string>();
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("competitionId", footballType);
dict.Add("seasonId", seasonId);//"110000005454"
dict.Add("competitionId", footballType);
dict.Add("seasonId", seasonId);//"110000005454"
string newKey = Utils.GetKey(appID, appKey);
string newKey = Utils.GetKey(appID, appKey);
Log.Info("访问接口开始时间");
string result = JsonHelper.Post(shootPath, dict, newKey);
Log.Info("访问接口开始时间");
string result = JsonHelper.Post(shootPath, dict, newKey);
Log.Info("足球球员射手排行==>"+result);
Log.Info("足球球员射手排行==>" + result);
JsonSerializerSettings settings = new JsonSerializerSettings();
JsonSerializerSettings settings = new JsonSerializerSettings();
settings.NullValueHandling = NullValueHandling.Ignore;
settings.NullValueHandling = NullValueHandling.Ignore;
Log.Info("序列化json开始时间");
ShootPlayerRanks shootPlayerRanks = JsonConvert.DeserializeObject<ShootPlayerRanks>(result, settings);
Log.Info("序列化json开始时间");
shootPlayerRanks = JsonConvert.DeserializeObject<ShootPlayerRanks>(result, settings);
Log.Info("序列化结束时间");
Log.Info("序列化结束时间");
var sortPlayerShoot = shootPlayerRanks.playerstats.Take(5).ToList();
var sortPlayerShoot = shootPlayerRanks.playerstats.Take(5).ToList();
shootPlayerRanks.playerstats = sortPlayerShoot;
shootPlayerRanks.playerstats = sortPlayerShoot;
});
return shootPlayerRanks;
}
catch(Exception ex)
......
......@@ -121,7 +121,7 @@
<dxg:GridColumn FieldName="dates" Header="日期" Width="112" />
<dxg:GridColumn FieldName="time" Header="时间" Width="112" />
<dxg:GridColumn FieldName="homeTeamLogo" Header="主队国旗" Width="180" />
<dxg:GridColumn FieldName="homeTeamLogo" Header="主队队徽" Width="180" />
<dxg:GridColumn FieldName="homeTeamName" Header="主队" Width="180" />
<dxg:GridColumn FieldName="homeTeamScore" Header="主队得分" Width="180" />
......@@ -129,9 +129,9 @@
<dxg:GridColumn FieldName="visitingTeamScore" Header="客队得分" Width="180" />
<dxg:GridColumn FieldName="visitingTeamName" Header="客队" Width="180" />
<dxg:GridColumn FieldName="visitingTeamLogo" Header="客队国旗" Width="180" />
<dxg:GridColumn FieldName="visitingTeamLogo" Header="客队队徽" Width="180" />
<dxg:GridColumn FieldName="status" Header="客队国旗" Width="180" />
<dxg:GridColumn FieldName="status" Header="比赛状态" Width="180" />
<dxg:GridControl.View>
<dxg:TableView AutoWidth="True" ShowGroupPanel="False"
......
......@@ -87,7 +87,7 @@
<dxg:GridControl x:Name="grid" ShowBorder="False" ItemsSource="{Binding Path= TeamRanksModel,Mode=TwoWay}">
<dxg:GridColumn FieldName="rank" Header="排名" Width="112" />
<dxg:GridColumn FieldName="teamLogo" Header="球队国旗" Width="112"/>
<dxg:GridColumn FieldName="teamLogo" Header="球队队徽" Width="112"/>
<dxg:GridColumn FieldName="teamName" Header="球队名" Width="112" />
<dxg:GridColumn FieldName="matchNum" Header="场次" Width="180" />
<dxg:GridColumn FieldName="winNum" Header="胜" Width="100" />
......
......@@ -11,7 +11,7 @@ using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using VIZ.Framework.Core;
namespace VIZ.TVP.FTB.Module
{
......@@ -23,6 +23,8 @@ namespace VIZ.TVP.FTB.Module
public MessageLastRecordDate()
{
InitializeComponent();
WPFHelper.BindingViewModel(this, new MessageLRDateViewModel());
}
}
}
......@@ -582,12 +582,12 @@ namespace VIZ.TVP.FTB.Module
/// <summary>
/// 设置赛季接口
/// </summary>
private void SetSeasonDict()
private async void SetSeasonDict()
{
try
{
var EPCDictSeasons = JsonModel.Post_MatchSeasonData_Path("英超");
var EPCDictSeasons = await JsonModel.Post_MatchSeasonData_Path("英超");
if(EPCDictSeasons!=null)
{
......@@ -609,7 +609,7 @@ namespace VIZ.TVP.FTB.Module
var FL1DictSeasons = JsonModel.Post_MatchSeasonData_Path("法甲");
var FL1DictSeasons = await JsonModel.Post_MatchSeasonData_Path("法甲");
if(FL1DictSeasons!=null)
{
......@@ -630,7 +630,7 @@ namespace VIZ.TVP.FTB.Module
var ISADictSeasons = JsonModel.Post_MatchSeasonData_Path("意甲");
var ISADictSeasons = await JsonModel.Post_MatchSeasonData_Path("意甲");
if(ISADictSeasons!=null)
{
......@@ -651,7 +651,7 @@ namespace VIZ.TVP.FTB.Module
var LIGADictSeasons = JsonModel.Post_MatchSeasonData_Path("德甲");
var LIGADictSeasons = await JsonModel.Post_MatchSeasonData_Path("德甲");
if(LIGADictSeasons!=null)
{
......@@ -669,7 +669,7 @@ namespace VIZ.TVP.FTB.Module
}
var SLPDictSeasons = JsonModel.Post_MatchSeasonData_Path("西甲");
var SLPDictSeasons = await JsonModel.Post_MatchSeasonData_Path("西甲");
if(SLPDictSeasons!=null)
{
......
......@@ -88,7 +88,7 @@
<dxg:GridColumn FieldName="rank" Header="排名" Width="112" />
<dxg:GridColumn FieldName="playerLogo" Header="球员图片" Width="112"/>
<dxg:GridColumn FieldName="teamLogo" Header="球队国旗" Width="112"/>
<dxg:GridColumn FieldName="teamLogo" Header="球队队徽" Width="112"/>
<dxg:GridColumn FieldName="figureName" Header="球员名称" Width="112" />
<dxg:GridColumn FieldName="goals" Header="进球数" Width="180" />
<dxg:GridColumn FieldName="PenaltyGoal" Header="点球" Width="100" />
......
......@@ -53,7 +53,7 @@ namespace VIZ.TVP.FTB.Module
/// <summary>
/// 刷新球队积分排名
/// </summary>
private void BtmCommand()
private async void BtmCommand()
{
shootPlayerRanks = new ShootPlayerRanks();
......@@ -83,7 +83,7 @@ namespace VIZ.TVP.FTB.Module
SeasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.SLPSeasonId;
}
shootPlayerRanks = JsonModel.Post_ShootPlayerRankData(FoolballType, SeasonId);
shootPlayerRanks = await JsonModel.Post_ShootPlayerRankData(FoolballType, SeasonId);
if (shootPlayerRanks == null) return;
ShootPlayerModel = new ObservableCollection<ShootPlayerRank>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment