浏览代码

update

master
DengBiao 2 年前
父节点
当前提交
1a0c815855
共有 4 个文件被更改,包括 18 次插入3 次删除
  1. +1
    -1
      internal/business/comm/db/db_user_push_for_jg.go
  2. +1
    -1
      internal/logic/domain/message/md/push.go
  3. +15
    -0
      internal/logic/domain/message/service/app_push.go
  4. +1
    -1
      internal/logic/domain/message/service/message_service.go

+ 1
- 1
internal/business/comm/db/db_user_push_for_jg.go 查看文件

@@ -47,7 +47,7 @@ func (*dbUserPushForJg) UserPushForJgUpdate(uid, masterId int64, pushAlia string

// UserPushForJgGetWithDb 单条记录获取
func (*dbUserPushForJg) UserPushForJgGetWithDb(masterId string, HKey string) string {
cacheKey := fmt.Sprintf(md.AppCfgCacheKey, masterId, HKey[0:1])
cacheKey := fmt.Sprintf(md.AppUserPushForJgCacheKey, masterId, HKey[0:1])
get, err := db.RedisUtil.HGetString(cacheKey, HKey)
if err != nil || get == "" {
cfg, err := DbUserPushForJg.UserPushForJgGetOne(HKey, utils.StrToInt64(masterId))


+ 1
- 1
internal/logic/domain/message/md/push.go 查看文件

@@ -10,6 +10,6 @@ type PushParams struct {
MessageType string `json:"message_type"` //消息类型`UNKNOWN、TEXT、FACE、VOICE、IMAGE、FILE、LOCATION、COMMAND、CUSTOM`
SendUserNickname string `json:"send_user_nickname"` //消费发送者-会员昵称
SendUserAvatarUrl string `json:"send_user_avatar_url"` //消费发送者-会员头像
Memo string `json:"reason"` //备注
Memo string `json:"memo"` //备注
Times string `json:"times"` //时间
}

+ 15
- 0
internal/logic/domain/message/service/app_push.go 查看文件

@@ -5,6 +5,8 @@ import (
md2 "code.fnuoos.com/go_rely_warehouse/zyos_go_jg_push.git/md"
"gim/internal/business/comm/db"
md3 "gim/internal/logic/domain/message/md"
"gim/pkg/logger"
"go.uber.org/zap"

"strings"
)
@@ -19,6 +21,19 @@ func getChangeContent(args md3.PushParams, Content string) string {

// CommAddPush 公共处理推送数据
func CommAddPush(args md3.PushParams) {
logger.Logger.Debug("CommAddPush",
zap.String("master_id", args.MasterId),
zap.String("uid", args.Uid),
zap.String("push_alia", args.PushAlia),
zap.String("title", args.Title),
zap.String("content", args.Content),
zap.String("push_type", args.PushType),
zap.String("message_type", args.MessageType),
zap.String("send_user_nickname", args.SendUserNickname),
zap.String("send_user_avatar_url", args.SendUserAvatarUrl),
zap.String("reason", args.Memo),
zap.String("times", args.Times),
)
pushPlatform := db.DbSysCfg.SysCfgFindWithDb(args.MasterId, "app_push_platform")["app_push_platform"]
if pushPlatform == "jg" { //极光
args.Content = getChangeContent(args, args.Content)


+ 1
- 1
internal/logic/domain/message/service/message_service.go 查看文件

@@ -166,7 +166,7 @@ func (*messageService) SendToUser(ctx context.Context, sender *pb.Sender, toUser
CommAddPush(md.PushParams{
MasterId: masterId,
Uid: uid,
PushAlia: "",
PushAlia: alia,
Title: "新消息提醒",
Content: "",
PushType: "zhi_ying_gim",


正在加载...
取消
保存