作者 yangfu

1.推送修改

... ... @@ -25,6 +25,7 @@ func Notification(header *protocol.RequestHeader, request *protocol.PushInfoRequ
Ext: request.Ext,
}
)
rsp = &protocol.PushInfoResponse{}
if appInfo, err = repApp.FindOne(map[string]interface{}{"project_key": request.ProjectKey}); err != nil {
log.Error(err)
err = protocol.NewCustomMessage(1, fmt.Sprintf("project_key:%v not found", request.ProjectKey))
... ... @@ -36,7 +37,7 @@ func Notification(header *protocol.RequestHeader, request *protocol.PushInfoRequ
return
}
if len(deviceList) == 0 {
err = protocol.NewSuccessWithMessage(fmt.Sprintf("接受者:%v 未查询到注册的设备信息!", request.Receivers))
err = protocol.NewSuccessWithMessage(fmt.Sprintf("接收人:%v 未查询到注册的设备信息!", request.Receivers))
return
}
for i := range deviceList {
... ...
... ... @@ -35,12 +35,14 @@ type UpdateDeviceRequest struct {
type UpdateDeviceResponse struct {
}
//设备信息
type Device struct {
Uid int64
ClientId string
DeviceToken string
}
//应用信息
type AppInfo struct {
Id int
AppKey string
... ...
... ... @@ -10,7 +10,6 @@ const (
/*Image */
type FileRequest struct {
//Xxx string`json:"xxx" valid:"Required"`
Files []*multipart.FileHeader
FileType string
}
... ...