namespace Tiobon.Core.Services; /// /// 系统用户 (服务) /// public class Ghrs_UserServices : BaseServices, IGhrs_UserServices { private readonly IBaseRepository _dal; public Ghrs_UserServices(IBaseRepository dal) { this._dal = dal; base.BaseDal = dal; } public override async Task QuerySingleDto(Expression> whereExpression) { var entity = await base.QuerySingleDto(whereExpression); if (entity != null) { var staff = await Db.Queryable().Where(x => x.StaffID == entity.UserStaffID).FirstAsync(); if (staff != null) { entity.StaffNo = staff.StaffNo; entity.StaffName = staff.StaffName; } } return entity; } }