This commit is contained in:
eson 2020-09-04 19:00:48 +08:00
parent 0f85a1a33a
commit 785bc7fc98
6 changed files with 15 additions and 6 deletions

View File

@ -47,6 +47,8 @@ func main() {
engine.GET("twitcasting/query", TwitcastingQuery) engine.GET("twitcasting/query", TwitcastingQuery)
engine.GET("openrec/query", OpenrecQuery) engine.GET("openrec/query", OpenrecQuery)
engine.GET("twitch/query", TwitchQuery) engine.GET("twitch/query", TwitchQuery)
engine.GET("nimo/query", NimoQuery)
engine.GET("tag/count", CountTag) engine.GET("tag/count", CountTag)
engine.GET("tag/allcount", CountTag) engine.GET("tag/allcount", CountTag)
engine.Run(":5500") engine.Run(":5500")

7
goserver/nimo.go Normal file
View File

@ -0,0 +1,7 @@
package main
import "github.com/gin-gonic/gin"
func NimoQuery(cxt *gin.Context) {
Query(cxt, "nimo")
}

View File

@ -4,7 +4,6 @@ import (
"database/sql" "database/sql"
"encoding/json" "encoding/json"
"fmt" "fmt"
"log"
"strconv" "strconv"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
@ -32,8 +31,6 @@ func Query(cxt *gin.Context, platform string) {
orderfield := cxt.Query("orderfield") orderfield := cxt.Query("orderfield")
ordertype := cxt.Query("ordertype") ordertype := cxt.Query("ordertype")
log.Println(orderfield, ordertype)
start := (page - 1) * psize start := (page - 1) * psize
// end := start + 200 // 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 { if err = json.Unmarshal([]byte(tags.String), &ot.Tags); err != nil {
// log.Println(tags)
} }
ots = append(ots, ot) ots = append(ots, ot)

View File

@ -29,7 +29,7 @@ WHERE
platform = "%s" platform = "%s"
AND operator = 0 AND operator = 0
AND latest_log_uid is not NULL ) ie 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 WHERE
ie.latest_log_uid = cl.log_uid %s limit %s,%s;` ie.latest_log_uid = cl.log_uid %s limit %s,%s;`

View File

@ -58,6 +58,9 @@ class App extends React.Component {
<Menu.Item key="twitch" icon={<DatabaseFilled />} onClick={(e) => { this.changePlatform(e.key); }} > <Menu.Item key="twitch" icon={<DatabaseFilled />} onClick={(e) => { this.changePlatform(e.key); }} >
twitch twitch
</Menu.Item> </Menu.Item>
<Menu.Item key="nimo" icon={<DatabaseFilled />} onClick={(e) => { this.changePlatform(e.key); }} >
nimo
</Menu.Item>
</Menu> </Menu>
</Sider> </Sider>
<Layout> <Layout>

View File

@ -1,5 +1,5 @@
var apihost = "http://localhost:5500" var apihost = "http://192.168.17.208:5500"
export default apihost; export default apihost;