shenjiachi 5 giorni fa
parent
commit
ee62107633
1 ha cambiato i file con 7 aggiunte e 4 eliminazioni
  1. +7
    -4
      app/hdl/friend_circle/hdl_friend_circle.go

+ 7
- 4
app/hdl/friend_circle/hdl_friend_circle.go Vedi File

@@ -255,6 +255,7 @@ func Publish(c *gin.Context) {

//插入es记录
now := time.Now()
nowStr := now.Format("2006-01-02 15:04:05")
createDocRet, err := es.CreateDoc(md.EggFriendCircleEsIndex, strconv.FormatInt(user.Id, 10)+"_"+utils.Int64ToStr(now.Unix()), md.EggFriendCircleEs{
Uid: user.Id,
ImUid: imUser.Id,
@@ -268,8 +269,8 @@ func Publish(c *gin.Context) {
State: 1,
IsTopUp: 2,
IsPraise: 2,
CreatedAt: now.Format("2006-01-02 15:04:05"),
UpdatedAt: now.Format("2006-01-02 15:04:05"),
CreatedAt: nowStr,
UpdatedAt: nowStr,
})

fmt.Printf("CreateDoc ==> %+v \n\n", createDocRet)
@@ -288,9 +289,11 @@ func Publish(c *gin.Context) {
m := md.EggEnergyUserEggScoreEs{
Uid: user.Id,
SendCircleOfFriendNums: 1,
CreatedAt: nowStr,
UpdatedAt: nowStr,
}
newCreateDoc, err := es.CreateDoc(index, id, &m)
if err != nil {
newCreateDoc, err1 := es.CreateDoc(index, id, &m)
if err1 != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}


Caricamento…
Annulla
Salva