feat: 完善养成管理后台功能

This commit is contained in:
richjohnrambo
2026-09-19 17:07:47 +08:00
parent f6766d3dbd
commit c7265252d8
13 changed files with 1257 additions and 61 deletions
@@ -0,0 +1,27 @@
package sysin
import (
"context"
"testing"
)
func TestCultivateContentBatchReviewFilter(t *testing.T) {
in := &CultivateContentBatchReviewInp{ObjectType: "feed_post", Ids: []string{"123"}, Action: "take_down", Reason: "违规内容"}
if err := in.Filter(context.Background()); err != nil {
t.Fatalf("Filter returned error: %v", err)
}
}
func TestCultivateContentBatchReviewFilterRequiresReason(t *testing.T) {
in := &CultivateContentBatchReviewInp{ObjectType: "feed_post", Ids: []string{"123"}, Action: "reject"}
if err := in.Filter(context.Background()); err == nil {
t.Fatal("expected missing reason error")
}
}
func TestCultivateReportHandleFilterGovernanceRules(t *testing.T) {
in := &CultivateReportHandleInp{Id: "123", Action: "processing", UserAction: "freeze", Reason: "恶意行为"}
if err := in.Filter(context.Background()); err == nil {
t.Fatal("expected governance action to require resolve")
}
}