66 lines
1.9 KiB
C#
66 lines
1.9 KiB
C#
using CloudGaming.Api.Admin.ApplicationServices.Apps.Ext;
|
|
using CloudGaming.AppConfigModel;
|
|
namespace CloudGaming.Api.Admin.Controllers.Apps.Ext;
|
|
/// <summary>
|
|
/// 控制器
|
|
/// </summary>
|
|
[ApiResultFilter]
|
|
[Route("api/v1/admin/Game/[controller]/[action]")]
|
|
[ControllerDescriptor(MenuId = "请设置菜单Id 系统菜单表中查找,如果不设置不受权限保护!", DisplayName = "")]
|
|
public class AlipayConfigController(IServiceProvider serviceProvider)
|
|
|
|
{
|
|
AlipayConfigService appAlipayConfig = new AlipayConfigService(serviceProvider);
|
|
|
|
/// <summary>
|
|
/// 查询表单数据
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<Dictionary<string, object?>> FindFormAsync()
|
|
{
|
|
|
|
return await appAlipayConfig.FindFormAsync();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 保存数据
|
|
/// </summary>
|
|
/// <param name="form"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public async Task SaveFormAsync(AliPayConfig form)
|
|
{
|
|
await appAlipayConfig.SaveFormAsync(form);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 添加
|
|
/// </summary>
|
|
/// <param name="form"></param>
|
|
/// <returns></returns>
|
|
[RequestLimitFilter]
|
|
[ActionDescriptor(PermissionFunctionConsts.Function_Insert, DisplayName = "创建表单")]
|
|
[Microsoft.AspNetCore.Mvc.HttpPost]
|
|
[ApiCheckModel]
|
|
public virtual Task CreateAsync([FromBody] AliPayConfig form)
|
|
{
|
|
return appAlipayConfig.SaveFormAsync(form);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 编辑
|
|
/// </summary>
|
|
/// <param name="form"></param>
|
|
/// <returns></returns>
|
|
[RequestLimitFilter]
|
|
[ActionDescriptor(PermissionFunctionConsts.Function_Update, DisplayName = "编辑表单")]
|
|
[Microsoft.AspNetCore.Mvc.HttpPost]
|
|
[ApiCheckModel]
|
|
public virtual Task UpdateAsync([FromBody] AliPayConfig form)
|
|
{
|
|
return appAlipayConfig.SaveFormAsync(form);
|
|
}
|
|
|
|
} |