fix 更新覆盖

This commit is contained in:
耿阳 2022-08-25 15:53:38 +08:00
parent 93259f98b1
commit c02b69bb62

View File

@ -192,11 +192,11 @@ func UpdateApproval(in *approval.CreateRequest) (*Approval, error) {
} }
// 保存基本信息 // 保存基本信息
entity = &Approval{ upEntity := &Approval{
Content: in.Content, Content: in.Content,
} }
if err := DB.Where(&Approval{ID: in.ID}).Updates(&entity).Error; err != nil { if err := DB.Where(&Approval{ID: in.ID}).Updates(&upEntity).Error; err != nil {
return err return err
} }