using Dapper; using System.Threading.Tasks; using Znyc.Recruitment.Admin.Commons.IDbContext; using Znyc.Recruitment.Admin.Commons.Repositories; using Znyc.Recruitment.Admin.Security.Entitys; using Znyc.Recruitment.Admin.Security.IRepositories; namespace Znyc.Recruitment.Admin.Security.Repositories { /// /// public class CallFeedbackRepository : BaseRepository, ICallFeedbackRepository { /// /// public CallFeedbackRepository() { } public CallFeedbackRepository(IDbContextCore dbContext) : base(dbContext) { } /// /// 根据ProductId修改通话评价反馈是否已读 /// /// /// public async Task UpdateIsReadAsync(long userId, long productId, int productType) { string sql = @"UPDATE rm_call_feedback SET IsRead=TRUE,ModifiedUserId=@ModifiedUserId,ModifiedTime=NOW() WHERE ProductId=@ProductId AND ProductType=@ProductType;"; return await DapperConn.ExecuteAsync(sql, new { ModifiedUserId = userId, ProductId = productId, ProductType = productType }); } } }