/// <summary> /// 添加食物 /// </summary> /// <param name="model"></param> /// <returns></returns> public Task <int> AddRfFood(RfFoodEntity model) { model.ModifyTime = DateTime.Now.D2LSecond(); model.Status = (int)StatusEnum.可用; return(_rfFoodRepository.InsertAsync(model)); }
/// <summary> /// 修改食物 /// </summary> /// <param name="model"></param> /// <returns></returns> public Task <int> ModifyRfFood(RfFoodEntity model) { model.ModifyTime = DateTime.Now.D2LSecond(); return(_rfFoodRepository.UpdateAsync(model)); }
public async Task <IActionResult> AddRfFood([FromBody] RfFoodEntity model) { return(OkResult(await _server.AddRfFood(model))); }