Эх сурвалжийг харах

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

wangchuanjin 2 жил өмнө
parent
commit
965da45300

+ 0 - 7
jyBXBase/rpc/etc/db.yaml

@@ -13,13 +13,6 @@ mysql:
         password: '=PDT49#80Z!RVv52_z'
         maxOpenConns: 80
         maxIdleConns: 5
-    push:
-        dbName: push
-        address: 192.168.3.14:4000
-        userName: root
-        password: '=PDT49#80Z!RVv52_z'
-        maxOpenConns: 5
-        maxIdleConns: 5
 redis:
     addr:
         - other=192.168.3.206:1712

+ 0 - 13
jyBXBase/rpc/init/db.go

@@ -103,19 +103,6 @@ func MysqlInit(em *entity.Mysql) {
 		}
 		MainMysql.Init()
 	}
-	//初始化 mysql-push
-	if em.Push.Address != "" {
-		logx.Info("--初始化 push mysql--")
-		PushMysql = &mysql.Mysql{
-			Address:      em.Push.Address,
-			UserName:     em.Push.UserName,
-			PassWord:     em.Push.Password,
-			DBName:       em.Push.DbName,
-			MaxOpenConns: em.Push.MaxOpenConns,
-			MaxIdleConns: em.Push.MaxIdleConns,
-		}
-		PushMysql.Init()
-	}
 	if em.BaseService.Address != "" {
 		logx.Info("--初始化 BaseServiceMysql tidb--")
 		BaseServiceMysql = &mysql.Mysql{

+ 4 - 4
jyBXBase/rpc/model/newestBidding.go

@@ -39,10 +39,10 @@ type NewestInfo struct {
 }
 
 var mysqlTables = map[string]string{
-	"f": "pushsubscribe",
-	"v": "pushsubscribe",
-	"m": "pushmember",
-	"e": "pushentniche",
+	"f": "push.pushsubscribe",
+	"v": "push.pushsubscribe",
+	"m": "push.pushmember",
+	"e": "push.pushentniche",
 }
 
 func GetNewestInfo(userId, userType string, newUserId int64) *NewestInfo {

+ 3 - 2
jyBXSubscribe/go.mod

@@ -3,10 +3,12 @@ module jyBXSubscribe
 go 1.18
 
 require (
-	app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a
+	app.yhyue.com/moapp/jybase v0.0.0-20230417095507-cf35f190347e
 	app.yhyue.com/moapp/jypkg v0.0.0-20230218064127-1de4f4f3e6a3
 	bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4
 	bp.jydev.jianyu360.cn/BaseService/jyCodeService v0.0.0-20220927093612-72958b15cdf0
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230207054315-b05f3dd4c4d3
+	bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230418084942-11fba19bd9bf
 	github.com/go-sql-driver/mysql v1.7.0
 	github.com/gogf/gf/v2 v2.0.6
 	github.com/zeromicro/go-zero v1.4.4
@@ -18,7 +20,6 @@ require (
 require (
 	app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d // indirect
 	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230209051900-1e7dcb8f83b7 // indirect
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230207054315-b05f3dd4c4d3 // indirect
 	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7 // indirect
 	bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20230129060002-f69424aa14ba // indirect
 	github.com/BurntSushi/toml v0.4.1 // indirect

+ 4 - 2
jyBXSubscribe/go.sum

@@ -10,8 +10,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20220617085837-48c1bf245c2f/go.mod h1:qNRA0sHu
 app.yhyue.com/moapp/jybase v0.0.0-20220719064915-2fef79005dfa/go.mod h1:FjBF25AYoBrPhVKTXGXWcmEAbBT0ATTK6KJMOA+I80Q=
 app.yhyue.com/moapp/jybase v0.0.0-20220802080941-07f401baab8b/go.mod h1:HelrO6tcD9TcKb/HOP2BLbzppyDz2kpQSFhPMQTUgbQ=
 app.yhyue.com/moapp/jybase v0.0.0-20230109015757-aa3d5e19b196/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
-app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a h1:wD4aWPSYdiX1cIP4lzzPD2s7fYhKa3muIf97l9tonJE=
-app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
+app.yhyue.com/moapp/jybase v0.0.0-20230417095507-cf35f190347e h1:BZEMetT36NokzQwEDRGHbQ5c/2A3cRQ12Z+rw0I5xhQ=
+app.yhyue.com/moapp/jybase v0.0.0-20230417095507-cf35f190347e/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
 app.yhyue.com/moapp/jypkg v0.0.0-20230218064127-1de4f4f3e6a3 h1:7vKwqvf/7dvKO0Q5B9Yj6yaDf8EDL3jJrbFqJ/vsIEk=
 app.yhyue.com/moapp/jypkg v0.0.0-20230218064127-1de4f4f3e6a3/go.mod h1:s5dthI0jGiOB+eHG8GAV15jlsu2YX1XA2gsLxw2m1sA=
 bp.jydev.jianyu360.cn/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=
@@ -24,6 +24,8 @@ bp.jydev.jianyu360.cn/BaseService/jyCodeService v0.0.0-20220927093612-72958b15cd
 bp.jydev.jianyu360.cn/BaseService/jyCodeService v0.0.0-20220927093612-72958b15cdf0/go.mod h1:Def9i6RggnFvYswG767+jI+S7wMPkzx3D7Bs6Gnj2Q8=
 bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230207054315-b05f3dd4c4d3 h1:jeItQ6RM1T6yPWc/5i4R6h3kViD+Rm2VnIEsc1gCFJA=
 bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230207054315-b05f3dd4c4d3/go.mod h1:5nimT8GJh46AyfeeDeyRlDQygMlO7TRM8Pwm41Gxemc=
+bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230418084942-11fba19bd9bf h1:z6R4L8HW+psGn4hLBfo7I3rvOGTLDy9UG9PilVLDF3U=
+bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230418084942-11fba19bd9bf/go.mod h1:kWsTXorjHexi/0IrZ6iFIyNmv5ookkkt5B/8zRi5Uu8=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220418005748-8ba5d936dd53/go.mod h1:E5lcDI3k4FESLxiAetCfWQTq8qfpy9cv0yN1oKoEO34=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419023723-0b32d4a41751/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419063004-233fc7ce006c/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=

+ 4 - 11
jyBXSubscribe/rpc/etc/db.yaml

@@ -20,20 +20,13 @@ mysql:
         password: '=PDT49#80Z!RVv52_z'
         maxOpenConns: 5
         maxIdleConns: 5
-    push:
-        dbName: push
-        address: 192.168.3.14:4000
-        userName: root
-        password: '=PDT49#80Z!RVv52_z'
-        maxOpenConns: 5
-        maxIdleConns: 5
 redis:
     addr:
         - other=127.0.0.1:6379
-        - push=192.168.3.206:1712
-        - pushcache_1=192.168.3.206:5000
-        - pushcache_2_a=192.168.3.206:5001
-        - pushcache_2_b=192.168.3.206:5002
+        - push=127.0.0.1:6379
+        - pushcache_1=127.0.0.1:6379
+        - pushcache_2_a=127.0.0.1:6379
+        - pushcache_2_b=127.0.0.1:6379
 es:
     addr: http://192.168.3.206:9800
     size: 5

+ 2 - 15
jyBXSubscribe/rpc/init/db.go

@@ -7,6 +7,7 @@ import (
 	elastic "app.yhyue.com/moapp/jybase/esv1"
 	"app.yhyue.com/moapp/jypkg/compatible"
 	"app.yhyue.com/moapp/jypkg/middleground"
+	P "bp.jydev.jianyu360.cn/BaseService/pushpkg/p"
 	"github.com/zeromicro/go-zero/core/logx"
 	"strings"
 
@@ -20,7 +21,6 @@ import (
 var (
 	MainMysql        *mysql.Mysql
 	BaseServiceMysql *mysql.Mysql
-	PushMysql        *mysql.Mysql
 	Mgo              mongodb.MongodbSim
 	MgoBidding       mongodb.MongodbSim
 	GlobalCommonData *mysql.Mysql
@@ -95,20 +95,7 @@ func MysqlInit(mm *entity.Mysql) {
 		}
 		GlobalCommonData.Init()
 	}
-	//初始化 pushServiceMysql
-	if mm.Push.Address != "" {
-		logx.Info("--初始化 推送 Push--")
-		PushMysql = &mysql.Mysql{
-			Address:      mm.Push.Address,
-			UserName:     mm.Push.UserName,
-			PassWord:     mm.Push.Password,
-			DBName:       mm.Push.DbName,
-			MaxOpenConns: mm.Push.MaxOpenConns,
-			MaxIdleConns: mm.Push.MaxIdleConns,
-		}
-		PushMysql.Init()
-	}
-
+	P.PushMapping.Init(BaseServiceMysql)
 }
 
 //

+ 0 - 1
jyBXSubscribe/rpc/init/init.go

@@ -46,5 +46,4 @@ func InitC() {
 			logx.Info(v, "--日志记录")
 		}
 	}
-	PushMapping.Init()
 }

+ 0 - 76
jyBXSubscribe/rpc/init/pushMapping.go

@@ -1,76 +0,0 @@
-package init
-
-import (
-	"app.yhyue.com/moapp/jybase/common"
-	"log"
-)
-
-var PushMapping = &pushMapping{}
-
-type pushMapping struct {
-	Area          map[string]int
-	City          map[string]int
-	Toptype       map[string]int
-	Subtype       map[string]int
-	Buyerclass    map[string]int
-	Subscopeclass map[string]int
-}
-
-//推送数据 在mysql中 信息类型和地区等存的对应id;查询的时候需进行转化;
-func (p *pushMapping) Init() {
-	infotype := PushMysql.SelectBySql("select id,type,name from infotype")
-	p.Toptype = map[string]int{}
-	p.Subtype = map[string]int{}
-	p.Buyerclass = map[string]int{}
-	p.Subscopeclass = map[string]int{}
-	if infotype != nil && len(*infotype) > 0 {
-		for _, v := range *infotype {
-			id := common.IntAll(v["id"])
-			tp := common.IntAll(v["type"])
-			name := common.ObjToString(v["name"])
-			if tp == 1 {
-				p.Toptype[name] = id
-			} else if tp == 2 {
-				p.Subtype[name] = id
-			} else if tp == 3 {
-				p.Buyerclass[name] = id
-			} else if tp == 4 {
-				p.Subscopeclass[name] = id
-			}
-		}
-		if len(p.Toptype) == 0 {
-			log.Fatalln("PushMapping Toptype Init Error")
-		}
-		if len(p.Subtype) == 0 {
-			log.Fatalln("PushMapping Subtype Init Error")
-		}
-		if len(p.Buyerclass) == 0 {
-			log.Fatalln("PushMapping Buyerclass Init Error")
-		}
-		if len(p.Subscopeclass) == 0 {
-			log.Fatalln("PushMapping Subscopeclass Init Error")
-		}
-	}
-	//
-	p.Area = map[string]int{}
-	p.City = map[string]int{}
-	province := PushMysql.SelectBySql("select id,level,name from province")
-	if province != nil && len(*province) > 0 {
-		for _, v := range *province {
-			id := common.IntAll(v["id"])
-			level := common.IntAll(v["level"])
-			name := common.ObjToString(v["name"])
-			if level == 1 {
-				p.Area[name] = id
-			} else if level == 2 {
-				p.City[name] = id
-			}
-		}
-		if len(p.Area) == 0 {
-			log.Fatalln("PushMapping Area Init Error")
-		}
-		if len(p.City) == 0 {
-			log.Fatalln("PushMapping City Init Error")
-		}
-	}
-}

+ 0 - 1
jyBXSubscribe/rpc/internal/logic/bypushhistorylogic.go

@@ -64,7 +64,6 @@ func (l *ByPushHistoryLogic) ByPushHistory(in *bxsubscribe.SubscribeInfosReq) (*
 		Staffs:           staffIds,
 		NewUserId:        in.NewUserId,
 		BaseServiceMysql: IC.BaseServiceMysql,
-		PushMysql:        IC.PushMysql,
 		IsEnt:            in.IsEnt,
 		UserType:         in.UserType,
 		PositionType:     in.PositionType,

+ 0 - 1
jyBXSubscribe/rpc/internal/logic/getsublistlogic.go

@@ -78,7 +78,6 @@ func (l *GetSubListLogic) GetSubList(in *bxsubscribe.SubscribeInfosReq) (*bxsubs
 		DeptId:           in.DeptId,    //商机管理部门id
 		NewUserId:        in.NewUserId,
 		BaseServiceMysql: IC.BaseServiceMysql,
-		PushMysql:        IC.PushMysql,
 		IsEnt:            in.IsEnt,
 		BuySubject:       0,
 		UserType:         in.UserType,

+ 1 - 1
jyBXSubscribe/rpc/internal/logic/getsubsomeinfologic.go

@@ -81,7 +81,7 @@ func (l *GetSubSomeInfoLogic) GetSubSomeInfo(in *bxsubscribe.SomeInfoReq) (*bxsu
 			today_1 := t.Unix()
 			today_2 := t.AddDate(0, 0, 1).Unix()
 			//错误
-			if IC.PushMysql.CountBySql("select count(1) as count from pushsubscribe a left join global_common_data.dws_f_bid_baseinfo b on a.infoid=b.infoid   where a.isvip =1 and a.userid =? and b.buyerclass_code=?  and (a.date between ? and ? )", common.InterfaceToStr(in.NewUserId), 93, today_1, today_2) > 0 {
+			if IC.BaseServiceMysql.CountBySql("select count(1) as count from pushsubscribe a left join global_common_data.dws_f_bid_baseinfo b on a.infoid=b.infoid   where a.isvip =1 and a.userid =? and b.buyerclass_code=?  and (a.date between ? and ? )", common.InterfaceToStr(in.NewUserId), 93, today_1, today_2) > 0 {
 				resp.Data.OtherFlag = true
 			}
 		} else {

+ 1 - 1
jyBXSubscribe/rpc/internal/logic/getviewstatuslogic.go

@@ -62,7 +62,7 @@ func (l *GetViewStatusLogic) GetViewStatus(in *bxsubscribe.GetViewStatusReq) (*b
 	if len(ss) > 0 {
 		finsql = fmt.Sprintf(`SELECT userid,isvisit,visittime,date FROM pushentniche where  infoid =? and source in (2,3) %s order By date asc`, fmt.Sprintf(`and userid in (%s)`, strings.Join(ss, ",")))
 	}
-	data := IC.PushMysql.SelectBySql(finsql, in.InfoId)
+	data := IC.BaseServiceMysql.SelectBySql(finsql, in.InfoId)
 	userMap := make(map[int]string)
 	for _, u := range *users {
 		userMap[u.Id] = u.Name

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

@@ -50,7 +50,7 @@ func (l *MsgDistributorLogic) MsgDistributor(in *bxsubscribe.MsgDistributorReq)
 		return &bxsubscribe.StatusResp{ErrorCode: -1, ErrorMsg: "缺少参数"}, nil
 	}
 	//获取分发信息的地区
-	infoRes := IC.PushMysql.SelectBySql(fmt.Sprintf("SELECT infoid FROM pushentniche WHERE id in('%s')", strings.Join(pushIds, "','")))
+	infoRes := IC.BaseServiceMysql.SelectBySql(fmt.Sprintf("SELECT infoid FROM pushentniche WHERE id in('%s')", strings.Join(pushIds, "','")))
 	if infoRes == nil || len(*infoRes) == 0 {
 		return &bxsubscribe.StatusResp{ErrorCode: -1, ErrorMsg: "获取分发地区异常"}, nil
 	}
@@ -80,12 +80,12 @@ func (l *MsgDistributorLogic) MsgDistributor(in *bxsubscribe.MsgDistributorReq)
 		}
 	}
 	//查询分发信息内容
-	msgRes := IC.PushMysql.SelectBySql(fmt.Sprintf("SELECT * FROM pushentniche WHERE id in ('%s') and entid =?  ", strings.Join(pushIds, "','")), in.EntId)
+	msgRes := IC.BaseServiceMysql.SelectBySql(fmt.Sprintf("SELECT * FROM pushentniche WHERE id in ('%s') and entid =?  ", strings.Join(pushIds, "','")), in.EntId)
 	if msgRes == nil || len(*msgRes) == 0 {
 		return &bxsubscribe.StatusResp{ErrorCode: -1, ErrorMsg: "获取分发信息内容异常"}, nil
 	}
 	//分发数据库修改
-	ok := IC.PushMysql.ExecTx("分发数据库修改", func(tx *sql.Tx) bool {
+	ok := IC.BaseServiceMysql.ExecTx("分发数据库修改", func(tx *sql.Tx) bool {
 		insertRow := []string{"entid", "deptid", "infoid", "matchkeys", "type", "product", "matchways", "matchitems", "disid", "area", "city", "buyerclass", "toptype", "subtype", "subscopeclass", "budget", "bidamount", "attachment_count", "source", "date", "userid", "isvisit", "visittime", "pid"}
 		msgItems := []string{"entid", "deptid", "infoid", "matchkeys", "type", "product", "matchways", "matchitems", "disid", "area", "city", "buyerclass", "toptype", "subtype", "subscopeclass", "budget", "bidamount", "attachment_count"}
 		dateNew := time.Now().Unix()
@@ -98,7 +98,7 @@ func (l *MsgDistributorLogic) MsgDistributor(in *bxsubscribe.MsgDistributorReq)
 				insertValue = append(insertValue, msgValues...)
 				insertValue = append(insertValue, []interface{}{3, dateNew, uid, nil, nil, m["id"]}...)
 			}
-			affected, _ := IC.PushMysql.InsertBatchByTx(tx, "pushentniche", insertRow, insertValue)
+			affected, _ := IC.BaseServiceMysql.InsertBatchByTx(tx, "pushentniche", insertRow, insertValue)
 			if affected == 0 {
 				return false
 			}

+ 16 - 15
jyBXSubscribe/rpc/model/push.go

@@ -19,6 +19,7 @@ import (
 	"app.yhyue.com/moapp/jybase/mongodb"
 	"app.yhyue.com/moapp/jybase/mysql"
 	"app.yhyue.com/moapp/jybase/redis"
+	P "bp.jydev.jianyu360.cn/BaseService/pushpkg/p"
 	"github.com/zeromicro/go-zero/core/logx"
 	"go.mongodb.org/mongo-driver/bson/primitive"
 )
@@ -43,10 +44,10 @@ var (
 )
 
 var aboutDbMsg map[string]*AboutDbMsg = map[string]*AboutDbMsg{
-	SubFreeFlag:  &AboutDbMsg{"pushsubscribe", "subpush"},
-	SubVipFlag:   &AboutDbMsg{"pushsubscribe", "subpush"},
-	MemberFlag:   &AboutDbMsg{"pushmember", "memberpush"},
-	EntnicheFlag: &AboutDbMsg{"pushentniche", "entnichepush"},
+	SubFreeFlag:  &AboutDbMsg{"push.pushsubscribe", "subpush"},
+	SubVipFlag:   &AboutDbMsg{"push.pushsubscribe", "subpush"},
+	MemberFlag:   &AboutDbMsg{"push.pushmember", "memberpush"},
+	EntnicheFlag: &AboutDbMsg{"push.pushentniche", "entnichepush"},
 }
 
 type AboutDbMsg struct {
@@ -413,8 +414,8 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 			//城市
 			city := []string{}
 			for _, v := range strings.Split(spqp.City, ",") {
-				if IC.PushMapping.City[v] > 0 {
-					city = append(city, fmt.Sprint(IC.PushMapping.City[v]))
+				if P.PushMapping.City[v] > 0 {
+					city = append(city, fmt.Sprint(P.PushMapping.City[v]))
 				} else {
 					city = append(city, "-1")
 				}
@@ -429,8 +430,8 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 			var sqlArea = ""
 			area := []string{}
 			for _, v := range strings.Split(spqp.Area, ",") {
-				if IC.PushMapping.Area[v] > 0 {
-					area = append(area, fmt.Sprint(IC.PushMapping.Area[v]))
+				if P.PushMapping.Area[v] > 0 {
+					area = append(area, fmt.Sprint(P.PushMapping.Area[v]))
 				} else {
 					area = append(area, "-1")
 				}
@@ -454,7 +455,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 		if spqp.Buyerclass != "" {
 			buyerclass := []string{}
 			for _, v := range strings.Split(spqp.Buyerclass, ",") {
-				buyerclass = append(buyerclass, fmt.Sprint(IC.PushMapping.Buyerclass[v]))
+				buyerclass = append(buyerclass, fmt.Sprint(P.PushMapping.Buyerclass[v]))
 			}
 			if len(buyerclass) == 1 {
 				buyerclass = append(buyerclass, "9999")
@@ -468,7 +469,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 		if spqp.Subtype != "" {
 			subtype := []string{}
 			for _, v := range strings.Split(spqp.Subtype, ",") {
-				subtype = append(subtype, fmt.Sprintf("find_in_set('%d',a.subscopeclass)", IC.PushMapping.Subscopeclass[v]))
+				subtype = append(subtype, fmt.Sprintf("find_in_set('%d',a.subscopeclass)", P.PushMapping.Subscopeclass[v]))
 			}
 			if len(subtype) == 1 {
 				subtype = append(subtype, "9999")
@@ -481,7 +482,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 		if spqp.Subscopeclass != "" {
 			find_in_set := []string{}
 			for _, v := range strings.Split(spqp.Subscopeclass, ",") {
-				find_in_set = append(find_in_set, fmt.Sprintf("find_in_set('%d',a.subscopeclass)", IC.PushMapping.Subscopeclass[v]))
+				find_in_set = append(find_in_set, fmt.Sprintf("find_in_set('%d',a.subscopeclass)", P.PushMapping.Subscopeclass[v]))
 			}
 			if len(find_in_set) == 1 {
 				querys = append(querys, find_in_set[0])
@@ -908,19 +909,19 @@ func (s *subscribePush) SetRead(newUserId, id int64, userId, entUserId, entId st
 	}
 	if isEnt {
 		if s.ModuleFlag == EntnicheFlag {
-			IC.PushMysql.UpdateOrDeleteBySql(fmt.Sprintf("update %s set isvisit=1 ,visittime=now() where entid=? and id=?", aboutDbMsg[s.ModuleFlag].MysqlTable), entId, id)
+			IC.BaseServiceMysql.UpdateOrDeleteBySql(fmt.Sprintf("update %s set isvisit=1 ,visittime=now() where entid=? and id=?", aboutDbMsg[s.ModuleFlag].MysqlTable), entId, id)
 
 		} else {
-			IC.PushMysql.UpdateOrDeleteBySql(fmt.Sprintf("update %s set isvisit=1 where entid=? and id=?", aboutDbMsg[s.ModuleFlag].MysqlTable), entId, id)
+			IC.BaseServiceMysql.UpdateOrDeleteBySql(fmt.Sprintf("update %s set isvisit=1 where entid=? and id=?", aboutDbMsg[s.ModuleFlag].MysqlTable), entId, id)
 
 		}
 	} else {
 		if s.ModuleFlag == EntnicheFlag {
 			//商机管理
-			IC.PushMysql.UpdateOrDeleteBySql(fmt.Sprintf("update %s set isvisit=1,visittime=now() where userid=? and id=?", aboutDbMsg[s.ModuleFlag].MysqlTable), entUserId, id)
+			IC.BaseServiceMysql.UpdateOrDeleteBySql(fmt.Sprintf("update %s set isvisit=1,visittime=now() where userid=? and id=?", aboutDbMsg[s.ModuleFlag].MysqlTable), entUserId, id)
 		} else {
 			//其他
-			IC.PushMysql.UpdateOrDeleteBySql(fmt.Sprintf("update %s set isvisit=1 where userid=? and id=?", aboutDbMsg[s.ModuleFlag].MysqlTable), newUserId, id)
+			IC.BaseServiceMysql.UpdateOrDeleteBySql(fmt.Sprintf("update %s set isvisit=1 where userid=? and id=?", aboutDbMsg[s.ModuleFlag].MysqlTable), newUserId, id)
 		}
 	}
 	if !isEnt {