message_personal_controller.go
1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package controllers
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(¶m)
c.Response(data, err)
}
func (c *MessagePersonalController) TodayMessageTaskStageAnomaly() {
srv := service.NewMessagePersonalService()
userReq := middlewares.GetUser(c.Ctx)
param := command.GetUserMessageCommand{}
param.UserId = int(userReq.UserId)
data, err := srv.TodayMessageTaskStageAnomalyV2(¶m)
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.TodayMessageTaskRecordAnomalyV2(¶m)
c.Response(data, err)
}
func (c *MessagePersonalController) TodayMessageTaskStageModify() {
srv := service.NewMessagePersonalService()
userReq := middlewares.GetUser(c.Ctx)
param := command.GetUserMessageCommand{}
param.UserId = int(userReq.UserId)
data, err := srv.TodayMessageTaskStageModifyV2(¶m)
c.Response(data, err)
}