IAdvertisementService.cs 980 B

1234567891011121314151617181920212223242526
  1. using Masuit.MyBlogs.Core.Models.Entity;
  2. using Masuit.MyBlogs.Core.Models.Enum;
  3. using System.Collections.Generic;
  4. namespace Masuit.MyBlogs.Core.Infrastructure.Services.Interface
  5. {
  6. public partial interface IAdvertisementService : IBaseService<Advertisement>
  7. {
  8. /// <summary>
  9. /// 按价格随机筛选一个元素
  10. /// </summary>
  11. /// <param name="type">广告类型</param>
  12. /// <param name="cid">分类id</param>
  13. /// <returns></returns>
  14. Advertisement GetByWeightedPrice(AdvertiseType type, string location, int? cid = null);
  15. /// <summary>
  16. /// 按价格随机筛选多个元素
  17. /// </summary>
  18. /// <param name="count">数量</param>
  19. /// <param name="type">广告类型</param>
  20. /// <param name="cid">分类id</param>
  21. /// <returns></returns>
  22. List<Advertisement> GetsByWeightedPrice(int count, AdvertiseType type, string location, int? cid = null);
  23. }
  24. }