pub struct EpisodeRepository { /* private fields */ }Expand description
话数仓储
Implementations§
Source§impl EpisodeRepository
impl EpisodeRepository
Sourcepub async fn list_by_manga_id(
&self,
manga_id: i32,
) -> ApiResult<Vec<EpisodeSimpleListVo>>
pub async fn list_by_manga_id( &self, manga_id: i32, ) -> ApiResult<Vec<EpisodeSimpleListVo>>
Sourcepub async fn list_full_by_manga_id(
&self,
manga_id: i32,
) -> ApiResult<Vec<EpisodeListVo>>
pub async fn list_full_by_manga_id( &self, manga_id: i32, ) -> ApiResult<Vec<EpisodeListVo>>
按漫画 ID 查询话数完整列表
Sourcepub async fn get_legacy_file_path(
&self,
id: i32,
post_name: &str,
) -> ApiResult<Option<String>>
pub async fn get_legacy_file_path( &self, id: i32, post_name: &str, ) -> ApiResult<Option<String>>
查询话数本地稿件路径(translatorFile / proofreaderFile / timerFile)
Sourcepub async fn set_legacy_file_path(
&self,
id: i32,
post_name: &str,
path: &str,
) -> ApiResult<()>
pub async fn set_legacy_file_path( &self, id: i32, post_name: &str, path: &str, ) -> ApiResult<()>
更新话数本地稿件路径
Sourcepub async fn get_newest_by_manga_id(
&self,
manga_id: i32,
) -> ApiResult<Option<NewestEpisodeVo>>
pub async fn get_newest_by_manga_id( &self, manga_id: i32, ) -> ApiResult<Option<NewestEpisodeVo>>
查询漫画最新话
Sourcepub async fn page_uploaded_submit(
&self,
page: i32,
page_size: i32,
manga_tran_name: Option<&str>,
username: Option<&str>,
) -> ApiResult<(i64, Vec<UploadPageVo>)>
pub async fn page_uploaded_submit( &self, page: i32, page_size: i32, manga_tran_name: Option<&str>, username: Option<&str>, ) -> ApiResult<(i64, Vec<UploadPageVo>)>
分页查询已上传稿件(SQL LIMIT/OFFSET,对齐 Java PageHelper)
Sourcepub async fn count_episode_by_number(
&self,
manga_id: i32,
manga_episode: &str,
) -> ApiResult<i64>
pub async fn count_episode_by_number( &self, manga_id: i32, manga_episode: &str, ) -> ApiResult<i64>
统计同漫画下相同话数标签数量
Sourcepub async fn touch_manga_update_time(&self, manga_id: i32) -> ApiResult<()>
pub async fn touch_manga_update_time(&self, manga_id: i32) -> ApiResult<()>
刷新漫画更新时间
Sourcepub async fn insert(&self, dto: &EpisodeEditDto) -> ApiResult<i32>
pub async fn insert(&self, dto: &EpisodeEditDto) -> ApiResult<i32>
新增话数(对齐 Java insertEpisode)
Sourcepub async fn insert_detail(
&self,
episode_id: i32,
dto: &EpisodeEditDto,
) -> ApiResult<()>
pub async fn insert_detail( &self, episode_id: i32, dto: &EpisodeEditDto, ) -> ApiResult<()>
新增话数详情及岗位接稿时间(对齐 Java insertEpisodeDetail)
Sourcepub async fn update_publish_link_only(
&self,
id: i32,
publish_link: Option<String>,
) -> ApiResult<()>
pub async fn update_publish_link_only( &self, id: i32, publish_link: Option<String>, ) -> ApiResult<()>
仅更新发布链接
Sourcepub async fn update(&self, dto: &EpisodeEditDto) -> ApiResult<()>
pub async fn update(&self, dto: &EpisodeEditDto) -> ApiResult<()>
更新话数(对齐 Java updateMangaEpisode)
Sourcepub async fn delete_by_id(&self, id: i32) -> ApiResult<()>
pub async fn delete_by_id(&self, id: i32) -> ApiResult<()>
删除话数及详情
Sourcepub async fn update_publish_links_batch(
&self,
requests: &[PublishLinkRequest],
) -> ApiResult<()>
pub async fn update_publish_links_batch( &self, requests: &[PublishLinkRequest], ) -> ApiResult<()>
批量更新发布链接
Sourcepub async fn count_publish_link(
&self,
publish_link: &str,
exclude_id: Option<i32>,
) -> ApiResult<i64>
pub async fn count_publish_link( &self, publish_link: &str, exclude_id: Option<i32>, ) -> ApiResult<i64>
检测发布链接是否重复
Sourcepub async fn get_statistic_count(
&self,
start: NaiveDateTime,
end: NaiveDateTime,
) -> ApiResult<PostCompletionStats>
pub async fn get_statistic_count( &self, start: NaiveDateTime, end: NaiveDateTime, ) -> ApiResult<PostCompletionStats>
统计时间段内各岗位完成数
Sourcepub fn stats_from_post(stats: &PostCompletionStats) -> Statistics
pub fn stats_from_post(stats: &PostCompletionStats) -> Statistics
转为 Statistics(对齐 Java getStatisticCount)
Sourcepub async fn get_member_statistics(
&self,
start: DateTime<Utc>,
end: DateTime<Utc>,
member_id: Option<i32>,
) -> ApiResult<Vec<MemberStatistics>>
pub async fn get_member_statistics( &self, start: DateTime<Utc>, end: DateTime<Utc>, member_id: Option<i32>, ) -> ApiResult<Vec<MemberStatistics>>
查询组员完成统计(对齐 Java MembertbDao.selectMemberStatistics)
Sourcepub async fn rollback_episode(
&self,
episode_id: i32,
workflow_type: &str,
) -> ApiResult<Option<i32>>
pub async fn rollback_episode( &self, episode_id: i32, workflow_type: &str, ) -> ApiResult<Option<i32>>
回退指定岗位流程
Sourcepub async fn list_unpublished_with_detail(
&self,
) -> ApiResult<Vec<EpisodeListVo>>
pub async fn list_unpublished_with_detail( &self, ) -> ApiResult<Vec<EpisodeListVo>>
查询未发布话数(任务追踪用)
Auto Trait Implementations§
impl Freeze for EpisodeRepository
impl !RefUnwindSafe for EpisodeRepository
impl Send for EpisodeRepository
impl Sync for EpisodeRepository
impl Unpin for EpisodeRepository
impl UnsafeUnpin for EpisodeRepository
impl !UnwindSafe for EpisodeRepository
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