pub struct MemberRepository { /* private fields */ }Expand description
组员仓储
Implementations§
Source§impl MemberRepository
impl MemberRepository
Sourcepub async fn get_auth_snapshot(&self, id: i32) -> ApiResult<Member>
pub async fn get_auth_snapshot(&self, id: i32) -> ApiResult<Member>
鉴权用组员快照(单 SQL,含岗位 ID)
Sourcepub async fn page_list(
&self,
username: Option<&str>,
post: Option<i16>,
intern: Option<i16>,
email: Option<&str>,
page: i32,
page_size: i32,
) -> ApiResult<(i64, Vec<Member>)>
pub async fn page_list( &self, username: Option<&str>, post: Option<i16>, intern: Option<i16>, email: Option<&str>, page: i32, page_size: i32, ) -> ApiResult<(i64, Vec<Member>)>
分页查询组员(先分页取 id,再批量 enrich 岗位/驻站数)
Sourcepub async fn all_cache(&self) -> ApiResult<Vec<MemberCache>>
pub async fn all_cache(&self) -> ApiResult<Vec<MemberCache>>
全量组员缓存列表(单 SQL 聚合岗位,对齐 Java MPJ join)
Sourcepub async fn delete_members(&self, ids: &[i32]) -> ApiResult<()>
pub async fn delete_members(&self, ids: &[i32]) -> ApiResult<()>
删除组员
Sourcepub async fn insert_member(&self, m: &Member) -> ApiResult<i32>
pub async fn insert_member(&self, m: &Member) -> ApiResult<i32>
新增组员
Sourcepub async fn update_member(&self, m: &Member) -> ApiResult<()>
pub async fn update_member(&self, m: &Member) -> ApiResult<()>
更新组员
Sourcepub async fn get_password(&self, id: i32) -> ApiResult<String>
pub async fn get_password(&self, id: i32) -> ApiResult<String>
取密码哈希
Sourcepub async fn exists_username(&self, username: &str) -> ApiResult<bool>
pub async fn exists_username(&self, username: &str) -> ApiResult<bool>
用户名重复检查
Sourcepub async fn exists_email(&self, email: &str) -> ApiResult<bool>
pub async fn exists_email(&self, email: &str) -> ApiResult<bool>
邮箱重复检查
Sourcepub async fn is_valid_invitation(&self, code: i32) -> ApiResult<bool>
pub async fn is_valid_invitation(&self, code: i32) -> ApiResult<bool>
邀请码有效
Sourcepub async fn list_invitation_codes(&self) -> ApiResult<Vec<InvitationCode>>
pub async fn list_invitation_codes(&self) -> ApiResult<Vec<InvitationCode>>
邀请码列表
Sourcepub async fn delete_invitation(&self, id: i32) -> ApiResult<()>
pub async fn delete_invitation(&self, id: i32) -> ApiResult<()>
删除邀请码
Sourcepub async fn add_invitation(&self, code: i32) -> ApiResult<()>
pub async fn add_invitation(&self, code: i32) -> ApiResult<()>
新增邀请码
Sourcepub async fn page_member_episodes(
&self,
member_id: i32,
page: i32,
page_size: i32,
) -> ApiResult<(i64, Vec<MemberEpisodeVo>)>
pub async fn page_member_episodes( &self, member_id: i32, page: i32, page_size: i32, ) -> ApiResult<(i64, Vec<MemberEpisodeVo>)>
组员话数分页(SQL COUNT + LIMIT)
Sourcepub async fn list_member_episodes(
&self,
member_id: i32,
) -> ApiResult<Vec<MemberEpisodeVo>>
pub async fn list_member_episodes( &self, member_id: i32, ) -> ApiResult<Vec<MemberEpisodeVo>>
组员话数列表(全量,仅供兼容)
Sourcepub async fn take_episode(&self, ep: &MemberEpisode) -> ApiResult<()>
pub async fn take_episode(&self, ep: &MemberEpisode) -> ApiResult<()>
接稿
Sourcepub async fn submit_episode(&self, ep: &MemberEpisode) -> ApiResult<()>
pub async fn submit_episode(&self, ep: &MemberEpisode) -> ApiResult<()>
交稿
Sourcepub async fn get_member_reminder_rss(
&self,
) -> ApiResult<Vec<MemberReminderRssRow>>
pub async fn get_member_reminder_rss( &self, ) -> ApiResult<Vec<MemberReminderRssRow>>
三月未交稿组员(对齐 Java MemberMapper.getMemberReminderRss)
Sourcepub async fn get_post_ids_by_member(
&self,
member_id: i32,
) -> ApiResult<Vec<i32>>
pub async fn get_post_ids_by_member( &self, member_id: i32, ) -> ApiResult<Vec<i32>>
查询组员岗位 ID 列表
Auto Trait Implementations§
impl Freeze for MemberRepository
impl !RefUnwindSafe for MemberRepository
impl Send for MemberRepository
impl Sync for MemberRepository
impl Unpin for MemberRepository
impl UnsafeUnpin for MemberRepository
impl !UnwindSafe for MemberRepository
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request