Forráskód Böngészése

wip:订阅列表附件

wangshan 7 hónapja
szülő
commit
e0a2e70a8b
1 módosított fájl, 3 hozzáadás és 1 törlés
  1. 3 1
      jyBXSubscribe/rpc/model/push.go

+ 3 - 1
jyBXSubscribe/rpc/model/push.go

@@ -815,8 +815,10 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 		if spqp.FileExists != "" {
 			if spqp.FileExists == "1" {
 				querys = append(querys, fmt.Sprintf("a.attachment_count is not null"))
+				querys = append(querys, fmt.Sprintf("a.attachment_count > 0"))
 			} else if spqp.FileExists == "-1" {
-				querys = append(querys, fmt.Sprintf("a.attachment_count is null"))
+				//querys = append(querys, fmt.Sprintf("a.attachment_count is null"))
+				querys = append(querys, fmt.Sprintf("(a.attachment_count is null OR a.attachment_count = 0)"))
 			}
 		}
 		// 是否已读