审查视图

pkg/port/beego/controllers/message_personal_controller.go 1.7 KB
tangxvhui authored
1
package controllers
tangxvhui authored
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

import (
	"github.com/linmadan/egglib-go/web/beego"
	"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/notify/command"
	"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/notify/service"
	"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/port/beego/middlewares"
)

// 获取个人的消息提示
type MessagePersonalController struct {
	beego.BaseController
}

// 周期综合自评是否开启,是否提示
func (c *MessagePersonalController) TodayMessageSummaryEvaluation() {
	srv := service.NewMessagePersonalService()
	userReq := middlewares.GetUser(c.Ctx)
	param := command.GetUserMessageCommand{}
	param.UserId = int(userReq.UserId)
	data, err := srv.TodayMessageSummaryEvaluationSelf(&param)
	c.Response(data, err)
}
tangxvhui authored
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41

func (c *MessagePersonalController) TodayMessageTaskStageAnomaly() {
	srv := service.NewMessagePersonalService()
	userReq := middlewares.GetUser(c.Ctx)
	param := command.GetUserMessageCommand{}
	param.UserId = int(userReq.UserId)
	data, err := srv.TodayMessageTaskStageAnomaly(&param)
	c.Response(data, err)
}

func (c *MessagePersonalController) TodayMessageTaskRecordAnomaly() {
	srv := service.NewMessagePersonalService()
	userReq := middlewares.GetUser(c.Ctx)
	param := command.GetUserMessageCommand{}
	param.UserId = int(userReq.UserId)
	data, err := srv.TodayMessageTaskRecordAnomaly(&param)
	c.Response(data, err)
}
tangxvhui authored
42 43 44 45 46 47 48 49 50

func (c *MessagePersonalController) TodayMessageTaskStageModify() {
	srv := service.NewMessagePersonalService()
	userReq := middlewares.GetUser(c.Ctx)
	param := command.GetUserMessageCommand{}
	param.UserId = int(userReq.UserId)
	data, err := srv.TodayMessageTaskStageModify(&param)
	c.Response(data, err)
}