上传公会同意cd判断
This commit is contained in:
parent
4a4915577b
commit
dd93a8956b
@ -2,9 +2,11 @@ package sociaty
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/utils"
|
||||
)
|
||||
|
||||
// 公会申请-同意
|
||||
@ -25,6 +27,26 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) (
|
||||
return
|
||||
}
|
||||
|
||||
// userex
|
||||
userEx, err := this.module.ModuleUser.GetUserExpand(req.Uid)
|
||||
if err != nil {
|
||||
this.module.Error("GetRemoteUserExpand", log.Field{Key: "uid", Value: req.Uid}, log.Field{Key: "err", Value: err.Error()})
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_UserNofound,
|
||||
Title: pb.ErrorCode_UserNofound.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if utils.IsInCDHour(userEx.SociatyCd) {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SociatyCDLimit,
|
||||
Title: pb.ErrorCode_SociatyCDLimit.ToString(),
|
||||
Message: fmt.Sprintf("CD内[%v]不允许申请", userEx.SociatyCd),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
uid := session.GetUserId()
|
||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user