using BPA.SAAS.Manage.Application.DataBase.Dtos.GoodsAttribute;
using BPA.SAAS.Manage.Application.DataBase.Interface;
using BPA.SAAS.Manage.Core.Base;
using BPA.SAAS.Manage.Core.DataBase;
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 GoodsAttributeServices: IDynamicApiController, ITransient
{
IGoodsAttributeService _goodsAttributeServices;
public GoodsAttributeServices(IGoodsAttributeService goodsAttributeServices)
{
_goodsAttributeServices = goodsAttributeServices;
}
///
/// 分页查询
///
///
///
[HttpPost("/api/goodsattribute/getgoodsattributepage")]
public PageUtil GetGoodsAttributePageAsync(GoodsAttributeQueryDto dto)
{
return _goodsAttributeServices.GetGoodsAttributePageAsync(dto);
}
///
/// 添加/修改
///
///
///
[HttpPost("/api/goodsattribute/addgoodsattribute")]
public async Task AddGoodsAttribute(GoodsAttributeDto dto)
{
return await _goodsAttributeServices.AddGoodsAttribute(dto);
}
///
/// 删除
///
///
///
[HttpPost("/api/goodsattribute/deletegoodsattribute")]
public async Task DeleteGoodsAttribute([FromBody] string[] Ids)
{
return await _goodsAttributeServices.DeleteGoodsAttribute(Ids);
}
///
/// 查询商品属性值列表
///
///
///
[HttpGet("/api/goodsattribute/getgoodsattributevalue")]
public async Task> GetGoodsAttributeValueAsync(string goodsAttributeId)
{
return await _goodsAttributeServices.GetGoodsAttributeValueAsync(goodsAttributeId);
}
///
/// 添加/修改
///
///
///
[HttpPost("/api/goodsattribute/addgoodsattributevalue")]
public async Task AddGoodsAttributeValue(List dto)
{
return await _goodsAttributeServices.AddGoodsAttributeValue(dto);
}
///
/// 删除
///
///
///
[HttpGet("/api/goodsattribute/deletegoodsattributevalue")]
public async Task DeleteGoodsAttributeValue(string id)
{
return await _goodsAttributeServices.DeleteGoodsAttributeValue(id);
}
///
/// 根据商品id查询商品属性
///
///
///
[HttpGet("/api/goodsattribute/getbygoodsidattribute")]
public async Task> GetByGoodsIdAttribute(string id)
{
return await _goodsAttributeServices.GetByGoodsIdAttribute(id);
}
}
}