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
3c9e52b2
Commit
3c9e52b2
authored
Apr 14, 2023
by
wangonghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志添加主和备的区分修改
parent
0b8ca038
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
111 additions
and
20 deletions
+111
-20
VIZ.MIGU.CBA.Module/Common/JsonModel.cs
+64
-8
VIZ.MIGU.CBA.Module/HeaderPage/ViewModel/DateHeaderViewModel.cs
+4
-0
VIZ.MIGU.CBA.Module/TeamStats/ViewModel/NewTeamStatsViewModel.cs
+1
-1
VIZ.MIGU.CBA.Module/TeamStatsTask/ViewModel/TeamStatsTaskViewModel.cs
+1
-1
VIZ.TVP.FTB.Module/Common/JsonModel.cs
+39
-10
VIZ.TVP.FTB.Module/HeaderPage/ViewModel/DateHeaderViewModel.cs
+2
-0
No files found.
VIZ.MIGU.CBA.Module/Common/JsonModel.cs
View file @
3c9e52b2
...
...
@@ -35,6 +35,13 @@ namespace VIZ.TVP.CBA.Module
private
static
string
httpStr
=
"http://sportsdata.misports.cn/beitai/api/"
;
//新的URL
public
static
string
strUrl
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
Url
;
/// <summary>
/// true 是主数据来源,false 是备份数据库来源
/// </summary>
public
static
bool
dataFromSource
=
true
;
//ApplicationDomainEx.HttpUrlConfig.Url;
//ApplicationDomainEx.HttpUrlConfig.Url;
//sd?.Settings["url"].Value.ToString();
...
...
@@ -87,7 +94,14 @@ namespace VIZ.TVP.CBA.Module
string
result
=
JsonHelper
.
GetResult
(
TomorrowMatchPath
);
Log
.
Info
(
"明日赛程数据接口新:=======>:"
+
result
);
if
(
dataFromSource
)
{
Log
.
Info
(
"明日赛程数据接口新:主数据来源 =======>:"
+
result
);
}
else
{
Log
.
Info
(
"明日赛程数据接口新:备份数据来源 =======>:"
+
result
);
}
JsonSerializerSettings
settings
=
new
JsonSerializerSettings
();
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
dayschedules
=
JsonConvert
.
DeserializeObject
<
Dayschedules
>(
result
,
settings
);
...
...
@@ -153,9 +167,14 @@ namespace VIZ.TVP.CBA.Module
string
newKey
=
Utils
.
GetKey
(
appID
,
appKey
);
var
str
=
JsonHelper
.
Post
(
TomorrowMatchPath
,
dict
,
newKey
);
Log
.
Info
(
"明日赛程数据接口新:=======>:"
+
str
);
if
(
dataFromSource
)
{
Log
.
Info
(
$"明日赛程数据接口新:主数据来源:
{
TomorrowMatchPath
}
=======>:"
+
str
);
}
else
{
Log
.
Info
(
$"明日赛程数据接口新:备份数据来源:
{
TomorrowMatchPath
}
=======>:"
+
str
);
}
JsonSerializerSettings
settings
=
new
JsonSerializerSettings
();
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
dayschedules
=
JsonConvert
.
DeserializeObject
<
Dayschedules
>(
str
,
settings
);
...
...
@@ -304,7 +323,14 @@ namespace VIZ.TVP.CBA.Module
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
playerSeasonData
=
JsonConvert
.
DeserializeObject
<
PlayerSeasonData
>(
result
,
settings
);
Log
.
Info
(
"球员赛季数据的服务器接口地址====>:"
+
result
);
if
(
dataFromSource
)
{
Log
.
Info
(
$"球员赛季数据的服务器接口地址:主数据来源:
{
PlayerSeasonDataPath
}
====>:"
+
result
);
}
else
{
Log
.
Info
(
$"球员赛季数据的服务器接口地址:备份数据来源:
{
PlayerSeasonDataPath
}
====>:"
+
result
);
}
});
return
playerSeasonData
;
...
...
@@ -372,7 +398,14 @@ namespace VIZ.TVP.CBA.Module
string
result
=
JsonHelper
.
Post
(
GameRoundDataPath
,
dict
,
newKey
);
Log
.
Info
(
"指定轮数的赛程的服务器接口地址====>:"
+
result
);
if
(
dataFromSource
)
{
Log
.
Info
(
$"指定轮数的赛程的服务器接口地址:主数据来源:
{
GameRoundDataPath
}
====>:"
+
result
);
}
else
{
Log
.
Info
(
$"指定轮数的赛程的服务器接口地址:备份数据来源:
{
GameRoundDataPath
}
====>:"
+
result
);
}
JsonSerializerSettings
settings
=
new
JsonSerializerSettings
();
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
...
...
@@ -443,7 +476,14 @@ namespace VIZ.TVP.CBA.Module
string
newKey
=
Utils
.
GetKey
(
appID
,
appKey
);
string
result
=
JsonHelper
.
Post
(
OnAirDataPath
,
dict
,
newKey
);
Log
.
Info
(
"全量直播数据==>:"
+
result
);
if
(
dataFromSource
)
{
Log
.
Info
(
$"全量直播数据:主数据来源:
{
OnAirDataPath
}
==>"
+
result
);
}
else
{
Log
.
Info
(
$"全量直播数据:备份数据来源:
{
OnAirDataPath
}
==>"
+
result
);
}
JsonSerializerSettings
settings
=
new
JsonSerializerSettings
();
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
...
...
@@ -523,6 +563,15 @@ namespace VIZ.TVP.CBA.Module
string
result
=
JsonHelper
.
Post
(
TeamSeasonDataPath
,
dict
,
newKey
);
Log
.
Info
(
"球队赛季接口数据==>:"
+
result
);
if
(
dataFromSource
)
{
Log
.
Info
(
$"球队赛季接口数据:主数据来源:
{
TeamSeasonDataPath
}
==>:"
+
result
);
}
else
{
Log
.
Info
(
$"球队赛季接口数据:备份数据来源:
{
TeamSeasonDataPath
}
==>:"
+
result
);
}
JsonSerializerSettings
settings
=
new
JsonSerializerSettings
();
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
teamSeasonData
=
JsonConvert
.
DeserializeObject
<
TeamSeasonData
>(
result
,
settings
);
...
...
@@ -589,7 +638,14 @@ namespace VIZ.TVP.CBA.Module
string
result
=
JsonHelper
.
Post
(
TeamScoreDataPath
,
dict
,
newKey
);
Log
.
Info
(
"球队积分排行数据==>:"
+
result
);
if
(
dataFromSource
)
{
Log
.
Info
(
$"球队积分排行数据:主数据来源:
{
TeamScoreDataPath
}
==>:"
+
result
);
}
else
{
Log
.
Info
(
$"球队积分排行数据:备份数据来源:
{
TeamScoreDataPath
}
==>:"
+
result
);
}
JsonSerializerSettings
settings
=
new
JsonSerializerSettings
();
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
...
...
VIZ.MIGU.CBA.Module/HeaderPage/ViewModel/DateHeaderViewModel.cs
View file @
3c9e52b2
...
...
@@ -174,6 +174,8 @@ namespace VIZ.TVP.CBA.Module
JsonModel
.
strUrl
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
Url
;
JsonModel
.
appKey
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
AppKey
;
JsonModel
.
appID
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
AppId
;
JsonModel
.
dataFromSource
=
true
;
}
}
}
...
...
@@ -197,6 +199,8 @@ namespace VIZ.TVP.CBA.Module
JsonModel
.
strUrl
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
BUrl
;
JsonModel
.
appKey
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
BAppKey
;
JsonModel
.
appID
=
AppSetup_InitCBALiteDB
.
HttpUrlConfigEntity
.
BAppId
;
JsonModel
.
dataFromSource
=
false
;
}
}
}
...
...
VIZ.MIGU.CBA.Module/TeamStats/ViewModel/NewTeamStatsViewModel.cs
View file @
3c9e52b2
...
...
@@ -1289,7 +1289,7 @@ namespace VIZ.TVP.CBA.Module
//if (SelectMatchItems == null) return;
//ScheduleID = SetMatchDict[SelectMatchItems];
Log
.
Error
(
string
.
Format
(
"teamStatsViewModel:{0}"
,
ScheduleID
));
//
Log.Error(string.Format("teamStatsViewModel:{0}", ScheduleID));
if
(
string
.
IsNullOrEmpty
(
ScheduleID
))
return
;
onAirDataModel
=
JsonModel
.
PostOnAirData_Path
(
ScheduleID
);
ClearData
();
...
...
VIZ.MIGU.CBA.Module/TeamStatsTask/ViewModel/TeamStatsTaskViewModel.cs
View file @
3c9e52b2
...
...
@@ -1286,7 +1286,7 @@ namespace VIZ.TVP.CBA.Module
//if (SelectMatchItems == null) return;
//ScheduleID = SetMatchDict[SelectMatchItems];
Log
.
Error
(
string
.
Format
(
"teamStatsViewModel:{0}"
,
ScheduleID
));
//
Log.Error(string.Format("teamStatsViewModel:{0}", ScheduleID));
if
(
string
.
IsNullOrEmpty
(
ScheduleID
))
return
;
onAirDataModel
=
JsonModel
.
PostOnAirData_Path
(
ScheduleID
);
ClearData
();
...
...
VIZ.TVP.FTB.Module/Common/JsonModel.cs
View file @
3c9e52b2
...
...
@@ -36,6 +36,10 @@ namespace VIZ.TVP.FTB.Module
//public string seasonId = AppSetup_InitLiteDB.HttpUrlConfigEntity.SeasonId;
/// <summary>
/// true 是主数据来源,false 是备份数据库来源
/// </summary>
public
static
bool
dataFromSource
=
true
;
/// <summary>
...
...
@@ -63,8 +67,15 @@ namespace VIZ.TVP.FTB.Module
string
newKey
=
Utils
.
GetKey
(
appID
,
appKey
);
var
str
=
JsonHelper
.
Post
(
GameRoundDataPath
,
dict
,
newKey
);
Log
.
Info
(
"轮次数据接口新:=======>:"
+
str
);
if
(
dataFromSource
)
{
Log
.
Info
(
$"轮次数据接口新:主数据来源:
{
GameRoundDataPath
}
=======>:"
+
str
);
}
else
{
Log
.
Info
(
$"轮次数据接口新:备份数据来源:
{
GameRoundDataPath
}
=======>:"
+
str
);
}
JsonSerializerSettings
settings
=
new
JsonSerializerSettings
();
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
dayschedules
=
JsonConvert
.
DeserializeObject
<
Dayschedules
>(
str
,
settings
);
...
...
@@ -107,7 +118,15 @@ namespace VIZ.TVP.FTB.Module
string
result
=
JsonHelper
.
Post
(
TeamScoreDataPath
,
dict
,
newKey
);
Log
.
Info
(
"球队积分排行数据==>:"
+
result
);
if
(
dataFromSource
)
{
Log
.
Info
(
$"球队积分排行数据:主数据来源:
{
TeamScoreDataPath
}
==>:"
+
result
);
}
else
{
Log
.
Info
(
$"球队积分排行数据:备份数据来源:
{
TeamScoreDataPath
}
==>:"
+
result
);
}
JsonSerializerSettings
settings
=
new
JsonSerializerSettings
();
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
...
...
@@ -147,7 +166,15 @@ namespace VIZ.TVP.FTB.Module
string
newKey
=
Utils
.
GetKey
(
appID
,
appKey
);
string
result
=
JsonHelper
.
Post
(
MatchDataPath
,
dict
,
newKey
);
Log
.
Info
(
"足球赛季数据==>"
+
result
);
if
(
dataFromSource
)
{
Log
.
Info
(
$"足球赛季数据:主数据来源:
{
MatchDataPath
}
==>"
+
result
);
}
else
{
Log
.
Info
(
$"足球赛季数据:备份数据来源:
{
MatchDataPath
}
==>"
+
result
);
}
JsonSerializerSettings
settings
=
new
JsonSerializerSettings
();
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
...
...
@@ -192,25 +219,27 @@ namespace VIZ.TVP.FTB.Module
string
newKey
=
Utils
.
GetKey
(
appID
,
appKey
);
Log
.
Info
(
"访问接口开始时间"
);
string
result
=
JsonHelper
.
Post
(
shootPath
,
dict
,
newKey
);
Log
.
Info
(
"足球球员射手排行==>"
+
result
);
if
(
dataFromSource
)
{
Log
.
Info
(
$"足球球员射手排行:主数据来源:
{
shootPath
}
==>"
+
result
);
}
else
{
Log
.
Info
(
$"足球球员射手排行:备份数据来源:
{
shootPath
}
==>"
+
result
);
}
JsonSerializerSettings
settings
=
new
JsonSerializerSettings
();
settings
.
NullValueHandling
=
NullValueHandling
.
Ignore
;
Log
.
Info
(
"序列化json开始时间"
);
shootPlayerRanks
=
JsonConvert
.
DeserializeObject
<
ShootPlayerRanks
>(
result
,
settings
);
Log
.
Info
(
"序列化结束时间"
);
//var sortPlayerShoot = shootPlayerRanks.playerstats.Take(5).ToList();
//shootPlayerRanks.playerstats = sortPlayerShoot;
});
return
shootPlayerRanks
;
}
...
...
VIZ.TVP.FTB.Module/HeaderPage/ViewModel/DateHeaderViewModel.cs
View file @
3c9e52b2
...
...
@@ -59,6 +59,7 @@ namespace VIZ.TVP.FTB.Module
JsonModel
.
strUrl
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
Url
;
JsonModel
.
appKey
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
AppKey
;
JsonModel
.
appID
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
AppId
;
JsonModel
.
dataFromSource
=
true
;
}
}
}
...
...
@@ -82,6 +83,7 @@ namespace VIZ.TVP.FTB.Module
JsonModel
.
strUrl
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
BUrl
;
JsonModel
.
appKey
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
BAppKey
;
JsonModel
.
appID
=
AppSetup_InitLiteDB
.
HttpUrlConfigEntity
.
BAppId
;
JsonModel
.
dataFromSource
=
false
;
}
}
}
...
...
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