This commit is contained in:
richboo111
2024-01-19 17:58:45 +08:00
parent 7b9a4fe7ae
commit 2e533c6c58
3 changed files with 43 additions and 31 deletions

View File

@@ -145,19 +145,33 @@ func (c *IMController) GetElmMedia() {
})
}
// @Title 增加以及获取门店自定义回复模板
// @Description 增加以及获取门店自定义回复模板
// @Title 增加门店自定义回复模板
// @Description 增加门店自定义回复模板
// @Param token header string true "认证token"
// @Param appID query string true "京西门店id"
// @Param vendorStoreID query string true "美团门店id"
// @Param replyTemplate query string true "新增或修改自定义模板"
// @Param opType query int true "操作 1-新增 2-获取"
// @Param appID formData string true "应用id"
// @Param vendorStoreID formData string true "美团门店id"
// @Param replyTemplate formData string true "新增或修改自定义模板"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /AddOrGetCustomReply [get]
func (c *IMController) AddOrGetCustomReply() {
c.callAddOrGetCustomReply(func(params *tImAddOrGetCustomReplyParams) (interface{}, string, error) {
retVal, err := im.AddOrGetCustomReply(params.AppID, params.VendorStoreID, params.ReplyTemplate, params.OpType)
// @router /AddCustomReply [post]
func (c *IMController) AddCustomReply() {
c.callAddCustomReply(func(params *tImAddCustomReplyParams) (interface{}, string, error) {
retVal, err := im.AddCustomReply(params.AppID, params.VendorStoreID, params.ReplyTemplate)
return retVal, "", err
})
}
// @Title 获取门店自定义回复模板
// @Description 获取门店自定义回复模板
// @Param token header string true "认证token"
// @Param appID query string true "应用id"
// @Param vendorStoreID query string true "美团门店id"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /GetCustomReply [get]
func (c *IMController) GetCustomReply() {
c.callGetCustomReply(func(params *tImGetCustomReplyParams) (interface{}, string, error) {
retVal := im.GetCustomTemplate(params.AppID, params.VendorStoreID)
return retVal, "", nil
})
}