WH01243 2 anni fa
parent
commit
0daaaf9972

+ 4 - 4
jyBXSubscribe/rpc/internal/logic/getkeylogic_test.go

@@ -30,12 +30,12 @@ func TestGetKeyLogic_GetKey(t *testing.T) {
 			name: "超级订阅获取",
 			args: args{
 				in: &bxsubscribe.GetKeyReq{
-					UserType:  "mType",
-					UserId:    "5e1154c71c298a4260e92abb",
+					UserType:  "vType",
+					UserId:    "6389918c95d15b282f20c1ca",
 					EntId:     "15178",
 					AppId:     "10000",
-					EntUserId: "4254",
-					NewUserId: 72668,
+					EntUserId: "4829",
+					NewUserId: 335871,
 					UserPower: 1,
 					DeptId:    "3816",
 					IsEnt:     true,

+ 10 - 2
jyBXSubscribe/rpc/model/push.go

@@ -365,9 +365,17 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 	} else {
 		if spqp.IsEnt {
 			if spqp.BuySubject == 1 {
-				userStr = fmt.Sprintf("   a.entid='%s' and (a.source =2 or   a.source =3) and (a.product =1 or   a.product =2) ", spqp.EntId)
+				if spqp.UserType == SubVipFlag {
+					userStr = fmt.Sprintf("   a.entid='%s' and (a.source > 1) and (a.product=1) ", spqp.EntId)
+
+				} else if spqp.UserType == MemberFlag {
+					userStr = fmt.Sprintf("   a.entid='%s' and (a.source>1) and (a.product=2) ", spqp.EntId)
+
+				} else {
+					userStr = fmt.Sprintf("   a.entid='%s' and (a.source>1) and (a.product<1) ", spqp.EntId)
+				}
 			} else {
-				userStr = fmt.Sprintf("   a.entid='%s'  and a.product !=1 and    a.product !=2 ", spqp.EntId)
+				userStr = fmt.Sprintf("   a.entid='%s'  and a.product < 1", spqp.EntId)
 			}
 		} else {
 			userStr = fmt.Sprintf("  a.userid='%s'", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))