Merge pull request #192 from lanyulei/dev

fix: 修复邮件内申请人异常的bug。
This commit is contained in:
lanyulei 2021-05-20 14:23:29 +08:00 committed by GitHub
commit ce5c8adacf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -422,6 +422,7 @@ func (h *Handle) HandleWorkOrder(
parallelStatusOk bool parallelStatusOk bool
processInfo process.Info processInfo process.Info
currentUserInfo system.SysUser currentUserInfo system.SysUser
applyUserInfo system.SysUser
sendToUserList []system.SysUser sendToUserList []system.SysUser
noticeList []int noticeList []int
sendSubject string = "您有一条待办工单,请及时处理" sendSubject string = "您有一条待办工单,请及时处理"
@ -454,6 +455,12 @@ func (h *Handle) HandleWorkOrder(
return return
} }
// 查询工单创建人信息
err = orm.Eloquent.Model(&system.SysUser{}).Where("user_id = ?", h.workOrderDetails.Creator).Find(&applyUserInfo).Error
if err != nil {
return
}
// 获取流程信息 // 获取流程信息
err = orm.Eloquent.Model(&process.Info{}).Where("id = ?", h.workOrderDetails.Process).Find(&processInfo).Error err = orm.Eloquent.Model(&process.Info{}).Where("id = ?", h.workOrderDetails.Process).Find(&processInfo).Error
if err != nil { if err != nil {
@ -809,7 +816,7 @@ func (h *Handle) HandleWorkOrder(
ProcessId: h.workOrderDetails.Process, ProcessId: h.workOrderDetails.Process,
Id: h.workOrderDetails.Id, Id: h.workOrderDetails.Id,
Title: h.workOrderDetails.Title, Title: h.workOrderDetails.Title,
Creator: currentUserInfo.NickName, Creator: applyUserInfo.NickName,
Priority: h.workOrderDetails.Priority, Priority: h.workOrderDetails.Priority,
CreatedAt: h.workOrderDetails.CreatedAt.Format("2006-01-02 15:04:05"), CreatedAt: h.workOrderDetails.CreatedAt.Format("2006-01-02 15:04:05"),
} }