|
@@ -104,7 +104,7 @@ func (n *NewestInfo) GetPushHistoryCount() int64 {
|
|
if b, err := redis.Exists("other", countKey); err == nil && b {
|
|
if b, err := redis.Exists("other", countKey); err == nil && b {
|
|
return 1
|
|
return 1
|
|
}
|
|
}
|
|
- countSql := "SELECT COUNT(1) FROM (SELECT 1 FROM %s WHERE s_userid = %d LIMIT 1) AS ph"
|
|
|
|
|
|
+ countSql := "SELECT COUNT(1) FROM (SELECT 1 FROM %s WHERE userid = %d LIMIT 1) AS ph"
|
|
//countSql := "select count(1) from %s a where a.userid=%d order by a.id desc"
|
|
//countSql := "select count(1) from %s a where a.userid=%d order by a.id desc"
|
|
countSql = fmt.Sprintf(countSql, n.TableName, n.NewUserId)
|
|
countSql = fmt.Sprintf(countSql, n.TableName, n.NewUserId)
|
|
if c := n.MysqlDb.CountBySql(countSql); c > 0 {
|
|
if c := n.MysqlDb.CountBySql(countSql); c > 0 {
|