Browse Source

h5注册

tmp
huangjiajun 1 week ago
parent
commit
f3ceaad096
2 changed files with 5 additions and 1 deletions
  1. +3
    -0
      app/es/md/es.go
  2. +2
    -1
      app/hdl/hdl_user.go

+ 3
- 0
app/es/md/es.go View File

@@ -12,6 +12,9 @@ const EggUserShortLinkMap = `
"uid":{
"type": "integer"
},
"date":{
"type": "integer"
},
"link":{
"type": "keyword"
},


+ 2
- 1
app/hdl/hdl_user.go View File

@@ -351,7 +351,7 @@ func InviteUrl(c *gin.Context) {
continue
}
jsonByte, _ := hit.Source.MarshalJSON()
if gjson.Get(string(jsonByte), "short_link").String() != "" {
if gjson.Get(string(jsonByte), "short_link").String() != "" && gjson.Get(string(jsonByte), "date").Int() > time.Now().Unix() {
isHas = 1
link = gjson.Get(string(jsonByte), "short_link").String()
}
@@ -367,6 +367,7 @@ func InviteUrl(c *gin.Context) {
"uid": user.Id,
"link": oldLink,
"short_link": link,
"date": time.Now().Unix() + 365*86400,
}
doc, _ := es.FirstDoc(EggUserShortLink, uniqueId)
if doc == nil {


Loading…
Cancel
Save