Compare commits

...

9 Commits
master ... dev

Author SHA1 Message Date
708592045c 弟弟 2025-07-30 16:58:05 +08:00
c49132d20b d 2025-07-29 14:10:35 +08:00
0d8a8d43f8 dd 2025-07-29 11:24:17 +08:00
7f681c37df 付费课程 2025-07-21 16:09:02 +08:00
893fe217a5 用户活跃度统计接口 2025-07-17 13:10:49 +08:00
1b94273c24 2025-07-16 10:17:47 +08:00
66770dd14b 吃的 2025-07-08 17:11:05 +08:00
f07d53220a 扫码登陆 2025-07-08 14:57:45 +08:00
91649ea2dd dd 2025-06-27 16:03:52 +08:00
21 changed files with 720 additions and 32 deletions

View File

@ -30,6 +30,7 @@ namespace YD_WeChatApplet.Context
public DbSet<G_Article> Article { get; set; }
public DbSet<Ai_SpecialAction> Ai_SpecialAction { get; set; }
public DbSet<Ai_SpecialLevel> Ai_SpecialLevel { get; set; }
public DbSet<Ai_ScanCodeLogin> Ai_ScanCodeLogin { get; set; }
public DbSet<N_SportsTestCategory> SportsTestCategory { get; set; }
public DbSet<N_HealthStandards> HealthStandards { get; set; }
public DbSet<N_AreaCategory> AreaCategory { get; set; }
@ -44,6 +45,7 @@ namespace YD_WeChatApplet.Context
public DbSet<Y_Curricular> Curricular { get; set; }
public DbSet<Y_StadiumVisiting> StadiumVisiting { get; set; }
public DbSet<Y_SchoolAccountApplication> SchoolAccountApplication { get; set; }
public DbSet<Y_CurricularPurchaseRecord> CurricularPurchaseRecord { get; set; }
}
}

View File

@ -58,6 +58,28 @@ namespace YD_WeChatApplet.Api.Controllers
return res;
}
/// <summary>
/// 付费课程分类
/// </summary>
/// <returns></returns>
[HttpGet("PaidCoursesList")]
public async Task<List<PaidCoursesListDto>> PaidCoursesList()
{
var res = await _clientSideService.PaidCoursesList();
return res;
}
/// <summary>
/// 课程兑换
/// </summary>
/// <returns></returns>
[HttpPost("PaidCoursesBuy")]
public async Task<bool> PaidCoursesBuy(string redeemCode)
{
var res = await _clientSideService.PaidCoursesBuy(redeemCode);
return res;
}
/// <summary>
/// 教学列表
/// </summary>

View File

@ -0,0 +1,34 @@
using Microsoft.AspNetCore.Mvc;
using YD_WeChatApplet.Api.Services.Interface;
using YD_WeChatApplet.Commons.Dto.HomeWork;
using YD_WeChatApplet.Commons.Dto.Patriarch;
using YD_WeChatApplet.Services;
namespace YD_WeChatApplet.Api.Controllers
{
/// <summary>
/// 公共接口
/// </summary>
[ApiController]
[ApiExplorerSettings(GroupName = "v1")]
[Route("[controller]")]
public class FrameworkController : ControllerBase
{
private readonly IFrameworkService _frameworkService;
public FrameworkController(IFrameworkService frameworkService)
{
_frameworkService = frameworkService;
}
/// <summary>
/// Ai一体机扫描登录
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
[HttpPost("ScanCodeLogin")]
public async Task<bool> ScanCodeLogin(string code)
{
return await _frameworkService.ScanCodeLogin(code);
}
}
}

View File

