JobPostRepository.cs 891 B

123456789101112131415161718192021222324252627
  1. using OASystem.Domain.Dtos.System;
  2. using SqlSugar;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace OASystem.Infrastructure.Repositories.System
  9. {
  10. public class JobPostRepository : BaseRepository<Sys_JobPost, JobPostView>
  11. {
  12. public JobPostRepository(SqlSugarClient sqlSugar) : base(sqlSugar)
  13. {
  14. }
  15. public async Task<List<Sys_JobPostI>> QueryJobPost(string sqlWhere)
  16. {
  17. string sql = string.Format(@"select jp.*,dep.DepName as 'DepName',cmp.CompanyName as 'CompanyName' from Sys_JobPost jp left join
  18. Sys_Company cmp on jp.CompanyId=cmp.Id left join Sys_Department dep on jp.DepId=dep.Id {0}", sqlWhere);
  19. return await _sqlSugar.SqlQueryable<Sys_JobPostI>(sql).ToListAsync();
  20. }
  21. }
  22. }