From d738c8c840a836f579613a7b5ed5900827227856 Mon Sep 17 00:00:00 2001 From: wangxinyu Date: Mon, 16 Dec 2024 17:48:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=94=B3=E8=AF=B7=E5=85=A5=E9=A9=BB?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E5=BE=AE=E4=BF=A1=E6=98=B5?= =?UTF-8?q?=E7=A7=B0=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/mix/service/apiservice.go | 5 +++++ dbstruct/streamerauthapproval.go | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/app/mix/service/apiservice.go b/app/mix/service/apiservice.go index d4ef08ed..09c3a0e3 100644 --- a/app/mix/service/apiservice.go +++ b/app/mix/service/apiservice.go @@ -1160,6 +1160,11 @@ func (s *Service) ApiGetStreamerAuthApprovalBasicHisList(ctx *gin.Context, req * func (s *Service) ApiCreateStreamerAuthApprovalDetails(ctx *gin.Context, req *streamerauthapprovaldetailsproto.ApiCreateReq) (ec errcode.ErrCode) { ec = errcode.ErrCodeStreamerAuthApprovalDetailsSrvOk + // 禁止设置[wxid_]开头的初始微信号 + if strings.HasPrefix(req.GetWechatContact(), "wxid_") { + ec = errcode.ErrCodeStreamerWxIdSetError + return + } if ec = s.ApiCreateStreamerAuthApprovalDetailsBusinessValidate(ctx, req); ec != errcode.ErrCodeStreamerAuthApprovalSrvOk { return diff --git a/dbstruct/streamerauthapproval.go b/dbstruct/streamerauthapproval.go index d292511c..6e856849 100644 --- a/dbstruct/streamerauthapproval.go +++ b/dbstruct/streamerauthapproval.go @@ -129,6 +129,13 @@ func (p *StreamerAuthApprovalDetails) GetApproveStatus() int64 { return 0 } +func (p *StreamerAuthApprovalDetails) GetWechatContact() string { + if p == nil || p.WechatContact == nil { + return "" + } + return *p.WechatContact +} + type StreamerAuthApprovalVersion struct { Id int64 `json:"id" bson:"_id"` //id,主播的mid Version int64 `json:"version" bson:"version"` //版本号