size
This commit is contained in:
parent
278652ee2f
commit
3411db6188
@ -53,11 +53,12 @@ namespace YD_YiLu.Commons.Dto.DeviceSync
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class DeviceSyncUserPageResponseDto
|
public class DeviceSyncUserPageResponseDto
|
||||||
{
|
{
|
||||||
public long SyncId { get; set; }
|
public long? SyncId { get; set; }
|
||||||
public int Current { get; set; }
|
|
||||||
public int Pages { get; set; }
|
|
||||||
public int Total { get; set; }
|
|
||||||
public List<DeviceSyncUserDto> UserList { get; set; } = new List<DeviceSyncUserDto>();
|
public List<DeviceSyncUserDto> UserList { get; set; } = new List<DeviceSyncUserDto>();
|
||||||
|
public int Total { get; set; }
|
||||||
|
public int Size { get; set; }
|
||||||
|
public int Pages { get; set; }
|
||||||
|
public int Current { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -68,16 +69,23 @@ namespace YD_YiLu.Commons.Dto.DeviceSync
|
|||||||
public int UserId { get; set; }
|
public int UserId { get; set; }
|
||||||
public int UserType { get; set; }
|
public int UserType { get; set; }
|
||||||
public string Username { get; set; }
|
public string Username { get; set; }
|
||||||
|
public string Password { get; set; }
|
||||||
public string Nickname { get; set; }
|
public string Nickname { get; set; }
|
||||||
public int OrganizationId { get; set; }
|
public int OrganizationId { get; set; }
|
||||||
public string OrganizationName { get; set; }
|
public string OrganizationName { get; set; }
|
||||||
|
public int GradeId { get; set; }
|
||||||
public string GradeName { get; set; }
|
public string GradeName { get; set; }
|
||||||
public string FacePictureUrl { get; set; }
|
public string FacePictureUrl { get; set; }
|
||||||
public string Identity { get; set; }
|
public string Identity { get; set; }
|
||||||
public string Gender { get; set; }
|
public string Gender { get; set; }
|
||||||
public string Birthday { get; set; }
|
public string Birthday { get; set; }
|
||||||
public string UserSerial { get; set; }
|
public string UserSerial { get; set; }
|
||||||
public List<TrainLimitValueDto> TrainLimitValues { get; set; } = new List<TrainLimitValueDto>();
|
public string Height { get; set; }
|
||||||
|
public string Weight { get; set; }
|
||||||
|
public List<TrainLimitValueDto> TrainLimitValues { get; set; }
|
||||||
|
public int Classification { get; set; }
|
||||||
|
public int IsActive { get; set; }
|
||||||
|
public int IsDelete { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TrainLimitValueDto
|
public class TrainLimitValueDto
|
||||||
|
|||||||
@ -19,7 +19,7 @@ namespace YD_YiLu.Api
|
|||||||
{
|
{
|
||||||
serverOptions.Limits.MaxRequestBodySize = 10485760;
|
serverOptions.Limits.MaxRequestBodySize = 10485760;
|
||||||
});
|
});
|
||||||
webBuilder.UseKestrel().UseUrls("http://*:9997");
|
webBuilder.UseKestrel().UseUrls("http://*:8001");
|
||||||
webBuilder.UseIIS();
|
webBuilder.UseIIS();
|
||||||
webBuilder.UseStartup<Startup>();
|
webBuilder.UseStartup<Startup>();
|
||||||
}).UseServiceProviderFactory(new AutofacServiceProviderFactory());
|
}).UseServiceProviderFactory(new AutofacServiceProviderFactory());
|
||||||
|
|||||||
@ -56,7 +56,8 @@ namespace YD_YiLu.Api.Services.Impl
|
|||||||
{
|
{
|
||||||
UserId = s.Id,
|
UserId = s.Id,
|
||||||
UserType = 2,
|
UserType = 2,
|
||||||
Username = s.StudentNo,
|
Username = null,
|
||||||
|
Password = null,
|
||||||
Nickname = s.StudentName,
|
Nickname = s.StudentName,
|
||||||
GradeName = "",
|
GradeName = "",
|
||||||
OrganizationId = s.ClassId ?? 0,
|
OrganizationId = s.ClassId ?? 0,
|
||||||
@ -66,6 +67,12 @@ namespace YD_YiLu.Api.Services.Impl
|
|||||||
Gender = s.Sex == 1 ? "男" : "女",
|
Gender = s.Sex == 1 ? "男" : "女",
|
||||||
Birthday = s.Birthday.HasValue ? s.Birthday.Value.ToString("yyyy-MM-dd") : "",
|
Birthday = s.Birthday.HasValue ? s.Birthday.Value.ToString("yyyy-MM-dd") : "",
|
||||||
UserSerial = s.StudentNo,
|
UserSerial = s.StudentNo,
|
||||||
|
Height = null,
|
||||||
|
Weight = null,
|
||||||
|
TrainLimitValues = null,
|
||||||
|
Classification = 2,
|
||||||
|
IsActive = 1,
|
||||||
|
IsDelete = 0
|
||||||
})
|
})
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
@ -75,17 +82,19 @@ namespace YD_YiLu.Api.Services.Impl
|
|||||||
if (c != null)
|
if (c != null)
|
||||||
{
|
{
|
||||||
u.OrganizationName = FormatOrganizationName(c, u.OrganizationName);
|
u.OrganizationName = FormatOrganizationName(c, u.OrganizationName);
|
||||||
|
u.GradeId = c.GradeId;
|
||||||
u.GradeName = c.GradeName ?? "";
|
u.GradeName = c.GradeName ?? "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new DeviceSyncUserPageResponseDto
|
return new DeviceSyncUserPageResponseDto
|
||||||
{
|
{
|
||||||
SyncId = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
|
SyncId = null,
|
||||||
Current = fullSync ? 1 : pageIndex,
|
UserList = list,
|
||||||
Pages = fullSync ? 1 : (total == 0 ? 0 : (int)Math.Ceiling(total / (double)Math.Max(pageSize, 1))),
|
|
||||||
Total = total,
|
Total = total,
|
||||||
UserList = list
|
Size = pageSize,
|
||||||
|
Pages = fullSync ? 1 : (total == 0 ? 0 : (int)Math.Ceiling(total / (double)Math.Max(pageSize, 1))),
|
||||||
|
Current = fullSync ? 1 : pageIndex
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -792,7 +801,8 @@ namespace YD_YiLu.Api.Services.Impl
|
|||||||
Identity = "", // 可选
|
Identity = "", // 可选
|
||||||
Gender = st == null ? "" : (st.Sex == 1 ? "男" : "女"),
|
Gender = st == null ? "" : (st.Sex == 1 ? "男" : "女"),
|
||||||
Birthday = st?.Birthday?.ToString("yyyy-MM-dd") ?? "",
|
Birthday = st?.Birthday?.ToString("yyyy-MM-dd") ?? "",
|
||||||
UserSerial = serial
|
UserSerial = serial,
|
||||||
|
TrainLimitValues = new List<TrainLimitValueDto>()
|
||||||
};
|
};
|
||||||
|
|
||||||
// 👉 构造 trainLimitValues
|
// 👉 构造 trainLimitValues
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user