Merge branch 'refs/heads/feat-user-sync'
This commit is contained in:
commit
3e68e4cfa8
5
main.go
5
main.go
|
|
@ -10,6 +10,7 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
"videoplayer/dao"
|
||||
"videoplayer/handler"
|
||||
|
|
@ -143,7 +144,9 @@ func JWTAuthMiddleware() gin.HandlerFunc {
|
|||
})
|
||||
return
|
||||
}
|
||||
c.Set("id", s_id)
|
||||
id, _ := strconv.Atoi(s_id)
|
||||
//查看s_id类型
|
||||
c.Set("id", id)
|
||||
c.Next()
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ func UserSyncDataFromMaster() {
|
|||
req.Token = tokens[0]
|
||||
req.Device = proto.Config.SERVER_NAME
|
||||
all := worker.GetRedis("user_sync_all")
|
||||
var is_all bool //是否全量同步
|
||||
is_all := false //是否全量同步
|
||||
if all == "" || all == "1" {
|
||||
is_all = true
|
||||
//清空数据表
|
||||
|
|
|
|||
Loading…
Reference in New Issue