diff --git a/internal/service/post_audit_service.go b/internal/service/post_audit_service.go
index 751e2cf..ac592b9 100644
--- a/internal/service/post_audit_service.go
+++ b/internal/service/post_audit_service.go
@@ -155,15 +155,12 @@ func (s *PostService) Reject(postID uint, reason string) error {
}
// Lock 锁定:设置 IsLocked 标志,禁止编辑,不改变帖子发布状态
+// 锁定状态独立于审核状态,任何状态的帖子均可锁定
func (s *PostService) Lock(postID uint, reason string) error {
post, err := s.findPost(postID)
if err != nil {
return err
}
- // 待审核帖子不允许锁定(审核流程中)
- if post.Status == model.PostStatusPending {
- return common.ErrPostCannotLock
- }
post.IsLocked = true
post.LockReason = reason
return s.repo.Update(post)
diff --git a/templates/admin/html/posts/index.html b/templates/admin/html/posts/index.html
index 45b131f..edb1668 100644
--- a/templates/admin/html/posts/index.html
+++ b/templates/admin/html/posts/index.html
@@ -57,7 +57,7 @@
{{end}}
- {{if and (not .IsLocked) (ne .Status "pending")}}
+ {{if not .IsLocked}}
{{end}}
{{if .IsLocked}}