This commit is contained in:
parent
3cdc52c75e
commit
2a7c04d4ea
|
@ -149,6 +149,27 @@ func (s *Service) CreateStreamerAuthApprovalDetailsTextAudit(ctx *gin.Context, n
|
|||
return
|
||||
}
|
||||
|
||||
func (s *Service) CreateZoneTextAudit(ctx *gin.Context, newZone *dbstruct.Zone) (tasks []*dbstruct.TextAuditTask) {
|
||||
tasks = make([]*dbstruct.TextAuditTask, 0)
|
||||
|
||||
if newZone.Profile != nil {
|
||||
|
||||
tasks = append(tasks, &dbstruct.TextAuditTask{
|
||||
RouteUrl: goproto.String(ctx.Request.URL.Path),
|
||||
AssociativeDatabase: goproto.String("zone"),
|
||||
AssociativeTableName: goproto.String("zone"),
|
||||
AssociativeTableId: newZone.Id,
|
||||
AssociativeTableColumn: goproto.String("profile"),
|
||||
AuditedText: newZone.Profile,
|
||||
OldText: goproto.String(""),
|
||||
})
|
||||
}
|
||||
|
||||
addTextAuditTasks(ctx, tasks, true)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func addTextAuditTasks(ctx *gin.Context, tasks []*dbstruct.TextAuditTask, options ...any) error {
|
||||
for _, task := range tasks {
|
||||
err := addTextAuditTask(ctx, task, options...)
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
momentproto "service/api/proto/moment/proto"
|
||||
streamerproto "service/api/proto/streamer/proto"
|
||||
streamerauthapprovaldetailsproto "service/api/proto/streamerauthapprovaldetails/proto"
|
||||
zoneproto "service/api/proto/zone/proto"
|
||||
zonemomentproto "service/api/proto/zonemoment/proto"
|
||||
"service/bizcommon/util"
|
||||
"service/dbstruct"
|
||||
|
@ -44,6 +45,7 @@ func (handler *TextAuditTaskResultHandler) initTextAuditTaskUpdateFuncGeneratorM
|
|||
handler.generateZoneMomentTextUpdateFunc()
|
||||
handler.generateStreamerAuthApprovalDetailsBioUpdateFunc()
|
||||
handler.generateStreamerAuthApprovalDetailsAutoResponseMessageUpdateFunc()
|
||||
handler.generateZoneProfileUpdateFunc()
|
||||
}
|
||||
|
||||
func (handler *TextAuditTaskResultHandler) getTextAuditTaskUpdateFunc(ctx *gin.Context, task *dbstruct.TextAuditTask, option int) func() error {
|
||||
|
@ -223,6 +225,24 @@ func (handler *TextAuditTaskResultHandler) generateZoneMomentTextUpdateFunc() {
|
|||
}
|
||||
}
|
||||
|
||||
// 空间表->简介
|
||||
func (handler *TextAuditTaskResultHandler) generateZoneProfileUpdateFunc() {
|
||||
handler.textAuditTaskUpdateFuncGeneratorMap["zone|zone|profile"] = func(ctx *gin.Context, task *dbstruct.TextAuditTask, option int) func() error {
|
||||
return func() error {
|
||||
id := task.AssociativeTableId
|
||||
auditcomp, reviewcomp, finalText := getTextUpdateInfo(task, option)
|
||||
return _DefaultZone.OpUpdate(ctx, &zoneproto.OpUpdateReq{
|
||||
Zone: &dbstruct.Zone{
|
||||
Id: id,
|
||||
Profile: finalText,
|
||||
ProfileAudit: auditcomp,
|
||||
ProfileReview: reviewcomp,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 尝试完成审核
|
||||
func tryToFinishTextAuditTaskOfMoment(ctx *gin.Context, task *dbstruct.TextAuditTask) error {
|
||||
// 机审通过,尝试触发moment_audit_task的人审
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
package dbstruct
|
||||
|
||||
type Zone struct {
|
||||
Id *int64 `json:"id" bson:"_id"` // 空间表id
|
||||
Mid *int64 `json:"mid" bson:"mid"` // 用户表id
|
||||
Profile *string `json:"profile" bson:"profile"` // 空间简介
|
||||
LastZoneMomentCt *int64 `json:"last_zone_moment_ct" bson:"last_zone_moment_ct"` // 最后空间动态创建时间
|
||||
ZoneMomentCount *int64 `json:"zone_moment_count" bson:"zone_moment_count"` // 空间内动态总数
|
||||
ImageCount *int64 `json:"image_count" bson:"image_count"` // 空间内图片总数
|
||||
VideoCount *int64 `json:"video_count" bson:"video_count"` // 空间内视频总数
|
||||
IsZoneThirdPartnerHided *int64 `json:"is_zone_third_partner_hided" bson:"is_zone_third_partner_hided"` // 是否隐藏空间代运营
|
||||
Ct *int64 `json:"ct" bson:"ct"` // 创建时间
|
||||
Ut *int64 `json:"ut" bson:"ut"` // 更新时间
|
||||
DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记
|
||||
Id *int64 `json:"id" bson:"_id"` // 空间表id
|
||||
Mid *int64 `json:"mid" bson:"mid"` // 用户表id
|
||||
Profile *string `json:"profile" bson:"profile"` // 空间简介
|
||||
LastZoneMomentCt *int64 `json:"last_zone_moment_ct" bson:"last_zone_moment_ct"` // 最后空间动态创建时间
|
||||
ZoneMomentCount *int64 `json:"zone_moment_count" bson:"zone_moment_count"` // 空间内动态总数
|
||||
ImageCount *int64 `json:"image_count" bson:"image_count"` // 空间内图片总数
|
||||
VideoCount *int64 `json:"video_count" bson:"video_count"` // 空间内视频总数
|
||||
IsZoneThirdPartnerHided *int64 `json:"is_zone_third_partner_hided" bson:"is_zone_third_partner_hided"` // 是否隐藏空间代运营
|
||||
Ct *int64 `json:"ct" bson:"ct"` // 创建时间
|
||||
Ut *int64 `json:"ut" bson:"ut"` // 更新时间
|
||||
DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记
|
||||
ProfileAudit *AuditComponent `json:"profile_audit" bson:"profile_audit"` // 空间简介审核
|
||||
ProfileReview *AuditComponent `json:"profile_review" bson:"profile_review"` // 空间简介人审
|
||||
}
|
||||
|
||||
func (p *Zone) GetId() int64 {
|
||||
|
|
Loading…
Reference in New Issue