You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.8 KiB
65 lines
1.8 KiB
using Coldairarrow.Entity.HuiYan;
|
|
using Coldairarrow.Util;
|
|
using EFCore.Sharding;
|
|
using LinqKit;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Linq.Dynamic.Core;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Coldairarrow.Business.HuiYan
|
|
{
|
|
public class albbitemlabelsBusiness : BaseBusiness<albbitemlabels>, IalbbitemlabelsBusiness, ITransientDependency
|
|
{
|
|
public albbitemlabelsBusiness(IDbAccessor db)
|
|
: base(db)
|
|
{
|
|
}
|
|
|
|
#region 外部接口
|
|
|
|
public async Task<PageResult<albbitemlabels>> GetDataListAsync(PageInput<ConditionDTO> input)
|
|
{
|
|
var q = GetIQueryable();
|
|
var where = LinqHelper.True<albbitemlabels>();
|
|
var search = input.Search;
|
|
|
|
//筛选
|
|
if (!search.Condition.IsNullOrEmpty() && !search.Keyword.IsNullOrEmpty())
|
|
{
|
|
var newWhere = DynamicExpressionParser.ParseLambda<albbitemlabels, bool>(
|
|
ParsingConfig.Default, false, $@"{search.Condition}.Contains(@0)", search.Keyword);
|
|
where = where.And(newWhere);
|
|
}
|
|
|
|
return await q.Where(where).GetPageResultAsync(input);
|
|
}
|
|
|
|
public async Task<albbitemlabels> GetTheDataAsync(string id)
|
|
{
|
|
return await GetEntityAsync(id);
|
|
}
|
|
|
|
public async Task AddDataAsync(albbitemlabels data)
|
|
{
|
|
await InsertAsync(data);
|
|
}
|
|
|
|
public async Task UpdateDataAsync(albbitemlabels data)
|
|
{
|
|
await UpdateAsync(data);
|
|
}
|
|
|
|
public async Task DeleteDataAsync(List<string> ids)
|
|
{
|
|
await DeleteAsync(ids);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 私有成员
|
|
|
|
#endregion
|
|
}
|
|
}
|