@ -39,11 +39,23 @@ namespace YD_WeChatApplet.Controllers
/// <returns></returns>
[AllowAnonymous]
[HttpGet("GetPersonalGoalInfo")]
public async Task<List<PersonalGoalInfoDto>> GetPersonalGoalInfo([FromQuery]PersonalGoalInfoReqDto req)
public async Task<PageDataDto<PersonalGoalInfoDto>> GetPersonalGoalInfo([FromQuery]PersonalGoalInfoReqDto req)
{
return await _serverService.GetPersonalGoalInfo(req);
}
/// <summary>
/// 获取用户训练记录
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[AllowAnonymous]
[HttpGet("GetUserTrainingRecords")]
public async Task<PageDataDto<UserTrainingRecordsDto>> GetUserTrainingRecords([FromQuery]UserTrainingRecordsReqDto req)
{
return await _serverService.GetUserTrainingRecords(req);
}
/// <summary>
/// 获取资源类型树
/// </summary>
@ -139,5 +151,17 @@ namespace YD_WeChatApplet.Controllers
{
return await _serverService.GetUserPageList(paramDto);
}
/// <summary>
/// 获取智慧体育用户管理页面数据(员工数据)
/// </summary>
/// <param name="paramDto"></param>
/// <returns></returns>
[AllowAnonymous]
[HttpGet("GetSmartSportsUserPageList")]
public async Task<PageDataDto<SmartSportsUserDto>> GetSmartSportsUserPageList([FromQuery] SmartSportsUserParam paramDto)
{
return await _serverService.GetSmartSportsUserPageList(paramDto);
}
}
}

View File

@ -123,7 +123,7 @@ namespace YD_WeChatApplet.Api.Services.Impl
/// <returns></returns>
public async Task<List<ComboBoxDto>> CurricularTaxonomyList()
{
var res = await _sportsContext.CurricularTaxonomy.Select(x => new ComboBoxDto()
var res = await _sportsContext.CurricularTaxonomy.Where(x => x.CurricularType == 1).Select(x => new ComboBoxDto()
{
Id = x.Id,
Name = x.TaxonomyName
@ -132,6 +132,58 @@ namespace YD_WeChatApplet.Api.Services.Impl
return res;
}
/// <summary>
/// 付费课程
/// </summary>
/// <returns></returns>
public async Task<List<PaidCoursesListDto>> PaidCoursesList()
{
var userId = UserLoginContext.Current.UserId;
var paidCourses = await _sportsContext.CurricularPurchaseRecord.Where(x => x.UserId == userId).ToListAsync();
var purchasedIds = paidCourses.Select(x => x.TaxonomyId).ToHashSet();
var res = await _sportsContext.CurricularTaxonomy
.Where(x => x.CurricularType == 2)
.Select(x => new PaidCoursesListDto
{
Id = x.Id,
Name = x.TaxonomyName,
IsPurchase = purchasedIds.Contains(x.Id)
}).ToListAsync();
return res;
}
/// <summary>
/// 付费课程购买
/// </summary>
/// <returns></returns>
public async Task<bool> PaidCoursesBuy(string redeemCode)
{
var paidCoursesList = new List<Y_CurricularPurchaseRecord>();
var paidCourses = await _sportsContext.CurricularTaxonomy.Where(x => x.CurricularType == 2).ToListAsync();
var userId = UserLoginContext.Current.UserId;
foreach (var paidCourse in paidCourses)
{
paidCoursesList.Add(new Y_CurricularPurchaseRecord()
{
TaxonomyId = paidCourse.Id,
UserId = userId,
RedeemCode = redeemCode,
Remarks = "",
CreateDate = DateTime.Now
});
}
await _sportsContext.AddRangeAsync(paidCoursesList);
return await _sportsContext.SaveChangesAsync() > 0;
}
/// <summary>
/// 教学列表
/// </summary>
@ -139,7 +191,7 @@ namespace YD_WeChatApplet.Api.Services.Impl
/// <returns></returns>
public async Task<PageDataDto<CurricularListDto>> CurricularList(CurricularDto dto)
{
var query = _sportsContext.Curricular;
var query = _sportsContext.Curricular.Where(x => x.TaxonomyId == dto.TaxonomyId);
var totalCount = await query.CountAsync();
@ -152,8 +204,7 @@ namespace YD_WeChatApplet.Api.Services.Impl
CoverImage = x.CoverImage,
Hits = x.Hits,
Url = x.Url
}).Where(x => x.TaxonomyId == dto.TaxonomyId)
.Skip((dto.PageIndex - 1) * dto.PageSize)
}).Skip((dto.PageIndex - 1) * dto.PageSize)
.Take(dto.PageSize)
.ToListAsync();

