Compare commits

...

3 Commits

Author SHA1 Message Date
6746406547 ss 2025-06-18 16:38:13 +08:00
fb19e2985b Merge branch 'dev' 2025-06-18 15:35:59 +08:00
c0ce4cba38 学校预约 2025-06-17 11:33:21 +08:00
8 changed files with 177 additions and 8 deletions

View File

@ -43,6 +43,7 @@ namespace YD_WeChatApplet.Context
public DbSet<Y_CurricularTaxonomy> CurricularTaxonomy { get; set; }
public DbSet<Y_Curricular> Curricular { get; set; }
public DbSet<Y_StadiumVisiting> StadiumVisiting { get; set; }
public DbSet<Y_SchoolAccountApplication> SchoolAccountApplication { get; set; }
}
}

View File

@ -363,5 +363,17 @@ namespace YD_WeChatApplet.Api.Controllers
var res = await _clientSideService.CetCheckInRecord(dto);
return res;
}
/// <summary>
/// 学校账号预约
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost("SchoolAccountApplication")]
public async Task<IActionResult> SchoolAccountApplication([FromBody] SchoolAccountApplicationDto dto)
{
await _clientSideService.SchoolAccountApplication(dto);
return Ok("预约成功");
}
}
}

View File

@ -19,7 +19,7 @@ namespace YD_WeChatApplet
{
serverOptions.Limits.MaxRequestBodySize = 10485760;
});
webBuilder.UseKestrel().UseUrls("http://*:9993");
webBuilder.UseKestrel().UseUrls("http://*:9995");
webBuilder.UseIIS();
webBuilder.UseStartup<Startup>();
}).UseServiceProviderFactory(new AutofacServiceProviderFactory());

View File

@ -1270,5 +1270,29 @@ namespace YD_WeChatApplet.Api.Services.Impl
return dailyRecords;
}
/// <summary>
/// 学校账号预约
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
public async Task SchoolAccountApplication(SchoolAccountApplicationDto dto)
{
var timeNow = DateTime.Now;
var entity = new Y_SchoolAccountApplication()
{
SchoolName = dto.SchoolName,
SchoolAddress = dto.SchoolAddress,
PhoneNo = dto.PhoneNo,
UserName = dto.UserName,
Remarks = dto.Remarks,
Status = 1,
VisitingTime = timeNow,
UpdateTime = timeNow
};
await _sportsContext.SchoolAccountApplication.AddAsync(entity);
await _sportsContext.SaveChangesAsync();
}
}
}

View File

@ -212,5 +212,13 @@ namespace YD_WeChatApplet.Services
/// <param name="dto"></param>
/// <returns></returns>
Task<List<CheckInRecordDto>> CetCheckInRecord(CetCheckInRecordDto dto);
/// <summary>
/// 学校账号预约
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
Task SchoolAccountApplication(SchoolAccountApplicationDto dto);
}
}

View File

@ -0,0 +1,83 @@
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using YD_WeChatApplet.Api.Entitys;
namespace YD_WeChatApplet.Api.SmartSportsEntitys
{
[Table("Y_SchoolAccountApplication")]
public class Y_SchoolAccountApplication
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Display(Description = "主键Id")]
[Comment("Id")]
public int Id { get; set; }
/// <summary>
///学校名称
/// </summary>
[Display(Name = "学校名称")]
[Comment("学校名称")]
[Column(TypeName = "nvarchar(100)")]
public string SchoolName { get; set; }
/// <summary>
///学校地址
/// </summary>
[Display(Name = "学校地址")]
[Comment("学校地址")]
[Column(TypeName = "nvarchar(1000)")]
public string SchoolAddress { get; set; }
/// <summary>
/// 用户姓名
/// </summary>
[Display(Name = "用户姓名")]
[Comment("用户姓名")]
[Column(TypeName = "nvarchar(2000)")]
public string UserName { get; set; }
/// <summary>
/// 联系电话
/// </summary>
[Display(Name = "联系电话")]
[Comment("联系电话")]
[Column(TypeName = "nvarchar(11)")]
public string PhoneNo { get; set; }
/// <summary>
/// 状态[1:未处理/2:已处理]
/// </summary>
[Display(Name = "状态")]
[Comment("状态")]
[Column(TypeName = "int)")]
public int Status { get; set; }
/// <summary>
///来访时间
/// </summary>
[Display(Name = "来访时间")]
[Comment("来访时间")]
[Column(TypeName = "datetime")]
public DateTime? VisitingTime { get; set; }
/// <summary>
///最后修改时间
/// </summary>
[Display(Name = "最后修改时间")]
[Comment("最后修改时间")]
[Column(TypeName = "datetime")]
public DateTime? UpdateTime { get; set; }
/// <summary>
///备注
/// </summary>
[Display(Name = "备注")]
[Comment("备注")]
[Column(TypeName = "text")]
public string Remarks { get; set; }
}
}

View File

@ -279,13 +279,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,41 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace YD_WeChatApplet.Commons.Dto.ClientSide
{
/// <summary>
/// 学校账号预约
/// </summary>
public class SchoolAccountApplicationDto
{
/// <summary>
///学校名称
/// </summary>
public string SchoolName { get; set; }
/// <summary>
///学校地址
/// </summary>
public string SchoolAddress { get; set; }
/// <summary>
/// 用户姓名
/// </summary>
public string UserName { get; set; }
/// <summary>
/// 联系电话
/// </summary>
public string PhoneNo { get; set; }
/// <summary>
///备注
/// </summary>
public string Remarks { get; set; }
}
}