瀏覽代碼

Merge branch 'feature/v1.1.17_wh' of BaseService/jyMicroservices into feature/v1.1.17

wangchuanjin 2 年之前
父節點
當前提交
f4862662f0
共有 2 個文件被更改,包括 38 次插入51 次删除
  1. 0 2
      jyBXSubscribe/rpc/internal/logic/msgdistributorlogic.go
  2. 38 49
      jyBXSubscribe/rpc/model/push.go

+ 0 - 2
jyBXSubscribe/rpc/internal/logic/msgdistributorlogic.go

@@ -109,13 +109,11 @@ func (l *MsgDistributorLogic) MsgDistributor(in *bxsubscribe.MsgDistributorReq)
 	for _, staff := range staffs {
 	for _, staff := range staffs {
 		//today
 		//today
 		redis.Del("pushcache_2_b", fmt.Sprintf("entnichepush_%s", staff))
 		redis.Del("pushcache_2_b", fmt.Sprintf("entnichepush_%s", staff))
-
 		//all
 		//all
 		redis.Del("pushcache_2_a", fmt.Sprintf("all_entnichepush_%s", staff))
 		redis.Del("pushcache_2_a", fmt.Sprintf("all_entnichepush_%s", staff))
 		redis.Del("pushcache_2_a", fmt.Sprintf("all_entnichepush_vip_%s", staff))
 		redis.Del("pushcache_2_a", fmt.Sprintf("all_entnichepush_vip_%s", staff))
 		redis.Del("pushcache_2_a", fmt.Sprintf("all_entnichepush_member_%s", staff))
 		redis.Del("pushcache_2_a", fmt.Sprintf("all_entnichepush_member_%s", staff))
 	}
 	}
-
 	if !ok {
 	if !ok {
 		return &bxsubscribe.StatusResp{ErrorCode: -1, ErrorMsg: "数据分发异常"}, nil
 		return &bxsubscribe.StatusResp{ErrorCode: -1, ErrorMsg: "数据分发异常"}, nil
 	}
 	}

+ 38 - 49
jyBXSubscribe/rpc/model/push.go