View File

@ -0,0 +1,41 @@
using AutoMapper;
using YD_WeChatApplet.Api.Services.Interface;
using YD_WeChatApplet.Api.SmartSportsEntitys;
using YD_WeChatApplet.Api.Utilities;
using YD_WeChatApplet.Context;
namespace YD_WeChatApplet.Api.Services.Impl
{
/// <summary>
/// 公共接口
/// </summary>
public class FrameworkService : IFrameworkService
{
public SmartSportsContext _sportsContext;
public FrameworkService(SmartSportsContext sportsContext)
{
_sportsContext = sportsContext;
}
/// <summary>
/// Ai一体机扫描登录
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
public async Task<bool> ScanCodeLogin(string code)
{
var entity = new Ai_ScanCodeLogin()
{
Code = code,
SchoolCode = UserLoginContext.Current.SchoolCode,
TeacherId = UserLoginContext.Current.UserId,
TeacherPhoneNo = UserLoginContext.Current.PhoneNo,
CreateDate = DateTime.Now
};
await _sportsContext.AddAsync(entity);
return await _sportsContext.SaveChangesAsync() > 0;
}
}
}

View File

@ -1,6 +1,7 @@
using AutoMapper;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Globalization;
using YD_WeChatApplet.Api.SmartSportsEntitys;
using YD_WeChatApplet.Api.Utilities;
using YD_WeChatApplet.Commons.Dto;
@ -34,8 +35,13 @@ namespace YD_WeChatApplet.Api.Services.Impl
{
List<S_HomeWork> homeWorkEntities = new List<S_HomeWork>();
DateTime startDate = paramDto.StartTime;
DateTime endDate = paramDto.EndTime;
string startmmed = paramDto.StartTime.Substring(0, 19);
string endmmed = paramDto.EndTime.Substring(0, 19);
DateTime startDate = DateTime.ParseExact(startmmed, "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
DateTime endDate = DateTime.ParseExact(endmmed, "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
paramDto.StartTime = startmmed;
var weekList = paramDto.WeekList;

View File

@ -18,6 +18,7 @@ using System.Net;
using YD_WeChatApplet.Api.SmartSportsEntitys;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Authorization;
using System.Linq;
using System.Text.Json;
using YD_WeChatApplet.Commons.Dto.School;
using VOL.Entity.DomainModels;
@ -41,12 +42,11 @@ namespace YD_WeChatApplet.Services
/// 获取打卡详情
/// </summary>
/// <returns></returns>
public async Task<List<PersonalGoalInfoDto>> GetPersonalGoalInfo(PersonalGoalInfoReqDto req)
public async Task<PageDataDto<PersonalGoalInfoDto>> GetPersonalGoalInfo(PersonalGoalInfoReqDto req)
{
var pgList = await (
from pg in _userContext.PersonalGoal
var query = from pg in _userContext.PersonalGoal
join pgr in _userContext.PersonalGoalResult on pg.Id equals pgr.PersonalGoalId
where pg.UserId == req.UserId && pg.GoalDate.Month == req.Month.Month && pg.GoalDate.Year == req.Month.Year
where pg.UserId == req.UserId
select new PersonalGoalInfoDto()
{
GoalDuration = pg.GoalDuration,
@ -54,9 +54,101 @@ namespace YD_WeChatApplet.Services
GoalDate = pg.GoalDate,
Amount = pgr.Amount,
IsFinish = pg.GoalAmount > pgr.Amount
}).ToListAsync();
};
return pgList;
// 如果提供了月份筛选
if (!string.IsNullOrEmpty(req.Month) && DateTime.TryParse(req.Month, out DateTime monthDate))
{
query = query.Where(x => x.GoalDate.Month == monthDate.Month && x.GoalDate.Year == monthDate.Year);
}
var total = await query.CountAsync();
var pgList = await query
.OrderByDescending(x => x.GoalDate)
.Skip((req.PageIndex - 1) * req.PageSize)
.Take(req.PageSize)
.ToListAsync();
return new PageDataDto<PersonalGoalInfoDto>
{
Total = total,
Datas = pgList
};
}
/// <summary>
/// 获取用户训练记录
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public async Task<PageDataDto<UserTrainingRecordsDto>> GetUserTrainingRecords(UserTrainingRecordsReqDto req)
{
// 查询个人目标结果表
var personalQuery = from pgr in _userContext.PersonalGoalResult
where pgr.UserId == req.UserId
select new UserTrainingRecordsDto
{
Id = pgr.Id,
TrainingType = pgr.PersonalGoalType.ToString(),
TrainingMode = pgr.WorkModeTypeName,
Duration = pgr.Duration,
JumpCount = pgr.Amount,
Kcal = pgr.Amount / 10m, // 简单的卡路里计算
TrainingTime = pgr.CreateTime,
DataSource = "个人训练"
};
// 查询团队任务结果表
var teamQuery = from gtr in _userContext.GroupTaskResult
where gtr.UserId == req.UserId
select new UserTrainingRecordsDto
{
Id = gtr.Id,
TrainingType = "团队训练",
TrainingMode = gtr.WorkModeTypeName,
Duration = gtr.Duration,
JumpCount = gtr.Amount,
Kcal = gtr.Amount / 10m, // 简单的卡路里计算
TrainingTime = gtr.CreateTime,
DataSource = "团队训练"
};
// 合并查询结果
var combinedQuery = personalQuery.Union(teamQuery);
// 应用筛选条件
if (!string.IsNullOrEmpty(req.Type))
{
combinedQuery = combinedQuery.Where(x => x.TrainingType.Contains(req.Type));
}
if (!string.IsNullOrEmpty(req.Mode))
{
combinedQuery = combinedQuery.Where(x => x.TrainingMode.Contains(req.Mode));
}
if (!string.IsNullOrEmpty(req.StartTime) && DateTime.TryParse(req.StartTime, out DateTime startTime))
{
combinedQuery = combinedQuery.Where(x => x.TrainingTime >= startTime);
}
if (!string.IsNullOrEmpty(req.EndTime) && DateTime.TryParse(req.EndTime, out DateTime endTime))
{
combinedQuery = combinedQuery.Where(x => x.TrainingTime <= endTime);
}
var total = await combinedQuery.CountAsync();
var records = await combinedQuery
.OrderByDescending(x => x.TrainingTime)
.Skip((req.PageIndex - 1) * req.PageSize)
.Take(req.PageSize)
.ToListAsync();
return new PageDataDto<UserTrainingRecordsDto>
{
Total = total,
Datas = records
};
}
/// <summary>
@ -372,5 +464,56 @@ namespace YD_WeChatApplet.Services
return res;
}
/// <summary>
/// 获取智慧体育用户管理页面数据(员工数据)
/// </summary>
/// <param name="paramDto"></param>
/// <returns></returns>
public async Task<PageDataDto<SmartSportsUserDto>> GetSmartSportsUserPageList(SmartSportsUserParam paramDto)
{
var res = new PageDataDto<SmartSportsUserDto>();
var query = _userContext.Users.Select(x => new SmartSportsUserDto
{
User_Id = x.User_Id,
UserName = x.UserName ?? "",
UserTrueName = x.UserTrueName ?? "",
HeadImageUrl = x.HeadImageUrl ?? "",
BirthDate = x.BirthDate ?? "",
Gender = x.Gender,
Address = x.Address ?? "",
Height = x.Height.HasValue ? x.Height.Value.ToString() : "",
Weight = x.Weight.HasValue ? x.Weight.Value.ToString() : "",
Role = "员工", // 微信小程序用户统一标记为员工
CreateDate = x.CreateDate,
GradeId = null, // 员工数据没有年级概念
GradeName = "" // 员工数据没有年级概念
});
// 按姓名筛选
if (!string.IsNullOrEmpty(paramDto.UserTrueName))
{
query = query.Where(x => x.UserTrueName.Contains(paramDto.UserTrueName));
}
// 按性别筛选
if (paramDto.Gender.HasValue)
{
query = query.Where(x => x.Gender == paramDto.Gender);
}
// 注意:员工数据没有年级概念,所以忽略 GradeId 筛选
res.Total = await query.CountAsync();
var list = await query.OrderByDescending(x => x.CreateDate)
.Skip((paramDto.PageIndex - 1) * paramDto.PageSize)
.Take(paramDto.PageSize)
.ToListAsync();
res.Datas = list;
return res;
}
}
}

