示例#1
0
        private async Task <AppStartPage> Get(GetAppStartPageInput input)
        {
            Platform?platform = input.Platform;
            int?     width_Px = input.Width_Px;
            int?     high_Px  = input.High_Px;
            var      data     =
                await Repository.FirstOrDefaultAsync(x => x.Platform == platform && x.Width_Px == width_Px && x.High_Px == high_Px)
                ??
                await Repository.FirstOrDefaultAsync(x => x.Platform == null && x.Width_Px == width_Px && x.High_Px == high_Px)
                ??
                await Repository.FirstOrDefaultAsync(x => x.Platform == platform && x.Width_Px == width_Px && x.High_Px == null)
                ??
                await Repository.FirstOrDefaultAsync(x => x.Platform == platform && x.Width_Px == null && x.High_Px == high_Px)
                ??
                await Repository.FirstOrDefaultAsync(x => x.Platform == platform && x.Width_Px == null && x.High_Px == null)
                ??
                await Repository.FirstOrDefaultAsync(x => x.Platform == null && x.Width_Px == null && x.High_Px == null)
            ;

            return(data);
        }
示例#2
0
        /// <summary>
        /// App端: 获取图片
        /// </summary>
        public async Task <GetAppStartPageDto> GetAppStartPage(GetAppStartPageInput input)
        {
            var data = await Get(input);

            return(data?.MapTo <GetAppStartPageDto>());
        }