Jianghan 1 年之前
父節點
當前提交
55067357d5
共有 1 個文件被更改,包括 16 次插入4 次删除
  1. 16 4
      jyBXSubscribe/rpc/model/push.go

+ 16 - 4
jyBXSubscribe/rpc/model/push.go

@@ -344,8 +344,14 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam, bsp *ViewCondition) (hasN
 			subPush, err = s.GetTodayCache(spqp.UserId, spqp.UserType)
 		}
 		// 返回信息补正文
-		if subPush != nil && len(subPush.Datas) > 0 && strings.Contains(strings.Join(bsp.SelectType, ","), "detail") {
-			getDetail(subPush)
+		if subPush != nil && len(subPush.Datas) > 0 {
+			if strings.Contains(strings.Join(bsp.SelectType, ","), "detail") {
+				getDetail(subPush)
+			} else {
+				for _, data := range subPush.Datas {
+					data.Detail = "" // 删掉正文
+				}
+			}
 		}
 		if err != nil {
 			logx.Info(spqp.UserId, "GetTodayCache Error", err)
@@ -383,8 +389,14 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam, bsp *ViewCondition) (hasN
 			logx.Info(spqp.UserId, "GetAllCache Error", err)
 		}
 		// 返回信息补正文
-		if allCache != nil && len(allCache.Datas) > 0 && strings.Contains(strings.Join(bsp.SelectType, ","), "detail") {
-			getDetail(allCache)
+		if allCache != nil && len(allCache.Datas) > 0 {
+			if strings.Contains(strings.Join(bsp.SelectType, ","), "detail") {
+				getDetail(allCache)
+			} else {
+				for _, data := range allCache.Datas {
+					data.Detail = "" // 删掉正文
+				}
+			}
 		}
 		if err != nil || allCache == nil || allCache.Date != nowFormat || len(allCache.Datas) == 0 {
 			list, countSearch := []*bxsubscribe.SubscribeInfo{}, int64(0)