feat:完善信息

This commit is contained in:
henry
2021-10-13 17:17:28 +08:00
parent 52dc8cb57d
commit 8f7aeba547
14 changed files with 272 additions and 113 deletions

View File

@ -70,7 +70,7 @@ func (c *Paper) Form(params *PaperParams) error {
return err
} else if !isExist {
return errors.New("当前论文信息不存在")
} else if mTechnologyPaper.UID != c.TenantUID {
} else if mTechnologyPaper.UID != c.ManageUID {
return errors.New("无权限操作")
}
}
@ -84,7 +84,7 @@ func (c *Paper) Form(params *PaperParams) error {
if params.ID <= 0 {
mTechnologyPaper.TenantID = c.TenantID
mTechnologyPaper.UID = c.TenantUID
mTechnologyPaper.UID = c.ManageUID
mTechnologyPaper.Local.Local = c.local
return model2.Create(mTechnologyPaper.TechnologyPaper)
}
@ -99,7 +99,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.TenantUID))
err := model2.Count(mTechnologyPaper.TechnologyPaper, &count, model2.NewWhere("id", id), model2.NewWhere("uid", c.ManageUID))
if err != nil {
return err
@ -114,6 +114,6 @@ func (c *Paper) Delete(id uint64) error {
func NewPaper() PaperHandle {
return func(enterprise *service.SessionEnterprise, local string) *Paper {
return &Paper{enterprise, local}
return &Paper{SessionEnterprise: enterprise, local: local}
}
}