Browse Source

fix:订阅导出超级订阅企业版查询不到数据处理

fuwencai 2 years ago
parent
commit
5fe90ad7af
1 changed files with 7 additions and 1 deletions
  1. 7 1
      jyBXSubscribe/rpc/internal/logic/bypushhistorylogic.go

+ 7 - 1
jyBXSubscribe/rpc/internal/logic/bypushhistorylogic.go

@@ -1,6 +1,7 @@
 package logic
 
 import (
+	"app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/encrypt"
 	"context"
 	"github.com/zeromicro/go-zero/core/logx"
@@ -64,6 +65,7 @@ func (l *ByPushHistoryLogic) ByPushHistory(in *bxsubscribe.SubscribeInfosReq) (*
 		NewUserId:        in.NewUserId,
 		BaseServiceMysql: IC.BaseServiceMysql,
 		IsEnt:            in.IsEnt,
+		UserType:         in.UserType,
 	}
 
 	//主体处理(fType:普通用户;vType:超级订阅用户;mType:大会员用户;eType:商机管理用户)
@@ -76,6 +78,8 @@ func (l *ByPushHistoryLogic) ByPushHistory(in *bxsubscribe.SubscribeInfosReq) (*
 	if infoCount > 0 {
 		in.UserType = model.EntnicheFlag
 		vipType = model.EntnicheFlag
+		//主体等于企业的
+		spqp.BuySubject = 1
 	}
 
 	if in.IsEnt == true {
@@ -85,7 +89,9 @@ func (l *ByPushHistoryLogic) ByPushHistory(in *bxsubscribe.SubscribeInfosReq) (*
 			vipType = model.EntnicheFlag
 		}
 	}
-
+	if in.UserType == model.EntnicheFlag {
+		spqp.UserId = common.InterfaceToStr(spqp.EntUserId)
+	}
 	logx.Info("数据导出查询参数", in)
 	if selectIds := strings.TrimSpace(in.SelectIds); selectIds != "" {
 		spqp.SelectInfoIds = strings.Split(selectIds, ",")