todo: 2
This commit is contained in:
@@ -47,6 +47,8 @@ func main() {
|
||||
engine.GET("twitcasting/query", TwitcastingQuery)
|
||||
engine.GET("openrec/query", OpenrecQuery)
|
||||
engine.GET("twitch/query", TwitchQuery)
|
||||
engine.GET("nimo/query", NimoQuery)
|
||||
|
||||
engine.GET("tag/count", CountTag)
|
||||
engine.GET("tag/allcount", CountTag)
|
||||
engine.Run(":5500")
|
||||
|
||||
7
goserver/nimo.go
Normal file
7
goserver/nimo.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package main
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
|
||||
func NimoQuery(cxt *gin.Context) {
|
||||
Query(cxt, "nimo")
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"strconv"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -32,8 +31,6 @@ func Query(cxt *gin.Context, platform string) {
|
||||
orderfield := cxt.Query("orderfield")
|
||||
ordertype := cxt.Query("ordertype")
|
||||
|
||||
log.Println(orderfield, ordertype)
|
||||
|
||||
start := (page - 1) * psize
|
||||
// end := start + 200
|
||||
|
||||
@@ -116,7 +113,7 @@ func Query(cxt *gin.Context, platform string) {
|
||||
}
|
||||
|
||||
if err = json.Unmarshal([]byte(tags.String), &ot.Tags); err != nil {
|
||||
// log.Println(tags)
|
||||
|
||||
}
|
||||
|
||||
ots = append(ots, ot)
|
||||
|
||||
@@ -29,7 +29,7 @@ WHERE
|
||||
platform = "%s"
|
||||
AND operator = 0
|
||||
AND latest_log_uid is not NULL ) ie
|
||||
JOIN intimate_extractor.collect_log cl
|
||||
JOIN intimate_extractor.collect_log cl ON ie.latest_log_uid = cl.log_uid
|
||||
WHERE
|
||||
ie.latest_log_uid = cl.log_uid %s limit %s,%s;`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user