|
@@ -73,8 +73,10 @@ func (l *InfoOneKeyActionLogic) InfoOneKeyAction(in *manager.OneKeyActionReq) (*
|
|
|
upData := make(map[string]interface{})
|
|
|
upData["publish_time"] = time.Now().Format("2006-01-02 15:04:05")
|
|
|
upData["published"] = 2
|
|
|
- //entNameKye := fmt.Sprintf("userEntName_%s_%s_%d", mc.InterfaceToStr(res["user_id"]), in.MsgId, in.MsgType)
|
|
|
- //entName := redis.GetStr("other", entNameKye)
|
|
|
+ entName := in.EntName
|
|
|
+ if res["ent_name"] != nil && mc.InterfaceToStr(res["ent_name"]) != "" {
|
|
|
+ entName = mc.InterfaceToStr(res["ent_name"])
|
|
|
+ }
|
|
|
supInfo := make(map[string]interface{})
|
|
|
supInfo["id"] = msgId
|
|
|
supInfo["title"] = res["title"]
|
|
@@ -88,7 +90,7 @@ func (l *InfoOneKeyActionLogic) InfoOneKeyAction(in *manager.OneKeyActionReq) (*
|
|
|
validityTime = validity.Unix()
|
|
|
}
|
|
|
supInfo["validity_time"] = validityTime
|
|
|
- if ok := es.SaveSupplyInfo(in.EntName, supInfo); ok {
|
|
|
+ if ok := es.SaveSupplyInfo(entName, supInfo); ok {
|
|
|
if !model.Mysql.Update(tname, query, map[string]interface{}{
|
|
|
"published": 1,
|
|
|
"is_del": 1,
|