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