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