|
@@ -166,11 +166,14 @@ func (s *subscribePush) PutTodayCache(userId, userType string, pc_a *SubPush) {
|
|
|
// 获取redis key
|
|
|
func (s *subscribePush) todayKey(userId, userType string) string {
|
|
|
if userType == EntnicheFlag {
|
|
|
- return fmt.Sprintf("%s_%s", aboutDbMsg[s.ModuleFlag].RedisKeyFlag, userId)
|
|
|
- } else {
|
|
|
- return fmt.Sprintf("%s_%s", aboutDbMsg[s.ModuleFlag].RedisKeyFlag, userId)
|
|
|
+ switch userType {
|
|
|
+ case SubVipFlag:
|
|
|
+ return fmt.Sprintf("%s_%s_%s", aboutDbMsg[s.ModuleFlag].RedisKeyFlag, "vip", userId)
|
|
|
+ case MemberFlag:
|
|
|
+ return fmt.Sprintf("%s_%s_%s", aboutDbMsg[s.ModuleFlag].RedisKeyFlag, "member", userId)
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+ return fmt.Sprintf("%s_%s", aboutDbMsg[s.ModuleFlag].RedisKeyFlag, userId)
|
|
|
}
|
|
|
func (s *subscribePush) allKey(userId, userType string) string {
|
|
|
if s.ModuleFlag == EntnicheFlag {
|
|
@@ -179,8 +182,6 @@ func (s *subscribePush) allKey(userId, userType string) string {
|
|
|
return fmt.Sprintf("all_%s_%s_%s", aboutDbMsg[s.ModuleFlag].RedisKeyFlag, "vip", userId)
|
|
|
case MemberFlag:
|
|
|
return fmt.Sprintf("all_%s_%s_%s", aboutDbMsg[s.ModuleFlag].RedisKeyFlag, "member", userId)
|
|
|
- case SubFreeFlag:
|
|
|
- return fmt.Sprintf("all_%s_%s_%s", aboutDbMsg[s.ModuleFlag].RedisKeyFlag, "free", userId)
|
|
|
}
|
|
|
}
|
|
|
return fmt.Sprintf("all_%s_%s", aboutDbMsg[s.ModuleFlag].RedisKeyFlag, userId)
|