public ActionResult GetProductCatalog(int id) { Product_Category productCatalog = _productManager.GetProductCatalog(id); if (productCatalog == null) { return(FailedResult("指定的数据不存在。")); } Product_CategoryDto productCatalogDto = Mapper.Map <Product_CategoryDto>(productCatalog); return(DataResult(productCatalogDto)); }
public ActionResult UpdateProductCatalog() { Product_CategoryDto args = RequestArgs <Product_CategoryDto>(); if (args == null) { return(FailedResult("参数无效。")); } Product_Category productCatalog = Mapper.Map <Product_Category>(args); NormalResult result = _productManager.UpdateProductCatalog(productCatalog); return(ApiResult(result.Successful, result.Message)); }