public bool AddIntervene(DBModel.tmo_intervene model) { if (model == null) { return(false); } model.input_time = DateTime.Now; List <tmo_intervene> list = new List <tmo_intervene>(); List <string> users = StringPlus.GetStrArray(model.user_id, ","); List <string> address = StringPlus.GetStrArray(model.inte_addr, ","); if (users.Count > 1) { for (var i = 0; i < users.Count; i++) { tmo_intervene newmodel = TmoShare.DeepCopy <tmo_intervene>(model); newmodel.inte_id = TmoShare.GetGuidString(); newmodel.user_id = users[i]; newmodel.inte_addr = address[i]; list.Add(newmodel); } } else { list.Add(model); } var dics = ModelConvertHelper <tmo_intervene> .ConvertModelToDictionaries(list); return(MySQLHelper.AddDatas("tmo_intervene", dics)); }