mirror of
https://gitcode.com/flipped-aurora/gin-vue-admin.git
synced 2026-05-13 02:42:38 +00:00
feat(): notify dingding
This commit is contained in:
21
server/plugin/notify/api/api.go
Normal file
21
server/plugin/notify/api/api.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/plugin/notify/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type Api struct {
|
||||
}
|
||||
|
||||
func (s *Api) NotifyController(c *gin.Context) {
|
||||
if err := service.ServiceGroupApp.Send(); err != nil {
|
||||
global.GVA_LOG.Error("发送失败!", zap.Any("err", err))
|
||||
response.FailWithMessage("发送失败", c)
|
||||
} else {
|
||||
response.OkWithData("发送成功", c)
|
||||
}
|
||||
}
|
||||
7
server/plugin/notify/api/enter.go
Normal file
7
server/plugin/notify/api/enter.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package api
|
||||
|
||||
type ApiGroup struct {
|
||||
Api
|
||||
}
|
||||
|
||||
var ApiGroupApp = new(ApiGroup)
|
||||
Reference in New Issue
Block a user