Commit b8d9f1a4 authored by hujiebin's avatar hujiebin

test handelr

parent 164bff40
...@@ -4,10 +4,14 @@ import ( ...@@ -4,10 +4,14 @@ import (
"git.hilo.cn/hilo-common/domain" "git.hilo.cn/hilo-common/domain"
"git.hilo.cn/hilo-common/mycontext" "git.hilo.cn/hilo-common/mycontext"
"git.hilo.cn/hilo-common/resource/mysql" "git.hilo.cn/hilo-common/resource/mysql"
"git.hilo.cn/hilo-common/sdk/emas"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"hilo-group/_const/enum/groupPower_e" "hilo-group/_const/enum/groupPower_e"
"hilo-group/_const/enum/msg_e"
"hilo-group/cv/group_power_cv" "hilo-group/cv/group_power_cv"
"hilo-group/domain/model/groupPower_m" "hilo-group/domain/model/groupPower_m"
"hilo-group/domain/model/msg_m"
"hilo-group/domain/model/user_m"
"hilo-group/resp" "hilo-group/resp"
) )
...@@ -67,3 +71,20 @@ func MGetGroupPowers(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -67,3 +71,20 @@ func MGetGroupPowers(c *gin.Context) (*mycontext.MyContext, error) {
resp.ResponseOk(c, response) resp.ResponseOk(c, response)
return myCtx, nil 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
}
...@@ -136,6 +136,7 @@ func InitRouter() *gin.Engine { ...@@ -136,6 +136,7 @@ func InitRouter() *gin.Engine {
{ {
innerGroupPower.GET("/infos", wrapper(group_power_r.MGetGroupPowers)) innerGroupPower.GET("/infos", wrapper(group_power_r.MGetGroupPowers))
} }
r.GET("/test", wrapper(group_power_r.Test))
return r return r
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment