예제 #1
0
파일: APPSV.cs 프로젝트: GSIL-Monitor/BTP
        public Jinher.AMP.BTP.Deploy.CustomDTO.AppDetailAndPackageDTO GetAppDetailAndPackage(System.Guid appId, ContextDTO contextDTO)
        {
            Jinher.AMP.BTP.Deploy.CustomDTO.AppDetailAndPackageDTO result = null;

            try
            {
                Jinher.AMP.App.ISV.Facade.AppManagerFacade appManagerFacade = new Jinher.AMP.App.ISV.Facade.AppManagerFacade();
                appManagerFacade.ContextDTO = AuthorizeHelper.CoinInitAuthorizeInfo();
                AppDetailAndPackage applicationDTO = appManagerFacade.GetAppDetailAndPackage(appId);

                if (applicationDTO != null)
                {
                    result            = new AppDetailAndPackageDTO();
                    result.DownLoad   = applicationDTO.DownLoad;
                    result.Icon       = applicationDTO.Icon;
                    result.Id         = applicationDTO.Id;
                    result.Illegal    = applicationDTO.Illegal;
                    result.Name       = applicationDTO.Name;
                    result.OffShelves = applicationDTO.OffShelves;
                    result.QRCodeUrl  = applicationDTO.QRCodeUrl;

                    if (applicationDTO.PackageUrl != null)
                    {
                        //苹果的下载地址 只取上架的
                        if (applicationDTO.PackageUrl.ContainsKey("ios"))
                        {
                            var iosDownLoadUrl = applicationDTO.PackageUrl["ios"].Trim();
                            if (!iosDownLoadUrl.Contains(";") || iosDownLoadUrl.Contains(";") && iosDownLoadUrl.Contains(".plist") || iosDownLoadUrl.Contains(";") && iosDownLoadUrl.Contains("itunes.apple.com"))
                            {
                                if (iosDownLoadUrl.Contains(";"))
                                {
                                    result.IosUrl = iosDownLoadUrl.Split(';')[1];
                                }
                                else
                                {
                                    result.IosUrl = iosDownLoadUrl;
                                }
                            }
                        }
                        //Android的下载地址
                        if (applicationDTO.PackageUrl.ContainsKey("android"))
                        {
                            result.AndroidUrl = applicationDTO.PackageUrl["android"].Trim();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error(string.Format("APPSV.GetAppDetailAndPackage服务异常:获取应用信息异常。 appId:{0}", appId), ex);
            }
            return(result);
        }
예제 #2
0
파일: APPSV.cs 프로젝트: GSIL-Monitor/BTP
        public List <Jinher.AMP.App.Deploy.ApplicationDTO> GetApplicationByOwnId(Guid ownerId)
        {
            List <Jinher.AMP.App.Deploy.ApplicationDTO> appsList = new List <App.Deploy.ApplicationDTO>();

            try
            {
                Jinher.AMP.App.ISV.Facade.AppManagerFacade facade = new Jinher.AMP.App.ISV.Facade.AppManagerFacade();
                facade.ContextDTO = AuthorizeHelper.CoinInitAuthorizeInfo();
                appsList          = facade.GetApplicationByOwnId(ownerId);
            }
            catch (Exception ex)
            {
                LogHelper.Error(string.Format("APPSV.GetApplicationByOwnId服务异常:根据应用主获取应用信息。 ownerId:{0}", ownerId), ex);
            }
            return(appsList);
        }