@@ -388,22 +388,16 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam) (hasNextPage bool, total
 func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, endtime int64, size int, isLimit bool) (result []*bxsubscribe.SubscribeInfo, count int64) {
 func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, endtime int64, size int, isLimit bool) (result []*bxsubscribe.SubscribeInfo, count int64) {
 	querys := []string{}
 	querys := []string{}
 	userStr := " "
 	userStr := " "
-	leftJoinStr := " "
 	var (
 	var (
 		countSql, findSql string
 		countSql, findSql string
 	)
 	)
-	codeMap, err := IC.CodeLib.CodeTransformation(context.Background(), &codeservice.Request{})
-	if codeMap.Data == nil || err != nil {
-		logx.Error("代码表获取失败")
-		return result, count
-	}
 	querys = append(querys, " 1=1 ")
 	querys = append(querys, " 1=1 ")
 	if spqp.SelectInfoIds != nil && len(spqp.SelectInfoIds) > 0 {
 	if spqp.SelectInfoIds != nil && len(spqp.SelectInfoIds) > 0 {
-		countSql = fmt.Sprintf("select count(1) as count from %s a LEFT JOIN %s b ON a.infoid = b.infoid where %s", aboutDbMsg[s.ModuleFlag].MysqlTable, Baseinfo, fmt.Sprintf("a.id in ('%s')", strings.Join(spqp.SelectInfoIds, "','")))
+		countSql = fmt.Sprintf("select count(1) as count from %s a  where %s", aboutDbMsg[s.ModuleFlag].MysqlTable, fmt.Sprintf("a.id in ('%s')", strings.Join(spqp.SelectInfoIds, "','")))
 		logx.Info("countSql", countSql)
 		logx.Info("countSql", countSql)
-		findSql = fmt.Sprintf("select a.id,a.date,a.infoid,a.isvisit,a.matchkeys,a.type,b.isvalidfile as attachment_count from %s a LEFT JOIN %s b ON a.infoid = b.infoid where %s order by a.date desc,a.id desc", aboutDbMsg[s.ModuleFlag].MysqlTable, Baseinfo, fmt.Sprintf("a.id in ('%s')", strings.Join(spqp.SelectInfoIds, "','")))
+		findSql = fmt.Sprintf("select a.id,a.date,a.infoid,a.isvisit,a.matchkeys,a.type,a.attachment_count from %s a  where %s order by a.date desc,a.id desc", aboutDbMsg[s.ModuleFlag].MysqlTable, fmt.Sprintf("a.id in ('%s')", strings.Join(spqp.SelectInfoIds, "','")))
 		//查询总数
 		//查询总数
-		count = spqp.BaseServiceMysql.CountBySql(countSql)
+		count = spqp.PushMysql.CountBySql(countSql)
 	} else {
 	} else {
 		//公共查询条件
 		//公共查询条件
 		//时间
 		//时间
@@ -419,8 +413,8 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 			//城市
 			//城市
 			city := []string{}
 			city := []string{}
 			for _, v := range strings.Split(spqp.City, ",") {
 			for _, v := range strings.Split(spqp.City, ",") {
-				if codeMap.Data.City[v] != "" {
-					city = append(city, fmt.Sprint(codeMap.Data.City[v]))
+				if IC.PushMapping.City[v] > 0 {
+					city = append(city, fmt.Sprint(IC.PushMapping.City[v]))
 				} else {
 				} else {
 					city = append(city, "-1")
 					city = append(city, "-1")
 				}
 				}
@@ -429,14 +423,14 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 				city = append(city, "9999")
 				city = append(city, "9999")
 			}
 			}
 			if len(city) > 0 {
 			if len(city) > 0 {
-				sqlAreaCity = fmt.Sprintf("b.city_code in (%s)", strings.Join(city, ","))
+				sqlAreaCity = fmt.Sprintf("city in (%s)", strings.Join(city, ","))
 			}
 			}
 			//区域
 			//区域
 			var sqlArea = ""
 			var sqlArea = ""
 			area := []string{}
 			area := []string{}
 			for _, v := range strings.Split(spqp.Area, ",") {
 			for _, v := range strings.Split(spqp.Area, ",") {
-				if codeMap.Data.Area[v] != "" {
-					area = append(area, fmt.Sprint(codeMap.Data.Area[v]))
+				if IC.PushMapping.Area[v] > 0 {
+					area = append(area, fmt.Sprint(IC.PushMapping.Area[v]))
 				} else {
 				} else {
 					area = append(area, "-1")
 					area = append(area, "-1")
 				}
 				}
@@ -445,7 +439,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 				area = append(area, "9999")
 				area = append(area, "9999")
 			}
 			}
 			if len(area) > 0 {
 			if len(area) > 0 {
-				sqlArea = fmt.Sprintf("b.area_code in (%s)", strings.Join(area, ","))
+				sqlArea = fmt.Sprintf("a.area in (%s)", strings.Join(area, ","))
 			}
 			}
 			if sqlAreaCity != "" && sqlArea != "" {
 			if sqlAreaCity != "" && sqlArea != "" {
 				sqlAreaCity = "( " + sqlAreaCity + " or " + sqlArea + " )"
 				sqlAreaCity = "( " + sqlAreaCity + " or " + sqlArea + " )"
@@ -460,15 +454,13 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 		if spqp.Buyerclass != "" {
 		if spqp.Buyerclass != "" {
 			buyerclass := []string{}
 			buyerclass := []string{}
 			for _, v := range strings.Split(spqp.Buyerclass, ",") {
 			for _, v := range strings.Split(spqp.Buyerclass, ",") {
-				if codeMap.Data.Buyerclass[v] != "" {
-					buyerclass = append(buyerclass, fmt.Sprint(codeMap.Data.Buyerclass[v]))
-				}
+				buyerclass = append(buyerclass, fmt.Sprint(IC.PushMapping.Buyerclass[v]))
 			}
 			}
 			if len(buyerclass) == 1 {
 			if len(buyerclass) == 1 {
 				buyerclass = append(buyerclass, "9999")
 				buyerclass = append(buyerclass, "9999")
 			}
 			}
 			if len(buyerclass) > 0 {
 			if len(buyerclass) > 0 {
-				querys = append(querys, fmt.Sprintf("b.buyerclass_code in (%s)", strings.Join(buyerclass, ",")))
+				querys = append(querys, fmt.Sprintf("a.buyerclass_code in (%s)", strings.Join(buyerclass, ",")))
 			}
 			}
 
 
 		}
 		}
@@ -476,28 +468,25 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 		if spqp.Subtype != "" {
 		if spqp.Subtype != "" {
 			subtype := []string{}
 			subtype := []string{}
 			for _, v := range strings.Split(spqp.Subtype, ",") {
 			for _, v := range strings.Split(spqp.Subtype, ",") {
-				if codeMap.Data.Subtype[v] != "" {
-					subtype = append(subtype, fmt.Sprint(codeMap.Data.Subtype[v]))
-				}
+				subtype = append(subtype, fmt.Sprintf("find_in_set('%d',a.subscopeclass)", IC.PushMapping.Subscopeclass[v]))
 			}
 			}
 			if len(subtype) == 1 {
 			if len(subtype) == 1 {
 				subtype = append(subtype, "9999")
 				subtype = append(subtype, "9999")
 			}
 			}
 			if len(subtype) > 0 {
 			if len(subtype) > 0 {
-				querys = append(querys, fmt.Sprintf("b.subtype_code in (%s)", strings.Join(subtype, ",")))
+				querys = append(querys, fmt.Sprintf("a.subtype_code in (%s)", strings.Join(subtype, ",")))
 			}
 			}
 		}
 		}
 		//信息行业
 		//信息行业
 		if spqp.Subscopeclass != "" {
 		if spqp.Subscopeclass != "" {
 			find_in_set := []string{}
 			find_in_set := []string{}
 			for _, v := range strings.Split(spqp.Subscopeclass, ",") {
 			for _, v := range strings.Split(spqp.Subscopeclass, ",") {
-				if codeMap.Data.Subscopeclass[v] != "" {
-					find_in_set = append(find_in_set, codeMap.Data.Subscopeclass[v])
-				}
+				find_in_set = append(find_in_set, fmt.Sprintf("find_in_set('%d',a.subscopeclass)", IC.PushMapping.Subscopeclass[v]))
 			}
 			}
-			if len(find_in_set) > 0 {
-				leftJoinStr = fmt.Sprintf(" STRAIGHT_JOIN %s t on t.infoid = b.infoid and t.labelcode=2 ", BidTags)
-				querys = append(querys, fmt.Sprintf(" t.labelvalues in (%s)", strings.Join(find_in_set, ",")))
+			if len(find_in_set) == 1 {
+				querys = append(querys, find_in_set[0])
+			} else if len(find_in_set) > 1 {
+				querys = append(querys, fmt.Sprintf("(%s)", strings.Join(find_in_set, " or ")))
 			}
 			}
 		}
 		}
 		//关键词
 		//关键词
@@ -518,19 +507,19 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 			minPrice := common.Int64All(common.Float64All(minPriceStr) * 10000) //换成元
 			minPrice := common.Int64All(common.Float64All(minPriceStr) * 10000) //换成元
 			maxPrice := common.Int64All(common.Float64All(maxPriceStr) * 10000) //换成元
 			maxPrice := common.Int64All(common.Float64All(maxPriceStr) * 10000) //换成元
 			if minPriceStr != "" && maxPriceStr != "" {
 			if minPriceStr != "" && maxPriceStr != "" {
-				querys = append(querys, fmt.Sprintf("((b.bidamount>=%d and b.bidamount<=%d) or (b.budget>=%d and b.budget<=%d and b.bidamount is null))", minPrice, maxPrice, minPrice, maxPrice))
+				querys = append(querys, fmt.Sprintf("((a.bidamount>=%d and a.bidamount<=%d) or (a.budget>=%d and a.budget<=%d and a.bidamount is null))", minPrice, maxPrice, minPrice, maxPrice))
 			} else if minPriceStr != "" {
 			} else if minPriceStr != "" {
-				querys = append(querys, fmt.Sprintf("(b.bidamount>=%d  or (b.budget>=%d and b.bidamount is null))", minPrice, minPrice))
+				querys = append(querys, fmt.Sprintf("(a.bidamount>=%d  or (a.budget>=%d and a.bidamount is null))", minPrice, minPrice))
 			} else if maxPriceStr != "" {
 			} else if maxPriceStr != "" {
-				querys = append(querys, fmt.Sprintf("(b.bidamount<=%d or (b.budget<=%d and b.bidamount is null))", maxPrice, maxPrice))
+				querys = append(querys, fmt.Sprintf("(a.bidamount<=%d or (a.budget<=%d and a.bidamount is null))", maxPrice, maxPrice))
 			}
 			}
 		}
 		}
 		//附件
 		//附件
 		if spqp.FileExists != "" {
 		if spqp.FileExists != "" {
 			if spqp.FileExists == "1" {
 			if spqp.FileExists == "1" {
-				querys = append(querys, fmt.Sprintf("b.isvalidfile =1 "))
+				querys = append(querys, fmt.Sprintf("a.attachment_count is not null"))
 			} else if spqp.FileExists == "-1" {
 			} else if spqp.FileExists == "-1" {
-				querys = append(querys, fmt.Sprintf("b.isvalidfile =0 "))
+				querys = append(querys, fmt.Sprintf("a.attachment_count is null"))
 			}
 			}
 		}
 		}
 
 
@@ -575,10 +564,10 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 			// 无查询分配人员、是否已读
 			// 无查询分配人员、是否已读
 			if spqp.IsRead == "" && len(staffs) == 0 {
 			if spqp.IsRead == "" && len(staffs) == 0 {
 				//查询数量(需要去重)
 				//查询数量(需要去重)
-				countSql = fmt.Sprintf("select count(1) from %s a STRAIGHT_JOIN %s b ON  a.infoid = b.infoid  %s where %s %s %s", aboutDbMsg[s.ModuleFlag].MysqlTable, Baseinfo, leftJoinStr, strings.Join(querys, " and "), userStr, common.If(isNew, " and a.source = 2 ", ""))
+				countSql = fmt.Sprintf("select count(1) from %s a    where %s %s %s", aboutDbMsg[s.ModuleFlag].MysqlTable, strings.Join(querys, " and "), userStr, common.If(isNew, " and a.source = 2 ", ""))
 				//列表查询
 				//列表查询
-				findSql = fmt.Sprintf("select a.id,a.infoid,a.matchkeys,b.isvalidfile as attachment_count from %s a STRAIGHT_JOIN %s b ON a.infoid = b.infoid  %s where  %s %s %s order by a.date desc,a.id desc",
-					aboutDbMsg[s.ModuleFlag].MysqlTable, Baseinfo, leftJoinStr, strings.Join(querys, " and "), userStr, common.If(isNew, " and a.source = 2 ", ""))
+				findSql = fmt.Sprintf("select a.id,a.infoid,a.matchkeys,a.attachment_count from %s a  where  %s %s %s order by a.date desc,a.id desc",
+					aboutDbMsg[s.ModuleFlag].MysqlTable, userStr, common.If(isNew, " and a.source = 2 ", ""))
 			} else {
 			} else {
 				//查询分配人员或是否已读
 				//查询分配人员或是否已读
 				staffQuery := " 1=1 "
 				staffQuery := " 1=1 "
@@ -592,9 +581,9 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 						staffQuery += " and a.isvisit=1"
 						staffQuery += " and a.isvisit=1"
 					}
 					}
 				}
 				}
-				countSql = fmt.Sprintf("select count(1) from %s a STRAIGHT_JOIN %s b ON  a.infoid = b.infoid  %s where %s %s %s and ((%s) or EXISTS (SELECT 1 from %s c STRAIGHT_JOIN %s b ON c.infoid = b.infoid  %s WHERE c.source=3 %s and %s and a.id=c.pid and (%s))) ", aboutDbMsg[s.ModuleFlag].MysqlTable, Baseinfo, leftJoinStr, strings.Join(querys, " and "), userStr, common.If(isNew, " and a.source = 2 ", ""), staffQuery, aboutDbMsg[s.ModuleFlag].MysqlTable, Baseinfo, leftJoinStr, strings.ReplaceAll(userStr, "a.", "c."), strings.Join(querys, " and "), strings.ReplaceAll(staffQuery, "a.", "c."))
+				countSql = fmt.Sprintf("select count(1) from %s a s where %s %s %s and ((%s) or EXISTS (SELECT 1 from %s c  WHERE c.source=3 %s and %s and a.id=c.pid and (%s))) ", aboutDbMsg[s.ModuleFlag].MysqlTable, strings.Join(querys, " and "), userStr, common.If(isNew, " and a.source = 2 ", ""), staffQuery, aboutDbMsg[s.ModuleFlag].MysqlTable, strings.ReplaceAll(userStr, "a.", "c."), strings.Join(querys, " and "), strings.ReplaceAll(staffQuery, "a.", "c."))
 				//列表查询
 				//列表查询
-				findSql = fmt.Sprintf("select a.id,a.infoid,a.matchkeys,b.isvalidfile as attachment_count from %s a STRAIGHT_JOIN %s b ON  a.infoid = b.infoid  %s where %s %s %s and ((%s) or EXISTS (SELECT 1 from %s c STRAIGHT_JOIN %s b ON c.infoid = b.infoid  %s WHERE c.source=3 %s and %s and a.id=c.pid and (%s))) order by a.date desc,a.id desc ", aboutDbMsg[s.ModuleFlag].MysqlTable, Baseinfo, leftJoinStr, strings.Join(querys, " and "), userStr, common.If(isNew, " and a.source = 2 ", ""), staffQuery, aboutDbMsg[s.ModuleFlag].MysqlTable, Baseinfo, leftJoinStr, strings.ReplaceAll(userStr, "a.", "c."), strings.Join(querys, " and "), strings.ReplaceAll(staffQuery, "a.", "c."))
+				findSql = fmt.Sprintf("select a.id,a.infoid,a.matchkeys,a.attachment_count from %s a where %s %s %s and ((%s) or EXISTS (SELECT 1 from %s c  WHERE c.source=3 %s and %s and a.id=c.pid and (%s))) order by a.date desc,a.id desc ", aboutDbMsg[s.ModuleFlag].MysqlTable, strings.Join(querys, " and "), userStr, common.If(isNew, " and a.source = 2 ", ""), staffQuery, aboutDbMsg[s.ModuleFlag].MysqlTable, strings.ReplaceAll(userStr, "a.", "c."), strings.Join(querys, " and "), strings.ReplaceAll(staffQuery, "a.", "c."))
 			}
 			}
 		} else {
 		} else {
 			// 是否已读
 			// 是否已读
@@ -630,17 +619,17 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 				}
 				}
 			}
 			}
 			//查询数量
 			//查询数量
