|
@@ -375,11 +375,11 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
|
|
|
if spqp.BuySubject == 1 {
|
|
|
//企业主体是企业的个人查询
|
|
|
if spqp.UserType == SubVipFlag {
|
|
|
- userStr = fmt.Sprintf(" a.userid='%s' and (a.product=1)", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
+ userStr = fmt.Sprintf(" a.userid='%s' and ( (a.source=1 and a.product=1 ) or a.source>1 ) ", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
} else if spqp.UserType == MemberFlag {
|
|
|
- userStr = fmt.Sprintf(" a.userid='%s' and (a.product=2)", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
+ userStr = fmt.Sprintf(" a.userid='%s' and ( (a.source=1 and a.product=2 ) or a.source>1 ) ", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
} else {
|
|
|
- userStr = fmt.Sprintf(" a.userid='%s' and (a.product<1)", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
+ userStr = fmt.Sprintf(" a.userid='%s' and ( (a.source=1 and a.product<1 ) or a.source>1 ) ", common.If(s.ModuleFlag == EntnicheFlag, spqp.EntUserId, common.InterfaceToStr(spqp.NewUserId)))
|
|
|
}
|
|
|
} else {
|
|
|
if s.ModuleFlag == EntnicheFlag {
|
|
@@ -770,7 +770,6 @@ func (s *subscribePush) GetCache(code, key string) (*SubPush, error) {
|
|
|
if err := json.Unmarshal(*pc_a, &p); err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
- logx.Info("redis数据", p)
|
|
|
return p, nil
|
|
|
}
|
|
|
|