public async Task <MessageModel <string> > Post([FromBody] d_handle_info d_handle_info) { var data = new MessageModel <string>(); var id = (await _d_handle_infoServices.Add(d_handle_info)); data.success = id > 0; if (data.success) { data.response = id.ObjToString(); data.msg = "添加成功"; } else { data.response = id.ObjToString(); data.msg = "添加失败"; } return(data); }
public async Task <MessageModel <string> > Update([FromBody] d_handle_info d_handle_info) { var data = new MessageModel <string>(); if (d_handle_info != null) { var id = (await _d_handle_infoServices.Update(d_handle_info)); data.success = id; if (data.success) { data.response = "id为" + d_handle_info.Guid + "的数据更新成功"; data.msg = "更新成功"; } else { data.response = "id为" + d_handle_info.Guid + "的数据不存在"; } } return(data); }