Esempio n. 1
0
        /// <summary>
        /// 保存推广主信息
        /// </summary>
        /// <param name="spreadInfo">推广主信息</param>
        /// <returns></returns>
        public Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO SaveToSpreadInfoExt(Jinher.AMP.BTP.Deploy.SpreadInfoDTO spreadInfo)
        {
            ResultDTO result = new ResultDTO {
                Message = "Success"
            };

            if (spreadInfo == null || spreadInfo.SpreadId == Guid.Empty || spreadInfo.SpreadCode == Guid.Empty)
            {
                return(new ResultDTO {
                    ResultCode = 1, Message = "Spreadid为空或推广码为空"
                });
            }
            try
            {
                ContextSession contextSession = ContextFactory.CurrentThreadContext;
                SpreadSV.Instance.BuildSaveSpreadInfo(spreadInfo, true);
                contextSession.SaveChanges();
            }
            catch (Exception ex)
            {
                LogHelper.Error(string.Format("SpreadInfoSV.SaveToSpreadInfoExt异常:spreaderId={0},spreaderCode={1}, Exception={2}", spreadInfo.SpreadId, spreadInfo.SpreadCode, ex));
                return(result);
            }
            return(result);
        }
Esempio n. 2
0
 /// <summary>
 /// 保存推广主信息
 /// </summary>
 /// <param name="spreadInfo">推广主信息</param>
 /// <returns>Result</returns>
 public Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO SaveToSpreadInfo(Jinher.AMP.BTP.Deploy.SpreadInfoDTO spreadInfo)
 {
     base.Do();
     return(this.Command.SaveToSpreadInfo(spreadInfo));
 }
Esempio n. 3
0
 /// <summary>
 /// 保存推广主信息
 /// </summary>
 /// <param name="spreaderDto">推广主信息</param>
 /// <returns></returns>
 public Jinher.AMP.BTP.Deploy.CustomDTO.ResultDTO SaveToSpreadInfo(Jinher.AMP.BTP.Deploy.SpreadInfoDTO spreadInfo)
 {
     base.Do();
     LogHelper.Info(string.Format("保存推广主信息:SpreadInfoSV.SaveToSpreadInfo , spreadInfo:{0}", JsonHelper.JsonSerializer(spreadInfo)));
     return(this.SaveToSpreadInfoExt(spreadInfo));
 }