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.

36 lines
908 B

using Entity.DbModel.Station;
using HybirdFrameworkCore.Autofac.Attribute;
using SqlSugar;
namespace Repository.Station;
6 months ago
[Scope("SingleInstance")]
6 months ago
public class BinInfoRepository : BaseRepository<BinInfo>
{
public BinInfoRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
{
}
/// <summary>
/// 禁用仓位
/// </summary>
/// <param name="id"></param>
/// <returns>修改结果</returns>
public bool UpdateStatus(int id)
{
return DbBaseClient
.Updateable<BinInfo>()
.SetColumns(bin => new BinInfo { Status = 0 })
.Where(bin => bin.Id == id)
.ExecuteCommandHasChange();
}
6 months ago
/// <summary>
///
/// </summary>
/// <param name="binNo"></param>
/// <returns></returns>
public BinInfo? QueryByBinNo(string binNo)
{
return this.QueryByClause(it => it.No == binNo);
}
}