Beispiel #1
0
        public bool UpdateGroupTypeTypePicUrl(SourceEntity.SourceItems entity)
        {
            string commandText = @"UPDATE GroupType SET TypePicUrl = @TypePicUrl WHERE TypePicUrl = @OldResUrl";

            List <MySqlParameter> paramsList = new List <MySqlParameter>();

            paramsList.Add(new MySqlParameter("@OldResUrl", entity.oldResUrl));
            paramsList.Add(new MySqlParameter("@TypePicUrl", entity.newResUrl));

            return(this.ExecuteNonQuery(commandText, paramsList));
        }
Beispiel #2
0
        /// <summary>
        /// 更新AppInfo下的MainIconPicUrl信息
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public bool UpdateAppInfoMainIconPicUrl(SourceEntity.SourceItems entity)
        {
            string commandText = @"UPDATE AppInfo SET MainIconPicUrl = @MainIconPicUrl WHERE MainIconPicUrl =@OldResUrl";

            List <MySqlParameter> paramsList = new List <MySqlParameter>();

            paramsList.Add(new MySqlParameter("@OldResUrl", entity.oldResUrl));
            paramsList.Add(new MySqlParameter("@MainIconPicUrl", entity.newResUrl));

            return(this.ExecuteNonQuery(commandText, paramsList));
        }
        /// <summary>
        /// 特殊处理安装包信息中,Icon和安装包Url
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        private bool UpDatePackInfo(SourceEntity.SourceItems item)
        {
            bool result = false;

            if (item.oldResUrl.EndsWith(".apk"))
            {
                if (item.oldResUrl.StartsWith("http://fs0"))
                {
                    result = new SourceUrlSyncBLL().UpdatePackInfoPackUrl(item);

                    if (result.Equals(false))
                    {
                        item.oldResUrl = item.oldResUrl.Replace("http://fs0", "http://fs1");
                        result         = new SourceUrlSyncBLL().UpdatePackInfoPackUrl(item);
                    }
                }
                else
                {
                    result = new SourceUrlSyncBLL().UpdatePackInfoPackUrl(item);

                    if (result.Equals(false))
                    {
                        item.oldResUrl = item.oldResUrl.Replace("http://fs1", "http://fs0");
                        result         = new SourceUrlSyncBLL().UpdatePackInfoPackUrl(item);
                    }
                }
            }
            else
            {
                if (item.oldResUrl.StartsWith("http://fs0"))
                {
                    result = new SourceUrlSyncBLL().UpdatePackInfoIconPicUrl(item);

                    if (result.Equals(false))
                    {
                        item.oldResUrl = item.oldResUrl.Replace("http://fs0", "http://fs1");
                        result         = new SourceUrlSyncBLL().UpdatePackInfoIconPicUrl(item);
                    }
                }
                else
                {
                    result = new SourceUrlSyncBLL().UpdatePackInfoIconPicUrl(item);

                    if (result.Equals(false))
                    {
                        item.oldResUrl = item.oldResUrl.Replace("http://fs1", "http://fs0");
                        result         = new SourceUrlSyncBLL().UpdatePackInfoIconPicUrl(item);
                    }
                }
            }

            return(result);
        }
Beispiel #4
0
 /// <summary>
 /// 更新安装包中的Icon信息
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public bool UpdatePackInfoIconPicUrl(SourceEntity.SourceItems entity)
 {
     return(new SourceUrlSyncDAL().UpdatePackInfoIconPicUrl(entity));
 }
Beispiel #5
0
 /// <summary>
 /// 更新LinkInfo中的缩略图
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public bool UpdateLinkInfoThumbPicUrl(SourceEntity.SourceItems entity)
 {
     return(new SourceUrlSyncDAL().UpdateLinkInfoThumbPicUrl(entity));
 }
Beispiel #6
0
 /// <summary>
 /// 更新分组类型中的图片
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public bool UpdateGroupTypeTypePicUrl(SourceEntity.SourceItems entity)
 {
     return(new SourceUrlSyncDAL().UpdateGroupTypeTypePicUrl(entity));
 }
Beispiel #7
0
 /// <summary>
 /// 更新应用截图
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public bool UpdateAppPicListPicUrl(SourceEntity.SourceItems entity)
 {
     return(new SourceUrlSyncDAL().UpdateAppPicListPicUrl(entity));
 }