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

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

zhangxinlei1996 2 жил өмнө
parent
commit
fc5fed8ccc

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

@@ -51,15 +51,14 @@ func GetNewestInfo(userId, userType string, newUserId int64) *NewestInfo {
 		TableName: mysqlTables[userType],
 		MysqlDb:   IC.BaseServiceMysql,
 		NewUserId: newUserId,
-		PushMysql: IC.PushMysql,
 	}
 	return nt
 }
 func (n *NewestInfo) GetPushHistory() (res []*bxbase.NewestList) {
-	findSQL := "select a.infoid,a.matchkeys,a.attachment_count,a.budget,a.bidamount from %s a  order by a.id desc limit 50"
-	findSQL = fmt.Sprintf(findSQL, n.TableName, Pushbidding, n.NewUserId, time.Now().AddDate(0, 0, -7).Unix())
+	findSQL := "select a.infoid,a.matchkeys,a.attachment_count,a.budget,a.bidamount from %s  a  where a.userid=%d and a.date>=%d  order by a.id desc limit 50"
+	findSQL = fmt.Sprintf(findSQL, n.TableName, n.NewUserId, time.Now().AddDate(0, 0, -7).Unix())
 	logx.Info(n.TableName, "-------", n.NewUserId, ",findSQL:", findSQL)
-	list := n.PushMysql.SelectBySql(findSQL)
+	list := n.MysqlDb.SelectBySql(findSQL)
 	if len(*list) > 0 && list != nil {
 		m := map[string]bool{}
 		es_ids := []string{}