public ActionResult GetProductAttribute(int id) { Product_Attribute productAttribute = _productManager.GetProductAttribute(id); if (productAttribute == null) { return(FailedResult("指定的数据不存在。")); } Product_AttributeDto productAttributeDto = Mapper.Map <Product_AttributeDto>(productAttribute); return(DataResult(productAttributeDto)); }
public ActionResult UpdateProductAttribute() { Product_AttributeDto args = RequestArgs <Product_AttributeDto>(); if (args == null) { return(FailedResult("参数无效。")); } Product_Attribute productAttribute = Mapper.Map <Product_Attribute>(args); NormalResult result = _productManager.UpdateProductAttribute(productAttribute); return(ApiResult(result.Successful, result.Message)); }