View File

@ -38,6 +38,18 @@ namespace YD_WeChatApplet.Services
/// <returns></returns>
Task<List<ComboBoxDto>> CurricularTaxonomyList();
/// <summary>
/// 付费课程分类
/// </summary>
/// <returns></returns>
Task<List<PaidCoursesListDto>> PaidCoursesList();
/// <summary>
/// 付费课程购买
/// </summary>
/// <returns></returns>
Task<bool> PaidCoursesBuy(string redeemCode);
/// <summary>
/// 课程列表
/// </summary>

View File

@ -0,0 +1,15 @@
namespace YD_WeChatApplet.Api.Services.Interface
{
/// <summary>
/// 公共接口
/// </summary>
public interface IFrameworkService
{
/// <summary>
/// Ai一体机扫描登录
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
Task<bool> ScanCodeLogin(string code);
}
}

View File

@ -15,7 +15,14 @@ namespace YD_WeChatApplet.Services
/// 获取打卡详情
/// </summary>
/// <returns></returns>
Task<List<PersonalGoalInfoDto>> GetPersonalGoalInfo(PersonalGoalInfoReqDto req);
Task<PageDataDto<PersonalGoalInfoDto>> GetPersonalGoalInfo(PersonalGoalInfoReqDto req);
/// <summary>
/// 获取用户训练记录
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
Task<PageDataDto<UserTrainingRecordsDto>> GetUserTrainingRecords(UserTrainingRecordsReqDto req);
/// <summary>
/// 获取资源类型树
@ -73,5 +80,11 @@ namespace YD_WeChatApplet.Services
/// <returns></returns>
Task<PageDataDto<UserPageListDto>> GetUserPageList(UserPageListParam paramDto);
/// <summary>
/// 获取智慧体育用户管理页面数据(员工数据)
/// </summary>
/// <param name="paramDto"></param>
/// <returns></returns>
Task<PageDataDto<SmartSportsUserDto>> GetSmartSportsUserPageList(SmartSportsUserParam paramDto);
}
}

