Skip to content

广告行情.biz.cs 少非空判断 #6

Description

@chenqilscy

第308行修改如下:

if (model!=null && model.TId == 4)

完整代码如下:

        /// <summary>
        /// 获取幻灯片广告
        /// </summary>
        /// <param name="aid">广告id</param>
        /// <returns></returns>
        public static List<ImgAds> GetSlideAds(int aid)
        {
            Ads model = new Ads();
            model = Find(_.Id == aid);
            if (model!=null && model.TId == 4)
            {
                List<ImgAds> listimg = new List<ImgAds>();
                listimg = JsonConvert.DeserializeObject<List<ImgAds>>(model.Content);
                return listimg;
            }
            return null;
        }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions