作者 tangxvhui

修复短信发送错误

... ... @@ -21,11 +21,11 @@ func (notices notifyConfirmEvaluationScore) from() string {
func (notices notifyConfirmEvaluationScore) makeNotify(param *domain.SummaryEvaluation) *domain.LogSms {
newSms := domain.LogSms{
Id: 0,
Phone: param.Executor.Account,
Phone: param.TargetUser.Account,
TemplateId: 5634326,
Template: "您好,#name#,#periodName#成绩已出,请前往绩效系统PC端进行确认哦,超时未确认可能会影响当月绩效工资哦~ ",
Value: map[string]string{
"name": param.Executor.UserName,
"name": param.TargetUser.UserName,
"periodName": param.CycleName,
},
Result: "",
... ...
... ... @@ -668,6 +668,11 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSelf(param *domain.
if err != nil {
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
}
//添加确认绩效成绩提醒短信提醒
err = notify.AddNotifyConfirmEvaluationScore(evaluationFinishList[0])
if err != nil {
return application.ThrowError(application.TRANSACTION_ERROR, "创建短信提醒失败"+err.Error())
}
}
}
if err := transactionContext.CommitTransaction(); err != nil {
... ... @@ -767,7 +772,13 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluation360Hrbp(param *doma
if err != nil {
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
}
//添加确认绩效成绩提醒短信提醒
err = notify.AddNotifyConfirmEvaluationScore(evaluationFinishList[0])
if err != nil {
return application.ThrowError(application.TRANSACTION_ERROR, "创建短信提醒失败"+err.Error())
}
}
}
if err := transactionContext.CommitTransaction(); err != nil {
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
... ... @@ -824,16 +835,17 @@ func (srv *SummaryEvaluationService) AfterCompletedEvaluationSuper(param *domain
if err != nil {
return application.ThrowError(application.INTERNAL_SERVER_ERROR, "保存考核结果,"+err.Error())
}
//添加确认绩效成绩提醒短信提醒
err = notify.AddNotifyConfirmEvaluationScore(evaluationList[0])
if err != nil {
return application.ThrowError(application.TRANSACTION_ERROR, "创建短信提醒失败"+err.Error())
}
}
if err := transactionContext.CommitTransaction(); err != nil {
return application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
}
//添加确认绩效成绩提醒短信提醒
err = notify.AddNotifyConfirmEvaluationScore(param)
if err != nil {
return application.ThrowError(application.TRANSACTION_ERROR, "创建短信提醒失败"+err.Error())
}
return nil
}
... ...