...
|
...
|
@@ -286,15 +286,15 @@ func CheckToken(request *protocol.CheckTokenRequest) (rsp *protocol.CheckTokenRe |
|
|
func CheckUuid(request *protocol.CheckUuidRequest) (rsp *protocol.CheckUuidResponse, err error) {
|
|
|
var ()
|
|
|
rsp = &protocol.CheckUuidResponse{}
|
|
|
//if len(request.Uuid) == 0 || (request.Uuid == "123456" && beego.BConfig.RunMode != "prod") {
|
|
|
// return
|
|
|
//}
|
|
|
if len(request.Uuid) == 0 || (request.Uuid == "123456" && beego.BConfig.RunMode != "prod") {
|
|
|
return
|
|
|
}
|
|
|
if redis.Hexists(protocol.RedisKey(protocol.HashUuid), request.Uuid) {
|
|
|
err = protocol.NewErrWithMessage(4142)
|
|
|
log.Error("[CheckUuid] 存在:", request.Uuid, err)
|
|
|
return
|
|
|
}
|
|
|
if e := redis.Hset(protocol.RedisKey(protocol.HashUuid), request.Uuid, request.Uuid, 3600*2); e != nil {
|
|
|
if e := redis.Hset(protocol.RedisKey(protocol.HashUuid), request.Uuid, request.Uuid, 3600); e != nil {
|
|
|
err = protocol.NewErrWithMessage(4142)
|
|
|
log.Error("[CheckUuid] 设置:", request.Uuid, e)
|
|
|
return
|
...
|
...
|
|