Compare commits
3 Commits
fe3e9f6535
...
6746406547
Author | SHA1 | Date | |
---|---|---|---|
6746406547 | |||
fb19e2985b | |||
c0ce4cba38 |
@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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("预约成功");
|
||||
}
|
||||
}
|
||||
}
|
@ -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());
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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();
|
||||
|
@ -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; }
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user