using DS.Module.Core;
using DS.WMS.Core.System.Dtos;
using DS.WMS.Core.System.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.AdminApi.Controllers;
///
/// 多语言服务
///
public class LanguageSetController : ApiController
{
private readonly ILanguageSetService _invokeService;
///
/// 构造函数
///
///
public LanguageSetController(ILanguageSetService invokeService)
{
_invokeService = invokeService;
}
///
/// 列表
///
///
///
[HttpPost]
[Route("GetLanguageSetList")]
public DataResult> GetLanguageSetList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
///
/// 编辑
///
///
///
[HttpPost]
[Route("EditLanguageSet")]
public DataResult EditLanguageSet([FromBody] LanguageSetReq model)
{
var res = _invokeService.EditLanguageSet(model);
return res;
}
///
/// 详情
///
///
///
[HttpGet]
[Route("GetLanguageSetInfo")]
public DataResult GetLanguageSetInfo([FromQuery] string id)
{
var res = _invokeService.GetLanguageSetInfo(id);
return res;
}
///
/// 获取多语言常量列表
///
///
[HttpGet]
[Route("GetLanguageConstList")]
public DataResult> GetLanguageConstList()
{
var res = _invokeService.GetLanguageConstList();
return res;
}
///
/// 获取当前租户已有的多语言信息
///
/// 语言类型
///
[HttpGet]
[Route("GetExistLanguageConstList")]
public DataResult> GetExistLanguageConstList([FromQuery] string languageType)
{
var res = _invokeService.GetExistLanguageConstList(languageType);
return res;
}
///
/// 导入多语言配置
///
///
///
[HttpPost]
[Route("ImportMultiLanguageSet")]
public DataResult ImportMultiLanguageSet([FromBody] ImportLanguageSetReq model)
{
var res = _invokeService.ImportMultiLanguageSet(model);
return res;
}
}