Explorar el Código

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

wangkaiyue hace 3 años
padre
commit
8702492d90
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      src/jfw/modules/subscribepay/src/service/userAccountInfo.go

+ 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"]))
 				}
 				//建立关联关系