切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
743d88612e1c8bc7d2ffe522a246083f00fff086
1 个父辈
7deac330
更新openApi 调用
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
14 行增加
和
2 行删除
pkg/application/notify/app_message.go
pkg/infrastructure/serviceGateway/httplib_mmm_open_api_service_gateway.go
pkg/application/notify/app_message.go
查看文件 @
743d886
...
...
@@ -137,6 +137,15 @@ func appMessageSend() error {
}
appMessage
=
append
(
appMessage
,
messageList
...
)
}
// openApi := serviceGateway.NewHttplibMmmOpenApiServiceGateway()
// for _, val := range appMessage {
// _, err := openApi.PushInfo(1, constant.APP_MESSAGE_KEY, []int64{int64(val.TargetUserId)}, val.Title, val.Content)
// if err != nil {
// log.Logger.Error("发送远端openApi关于里程碑异常的消息通知:" + err.Error())
// }
// }
err
=
saveAllMessagePersonal
(
appMessage
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"保存里程碑异常的消息通知失败%s"
,
err
)
...
...
pkg/infrastructure/serviceGateway/httplib_mmm_open_api_service_gateway.go
查看文件 @
743d886
...
...
@@ -30,16 +30,19 @@ type MessageExt struct {
}
// PushInfo 个推
func
(
serviceGateway
*
HttplibMmmOpenApiServiceGateway
)
PushInfo
(
msgType
int
,
project
s
[]
string
,
uids
[]
int64
,
title
string
,
content
string
)
(
map
[
string
]
interface
{},
error
)
{
func
(
serviceGateway
*
HttplibMmmOpenApiServiceGateway
)
PushInfo
(
msgType
int
,
project
string
,
uids
[]
int64
,
title
string
,
content
string
)
(
map
[
string
]
interface
{},
error
)
{
url
:=
strings
.
Join
([]
string
{
serviceGateway
.
baseURL
,
"v1"
,
"push"
,
"pushInfo"
},
"/"
)
serviceGateway
.
CreateRequest
(
"post"
,
url
)
options
:=
&
MessageOptions
{
MmmType
:
msgType
,
Project
s
:
projects
,
Project
:
project
,
Receivers
:
uids
,
Title
:
title
,
Content
:
content
,
}
options
.
Ext
.
TransData
.
MmmType
=
"103"
//固定值,需要手机端配合设置
options
.
Ext
.
TransData
.
MmmTitle
=
title
options
.
Ext
.
TransData
.
MmmContent
=
content
serviceGateway
.
SetBody
(
options
)
response
:=
make
(
map
[
string
]
interface
{})
err
:=
serviceGateway
.
ToJson
(
&
response
)
...
...
请
注册
或
登录
后发表评论