81 lines
2.4 KiB
C#
81 lines
2.4 KiB
C#
using MyCode.Project.Domain.Dtos.Request.Act;
|
|
using MyCode.Project.Domain.Message.Act.PurchaseOrder;
|
|
using MyCode.Project.Domain.Message.Common;
|
|
using MyCode.Project.Domain.Message.Request.InvoiceOrder;
|
|
using MyCode.Project.Domain.Message.Request.PurchaseOrder;
|
|
using MyCode.Project.Domain.Message.Request.User;
|
|
using MyCode.Project.Domain.Message.Response.InvoiceOrder;
|
|
using MyCode.Project.Domain.Message.Response.PurchaseOrder;
|
|
using MyCode.Project.Infrastructure.Common;
|
|
using MyCode.Project.Infrastructure.Extensions;
|
|
using MyCode.Project.Repositories.Common;
|
|
using MyCode.Project.Services;
|
|
using System.Collections.Generic;
|
|
using System.Web;
|
|
using System.Web.Http;
|
|
|
|
namespace MyCode.Project.WebApi.Areas.Admin.Controllers
|
|
{
|
|
/// <summary>
|
|
/// 系统配置相关
|
|
/// </summary>
|
|
public class GlobalSwitchController : BaseAdminController
|
|
{
|
|
private IGlobalSwitchService _globalSwitchService;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="globalSwitchService"></param>
|
|
public GlobalSwitchController(IGlobalSwitchService globalSwitchService
|
|
)
|
|
{
|
|
_globalSwitchService = globalSwitchService;
|
|
}
|
|
|
|
#region SavePosAppVersionConfig(保存版本配置信息)
|
|
/// <summary>
|
|
/// 保存版本配置信息
|
|
/// </summary>
|
|
/// <param name="act"></param>
|
|
[HttpPost]
|
|
public void SavePosAppVersionConfig(PosAppVersionConfigAct act)
|
|
{
|
|
_globalSwitchService.SavePosAppVersionConfig(act);
|
|
}
|
|
#endregion
|
|
|
|
#region SavePosAppVersionConfig(获取版本号配置信息)
|
|
/// <summary>
|
|
/// 获取版本号配置信息
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public PosAppVersionConfigAct GetAppVersionConfig()
|
|
{
|
|
return _globalSwitchService.GetPosAppVersionConfig();
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region GetAppVersionConfig(获取版本号配置信息For Pda)
|
|
/// <summary>
|
|
/// 获取版本号配置信息For Pda
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[AllowAnonymous]
|
|
public PosAppVersionConfigAct GetAppVersion(string key)
|
|
{
|
|
if (key.ToUpper() == "A9E45EED-E6F2-4276-8554-AF3055CA0512")
|
|
return _globalSwitchService.GetPosAppVersionConfig();
|
|
else
|
|
return null;
|
|
}
|
|
#endregion
|
|
|
|
|
|
|
|
}
|
|
}
|