Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.TVP.CBA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘龙飞
VIZ.TVP.CBA
Commits
f81cdbed
Commit
f81cdbed
authored
Mar 07, 2023
by
wangonghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug和足球球队积分功能开发
parent
708a98ce
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
217 additions
and
13 deletions
+217
-13
VIZ.MIGU.CBA.Module/Common/Utils.cs
+2
-2
VIZ.TVP.FTB.Module/Common/JsonModel.cs
+44
-5
VIZ.TVP.FTB.Module/Common/Model/Season.cs
+26
-0
VIZ.TVP.FTB.Module/Common/Model/Seasons.cs
+21
-0
VIZ.TVP.FTB.Module/Setting/httpUrl/View/HttpUrlConfigView.xaml
+10
-1
VIZ.TVP.FTB.Module/Setting/httpUrl/ViewModel/HttpUrlConfigViewModel.cs
+99
-4
VIZ.TVP.FTB.Module/Storge/HttpUrlConfigEntity.cs
+13
-1
VIZ.TVP.FTB.Module/VIZ.TVP.FTB.Module.csproj
+2
-0
No files found.
VIZ.MIGU.CBA.Module/Common/Utils.cs
View file @
f81cdbed
...
...
@@ -1537,8 +1537,8 @@ namespace VIZ.TVP.CBA.Module
mainViewModel
.
VisitTeamCompareOptionDictionary
.
Add
(
"得分"
,
mainViewModel
.
onAirDataModel
.
liveTeamStatV
.
Points
);
mainViewModel
.
VisitTeamCompareOptionDictionary
.
Add
(
"篮板"
,
mainViewModel
.
onAirDataModel
.
liveTeamStatV
.
Rebounds
);
mainViewModel
.
VisitTeamCompareOptionDictionary
.
Add
(
"助攻"
,
mainViewModel
.
onAirDataModel
.
liveTeamStatV
.
Assists
);
mainViewModel
.
VisitTeamCompareOptionDictionary
.
Add
(
"抢断"
,
mainViewModel
.
onAirDataModel
.
liveTeamStatV
.
Blocked
);
mainViewModel
.
VisitTeamCompareOptionDictionary
.
Add
(
"盖帽"
,
mainViewModel
.
onAirDataModel
.
liveTeamStatV
.
Steals
);
mainViewModel
.
VisitTeamCompareOptionDictionary
.
Add
(
"抢断"
,
mainViewModel
.
onAirDataModel
.
liveTeamStatV
.
Steals
);
//Steals
mainViewModel
.
VisitTeamCompareOptionDictionary
.
Add
(
"盖帽"
,
mainViewModel
.
onAirDataModel
.
liveTeamStatV
.
Blocked
);
mainViewModel
.
VisitTeamCompareOptionDictionary
.
Add
(
"失误"
,
mainViewModel
.
onAirDataModel
.
liveTeamStatV
.
Turnovers
);
mainViewModel
.
VisitTeamCompareOptionDictionary
.
Add
(
"犯规"
,
mainViewModel
.
onAirDataModel
.
liveTeamStatV
.
PersonalFouls
);
//HomeTeamCompareOptionDictionary.Add(TeamDataCompareOptionChinese[7], Json_OnAirData.liveTeamStatH.FlagrantFouls);
...
...
VIZ.TVP.FTB.Module/Common/JsonModel.cs
View file @
f81cdbed
...
...
@@ -31,7 +31,9 @@ namespace VIZ.TVP.FTB.Module
//sd.Settings["AppID"].Value.ToString();
public
static
string
appKey
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
AppKey
;
public
static
string
type
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
SelectFootballType
;
//public string type = AppSetup_InitLiteDB.HttpUrlConfigEntity.SelectFootballType;
//public string seasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.SeasonId;
...
...
@@ -54,7 +56,7 @@ namespace VIZ.TVP.FTB.Module
Dictionary
<
string
,
string
>
dict
=
new
Dictionary
<
string
,
string
>();
//dict.Add("leagueid", "401");
dict
.
Add
(
"round"
,
round
);
dict
.
Add
(
"competitionId"
,
t
ype
);
dict
.
Add
(
"competitionId"
,
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
SelectFootballT
ype
);
string
newKey
=
Utils
.
GetKey
(
appID
,
appKey
);
...
...
@@ -95,8 +97,8 @@ namespace VIZ.TVP.FTB.Module
Dictionary
<
string
,
string
>
dict
=
new
Dictionary
<
string
,
string
>();
dict
.
Add
(
"competitionId"
,
t
ype
);
dict
.
Add
(
"seasonId"
,
"110000005454"
);
dict
.
Add
(
"competitionId"
,
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
SelectFootballT
ype
);
dict
.
Add
(
"seasonId"
,
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
SeasonId
);
//"110000005454"
string
newKey
=
Utils
.
GetKey
(
appID
,
appKey
);
...
...
@@ -107,7 +109,7 @@ namespace VIZ.TVP.FTB.Module
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
TeamRanks
teamRanks
=
JsonConvert
.
DeserializeObject
<
TeamRanks
>(
result
,
settings
);
var
sortRanks
=
teamRanks
.
teamstats
.
OrderBy
(
a
=>
a
.
score
).
ToList
();
var
sortRanks
=
teamRanks
.
teamstats
.
OrderBy
Descending
(
a
=>
a
.
score
).
ToList
();
teamRanks
.
teamstats
=
sortRanks
;
Console
.
WriteLine
(
"球队积分排行数据============>:"
+
TeamScoreDataPath
);
...
...
@@ -122,6 +124,43 @@ namespace VIZ.TVP.FTB.Module
}
/// <summary>
/// 获取赛季数据接口
/// </summary>
/// <returns></returns>
public
static
Seasons
Post_MatchSeasonData_Path
(
string
selectFootballType
)
{
try
{
string
MatchDataPath
=
strUrl
+
"matchSeason"
;
Dictionary
<
string
,
string
>
dict
=
new
Dictionary
<
string
,
string
>();
dict
.
Add
(
"competitionId"
,
selectFootballType
);
string
newKey
=
Utils
.
GetKey
(
appID
,
appKey
);
string
result
=
JsonHelper
.
Post
(
MatchDataPath
,
dict
,
newKey
);
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
);
return
seasons
;
}
catch
(
Exception
ex
)
{
Log
.
Error
(
ex
.
Message
);
return
null
;
}
}
}
}
VIZ.TVP.FTB.Module/Common/Model/Season.cs
0 → 100644
View file @
f81cdbed
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.TVP.FTB.Module
{
public
class
Season
{
/// <summary>
/// 赛季Id
/// </summary>
public
string
seasonId
{
get
;
set
;
}
/// <summary>
/// 赛季名称
/// </summary>
public
string
seasonName
{
get
;
set
;
}
/// <summary>
/// 赛季名称简写
/// </summary>
public
string
shortName
{
get
;
set
;
}
}
}
VIZ.TVP.FTB.Module/Common/Model/Seasons.cs
0 → 100644
View file @
f81cdbed
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.TVP.FTB.Module
{
public
class
Seasons
{
/// <summary>
/// 更新的时间
/// </summary>
public
string
LastPushDataDateTime
{
get
;
set
;
}
/// <summary>
/// 赛季数据
/// </summary>
public
List
<
Season
>
matchseason
{
get
;
set
;
}
}
}
VIZ.TVP.FTB.Module/Setting/httpUrl/View/HttpUrlConfigView.xaml
View file @
f81cdbed
...
...
@@ -74,7 +74,7 @@
<!-- 地址 -->
<TextBlock Text="比赛类型:" VerticalAlignment="Center" HorizontalAlignment="
Center
" Margin="0,0,10,0" Grid.Row="8" ></TextBlock>
<TextBlock Text="比赛类型:" VerticalAlignment="Center" HorizontalAlignment="
Right
" Margin="0,0,10,0" Grid.Row="8" ></TextBlock>
<WrapPanel Grid.Column="1" Grid.Row="8" HorizontalAlignment="Left" VerticalAlignment="Center">
...
...
@@ -83,11 +83,20 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="150"/>
</Grid.ColumnDefinitions>
<dxe:ComboBoxEdit Grid.Column="0" Height="30" Grid.Row="8" Width="100"
ItemsSource="{Binding Path= FootballTypes,Mode=TwoWay}" SelectedItem="{Binding Path=SelectFootballType,Mode=TwoWay}"></dxe:ComboBoxEdit>
<TextBlock Text="赛季:" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>
<dxe:ComboBoxEdit Grid.Column="2" Height="30" Grid.Row="8" Width="140"
ItemsSource="{Binding Path=Seasons,Mode=TwoWay}" SelectedItem="{Binding Path=SelectSeason,Mode=TwoWay}"></dxe:ComboBoxEdit>
</Grid>
</WrapPanel>
...
...
VIZ.TVP.FTB.Module/Setting/httpUrl/ViewModel/HttpUrlConfigViewModel.cs
View file @
f81cdbed
...
...
@@ -172,7 +172,64 @@ namespace VIZ.TVP.FTB.Module
public
string
SelectFootballType
{
get
{
return
selectFootballType
;
}
set
{
selectFootballType
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectFootballType
));
}
set
{
selectFootballType
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectFootballType
));
SetSeasonDict
();
if
(
selectSeason
==
null
)
return
;
if
(
SeasonDict
.
ContainsKey
(
selectSeason
))
{
SeasonId
=
SeasonDict
[
selectSeason
];
}
}
}
/// <summary>
/// 赛季绑定集合
/// </summary>
private
ObservableCollection
<
string
>
seasons
;
public
ObservableCollection
<
string
>
Seasons
{
get
{
return
seasons
;
}
set
{
seasons
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Seasons
));
}
}
private
string
selectSeason
;
/// <summary>
/// 选中的赛季
/// </summary>
public
string
SelectSeason
{
get
{
return
selectSeason
;
}
set
{
selectSeason
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectSeason
));
if
(
selectSeason
==
null
)
return
;
if
(
SeasonDict
.
ContainsKey
(
selectSeason
))
{
SeasonId
=
SeasonDict
[
selectSeason
];
}
}
}
/// <summary>
/// 赛季Id
/// </summary>
public
string
SeasonId
{
get
;
set
;
}
#
endregion
...
...
@@ -192,29 +249,34 @@ namespace VIZ.TVP.FTB.Module
/// </summary>
public
VCommand
LoadedCommand
{
get
;
set
;
}
/// <summary>
/// 加载
/// </summary>
private
void
Loaded
()
{
this
.
Url
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
Url
;
this
.
AppId
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
AppId
;
this
.
AppKey
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
AppKey
;
this
.
BUrl
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
BUrl
;
this
.
BAppId
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
BAppId
;
this
.
BAppKey
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
BAppKey
;
this
.
SelectFootballType
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
SelectFootballType
;
this
.
SelectSeason
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
SelectSeason
;
this
.
SeasonId
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
SeasonId
;
SetSeasonDict
();
}
...
...
@@ -238,11 +300,44 @@ namespace VIZ.TVP.FTB.Module
config
.
BAppId
=
this
.
BAppId
;
config
.
BAppKey
=
this
.
BAppKey
;
config
.
SelectFootballType
=
this
.
SelectFootballType
;
// 选择赛事和赛事Id
config
.
SelectSeason
=
this
.
SelectSeason
;
config
.
SeasonId
=
this
.
SeasonId
;
AppSetup_InitLiteDB
.
localDbContext
.
HttpUrlConfig
.
Upsert
(
config
);
}
public
Dictionary
<
string
,
string
>
SeasonDict
=
new
Dictionary
<
string
,
string
>();
/// <summary>
/// 赛季数据
/// </summary>
public
Seasons
dictSeasons
=
null
;
/// <summary>
/// 设置赛季接口
/// </summary>
private
void
SetSeasonDict
()
{
SeasonDict
.
Clear
();
if
(
string
.
IsNullOrEmpty
(
selectFootballType
))
return
;
dictSeasons
=
JsonModel
.
Post_MatchSeasonData_Path
(
selectFootballType
);
foreach
(
var
dict
in
dictSeasons
.
matchseason
)
{
if
(!
SeasonDict
.
ContainsKey
(
dict
.
seasonName
))
{
SeasonDict
.
Add
(
dict
.
seasonName
,
dict
.
seasonId
);
}
}
Seasons
=
new
ObservableCollection
<
string
>();
Seasons
=
SeasonDict
.
Keys
.
ToObservableCollection
();
}
}
}
VIZ.TVP.FTB.Module/Storge/HttpUrlConfigEntity.cs
View file @
f81cdbed
...
...
@@ -53,9 +53,21 @@ namespace VIZ.TVP.FTB.Module
/// </summary>
public
string
BAppKey
{
get
;
set
;
}
=
"ffrw7ilc8i6r3pkzvl"
;
/// <summary>
/// 五大联赛
/// </summary>
public
string
SelectFootballType
{
get
;
set
;
}
=
"德甲"
;
/// <summary>
/// 选择赛季
/// </summary>
public
string
SelectSeason
{
get
;
set
;
}
/// <summary>
/// 赛季Id
/// </summary>
public
string
SeasonId
{
get
;
set
;
}
#
endregion
...
...
VIZ.TVP.FTB.Module/VIZ.TVP.FTB.Module.csproj
View file @
f81cdbed
...
...
@@ -92,6 +92,8 @@
<ItemGroup>
<Compile Include="Common\JsonHelper.cs" />
<Compile Include="Common\JsonModel.cs" />
<Compile Include="Common\Model\Season.cs" />
<Compile Include="Common\Model\Seasons.cs" />
<Compile Include="Common\PluginConstant.cs" />
<Compile Include="Common\Utils.cs" />
<Compile Include="FDayMatch\FDayMatchViewPlugin.cs" />
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment