/// <summary> /// 新增 /// </summary> /// <param name="entity"></param> /// <returns></returns> public Sys_Interface_WhiteList Add(Add_Sys_Interface_WhiteList_Input inputModel) { if (inputModel.Appid.IsNullOrEmpty()) { throw new Exception("不能为空"); } //检查User_Id重复 if (base.GetCount(w => w.Appid == inputModel.Appid) > 0) { throw new Exception("Appid已存在,请填写其他"); } Sys_Interface_WhiteList model = new Sys_Interface_WhiteList(); //model.Id = StringHelper.GuidTo16String(); model.Create_Time = DateTime.Now; model.Appid = inputModel.Appid; model.Validity_Time = inputModel.Validity_Time.ToDateTime(Convert.ToDateTime("5555-05-05 05:05:05")); model.Remark = inputModel.Remark; base.Add(model); return(model); }
public ActionRes Add([FromBody] Add_Sys_Interface_WhiteList_Input model) { var res = AllServices.SysInterfaceWhiteListService.Add(model); return(ActionRes.Success(res)); }