-			countSql = fmt.Sprintf("select count(1) as count from %s  a STRAIGHT_JOIN %s b ON a.infoid = b.infoid  %s where 1=1 %s and %s", aboutDbMsg[s.ModuleFlag].MysqlTable, Baseinfo, leftJoinStr, userStr, strings.Join(querys, " and "))
+			countSql = fmt.Sprintf("select count(1) as count from %s  a  where 1=1 %s and %s", aboutDbMsg[s.ModuleFlag].MysqlTable, userStr, strings.Join(querys, " and "))
 			//列表查询语句
 			//列表查询语句
-			findSql = "select a.id,a.date,a.infoid,a.isvisit,a.matchkeys,a.type,b.isvalidfile as attachment_count"
+			findSql = "select a.id,a.date,a.infoid,a.isvisit,a.matchkeys,a.type,a.attachment_count"
 			if s.ModuleFlag == EntnicheFlag {
 			if s.ModuleFlag == EntnicheFlag {
 				findSql += ", IF(a.source is NULL,1,a.source) as  source "
 				findSql += ", IF(a.source is NULL,1,a.source) as  source "
 			}
 			}
 			if s.ModuleFlag != MemberFlag && s.ModuleFlag != EntnicheFlag {
 			if s.ModuleFlag != MemberFlag && s.ModuleFlag != EntnicheFlag {
 				findSql += ",a.isvip"
 				findSql += ",a.isvip"
 			}
 			}
