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
{
///
/// 系统配置相关
///
public class GlobalSwitchController : BaseAdminController
{
private IGlobalSwitchService _globalSwitchService;
///
///
///
///
public GlobalSwitchController(IGlobalSwitchService globalSwitchService
)
{
_globalSwitchService = globalSwitchService;
}
#region SavePosAppVersionConfig(保存版本配置信息)
///
/// 保存版本配置信息
///
///
[HttpPost]
public void SavePosAppVersionConfig(PosAppVersionConfigAct act)
{
_globalSwitchService.SavePosAppVersionConfig(act);
}
#endregion
#region SavePosAppVersionConfig(获取版本号配置信息)
///
/// 获取版本号配置信息
///
///
[HttpGet]
public PosAppVersionConfigAct GetAppVersionConfig()
{
return _globalSwitchService.GetPosAppVersionConfig();
}
#endregion
#region GetAppVersionConfig(获取版本号配置信息For Pda)
///
/// 获取版本号配置信息For Pda
///
///
[HttpGet]
[AllowAnonymous]
public PosAppVersionConfigAct GetAppVersion(string key)
{
if (key.ToUpper() == "A9E45EED-E6F2-4276-8554-AF3055CA0512")
return _globalSwitchService.GetPosAppVersionConfig();
else
return null;
}
#endregion
}
}