View File

@ -0,0 +1,62 @@
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace YD_WeChatApplet.Api.SmartSportsEntitys
{
[Table("Ai_ScanCodeLogin")]
public class Ai_ScanCodeLogin
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Display(Description = "主键Id")]
[Comment("Id")]
public int Id { get; set; }
/// <summary>
/// AI设备的唯一编码
/// </summary>
[Display(Name = "AI设备的唯一编码")]
[Comment("AI设备的唯一编码")]
[Column(TypeName = "nvarchar(100)")]
public string Code { get; set; }
/// <summary>
///学校编号
/// </summary>
[Display(Name = "学校编号")]
[Comment("学校编号")]
[Column(TypeName = "nvarchar(100)")]
public string SchoolCode { get; set; }
/// <summary>
///老师Id
/// </summary>
[Display(Name = "老师Id")]
[Comment("老师Id")]
[Column(TypeName = "int")]
public int TeacherId { get; set; }
/// <summary>
///老师联系方式
/// </summary>
[Display(Name = "老师联系方式")]
[Comment("老师联系方式")]
[Column(TypeName = "nvarchar(20)")]
public string TeacherPhoneNo { get; set; }
/// <summary>
///创建时间
/// </summary>
[Display(Name = "创建时间")]
[Comment("创建时间")]
[Column(TypeName = "datetime")]
[Editable(true)]
public DateTime? CreateDate { get; set; }
}
}

