public bool SaveItemShippingSetting(ItemShippingSetting shipping) { if (shipping.ShippingMethod == true) { shipping.ShippingRate = 0; } return(_itemShippingService.SaveItemShippingSetting(shipping)); }
public bool SaveItemShippingSetting([FromBody] ItemShippingSetting shippingSetting) { var result = _itemShippingSettingServices.SaveItemShippingSetting(shippingSetting); return(result); //if(result) // return Ok(); //return StatusCode(400); }
/// <summary> /// 保存商品配送信息 /// </summary> /// <param name="shipiing"></param> /// <returns></returns> public bool SaveItemShippingSetting(ItemShippingSetting shipiing) { var command = _DB.GetCommand("SaveItemShippingSetting"); var result = command.ExecuteNonQuery(new { ItemNumber = shipiing.ItemNumber , ShippingAddress = shipiing.ShippingAddress , Contacts = shipiing.Contacts , Tel = shipiing.Tel , ShippingMethod = shipiing.ShippingMethod , ShippingRate = shipiing.ShippingRate }); return(result > 0); }