正在显示
6 个修改的文件
包含
27 行增加
和
2 行删除
pkg/application/notify/sms.go
0 → 100644
@@ -3,6 +3,7 @@ package adapter | @@ -3,6 +3,7 @@ package adapter | ||
3 | type EvaluationSuperListAdapter struct { | 3 | type EvaluationSuperListAdapter struct { |
4 | SummaryEvaluationId int `json:"summaryEvaluationId,string"` //评估任务id | 4 | SummaryEvaluationId int `json:"summaryEvaluationId,string"` //评估任务id |
5 | TargetUserName string `json:"targetUserName"` //目标用户,被评估的员工 | 5 | TargetUserName string `json:"targetUserName"` //目标用户,被评估的员工 |
6 | + TargetUserId int `json:"targetUserId,string"` //目标用户,被评估的员工 | ||
6 | EvaluationStatus string `json:"evaluationStatus"` //上级评估完成状态 | 7 | EvaluationStatus string `json:"evaluationStatus"` //上级评估完成状态 |
7 | EndTime string `json:"endTime"` //截止时间 | 8 | EndTime string `json:"endTime"` //截止时间 |
8 | TotalScoreSelf string `json:"totalScoreSelf"` //综合自评总分 | 9 | TotalScoreSelf string `json:"totalScoreSelf"` //综合自评总分 |
@@ -273,7 +273,7 @@ func TaskSendSummaryEvaluation() error { | @@ -273,7 +273,7 @@ func TaskSendSummaryEvaluation() error { | ||
273 | return err | 273 | return err |
274 | } | 274 | } |
275 | //发送短信通知 | 275 | //发送短信通知 |
276 | - err = sendSmsEvalation(createdEvalationList) | 276 | + //err = sendSmsEvalation(createdEvalationList) |
277 | return err | 277 | return err |
278 | } | 278 | } |
279 | 279 | ||
@@ -330,3 +330,4 @@ func sendSmsEvalation(param []domain.SummaryEvaluation) error { | @@ -330,3 +330,4 @@ func sendSmsEvalation(param []domain.SummaryEvaluation) error { | ||
330 | } | 330 | } |
331 | 331 | ||
332 | //周期自评 短信提醒 | 332 | //周期自评 短信提醒 |
333 | +//周期自评 结束前 4个小时发送 |
@@ -1019,6 +1019,7 @@ func (srv *SummaryEvaluationService) ListExecutorEvaluationSuper(param *command. | @@ -1019,6 +1019,7 @@ func (srv *SummaryEvaluationService) ListExecutorEvaluationSuper(param *command. | ||
1019 | item := adapter.EvaluationSuperListAdapter{ | 1019 | item := adapter.EvaluationSuperListAdapter{ |
1020 | SummaryEvaluationId: v.Id, | 1020 | SummaryEvaluationId: v.Id, |
1021 | TargetUserName: v.TargetUser.UserName, | 1021 | TargetUserName: v.TargetUser.UserName, |
1022 | + TargetUserId: v.TargetUser.UserId, | ||
1022 | EvaluationStatus: string(v.Status), | 1023 | EvaluationStatus: string(v.Status), |
1023 | EndTime: v.EndTime.Format("2006-01-02 15:04:05"), | 1024 | EndTime: v.EndTime.Format("2006-01-02 15:04:05"), |
1024 | TotalScoreSelf: "", | 1025 | TotalScoreSelf: "", |
@@ -11,9 +11,20 @@ type LogSms struct { | @@ -11,9 +11,20 @@ type LogSms struct { | ||
11 | Template string | 11 | Template string |
12 | Value map[string]string | 12 | Value map[string]string |
13 | Result string | 13 | Result string |
14 | + Status SmsStatus | ||
14 | CreatedAt time.Time | 15 | CreatedAt time.Time |
15 | } | 16 | } |
16 | 17 | ||
18 | +type SmsStatus string | ||
19 | + | ||
20 | +const ( | ||
21 | + SmsWait SmsStatus = "wait" //等待执行 | ||
22 | + SmsInit SmsStatus = "init" //正在执行 | ||
23 | + SmsSuccess SmsStatus = "success" //执行成功 | ||
24 | + SmsFailed SmsStatus = "failed" //执行失败 | ||
25 | + SmsIgnore SmsStatus = "ignore" //忽略执行 | ||
26 | +) | ||
27 | + | ||
17 | // 每日自评 短信消息提醒 | 28 | // 每日自评 短信消息提醒 |
18 | func (sms *LogSms) SummaryEvaluationMessage(phone string, name string) { | 29 | func (sms *LogSms) SummaryEvaluationMessage(phone string, name string) { |
19 | *sms = LogSms{ | 30 | *sms = LogSms{ |
@@ -9,6 +9,6 @@ type LogSms struct { | @@ -9,6 +9,6 @@ type LogSms struct { | ||
9 | TemplateId int `pg:"template_id"` | 9 | TemplateId int `pg:"template_id"` |
10 | Template string `pg:"template"` | 10 | Template string `pg:"template"` |
11 | Value map[string]string `pg:"value"` | 11 | Value map[string]string `pg:"value"` |
12 | - CreatedAt time.Time `pg:"createdAt"` | 12 | + CreatedAt time.Time `pg:"created_at"` |
13 | Result string `pg:"result"` | 13 | Result string `pg:"result"` |
14 | } | 14 | } |
-
请 注册 或 登录 后发表评论