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.
28 lines
711 B
28 lines
711 B
7 months ago
|
using Entity.DbModel.Station;
|
||
|
using HybirdFrameworkCore.Autofac.Attribute;
|
||
|
using SqlSugar;
|
||
|
|
||
|
namespace Repository.Station;
|
||
|
|
||
|
[Scope]
|
||
|
public class SwapOrderBatteryRepository:BaseRepository<SwapOrderBattery>
|
||
|
{
|
||
|
|
||
|
public SwapOrderBatteryRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
///
|
||
|
/// </summary>
|
||
|
/// <param name="batterySn"></param>
|
||
|
/// <returns></returns>
|
||
|
public SwapOrderBattery? QueryLatestOrderNoByBatterySn(string? batterySn)
|
||
|
{
|
||
|
if (string.IsNullOrWhiteSpace(batterySn))
|
||
|
{
|
||
|
return null;
|
||
|
}
|
||
|
return QueryByClause(it => it.DownBatteryNo == batterySn, it => it.CreatedTime, OrderByType.Desc);
|
||
|
}
|
||
|
}
|