diff --git a/route/cp_r/cp_relation.go b/route/cp_r/cp_relation.go index f109e80f3ea2b7235dcef861e7c0e5e531f509d3..2844272842752476c2abb76af6be27bd8e32fd64 100644 --- a/route/cp_r/cp_relation.go +++ b/route/cp_r/cp_relation.go @@ -21,6 +21,7 @@ import ( "hilo-user/domain/model/diamond_m" "hilo-user/domain/model/user_m" "hilo-user/domain/service/cp_s" + "hilo-user/myerr" "hilo-user/myerr/bizerr" "hilo-user/req" "hilo-user/resp" @@ -119,11 +120,11 @@ func ReplyCpInvite(c *gin.Context) (*mycontext.MyContext, error) { myCtx := mycontext.CreateMyContext(c.Keys) externalId := c.PostForm("externalId") if externalId == "" { - return myCtx, bizerr.InvalidParameter + return myCtx, myerr.WrapErr(bizerr.InvalidParameter) } optType, err := strconv.Atoi(c.PostForm("type")) if err != nil || optType > 2 || optType < 1 { - return myCtx, bizerr.InvalidParameter + return myCtx, myerr.WrapErr(bizerr.InvalidParameter) } myUserId, lang, err := req.GetUserIdLang(c, myCtx) @@ -141,7 +142,7 @@ func ReplyCpInvite(c *gin.Context) (*mycontext.MyContext, error) { return myCtx, err } if userSender.ID == myUserId { - return myCtx, bizerr.InvalidParameter + return myCtx, myerr.WrapErr(bizerr.InvalidParameter) } cpRecord, err := cp_m.GetCpInvite(model, userSender.ID, user.ID, cp_e.CpInvite) @@ -150,7 +151,7 @@ func ReplyCpInvite(c *gin.Context) (*mycontext.MyContext, error) { return myCtx, err } if cpRecord == nil || cpRecord.Id == 0 { - return myCtx, bizerr.InvalidParameter + return myCtx, myerr.WrapErr(bizerr.InvalidParameter) } if optType == 1 { // 接受的时候