Pārlūkot izejas kodu

增改 whatsapp 记录时亦清空缓存

boweniac 2 mēneši atpakaļ
vecāks
revīzija
d620ae5d49

+ 2 - 0
internal/logic/whatsapp/create_whatsapp_logic.go

@@ -50,5 +50,7 @@ func (l *CreateWhatsappLogic) CreateWhatsapp(req *types.WhatsappInfo) (*types.Ba
 		return nil, dberrorhandler.DefaultEntError(l.Logger, err, req)
 		return nil, dberrorhandler.DefaultEntError(l.Logger, err, req)
 	}
 	}
 
 
+	_ = l.svcCtx.Rds.Del(l.ctx, "wa_info")
+
 	return &types.BaseMsgResp{Msg: errormsg.CreateSuccess}, nil
 	return &types.BaseMsgResp{Msg: errormsg.CreateSuccess}, nil
 }
 }

+ 2 - 0
internal/logic/whatsapp/update_whatsapp_logic.go

@@ -43,5 +43,7 @@ func (l *UpdateWhatsappLogic) UpdateWhatsapp(req *types.WhatsappInfo) (*types.Ba
 		return nil, dberrorhandler.DefaultEntError(l.Logger, err, req)
 		return nil, dberrorhandler.DefaultEntError(l.Logger, err, req)
 	}
 	}
 
 
+	_ = l.svcCtx.Rds.Del(l.ctx, "wa_info")
+
 	return &types.BaseMsgResp{Msg: errormsg.UpdateSuccess}, nil
 	return &types.BaseMsgResp{Msg: errormsg.UpdateSuccess}, nil
 }
 }