Эх сурвалжийг харах

fix:领取邀请奖励后删除邀请

wangkaiyue 3 жил өмнө
parent
commit
8702492d90

+ 5 - 1
src/jfw/modules/subscribepay/src/service/userAccountInfo.go

@@ -371,10 +371,14 @@ func (this *UserAccount) PhoneBind() {
 					//船新用户 查看是否有邀请关系 shareRedisName
 					go func(openId string) {
 						var shareUid string
+						shareKey := fmt.Sprintf("rec_%s", openId)
 						if openId != "" {
-							shareUid = redis.GetStr(config.Config.ShareRedisName, fmt.Sprintf("rec_%s", openId))
+							shareUid = redis.GetStr(config.Config.ShareRedisName, shareKey)
 						}
 						entity.NewShareFission(userId, shareUid).AddPower(this.Request)
+						if shareUid != "" {
+							redis.Del(config.Config.ShareRedisName, shareKey)
+						}
 					}(qutil.ObjToString((*uData)["s_m_openid"]))
 				}
 				//建立关联关系