Browse Source

更新时不允许修改vendorId

pull/51/head
zhangxin 3 years ago
parent
commit
e2fc7a575a
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      services/log/implments/Vendor.service.impl.go

+ 3
- 0
services/log/implments/Vendor.service.impl.go View File

@ -216,8 +216,10 @@ func (impl *VendorServiceImplement) UpdateOne(user *models.Usertab, entity *mode
if record == nil {
return grmi.NewBusinessError("不存在指定记录!")
}
entity.VendorId = record.VendorId
err = dao.UpdateOne(entity)
if err != nil {
session.Rollback()
return err
}
return nil
@ -378,6 +380,7 @@ func (impl *VendorServiceImplement) Update(user *models.Usertab, entities *[]mod
if record == nil {
return grmi.NewBusinessError("不存在指定记录!")
}
entity.VendorId = record.VendorId
}
err = dao.Update(entities)


Loading…
Cancel
Save