using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsType; using BPA.SAAS.Manage.Application.DataBase.Interface; using BPA.SAAS.Manage.Core.Base; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BPA.SAAS.Manage.Application.DataBase { [ApiDescriptionSettings("Goods", Tag = "商品类型管理")] public class GoodsTypeServices: IDynamicApiController, ITransient { IGoodsTypeService _goodsTypeService; public GoodsTypeServices(IGoodsTypeService goodsTypeService) { _goodsTypeService = goodsTypeService; } /// /// 分页查询 /// /// /// [HttpPost("/api/goodstype/page")] public async Task GetGoodsTypePage(GoodsTypeQueryDto dto) { return await _goodsTypeService.GetGoodsTypePage(dto); } /// /// 查询类型列表(外部调用) /// /// [HttpGet("/api/goodstype/getgoodstypelist_alm")] [AllowAnonymous] public async Task> GetGoodsTypeList_alm() { return await _goodsTypeService.GetGoodsTypeList_alm(); } /// /// 添加商品类型 /// /// /// [HttpPost("/api/goodstype/add")] public async Task AddGoodsType(GoodsTypeDto dto) { return await _goodsTypeService.AddGoodsType(dto); } /// /// 更新商品类型 /// /// /// [HttpPost("/api/goodstype/update")] public async Task UpdateGoodsType(GoodsTypeDto dto) { return await _goodsTypeService.UpdateGoodsType(dto); } /// /// 删除商品类型 /// /// /// [HttpGet("/api/goodstype/delete")] public async Task DelGoodsType(string Id) { return await _goodsTypeService.DelGoodsType(Id); } /// /// 查询商品类型树结构 /// /// [HttpGet("/api/goodstype/tree")] public async Task GetGoodsTypeTree() { return await _goodsTypeService.GetGoodsTypeTree(); } } }