forked from powerfun/udpservice
细节调整
This commit is contained in:
parent
917e5d9800
commit
3e28d52154
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="Host" value="https://wx.powerfun.com.cn/"/>
|
<add key="Host" value="http://192.168.0.97:5082/"/>
|
||||||
<add key="Top" value="100"/>
|
<add key="Top" value="10"/>
|
||||||
<add key="ShowVirtualUser" value="true"/>
|
<add key="ShowVirtualUser" value="true"/>
|
||||||
<add key="Ip" value="192.168.0.97"/>
|
<add key="Ip" value="192.168.0.97"/>
|
||||||
<add key="Port" value="11000"/>
|
<add key="Port" value="11000"/>
|
||||||
|
|||||||
@ -29,7 +29,7 @@ namespace OnlineUserPool.Hander
|
|||||||
mapRecordRankings = new List<MapRecordRanking>();
|
mapRecordRankings = new List<MapRecordRanking>();
|
||||||
for (int i = 0; i < pageCount; i++)
|
for (int i = 0; i < pageCount; i++)
|
||||||
{
|
{
|
||||||
mapRecordRankings.AddRange(WebService.GetRecordFileFromServer(records.Skip(i* pageSize).Take(pageSize).Select(n => n.RankingId).ToList()));
|
mapRecordRankings.AddRange(WebService.GetRecordFileFromServer(records.Skip(i* pageSize).Take(pageSize).Select(n => n.Id).ToList()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,6 +40,10 @@ namespace OnlineUserPool.Hander
|
|||||||
public List<MsgModel> GetVirtualUserData()
|
public List<MsgModel> GetVirtualUserData()
|
||||||
{
|
{
|
||||||
List<MsgModel> msgModels = new List<MsgModel>();
|
List<MsgModel> msgModels = new List<MsgModel>();
|
||||||
|
if(ConfigHelp.ShowVirtualUser == false)
|
||||||
|
{
|
||||||
|
return msgModels;
|
||||||
|
}
|
||||||
if (mapRecordRankings != null)
|
if (mapRecordRankings != null)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < mapRecordRankings.Count; i++)
|
for (int i = 0; i < mapRecordRankings.Count; i++)
|
||||||
@ -106,7 +110,7 @@ namespace OnlineUserPool.Hander
|
|||||||
//var str = "参数:" + (ConfigHelp.Top - virutalEndCount) + "," + string.Join(",",routeIds) + "\r\n";
|
//var str = "参数:" + (ConfigHelp.Top - virutalEndCount) + "," + string.Join(",",routeIds) + "\r\n";
|
||||||
//str += "服务端返回:" + Newtonsoft.Json.JsonConvert.SerializeObject(randomUser) +"\r\n";
|
//str += "服务端返回:" + Newtonsoft.Json.JsonConvert.SerializeObject(randomUser) +"\r\n";
|
||||||
//Log.Information(str);
|
//Log.Information(str);
|
||||||
var addRankings = WebService.GetRecordFileFromServer(randomUser.Select(n => n.RankingId).ToList());
|
var addRankings = WebService.GetRecordFileFromServer(randomUser.Select(n => n.Id).ToList());
|
||||||
mapRecordRankings.AddRange(addRankings);
|
mapRecordRankings.AddRange(addRankings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,21 +6,21 @@ namespace OnlineUserPool.Model
|
|||||||
{
|
{
|
||||||
public class MapRouteAndUserQueryVM
|
public class MapRouteAndUserQueryVM
|
||||||
{
|
{
|
||||||
public long RowNumber { get; set; }
|
//public long RowNumber { get; set; }
|
||||||
|
|
||||||
public int RouteId { get; set; }
|
public int RouteId { get; set; }
|
||||||
|
|
||||||
public int UserId { get; set; }
|
//public int UserId { get; set; }
|
||||||
|
|
||||||
public string DirPath { get; set; }
|
//public string DirPath { get; set; }
|
||||||
|
|
||||||
public string NickName { get; set; }
|
//public string NickName { get; set; }
|
||||||
|
|
||||||
public string WxHeadImg { get; set; }
|
//public string WxHeadImg { get; set; }
|
||||||
|
|
||||||
public int? FTP { get; set; }
|
//public int? FTP { get; set; }
|
||||||
|
|
||||||
public string RankingId { get; set; }
|
public long Id { get; set; }
|
||||||
|
|
||||||
public string ContinueMark { get; set; }
|
public string ContinueMark { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,7 @@ namespace OnlineUserPool.Unility
|
|||||||
static BaseApi()
|
static BaseApi()
|
||||||
{
|
{
|
||||||
httpClient = new System.Net.Http.HttpClient();
|
httpClient = new System.Net.Http.HttpClient();
|
||||||
|
httpClient.DefaultRequestHeaders.UserAgent.Add(new System.Net.Http.Headers.ProductInfoHeaderValue("OnlineUserPool", "1.0.0"));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static async Task<T> PostAsync<T>(string url, object data)
|
protected static async Task<T> PostAsync<T>(string url, object data)
|
||||||
@ -47,7 +48,7 @@ namespace OnlineUserPool.Unility
|
|||||||
/// 从服务端获取记录信息
|
/// 从服务端获取记录信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<MapRecordRanking> GetRecordFileFromServer(List<string> id)
|
public static List<MapRecordRanking> GetRecordFileFromServer(List<long> id)
|
||||||
{
|
{
|
||||||
if (!id.Any())
|
if (!id.Any())
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user