c
This commit is contained in:
parent
580d586b2d
commit
4be147ed0c
@ -55,7 +55,7 @@ namespace YD_AllHeartRates.Api.Controllers
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost(nameof(AddDevice))]
|
||||
public async Task<bool> AddDevice(AddDeviceDto dto)
|
||||
public async Task<bool> AddDevice([FromBody] AddDeviceDto dto)
|
||||
{
|
||||
var res = await _deviceService.AddDevice(dto);
|
||||
return res;
|
||||
@ -66,7 +66,7 @@ namespace YD_AllHeartRates.Api.Controllers
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost(nameof(UpdateDevice))]
|
||||
public async Task<bool> UpdateDevice(AddDeviceDto dto)
|
||||
public async Task<bool> UpdateDevice([FromBody] AddDeviceDto dto)
|
||||
{
|
||||
var res = await _deviceService.UpdateDevice(dto);
|
||||
return res;
|
||||
|
Binary file not shown.
@ -4228,6 +4228,12 @@
|
||||
<member name="P:YD_AllHeartRates.Commons.Fakes.ShimUserInfoDto.AllInstances.SchoolCodeSetString">
|
||||
<summary>设置 UserInfoDto.set_SchoolCode(UserInfoDto this, String value) 的 填充码</summary>
|
||||
</member>
|
||||
<member name="P:YD_AllHeartRates.Commons.Fakes.ShimUserInfoDto.AllInstances.SchoolNameGet">
|
||||
<summary>设置 UserInfoDto.get_SchoolName(UserInfoDto this) 的 填充码</summary>
|
||||
</member>
|
||||
<member name="P:YD_AllHeartRates.Commons.Fakes.ShimUserInfoDto.AllInstances.SchoolNameSetString">
|
||||
<summary>设置 UserInfoDto.set_SchoolName(UserInfoDto this, String value) 的 填充码</summary>
|
||||
</member>
|
||||
<member name="P:YD_AllHeartRates.Commons.Fakes.ShimUserInfoDto.AllInstances.TokenGet">
|
||||
<summary>设置 UserInfoDto.get_Token(UserInfoDto this) 的 填充码</summary>
|
||||
</member>
|
||||
@ -4294,6 +4300,12 @@
|
||||
<member name="P:YD_AllHeartRates.Commons.Fakes.ShimUserInfoDto.SchoolCodeSetString">
|
||||
<summary>设置 UserInfoDto.set_SchoolCode(UserInfoDto this, String value) 的 填充码</summary>
|
||||
</member>
|
||||
<member name="P:YD_AllHeartRates.Commons.Fakes.ShimUserInfoDto.SchoolNameGet">
|
||||
<summary>设置 UserInfoDto.get_SchoolName(UserInfoDto this) 的 填充码</summary>
|
||||
</member>
|
||||
<member name="P:YD_AllHeartRates.Commons.Fakes.ShimUserInfoDto.SchoolNameSetString">
|
||||
<summary>设置 UserInfoDto.set_SchoolName(UserInfoDto this, String value) 的 填充码</summary>
|
||||
</member>
|
||||
<member name="P:YD_AllHeartRates.Commons.Fakes.ShimUserInfoDto.TokenGet">
|
||||
<summary>设置 UserInfoDto.get_Token(UserInfoDto this) 的 填充码</summary>
|
||||
</member>
|
||||
|
@ -154,7 +154,7 @@ namespace YD_AllHeartRates.Api.Services.Impl
|
||||
var device = await _sportsContext.Device.Where(x => x.Code == dto.Code).FirstOrDefaultAsync();
|
||||
|
||||
if (device != null)
|
||||
throw new Exception($"设备编号:{dto.Code}的学生已存在!");
|
||||
throw new Exception($"设备编号:{dto.Code}的已存在!");
|
||||
|
||||
|
||||
var entity = new S_Device()
|
||||
|
@ -307,13 +307,13 @@ namespace YD_AllHeartRates.Api
|
||||
app.UseStaticHttpContext();
|
||||
app.UseMiddleware<JwtContextMiddleware>();
|
||||
|
||||
//app.UseSwagger();
|
||||
//app.UseSwaggerUI(c =>
|
||||
//{
|
||||
// //2个下拉框选项 选择对应的文档
|
||||
// c.SwaggerEndpoint("/swagger/v1/swagger.json", "YD_AllHeartRates.Api");
|
||||
// c.RoutePrefix = "";
|
||||
//});
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
//2个下拉框选项 选择对应的文档
|
||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "YD_AllHeartRates.Api");
|
||||
c.RoutePrefix = "";
|
||||
});
|
||||
|
||||
app.UseRouting();
|
||||
app.UseCors();
|
||||
|
@ -8,19 +8,9 @@
|
||||
"Order": 0,
|
||||
"Parameters": [
|
||||
{
|
||||
"Name": "Code",
|
||||
"Type": "System.String",
|
||||
"IsRequired": false
|
||||
},
|
||||
{
|
||||
"Name": "DeviceType",
|
||||
"Type": "System.Int32",
|
||||
"IsRequired": false
|
||||
},
|
||||
{
|
||||
"Name": "StudentNo",
|
||||
"Type": "System.String",
|
||||
"IsRequired": false
|
||||
"Name": "dto",
|
||||
"Type": "YD_AllHeartRates.Commons.Dto.Device.AddDeviceDto",
|
||||
"IsRequired": true
|
||||
}
|
||||
],
|
||||
"ReturnTypes": [
|
||||
@ -368,19 +358,9 @@
|
||||
"Order": 0,
|
||||
"Parameters": [
|
||||
{
|
||||
"Name": "Code",
|
||||
"Type": "System.String",
|
||||
"IsRequired": false
|
||||
},
|
||||
{
|
||||
"Name": "DeviceType",
|
||||
"Type": "System.Int32",
|
||||
"IsRequired": false
|
||||
},
|
||||
{
|
||||
"Name": "StudentNo",
|
||||
"Type": "System.String",
|
||||
"IsRequired": false
|
||||
"Name": "dto",
|
||||
"Type": "YD_AllHeartRates.Commons.Dto.Device.AddDeviceDto",
|
||||
"IsRequired": true
|
||||
}
|
||||
],
|
||||
"ReturnTypes": [
|
||||
|
@ -136,30 +136,30 @@
|
||||
"Device"
|
||||
],
|
||||
"summary": "新增设备",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Code",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "DeviceType",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "StudentNo",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json-patch+json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AddDeviceDto"
|
||||
}
|
||||
},
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AddDeviceDto"
|
||||
}
|
||||
},
|
||||
"text/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AddDeviceDto"
|
||||
}
|
||||
},
|
||||
"application/*+json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AddDeviceDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
@ -190,30 +190,30 @@
|
||||
"Device"
|
||||
],
|
||||
"summary": "编辑设备",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Code",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "DeviceType",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "StudentNo",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json-patch+json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AddDeviceDto"
|
||||
}
|
||||
},
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AddDeviceDto"
|
||||
}
|
||||
},
|
||||
"text/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AddDeviceDto"
|
||||
}
|
||||
},
|
||||
"application/*+json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AddDeviceDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
@ -663,6 +663,24 @@
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"AddDeviceDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"deviceType": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"studentNo": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ChartDataDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -1170,6 +1188,10 @@
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"schoolName": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"user_Id": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
|
Binary file not shown.
Binary file not shown.
@ -4228,6 +4228,12 @@
|
||||
<member name="P:YD_AllHeartRates.Commons.Fakes.ShimUserInfoDto.AllInstances.SchoolCodeSetString">
|
||||
<summary>设置 UserInfoDto.set_SchoolCode(UserInfoDto this, String value) 的 填充码</summary>
|
||||
</member>
|
||||
<member name="P:YD_AllHeartRates.Commons.Fakes.ShimUserInfoDto.AllInstances.SchoolNameGet">
|
||||
<summary>设置 UserInfoDto.get_SchoolName(UserInfoDto this) 的 填充码</summary>
|
||||
</member>
|
||||
<member name="P:YD_AllHeartRates.Commons.Fakes.ShimUserInfoDto.AllInstances.SchoolNameSetString">
|
||||
<summary>设置 UserInfoDto.set_SchoolName(UserInfoDto this, String value) 的 填充码</summary>
|
||||
</member>
|
||||
<member name="P:YD_AllHeartRates.Commons.Fakes.ShimUserInfoDto.AllInstances.TokenGet">
|
||||
<summary>设置 UserInfoDto.get_Token(UserInfoDto this) 的 填充码</summary>
|
||||
</member>
|
||||
@ -4294,6 +4300,12 @@
|
||||
<member name="P:YD_AllHeartRates.Commons.Fakes.ShimUserInfoDto.SchoolCodeSetString">
|
||||
<summary>设置 UserInfoDto.set_SchoolCode(UserInfoDto this, String value) 的 填充码</summary>
|
||||
</member>
|
||||
<member name="P:YD_AllHeartRates.Commons.Fakes.ShimUserInfoDto.SchoolNameGet">
|
||||
<summary>设置 UserInfoDto.get_SchoolName(UserInfoDto this) 的 填充码</summary>
|
||||
</member>
|
||||
<member name="P:YD_AllHeartRates.Commons.Fakes.ShimUserInfoDto.SchoolNameSetString">
|
||||
<summary>设置 UserInfoDto.set_SchoolName(UserInfoDto this, String value) 的 填充码</summary>
|
||||
</member>
|
||||
<member name="P:YD_AllHeartRates.Commons.Fakes.ShimUserInfoDto.TokenGet">
|
||||
<summary>设置 UserInfoDto.get_Token(UserInfoDto this) 的 填充码</summary>
|
||||
</member>
|
||||
|
@ -1 +1 @@
|
||||
9711cc5c
|
||||
7def3707
|
@ -1 +1 @@
|
||||
H0ECemtgImgUL+ed0QTYd0QKQdt298k5eTynx9sm+9g=WWmIfOUbyYPYdKFHlVpzo+vbEnfIsJNTTcG8+oWdtSc=
|
||||
kpAOGOwQr+PqcqSkET2ftxen78nx6+ufMJyhzNQMesU=WWmIfOUbyYPYdKFHlVpzo+vbEnfIsJNTTcG8+oWdtSc=
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("YD_AllHeartRates.Api")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f0419e702dd7130a559633ce5d9b2216ffa6dee9")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+580d586b2d20254267b1182a8ceff393c252da81")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("YD_AllHeartRates.Api")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("YD_AllHeartRates.Api")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
8303687dca1a5c1160892a9951d580b843d385e84c8eeaba402820a8a41dea82
|
||||
d0fd70ca558eb27a63b8502db6933ff8d4d403e75a3eb07f44cb84badd7aeaea
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("YD_AllHeartRates.Commons")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d8a77cfbaf3548e4732854d92784d08a66af29c0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+580d586b2d20254267b1182a8ceff393c252da81")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("YD_AllHeartRates.Commons")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("YD_AllHeartRates.Commons")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
f7b7947998f79688e9ed9c7b544bfefa644b2fe11632a2252fd955fabfe9529a
|
||||
35d58a7d90dcca1c52be85a8d3e3e2c8fc425c6c7ec2830346ca890579682685
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user