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.
26 lines
855 B
26 lines
855 B
2 years ago
|
using FreeSql;
|
||
|
using Znyc.CloudCar.Auth.HttpContextUser;
|
||
|
using Znyc.CloudCar.IRepository.Equipment;
|
||
|
using Znyc.CloudCar.Model.Entities;
|
||
|
|
||
|
namespace Znyc.CloudCar.Repository.Equipment
|
||
|
{
|
||
|
public class EquipmentRepository : RepositoryBase<EquipmentEntity>, IEquipmentRepository
|
||
|
{
|
||
|
public EquipmentRepository(UnitOfWorkManager uowm, IHttpContextUser user) : base(uowm, user)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 同步浏览量
|
||
|
/// </summary>
|
||
|
/// <param name="id"></param>
|
||
|
/// <param name="pageview"></param>
|
||
|
/// <returns></returns>
|
||
|
public async Task<int> UpdatePageView(long id, int pageview)
|
||
|
{
|
||
|
string sql = string.Format($"UPDATE equipment SET PageView= {pageview} WHERE Id = {id};");
|
||
|
return await Orm.Ado.ExecuteNonQueryAsync(sql);
|
||
|
}
|
||
|
}
|
||
|
}
|