diff --git a/route/group_power_r/inner.go b/route/group_power_r/inner.go index 3e6fbc680776c7a34efe3a0699c8cb8a33088f6d..707fdda9b8b88bf72d60ef326cbafdae2e9e56db 100644 --- a/route/group_power_r/inner.go +++ b/route/group_power_r/inner.go @@ -4,10 +4,14 @@ import ( "git.hilo.cn/hilo-common/domain" "git.hilo.cn/hilo-common/mycontext" "git.hilo.cn/hilo-common/resource/mysql" + "git.hilo.cn/hilo-common/sdk/emas" "github.com/gin-gonic/gin" "hilo-group/_const/enum/groupPower_e" + "hilo-group/_const/enum/msg_e" "hilo-group/cv/group_power_cv" "hilo-group/domain/model/groupPower_m" + "hilo-group/domain/model/msg_m" + "hilo-group/domain/model/user_m" "hilo-group/resp" ) @@ -67,3 +71,20 @@ func MGetGroupPowers(c *gin.Context) (*mycontext.MyContext, error) { resp.ResponseOk(c, response) return myCtx, nil } + +func Test(c *gin.Context) (*mycontext.MyContext, error) { + var model = domain.CreateModelNil() + if err := msg_m.NewUserRecord(model, 4522, msg_e.GroupPowerUserLeave, "frozen", 4522, "", "", "", "", "").Persistent(); err != nil { + return nil, err + } + mgrUser, _ := user_m.GetUser(model, 4522) + err := msg_m.SendEmasMsgAssistant(model, mgrUser.ExternalId, mgrUser.DeviceType) + if err != nil { + return nil, err + } + err = emas.SendIosMsgAll("全部消息测试") + if err != nil { + return nil, err + } + return nil, nil +} diff --git a/route/router.go b/route/router.go index ebd2854a9d65df3270d26af46ddbe180f9c64927..564bb1dd838dfbe28886336f76c75fd43300a738 100644 --- a/route/router.go +++ b/route/router.go @@ -136,6 +136,7 @@ func InitRouter() *gin.Engine { { innerGroupPower.GET("/infos", wrapper(group_power_r.MGetGroupPowers)) } + r.GET("/test", wrapper(group_power_r.Test)) return r }