-			findSql = fmt.Sprintf("%s from %s  a STRAIGHT_JOIN %s b ON 1=1 %s and a.infoid = b.infoid  %s where %s"+
-				" order by a.date desc,a.id desc", findSql, aboutDbMsg[s.ModuleFlag].MysqlTable, Baseinfo, userStr, leftJoinStr, strings.Join(querys, " and "))
+			findSql = fmt.Sprintf("%s from %s  a  where  %s %s "+
+				" order by a.date desc,a.id desc", findSql, aboutDbMsg[s.ModuleFlag].MysqlTable, strings.Join(querys, " and "), userStr)
 		}
 		}
 		//查询总数
 		//查询总数
 		logx.Info("countSql", countSql)
 		logx.Info("countSql", countSql)
@@ -650,7 +639,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 		findSql += fmt.Sprintf(" limit %d,%d", (spqp.PageNum-1)*size, size)
 		findSql += fmt.Sprintf(" limit %d,%d", (spqp.PageNum-1)*size, size)
 	}
 	}
 	logx.Info(spqp.NewUserId, "subscribePush query sql:", findSql)
 	logx.Info(spqp.NewUserId, "subscribePush query sql:", findSql)
-	list := spqp.BaseServiceMysql.SelectBySql(findSql)
+	list := spqp.PushMysql.SelectBySql(findSql)
 	if list != nil && len(*list) > 0 {
 	if list != nil && len(*list) > 0 {
 		pushCas := s.GetJyPushs(*list)
 		pushCas := s.GetJyPushs(*list)
 		if !spqp.Export {
 		if !spqp.Export {
@@ -928,10 +917,10 @@ func (s *subscribePush) SetRead(newUserId, id int64, userId, entUserId, entId st
 	} else {
 	} else {
 		if s.ModuleFlag == EntnicheFlag {
 		if s.ModuleFlag == EntnicheFlag {
 			//商机管理
 			//商机管理
-			IC.BaseServiceMysql.UpdateOrDeleteBySql(fmt.Sprintf("update %s set isvisit=1,visittime=now() where userid=? and id=?", aboutDbMsg[s.ModuleFlag].MysqlTable), entUserId, id)
+			IC.PushMysql.UpdateOrDeleteBySql(fmt.Sprintf("update %s set isvisit=1,visittime=now() where userid=? and id=?", aboutDbMsg[s.ModuleFlag].MysqlTable), entUserId, id)
 		} else {
 		} else {
 			//其他
 			//其他
-			IC.BaseServiceMysql.UpdateOrDeleteBySql(fmt.Sprintf("update %s set isvisit=1 where userid=? and id=?", aboutDbMsg[s.ModuleFlag].MysqlTable), newUserId, id)
+			IC.PushMysql.UpdateOrDeleteBySql(fmt.Sprintf("update %s set isvisit=1 where userid=? and id=?", aboutDbMsg[s.ModuleFlag].MysqlTable), newUserId, id)
 		}
 		}
 	}
 	}
 	if !isEnt {
 	if !isEnt {
@@ -1095,11 +1084,11 @@ func (s *subscribePush) listManager(spqp *SubPushQueryParam, list []map[string]i
 	id := int64(0)
 	id := int64(0)
 	switch s.ModuleFlag {
 	switch s.ModuleFlag {
 	case EntnicheFlag:
 	case EntnicheFlag:
-		_, id = spqp.BaseServiceMysql.InsertIgnoreBatch(aboutDbMsg[s.ModuleFlag].MysqlTable, ennicheInsertCollKey, pushInsert)
+		_, id = spqp.PushMysql.InsertIgnoreBatch(aboutDbMsg[s.ModuleFlag].MysqlTable, ennicheInsertCollKey, pushInsert)
 	case MemberFlag:
 	case MemberFlag:
-		_, id = spqp.BaseServiceMysql.InsertIgnoreBatch(aboutDbMsg[s.ModuleFlag].MysqlTable, memberInsertCollKey, pushInsert)
+		_, id = spqp.PushMysql.InsertIgnoreBatch(aboutDbMsg[s.ModuleFlag].MysqlTable, memberInsertCollKey, pushInsert)
 	default:
 	default:
-		_, id = spqp.BaseServiceMysql.InsertIgnoreBatch(aboutDbMsg[s.ModuleFlag].MysqlTable, subscribeInsertCollKey, pushInsert)
+		_, id = spqp.PushMysql.InsertIgnoreBatch(aboutDbMsg[s.ModuleFlag].MysqlTable, subscribeInsertCollKey, pushInsert)
 	}
 	}
 	for i := length - 1; i >= 0; i-- {
 	for i := length - 1; i >= 0; i-- {
 		resultList[i].CaIndex = id
 		resultList[i].CaIndex = id