|
@@ -3,9 +3,7 @@ package customerService
|
|
import "github.com/baiy/Cadmin-server-go/admin"
|
|
import "github.com/baiy/Cadmin-server-go/admin"
|
|
|
|
|
|
type customMsg struct {
|
|
type customMsg struct {
|
|
- Id int `form:"id"` //消息id
|
|
|
|
- //UserGroupId string `form:"userGroupId"` //用户分组标识
|
|
|
|
- //UserGroupName string `form:"userGroupName"` //用户分组名称
|
|
|
|
|
|
+ Id int `form:"id"` //消息id
|
|
MsgType int `form:"msgType"` //消息类型
|
|
MsgType int `form:"msgType"` //消息类型
|
|
Title string `form:"title"` //标题
|
|
Title string `form:"title"` //标题
|
|
Content string `form:"content"` //内容
|
|
Content string `form:"content"` //内容
|
|
@@ -18,7 +16,7 @@ type customMsg struct {
|
|
UserIds string `form:"userIds"` //发送用户id
|
|
UserIds string `form:"userIds"` //发送用户id
|
|
}
|
|
}
|
|
|
|
|
|
-func customSendMsg(context *admin.Context) (interface{}, error) {
|
|
|
|
|
|
+func CustomSendMsg(context *admin.Context) (interface{}, error) {
|
|
param := &customMsg{}
|
|
param := &customMsg{}
|
|
err := context.Form(param)
|
|
err := context.Form(param)
|
|
if err != nil {
|
|
if err != nil {
|
|
@@ -31,7 +29,7 @@ func customSendMsg(context *admin.Context) (interface{}, error) {
|
|
}
|
|
}
|
|
//拼接link
|
|
//拼接link
|
|
param.Link = param.Link + "," + param.AndroidUrl + "," + param.IosUrl + "," + param.WeChatUrl
|
|
param.Link = param.Link + "," + param.AndroidUrl + "," + param.IosUrl + "," + param.WeChatUrl
|
|
- status, err := CustomSendMsg(param, sendStatus, context.User.Username, context.User.Id)
|
|
|
|
|
|
+ status, err := CustomSendMsgService(param, sendStatus, context.User.Username, context.User.Id)
|
|
return map[string]interface{}{
|
|
return map[string]interface{}{
|
|
"status": status,
|
|
"status": status,
|
|
}, err
|
|
}, err
|