Browse Source

wip:过滤付费用户

wangkaiyue 1 year ago
parent
commit
61b3cd3965
1 changed files with 9 additions and 9 deletions
  1. 9 9
      doFreeClueSign/job/mamager.go

+ 9 - 9
doFreeClueSign/job/mamager.go

@@ -125,23 +125,23 @@ func (jm *JobManager) FilterPayUserAndSaveDb(ctx context.Context, value interfac
 		operationTime string
 	)
 	if msg, ok := value.(*public.AgainSubUserMsg); ok {
-		//if jm.payUser.Contains(msg.MgoUserID) {
-		//	return nil
-		//}
+		if jm.payUser.Contains(msg.MgoUserID) {
+			return nil
+		}
 		operationTime = time.Unix(msg.TimeStamp, 0).Format(time.DateTime)
 		sql += `(mogUserId,sub_again_date,create_time)VALUES (?, ?, ?)ON DUPLICATE KEY UPDATE sub_again_date=?`
 		val = append(val, msg.MgoUserID, operationTime, now, operationTime)
 	} else if msg, ok := value.(*public.BindMsg); ok {
-		//if jm.payUser.Contains(msg.MgoUserID) {
-		//	return nil
-		//}
+		if jm.payUser.Contains(msg.MgoUserID) {
+			return nil
+		}
 		operationTime = time.Unix(msg.TimeStamp, 0).Format(time.DateTime)
 		sql += `(mogUserId,phone,bind_phone_date,create_time)VALUES (?, ?, ?, ?)ON DUPLICATE KEY UPDATE phone=?, bind_phone_date=?`
 		val = append(val, msg.MgoUserID, msg.Phone, operationTime, now, msg.Phone, operationTime)
 	} else if msg, ok := value.(*public.NewActiveMsg); ok {
-		//if jm.payUser.Contains(msg.MgoUserID) {
-		//	return nil
-		//}
+		if jm.payUser.Contains(msg.MgoUserID) {
+			return nil
+		}
 		operationTime = time.Unix(msg.TimeStamp, 0).Format(time.DateTime)
 		sql += `(mogUserId,act_again_date,create_time)VALUES (?, ?, ?)ON DUPLICATE KEY UPDATE act_again_date=?`
 		val = append(val, msg.MgoUserID, operationTime, now, operationTime)