refactor🎨: 调整删除时获取使用函数获取id
This commit is contained in:
1 parent
76351fe685
commit
f81c9c2ca0
2 files changed
+3
-3
No files matched your search
@@ -51,12 +51,12 @@ func (e *SysLoginLog) Get(d *dto.SysLoginLogById, model *models.SysLoginLog) err
|
||||
return nil
|
||||
}
|
||||
|
||||
// RemoveSysLoginLog 删除SysLoginLog
|
||||
// Remove 删除SysLoginLog
|
||||
func (e *SysLoginLog) Remove(c *dto.SysLoginLogById) error {
|
||||
var err error
|
||||
var data models.SysLoginLog
|
||||
|
||||
db := e.Orm.Delete(&data, c.Ids)
|
||||
db := e.Orm.Delete(&data, c.GetId())
|
||||
if db.Error != nil {
|
||||
err = db.Error
|
||||
e.Log.Errorf("Delete error: %s", err)
|
||||
|
||||
Reference in new issue
Block a user