public JsonResult AddExpressAccessConfig(SelfAccessConfigModel model) { var result = new BaseResponse() { DoFlag = false, DoResult = "添加失败,请稍后重试... ..." }; #region 参数验证 if (string.IsNullOrEmpty(model.LogiscticId)) { result.DoResult = "请填写配送商ID"; return(Json(result)); } if (!model.DayInterval.HasValue) { result.DoResult = "天数配置未填写或者您填写的数字过大!"; return(Json(result)); } if (!model.Frequence.HasValue) { result.DoResult = "间隔小时频率配置未填写或者您填写的数字过大!"; return(Json(result)); } model.RowCreateDate = DateTime.Now; model.IsDel = 0; #endregion try { var ret = ExpressClient.Instance.AddExpressAccessConfig(model); result.DoFlag = ret.DoFlag; result.DoResult = ret.DoResult; } catch (Exception ex) { result.DoResult = "添加异常,请稍后重试... ..."; } return(Json(result)); }
//自接频率修改 public bool UpdateSelfAccessConfig(SelfAccessConfigModel model) { return(BSClient.Send <EC_SelfAccessConfigUpdateResponse>(Mapper.Map <SelfAccessConfigModel, EC_SelfAccessConfigUpdate>(model)).DoFlag); }
/// <summary> /// 新增配送商 /// </summary> /// <param name="model"></param> /// <returns></returns> public EC_SelfAccessConfigAddResponse AddExpressAccessConfig(SelfAccessConfigModel model) { return(BSClient.Send <EC_SelfAccessConfigAddResponse>(Mapper.Map <SelfAccessConfigModel, EC_SelfAccessConfigAdd>(model))); }