View File

@ -0,0 +1,61 @@
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace YD_WeChatApplet.Api.SmartSportsEntitys
{
/// <summary>
/// 课程购买记录表
/// </summary>
[Table("Y_CurricularPurchaseRecord")]
public class Y_CurricularPurchaseRecord
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Display(Description = "主键Id")]
[Comment("Id")]
public int Id { get; set; }
/// <summary>
///用户Id
/// </summary>
[Display(Name = "用户Id")]
[Comment("用户Id")]
[Column(TypeName = "int)")]
public int UserId { get; set; }
/// <summary>
///分类Id
/// </summary>
[Display(Name = "分类Id")]
[Comment("分类Id")]
[Column(TypeName = "int)")]
public int TaxonomyId { get; set; }
/// <summary>
///兑换码
/// </summary>
[Display(Name = "兑换码")]
[Comment("兑换码")]
[Column(TypeName = "nvarchar(1000)")]
public string RedeemCode { get; set; }
/// <summary>
///备注
/// </summary>
[Display(Name = "备注")]
[Comment("备注")]
[Column(TypeName = "text")]
public string Remarks { get; set; }
/// <summary>
///创建时间
/// </summary>
[Display(Name = "创建时间")]
[Comment("创建时间")]
[Column(TypeName = "datetime")]
public DateTime CreateDate { get; set; }
}
}

View File

@ -23,5 +23,13 @@ namespace YD_WeChatApplet.Api.SmartSportsEntitys
[Comment("分类名称")]
[Column(TypeName = "nvarchar(100)")]
public string TaxonomyName { get; set; }
/// <summary>
///课程类型
/// </summary>
[Display(Name = "课程类型")]
[Comment("课程类型")]
[Column(TypeName = "int)")]
public int CurricularType { get; set; }
}
}

View File

