Parcourir la source

wip:查询source修改

wangkaiyue il y a 2 ans
Parent
commit
ae3a94c0d3
1 fichiers modifiés avec 3 ajouts et 14 suppressions
  1. 3 14
      jyBXSubscribe/rpc/model/push.go

+ 3 - 14
jyBXSubscribe/rpc/model/push.go

@@ -498,20 +498,9 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 		}
 
 		if spqp.IsEnt {
-			isNew := 1
 			var staffs []string
-			//商机管理判断
-			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(" and  a.entid='%s' and (a.source > 1) ", spqp.EntId)
-			} else {
-				userStr += fmt.Sprintf(" and  a.entid='%s' and a.source = 2 ", spqp.EntId)
-			}
+			userStr += fmt.Sprintf(" and  a.entid='%s' and a.source = 2 ", spqp.EntId)
+
 			//判断是企业管理员还是部门管理员 部门管理员获取所有子部门
 			userEnt := EntInfo(common.IntAll(spqp.EntId), common.IntAll(spqp.EntUserId))
 			if !(userEnt.Role_admin_system || userEnt.Role_admin_department) {
@@ -543,7 +532,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 			}
 
 			// 无查询分配人员、是否已读
-			if (spqp.IsRead == "" && len(spqp.Staffs) == 0) || isNew == 0 {
+			if spqp.IsRead == "" && len(spqp.Staffs) == 0 {
 				//查询数量(需要去重)
 				//if len(querys) > 1 {
 				countSql = fmt.Sprintf("select count(1) from %s a STRAIGHT_JOIN %s b ON  a.infoid = b.infoid  %s where  %s %s", aboutDbMsg[s.ModuleFlag].MysqlTable, Baseinfo, leftJoinStr, strings.Join(querys, " and "), userStr)