Пример #1
0
 private static HttpResponseResult DoSychro(AbstractSynchro absSyn, SynchroDirection direciton, Dictionary <SynOperationType, IEnumerable <AbsSynchroDataInfo> > dict = null, IEnumerable <AbsSynchroDataInfo> datas = null, IEnumerable <string> numbers = null, bool flag = true)
 {
     if (direciton == SynchroDirection.ToK3)
     {
         AbstractSynchroToK3 k3 = absSyn as AbstractSynchroToK3;
         return(k3.DoSynchroData(numbers, dict));
     }
     else
     {
         AbstractSynchroToHC hc = absSyn as AbstractSynchroToHC;
         return(hc.SynK3DataToWebSite(datas, numbers, flag));
     }
 }
Пример #2
0
        private static HttpResponseResult SynchroDataTo(Context ctx, AbstractSynchro absSyn, SynchroDataType dataType, SynchroDirection direction, DoSchroData doSchroData, Dictionary <SynOperationType, IEnumerable <AbsSynchroDataInfo> > dict = null, IEnumerable <AbsSynchroDataInfo> datas = null, IEnumerable <string> numbers = null, bool flag = true)
        {
            HttpResponseResult result = null;

            if (absSyn == null)
            {
                result         = new HttpResponseResult();
                result.Success = false;
                result.Message = "没有找到【" + dataType + "】同步类的实例!!!";

                return(result);
            }

            var token = GetSeeedSystemProfile(ctx, "");

            if (token.IsNullOrEmptyOrWhiteSpace())
            {
                token = "";
            }

            string url = GetWebAppRootUrl(ctx);

            absSyn.K3CloudContext = ctx;


            if (absSyn.K3CloudContext != null)
            {
                if (absSyn.K3CloudContext.DBId.CompareTo(DataBaseConst.K3CloudDbId) == 0)
                {
                    absSyn.RedisDbId = DataBaseConst.HKRedisDbId;
                }
                else
                {
                    absSyn.RedisDbId = DataBaseConst.ALRedisDbId;
                }
            }

            return(doSchroData(absSyn, direction, dict, datas, numbers, flag));
        }