feat:完善项目信息

This commit is contained in:
henry
2022-01-21 11:42:58 +08:00
parent dda20eb011
commit 1c027dd2d1
23 changed files with 125 additions and 113 deletions

View File

@ -119,8 +119,8 @@ func (c *Demand) Form(params *DemandParams) error {
return errors.New("操作错误,需求信息不存在或已被删除")
} else if mTechnologyDemand.UID != c.UID {
return errors.New("无权限操作")
} else if mTechnologyDemand.Status != model2.TechnologyDemandStatusForRefuse &&
mTechnologyDemand.Status != model2.TechnologyDemandStatusForDraft {
} else if mTechnologyDemand.Status != model2.TechnologyStatusKindForRefuse &&
mTechnologyDemand.Status != model2.TechnologyStatusKindForDraft {
return errors.New("操作错误,当前状态不允许修改")
}
}
@ -145,14 +145,14 @@ func (c *Demand) Form(params *DemandParams) error {
},
})
if mTechnologyDemand.ID > 0 {
mTechnologyDemand.Status = model2.TechnologyDemandStatusForExamining
mTechnologyDemand.Status = model2.TechnologyStatusKindForExamining
return model2.Updates(mTechnologyDemand.TechnologyDemand, mTechnologyDemand.TechnologyDemand)
}
mTechnologyDemand.UID = c.UID
mTechnologyDemand.TenantID = c.tenantID
if params.IsSubmit > 0 {
mTechnologyDemand.Status = model2.TechnologyDemandStatusForExamining
mTechnologyDemand.Status = model2.TechnologyStatusKindForExamining
}
return model2.Create(mTechnologyDemand.TechnologyDemand)
}