@ -22,6 +22,7 @@ using Autofac;
using YD_WeChatApplet.Api.Services.Impl;
using YD_WeChatApplet.Api.AutoMappers;
using YD_WeChatApplet.Api.Filters;
using YD_WeChatApplet.Api.Services.Interface;
namespace YD_WeChatApplet
{
@ -66,6 +67,7 @@ namespace YD_WeChatApplet
services.AddScoped<IClientSideService, ClientSideService>();
services.AddScoped<IUserPreferenceService, UserPreferenceService>();
services.AddScoped<IServerService, ServerService>();
services.AddScoped<IFrameworkService, FrameworkService>();
services.AddScoped<ICacheService, RedisCacheService>();
services.AddSession();
@ -279,13 +281,13 @@ namespace YD_WeChatApplet
//配置HttpContext
app.UseStaticHttpContext();
app.UseSwagger();
app.UseSwaggerUI(c =>
{
//2个下拉框选项 选择对应的文档
c.SwaggerEndpoint("/swagger/v1/swagger.json", "YD_WeChatApplet.Api");
c.RoutePrefix = "";
});
//app.UseSwagger();
//app.UseSwaggerUI(c =>
//{
// //2个下拉框选项 选择对应的文档
// c.SwaggerEndpoint("/swagger/v1/swagger.json", "YD_WeChatApplet.Api");
// c.RoutePrefix = "";
//});
app.UseRouting();
app.UseCors();

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YD_WeChatApplet.Commons.Dto.HomeWork;
namespace YD_WeChatApplet.Commons.Dto.ClientSide
{
/// <summary>
/// 付费课程列表
/// </summary>
public class PaidCoursesListDto : ComboBoxDto
{
/// <summary>
/// 是否购买
/// </summary>
public bool IsPurchase { get; set; }
}
}

View File

@ -97,12 +97,12 @@ namespace YD_WeChatApplet.Commons.Dto.HomeWork
/// <summary>
///开始时间
/// </summary>
public DateTime StartTime { get; set; }
public string StartTime { get; set; }
/// <summary>
///结束时间
/// </summary>
public DateTime EndTime { get; set; }
public string EndTime { get; set; }
/// <summary>
/// 学生集合

View File

@ -8,7 +8,9 @@ namespace YD_WeChatApplet.Commons
{
public class PersonalGoalInfoReqDto
{
public int PageIndex { get; set; } = 1;
public int PageSize { get; set; } = 31;
public int UserId { get; set; }
public DateTime Month { get; set; }
public string Month { get; set; }
}
}

View File

@ -0,0 +1,100 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace YD_WeChatApplet.Commons.Dto.Server
{
/// <summary>
/// 智慧体育用户管理页面数据传输对象
/// </summary>
public class SmartSportsUserDto
{
/// <summary>
/// 用户ID
/// </summary>
public int User_Id { get; set; }
/// <summary>
/// 用户名
/// </summary>
public string UserName { get; set; }
/// <summary>
/// 用户姓名
/// </summary>
public string UserTrueName { get; set; }
/// <summary>
/// 头像
/// </summary>
public string HeadImageUrl { get; set; }
/// <summary>
/// 年级ID
/// </summary>
public int? GradeId { get; set; }
/// <summary>
/// 年级名称
/// </summary>
public string GradeName { get; set; }
/// <summary>
/// 出生年月
/// </summary>
public string BirthDate { get; set; }
/// <summary>
/// 性别
/// </summary>
public int? Gender { get; set; }
/// <summary>
/// 地址
/// </summary>
public string Address { get; set; }
/// <summary>
/// 身高(字符串格式)
/// </summary>
public string Height { get; set; }
/// <summary>
/// 体重(字符串格式)
/// </summary>
public string Weight { get; set; }
/// <summary>
/// 拥有身份
/// </summary>
public string Role { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime? CreateDate { get; set; }
}
/// <summary>
/// 智慧体育用户管理页面查询参数
/// </summary>
public class SmartSportsUserParam : PageDto
{
/// <summary>
/// 用户姓名
/// </summary>
public string UserTrueName { get; set; }
/// <summary>
/// 年级ID
/// </summary>
public int? GradeId { get; set; }
/// <summary>
/// 性别
/// </summary>
public int? Gender { get; set; }
}
}

View File

@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace YD_WeChatApplet.Commons
{
public class UserTrainingRecordsDto
{
/// <summary>
/// 训练ID
/// </summary>
public int Id { get; set; }
/// <summary>
/// 训练类型
/// </summary>
public string TrainingType { get; set; }
/// <summary>
/// 训练模式
/// </summary>
public string TrainingMode { get; set; }
/// <summary>
/// 训练时长(分钟)
/// </summary>
public int Duration { get; set; }
/// <summary>
/// 跳绳个数
/// </summary>
public int JumpCount { get; set; }
/// <summary>
/// 消耗卡路里
/// </summary>
public decimal Kcal { get; set; }
/// <summary>
/// 训练时间
/// </summary>
public DateTime TrainingTime { get; set; }
/// <summary>
/// 数据来源
/// </summary>
public string DataSource { get; set; }
}
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace YD_WeChatApplet.Commons
{
public class UserTrainingRecordsReqDto
{
public int PageIndex { get; set; } = 1;
public int PageSize { get; set; } = 10;
public int UserId { get; set; }
public string Type { get; set; }
public string Mode { get; set; }
public string StartTime { get; set; }
public string EndTime { get; set; }
}
}