用户发送消息
This commit is contained in:
@@ -37,6 +37,28 @@ func (c *MsgController) SendStoreMessage() {
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 发送用户微信消息
|
||||
// @Description 发送用户微信消息
|
||||
// @Param token header string true "认证token"
|
||||
// @Param userIDs formData string true "用户 ID列表"
|
||||
// @Param title formData string true "消息标题"
|
||||
// @Param content formData string true "消息内容"
|
||||
// @Param isAsync formData bool false "是否异步操作,缺省否"
|
||||
// @Param isContinueWhenError formData bool false "单个失败是否继续,缺省false"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /SendUserMessage [post]
|
||||
func (c *MsgController) SendUserMessage() {
|
||||
c.callSendUserMessage(func(params *tMsgSendUserMessageParams) (retVal interface{}, errCode string, err error) {
|
||||
var userIDs []string
|
||||
if err = jxutils.Strings2Objs(params.UserIDs, &userIDs); err != nil {
|
||||
return retVal, "", err
|
||||
}
|
||||
retVal, err = weixinmsg.SendUserMessage(params.Ctx, params.Title, params.Content, userIDs, params.IsAsync, params.IsContinueWhenError)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 门店读微信消息
|
||||
// @Description 门店读微信消息(此API是自动调用的)
|
||||
// @Param token header string true "认证token"
|
||||
|
||||
Reference in New Issue
Block a user