Merge pull request 'by Robin at 20241218' (#917) from feat-IRONFANS-212-Robin into test
Reviewed-on: https://git.wishpal.cn/wishpal_ironfan/service/pulls/917
This commit is contained in:
commit
75cf70878a
|
@ -39,9 +39,9 @@ const (
|
|||
AudNotifTemp_StreamerDetailsApplied = 1732523345 // 提交完善资料材料
|
||||
AudNotifTemp_StreamerDetailsPassed = 1732523346 // 运营后台审核通过完善资料
|
||||
AudNotifTemp_StreamerDetailsRejected = 1732523347 // 运营后台审核写上备注并未通过完善资料
|
||||
AudNotifTemp_WithdrawalInfoApplied = 1732523348 // 主播提交了申请提现相关的资料(todo)
|
||||
AudNotifTemp_WithdrawalInfoPassed = 1732523349 // 运营后台操作了相关资料审核:通过
|
||||
AudNotifTemp_WithdrawalInfoRejected = 1732523350 // 运营后台操作了相关资料审核:拒绝
|
||||
AudNotifTemp_RealNameAuthenticationApplied = 1732523348 // 主播提交了申请提现相关的资料(todo)
|
||||
AudNotifTemp_RealNameAuthenticationPassed = 1732523349 // 运营后台操作了相关资料审核:通过
|
||||
AudNotifTemp_RealNameAuthenticationRejected = 1732523350 // 运营后台操作了相关资料审核:拒绝
|
||||
AudNotifTemp_StreamerDirectlyUpdated = 1732523351 // 主播在编辑主页时,仅修改选项内容后提交
|
||||
AudNotifTemp_BioChangeApplied = 1732523352 // 主播在编辑主页时,修改个性签名后提交
|
||||
AudNotifTemp_BioPassed = 1732523353 // 运营审核通过【个性签名】
|
||||
|
|
|
@ -2045,6 +2045,9 @@ func (s *Service) ApiCreateRealNameAuthentication(ctx *gin.Context, req *realnam
|
|||
ec = errcode.ErrCodeRealNameAuthenticationSrvFail
|
||||
return
|
||||
}
|
||||
|
||||
DefaultNotifBuilderHandler.Handle(ctx)(consts.AudNotifTemp_RealNameAuthenticationApplied)(req.RealNameAuthentication)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -146,3 +146,12 @@ func (p *RealNameAuthentication) OpListByMid(ctx *gin.Context, req *realname_aut
|
|||
}
|
||||
return realname_authentication, nil
|
||||
}
|
||||
|
||||
func (p *RealNameAuthentication) GetByIds(ctx *gin.Context, ids []int64) ([]*dbstruct.RealNameAuthentication, error) {
|
||||
list, err := p.store.GetRealNameAuthenticationListByIds(ctx, ids)
|
||||
if err != nil {
|
||||
logger.Error("GetRealNameAuthenticationListByIds fail, ids: %v, err: %v", ids, err)
|
||||
return make([]*dbstruct.RealNameAuthentication, 0), err
|
||||
}
|
||||
return list, nil
|
||||
}
|
||||
|
|
|
@ -68,6 +68,9 @@ func (handler *NotifBuilderHandler) init() {
|
|||
handler.handleAudStreamerDetailsApplied()
|
||||
handler.handleAudStreamerDetailsPassed()
|
||||
handler.handleAudStreamerDetailsRejected()
|
||||
handler.handleAudRealNameAuthenticationApplied()
|
||||
handler.handleAudRealNameAuthenticationPassed()
|
||||
handler.handleAudRealNameAuthenticationRejected()
|
||||
handler.handleAudBioChangeApplied()
|
||||
handler.handleAudBioPassed()
|
||||
handler.handleAudBioRejected()
|
||||
|
@ -349,6 +352,29 @@ func (handler *NotifBuilderHandler) handleAudStreamerDetailsRejected() {
|
|||
}
|
||||
}
|
||||
|
||||
func (handler *NotifBuilderHandler) handleAudRealNameAuthenticationApplied() {
|
||||
handler.handlerMap[consts.AudNotifTemp_RealNameAuthenticationApplied] = func(ctx *gin.Context, args ...any) {
|
||||
realNameAuthentication := args[0].(*dbstruct.RealNameAuthentication)
|
||||
if realNameAuthentication != nil {
|
||||
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_RealNameAuthenticationApplied, realNameAuthentication.GetMid())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (handler *NotifBuilderHandler) handleAudRealNameAuthenticationPassed() {
|
||||
handler.handlerMap[consts.AudNotifTemp_RealNameAuthenticationPassed] = func(ctx *gin.Context, args ...any) {
|
||||
mid := args[0].(int64)
|
||||
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_RealNameAuthenticationPassed, mid)
|
||||
}
|
||||
}
|
||||
|
||||
func (handler *NotifBuilderHandler) handleAudRealNameAuthenticationRejected() {
|
||||
handler.handlerMap[consts.AudNotifTemp_RealNameAuthenticationRejected] = func(ctx *gin.Context, args ...any) {
|
||||
mid := args[0].(int64)
|
||||
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_RealNameAuthenticationRejected, mid)
|
||||
}
|
||||
}
|
||||
|
||||
func (handler *NotifBuilderHandler) handleAudBioChangeApplied() {
|
||||
handler.handlerMap[consts.AudNotifTemp_BioChangeApplied] = func(ctx *gin.Context, args ...any) {
|
||||
streamer := args[0].(*dbstruct.Streamer)
|
||||
|
|
|
@ -3192,6 +3192,13 @@ func (s *Service) OpApproveRealNameAuthentication(ctx *gin.Context, req *realnam
|
|||
return
|
||||
}
|
||||
|
||||
list, err := _DefaultRealNameAuthentication.GetByIds(ctx, req.Ids)
|
||||
if err != nil {
|
||||
logger.Error("GetByIds fail, req: %v, err: %v", util.ToJson(req), err)
|
||||
ec = errcode.ErrCodeRealNameAuthenticationSrvFail
|
||||
return
|
||||
}
|
||||
|
||||
//2.若是审批失败,则更新之后直接删除,审批失败的信息将流转到历史表里保存
|
||||
if util.DerefInt64(req.ApproveStatus) == consts.RealNameAuthentication_Rejected {
|
||||
err := _DefaultRealNameAuthentication.OpDeleteBatch(ctx, req.Ids)
|
||||
|
@ -3200,9 +3207,18 @@ func (s *Service) OpApproveRealNameAuthentication(ctx *gin.Context, req *realnam
|
|||
ec = errcode.ErrCodeRealNameAuthenticationSrvFail
|
||||
return
|
||||
}
|
||||
|
||||
for _, realnameauth := range list {
|
||||
DefaultNotifBuilderHandler.Handle(ctx)(consts.AudNotifTemp_RealNameAuthenticationRejected)(realnameauth.GetMid())
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
for _, realnameauth := range list {
|
||||
DefaultNotifBuilderHandler.Handle(ctx)(consts.AudNotifTemp_RealNameAuthenticationRejected)(realnameauth.GetMid())
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -12,5 +12,11 @@ type RealNameAuthentication struct {
|
|||
Ct *int64 `json:"ct" bson:"ct"` // 创建时间
|
||||
Ut *int64 `json:"ut" bson:"ut"` // 更新时间
|
||||
DelFlag *int64 `json:"del_flag" bson:"del_flag"` // 删除标记
|
||||
|
||||
}
|
||||
|
||||
func (p *RealNameAuthentication) GetMid() int64 {
|
||||
if p != nil && p.Mid != nil {
|
||||
return *p.Mid
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue