feat:注释不用的代码
This commit is contained in:
@ -119,7 +119,7 @@ func (c *Demand) Form(params *DemandParams) error {
|
||||
return err
|
||||
} else if !isExist {
|
||||
return errors.New("操作错误,数据不存在")
|
||||
} else if mTechnologyDemand.UID != c.ManageUID {
|
||||
} else if mTechnologyDemand.MUid != c.ManageUID {
|
||||
return errors.New("无权限操作")
|
||||
} else if mTechnologyDemand.Status != model2.TechnologyDemandStatusForRefuse &&
|
||||
mTechnologyDemand.Status != model2.TechnologyDemandStatusForDraft {
|
||||
@ -156,7 +156,7 @@ func (c *Demand) Form(params *DemandParams) error {
|
||||
return model2.Updates(mTechnologyDemand.TechnologyDemand, mTechnologyDemand.TechnologyDemand)
|
||||
}
|
||||
mTechnologyDemand.TenantID = c.TenantID
|
||||
mTechnologyDemand.UID = c.ManageUID
|
||||
mTechnologyDemand.MUid = c.ManageUID
|
||||
mTechnologyDemand.Local.Local = c.local
|
||||
return model2.Create(mTechnologyDemand.TechnologyDemand)
|
||||
}
|
||||
@ -172,7 +172,7 @@ func (c *Demand) Delete(id uint64) error {
|
||||
return err
|
||||
} else if !isExist {
|
||||
return errors.New("操作错误,数据不存在")
|
||||
} else if mTechnologyDemand.UID != c.ManageUID {
|
||||
} else if mTechnologyDemand.MUid != c.ManageUID {
|
||||
return errors.New("无权限操作")
|
||||
}
|
||||
if err = model2.Delete(mTechnologyDemand.TechnologyDemand); err != nil {
|
||||
|
@ -73,7 +73,7 @@ func (c *Instance) Form(params *InstanceParams) error {
|
||||
return err
|
||||
} else if !isExist {
|
||||
return errors.New("信息不存在")
|
||||
} else if c.ManageUID != mTechnologyInstance.UID {
|
||||
} else if c.ManageUID != mTechnologyInstance.MUid {
|
||||
return errors.New("操作错误,无权限操作")
|
||||
} else if mTechnologyInstance.Status != model2.TechnologyInstanceStatusForDraft &&
|
||||
mTechnologyInstance.Status != model2.TechnologyInstanceStatusForRefuse {
|
||||
@ -105,7 +105,7 @@ func (c *Instance) Form(params *InstanceParams) error {
|
||||
mTechnologyInstance.UpdatedAt = time.Now()
|
||||
return model2.Updates(mTechnologyInstance.TechnologyInstance, mTechnologyInstance.TechnologyInstance)
|
||||
}
|
||||
mTechnologyInstance.UID = c.ManageUID
|
||||
mTechnologyInstance.MUid = c.ManageUID
|
||||
mTechnologyInstance.Local.Local = c.local
|
||||
mTechnologyInstance.TenantID = c.TenantID
|
||||
|
||||
@ -122,7 +122,7 @@ func (c *Instance) Shelf(id uint64, status int) error {
|
||||
return err
|
||||
} else if !isExist {
|
||||
return errors.New("信息不存在")
|
||||
} else if c.ManageUID != mTechnologyInstance.UID {
|
||||
} else if c.ManageUID != mTechnologyInstance.MUid {
|
||||
return errors.New("操作错误,无权限操作")
|
||||
} else if mTechnologyInstance.Status != model2.TechnologyInstanceStatusForAgree {
|
||||
return errors.New("操作错误,当前状态不允许处理上下架")
|
||||
@ -147,7 +147,7 @@ func (c *Instance) Delete(id uint64) error {
|
||||
return err
|
||||
} else if !isExist {
|
||||
return errors.New("信息不存在")
|
||||
} else if c.ManageUID != mTechnologyInstance.UID {
|
||||
} else if c.ManageUID != mTechnologyInstance.MUid {
|
||||
return errors.New("操作错误,无权限操作")
|
||||
}
|
||||
if err = model2.Delete(mTechnologyInstance.TechnologyInstance); err != nil {
|
||||
|
@ -70,7 +70,7 @@ func (c *Paper) Form(params *PaperParams) error {
|
||||
return err
|
||||
} else if !isExist {
|
||||
return errors.New("当前论文信息不存在")
|
||||
} else if mTechnologyPaper.UID != c.ManageUID {
|
||||
} else if mTechnologyPaper.MUid != 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.ManageUID
|
||||
mTechnologyPaper.MUid = c.ManageUID
|
||||
mTechnologyPaper.Local.Local = c.local
|
||||
return model2.Create(mTechnologyPaper.TechnologyPaper)
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ func (c *Patent) Form(params *PatentParams) error {
|
||||
return err
|
||||
} else if !isExist {
|
||||
return errors.New("操作错误,专利信息不存在")
|
||||
} else if mTechnologyPatent.UID != c.ManageUID {
|
||||
} else if mTechnologyPatent.MUid != c.ManageUID {
|
||||
return errors.New("无权限操作")
|
||||
}
|
||||
}
|
||||
@ -126,7 +126,7 @@ func (c *Patent) Form(params *PatentParams) error {
|
||||
}
|
||||
mTechnologyPatent.TenantID = c.TenantID
|
||||
mTechnologyPatent.Local.Local = c.local
|
||||
mTechnologyPatent.UID = c.ManageUID
|
||||
mTechnologyPatent.MUid = c.ManageUID
|
||||
return model2.Create(mTechnologyPatent.TechnologyPatent)
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ func (c *Patent) Delete(id uint64) error {
|
||||
return err
|
||||
} else if !isExist {
|
||||
return errors.New("操作错误,专利信息不存在")
|
||||
} else if mTechnologyPatent.UID != c.ManageUID {
|
||||
} else if mTechnologyPatent.MUid != c.ManageUID {
|
||||
return errors.New("无权限操作")
|
||||
}
|
||||
return model2.Delete(mTechnologyPatent.TechnologyPatent)
|
||||
|
@ -100,7 +100,7 @@ func (c *Topic) Form(params *TopicParams) error {
|
||||
return err
|
||||
} else if !isExist {
|
||||
return errors.New("操作错误,课题信息不存在")
|
||||
} else if mTechnologyTopic.UID != c.ManageUID {
|
||||
} else if mTechnologyTopic.MUid != c.ManageUID {
|
||||
return errors.New("无权限操作")
|
||||
} else if mTechnologyTopic.Status != model2.TechnologyTopicStatusForDraft &&
|
||||
mTechnologyTopic.Status != model2.TechnologyTopicStatusForRefuse {
|
||||
@ -124,7 +124,7 @@ func (c *Topic) Form(params *TopicParams) error {
|
||||
}
|
||||
mTechnologyTopic.TenantID = c.TenantID
|
||||
mTechnologyTopic.Local.Local = c.local
|
||||
mTechnologyTopic.UID = c.ManageUID
|
||||
mTechnologyTopic.MUid = c.ManageUID
|
||||
return model2.Create(mTechnologyTopic.TechnologyTopic)
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ func (c *Topic) Delete(id uint64) error {
|
||||
return err
|
||||
} else if !isExist {
|
||||
return errors.New("操作错误,课题信息不存在")
|
||||
} else if mTechnologyTopic.UID != c.ManageUID {
|
||||
} else if mTechnologyTopic.MUid != c.ManageUID {
|
||||
return errors.New("无权限操作")
|
||||
}
|
||||
return model2.Delete(mTechnologyTopic.TechnologyTopic)
|
||||
|
Reference in New Issue
Block a user