移动和修改功能

main
lgd 2 months ago
parent edee34898e
commit 8491969462

@ -419,6 +419,21 @@ namespace OpenAuth.App.ServiceApp
}
return new Response<string> { Result = "删除成功!" };
}
public async Task<Response<string>> UpdatePicName(string id, string name)
{
string sql = "update lasa_mediafile set \"Name\"='" + name + "' where \"Id\"='" + id + "'";
await _client.Ado.ExecuteCommandAsync(sql);
return new Response<string> { Result = "修改成功!" };
}
public async Task<Response<string>> UpdatePicParentKey(string id, string ParentKey)
{
string sql = "update lasa_mediafile set \"Name\"='" + ParentKey + "' where \"Id\"='" + id + "'";
await _client.Ado.ExecuteCommandAsync(sql);
return new Response<string> { Result = "修改成功!" };
}
}

@ -710,5 +710,41 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
}
return result;
}
[HttpGet]
[AllowAnonymous]
public async Task<Response<string>> UpdatePicName(string id, string name)
{
var result = new Response<string>();
try
{
result = await _app.UpdatePicName(id, name);
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.Message;
}
return result;
}
[HttpGet]
[AllowAnonymous]
public async Task<Response<string>> UpdatePicParentKey(string id, string ParentKey)
{
var result = new Response<string>();
try
{
result = await _app.UpdatePicParentKey(id, ParentKey);
}
catch (Exception ex)
{
result.Code = 500;
result.Message = ex.Message;
}
return result;
}
}
}

Loading…
Cancel
Save