1234567891011121314151617181920212223242526272829 |
- using OASystem.Domain;
- using OASystem.Domain.Entities.System;
- using OASystem.Domain.ViewModels.System;
- namespace OASystem.Infrastructure.Repositories.System
- {
- public class DepartmentRepository : BaseRepository<Sys_Department, DepartmentView>
- {
- public DepartmentRepository(SqlSugarClient sqlSugar) : base(sqlSugar)
- {
- }
- public Result QueryDepListByCompId(DepartmentRepository _DepartmentRepository,int companyid)
- {
- Result result = new Result();
- var DBdata = _DepartmentRepository.QueryDto<Sys_Department, DepartmentView>(x => x.CompanyId == companyid);
- if (DBdata != null && DBdata.Count() > 0)
- {
- result.Code = 0;
- result.Msg = "成功!";
- result.Data = DBdata;
- }
- return result;
- }
- }
- }
|