This commit is contained in:
不做码农
2021-09-27 08:06:09 +08:00
parent 48e14b4d4f
commit 40026f596f
53 changed files with 1306 additions and 312 deletions

View File

@@ -9,7 +9,7 @@ namespace ZR.Repository.System
/// 用户岗位
/// </summary>
[AppService(ServiceLifetime = LifeTime.Transient)]
public class SysUserPostRepository : BaseRepository
public class SysUserPostRepository : BaseRepository<SysUserPost>
{
/// <summary>
/// 获取用户岗位
@@ -18,7 +18,7 @@ namespace ZR.Repository.System
/// <returns></returns>
public List<SysPost> SelectPostsByUserId(long userId)
{
return Db.Queryable<SysPost, SysUserPost>((p, up) => new JoinQueryInfos(
return Context.Queryable<SysPost, SysUserPost>((p, up) => new JoinQueryInfos(
JoinType.Left, up.PostId == p.PostId
)).Where((p, up) => up.UserId == userId)
.Select<SysPost>().ToList();