From 47f034c35b3992803c7463b436fe4e72bae26c89 Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Wed, 14 Jun 2023 15:01:32 +0800 Subject: [PATCH] im check --- route/cp_r/cp_relation.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/route/cp_r/cp_relation.go b/route/cp_r/cp_relation.go index 97461eb..b161fab 100644 --- a/route/cp_r/cp_relation.go +++ b/route/cp_r/cp_relation.go @@ -494,10 +494,12 @@ func CheckCpImExpire(c *gin.Context) (*mycontext.MyContext, error) { switch cpRecord.Status { case cp_e.CpInvite: if userId == cpRecord.UserId { // 发起人 - resId = common.MSG_ID_ALREADY_EXPIRED + resId = common.MSG_ID_ALREADY_EXPIRED // 等待对方接受 } - case cp_e.CpInviteAccept, cp_e.CpInviteRefuse: - resId = common.MSG_ID_ALREADY_EXPIRED + case cp_e.CpInviteAccept: + resId = common.MSG_ID_ALREADY_EXPIRED // 已接受 + case cp_e.CpInviteRefuse: + resId = common.MSG_ID_ALREADY_EXPIRED // 已拒绝 case cp_e.CpInviteExpired: resId = common.MSG_ID_ALREADY_EXPIRED } @@ -514,12 +516,12 @@ func CheckCpImExpire(c *gin.Context) (*mycontext.MyContext, error) { switch cpCancel.Status { case cp_e.CpCancel: if userId == cpCancel.UserId { // 发起人 - resId = common.MSG_ID_ALREADY_EXPIRED + resId = common.MSG_ID_ALREADY_EXPIRED // 等待对方接受 } - case cp_e.CpCancelRevoke, cp_e.CpCancelAccept: - resId = common.MSG_ID_ALREADY_EXPIRED - case cp_e.CpCancelAcceptAuto: - resId = common.MSG_ID_ALREADY_EXPIRED + case cp_e.CpCancelRevoke: + resId = common.MSG_ID_ALREADY_EXPIRED // 已被取消 + case cp_e.CpCancelAccept, cp_e.CpCancelAcceptAuto: + resId = common.MSG_ID_ALREADY_EXPIRED // 已解绑 } } if resId > 0 { -- 2.22.0