/// <summary> /// 添加对服务的评价信息 /// </summary> /// <param name="satisfactionInfoAddViewModel"></param> /// <returns></returns> public int SatisfactionInfo_Add(SatisfactionInfoAddViewModel satisfactionInfoAddViewModel) { var node_Info = _IMapper.Map <SatisfactionInfoAddViewModel, Satisfaction_Info>(satisfactionInfoAddViewModel); _ISatisfactionInfoRepository.Add(node_Info); return(_ISatisfactionInfoRepository.SaveChanges()); }
public ActionResult <SatisfactionInfoAddResModel> Manage_Satisfaction_Add(SatisfactionInfoAddViewModel satisfactionInfoAddViewModel) { int Node_Add_Count; Node_Add_Count = _ISatisfactionInfoService.SatisfactionInfo_Add(satisfactionInfoAddViewModel); SatisfactionInfoAddResModel satisfactionInfoAddResModel = new SatisfactionInfoAddResModel(); if (Node_Add_Count > 0) { satisfactionInfoAddResModel.IsSuccess = true; satisfactionInfoAddResModel.AddCount = Node_Add_Count; satisfactionInfoAddResModel.baseViewModel.Message = "添加成功"; satisfactionInfoAddResModel.baseViewModel.ResponseCode = 200; _ILogger.Information("增加评论信息成功"); return(Ok(satisfactionInfoAddResModel)); } else { satisfactionInfoAddResModel.IsSuccess = false; satisfactionInfoAddResModel.AddCount = 0; satisfactionInfoAddResModel.baseViewModel.Message = "添加失败"; satisfactionInfoAddResModel.baseViewModel.ResponseCode = 400; _ILogger.Information("增加评论信息失败"); return(Ok(satisfactionInfoAddResModel)); } }