|
@@ -364,16 +364,14 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
|
|
|
findSql = "select a.id,a.date,a.infoid,a.isvisit,a.matchkeys,a.type,b.isvalidfile as attachment_count"
|
|
|
} else {
|
|
|
if spqp.IsEnt {
|
|
|
- isNew := 0
|
|
|
- if spqp.UserType == EntnicheFlag {
|
|
|
- //商机管理判断
|
|
|
- newCount := IC.MainMysql.CountBySql("select count(id) from entniche_info where id =? and isNew=1 and status=1", spqp.EntId)
|
|
|
- if newCount > 0 {
|
|
|
- //新商机管理
|
|
|
- isNew = 1
|
|
|
- }
|
|
|
- }
|
|
|
- if spqp.BuySubject == 1 || isNew == 1 {
|
|
|
+ isNew := 1
|
|
|
+ //商机管理判断
|
|
|
+ newCount := IC.MainMysql.CountBySql("select count(id) from entniche_info where id =? and isNew != 1 and status=1", spqp.EntId)
|
|
|
+ if newCount > 0 {
|
|
|
+ //新商机管理
|
|
|
+ isNew = 0
|
|
|
+ }
|
|
|
+ if isNew == 1 {
|
|
|
//企业主体是企业的企业查询
|
|
|
userStr = fmt.Sprintf(" a.entid='%s' and (a.source > 1) ", spqp.EntId)
|
|
|
} else {
|