feat:完善信息

This commit is contained in:
henry
2021-10-12 13:54:05 +08:00
parent 37fd5abdac
commit 142cbcf5ae
10 changed files with 53 additions and 34 deletions

View File

@ -65,11 +65,11 @@ func (c *Paper) Form(params *PaperParams) error {
return err
} else if !isExist {
return errors.New("当前论文信息不存在")
} else if mTechnologyPaper.UID != c.UID {
} else if mTechnologyPaper.UID != c.TenantUID {
return errors.New("无权限操作")
}
}
mTechnologyPaper.UID = c.UID
mTechnologyPaper.UID = c.TenantUID
mTechnologyPaper.Title = params.Title
mTechnologyPaper.Ext = params.Ext
mTechnologyPaper.Author = params.Author
@ -92,7 +92,7 @@ func (c *Paper) Delete(id uint64) error {
var count int64
err := model2.Count(mTechnologyPaper.TechnologyPaper, &count, model2.NewWhere("id", id), model2.NewWhere("uid", c.UID))
err := model2.Count(mTechnologyPaper.TechnologyPaper, &count, model2.NewWhere("id", id), model2.NewWhere("uid", c.TenantUID))
if err != nil {
return err