mirror of
https://github.com/anjoy8/Blog.Core.git
synced 2024-09-20 23:48:27 +08:00
33 lines
831 B
C#
33 lines
831 B
C#
using Blog.Core.Common;
|
||
using Blog.Core.IRepository.Base;
|
||
using Blog.Core.IServices;
|
||
using Blog.Core.Model.Models;
|
||
using Blog.Core.Services.BASE;
|
||
using System.Collections.Generic;
|
||
using System.Threading.Tasks;
|
||
|
||
namespace Blog.Core.Services
|
||
{
|
||
public class TopicServices: BaseServices<Topic>, ITopicServices
|
||
{
|
||
|
||
IBaseRepository<Topic> _dal;
|
||
public TopicServices(IBaseRepository<Topic> dal)
|
||
{
|
||
this._dal = dal;
|
||
base.BaseDal = dal;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 获取开Bug专题分类(缓存)
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[Caching(AbsoluteExpiration = 60)]
|
||
public async Task<List<Topic>> GetTopics()
|
||
{
|
||
return await base.Query(a => !a.tIsDelete && a.tSectendDetail == "tbug");
|
||
}
|
||
|
||
}
|
||
}
|