|
@@ -5,6 +5,7 @@ import (
|
|
|
"app.yhyue.com/moapp/jybase/common"
|
|
|
"context"
|
|
|
"fmt"
|
|
|
+ "github.com/zeromicro/go-zero/core/logx"
|
|
|
"log"
|
|
|
"strings"
|
|
|
)
|
|
@@ -265,18 +266,19 @@ func (u *UserIdConstructor) toCountUserSQL(userId string) string {
|
|
|
sqlList = append(sqlList, tagSql)
|
|
|
}
|
|
|
u.countUserSQL = fmt.Sprintf(countUserSql, userId, strings.Join(sqlList, " or "))
|
|
|
- log.Println("toCountUserSQL:", u.countUserSQL)
|
|
|
+ logx.Info("toCountUserSQL:", u.countUserSQL)
|
|
|
return u.countUserSQL
|
|
|
}
|
|
|
|
|
|
// 从数据库查询
|
|
|
func (u *UserIdConstructor) CountUser(userId string) (count uint64) {
|
|
|
if !u.InitTagList() {
|
|
|
+ logx.Info("InitTagList 异常")
|
|
|
return 0
|
|
|
}
|
|
|
rows := entity.ClickhouseConn.QueryRow(context.Background(), u.toCountUserSQL(userId))
|
|
|
if err := rows.Scan(&count); err != nil {
|
|
|
- log.Println("QueryBaseUserIdList err:", err)
|
|
|
+ logx.Info("QueryBaseUserIdList err:", err)
|
|
|
return
|
|
|
}
|
|
|
return count
|