作者 yangfu

修改 机会/草稿提交

... ... @@ -423,6 +423,10 @@ func ChanceSubmit(header *protocol.RequestHeader, request *protocol.ChanceSubmit
err = protocol.NewErrWithMessage(5302)
return
}
if template.EnableStatus == protocol.InValid {
err = protocol.NewErrWithMessage(5302)
return
}
if chanceType, err = models.GetChanceTypeById(template.ChanceTypeId); err != nil {
log.Error("一级分类不存在:", request.AuditTemplateId, err)
err = protocol.NewErrWithMessage(5302)
... ... @@ -2360,10 +2364,16 @@ func DraftSaveChance(header *protocol.RequestHeader, request *protocol.DraftSave
//1.模板是否存在
if template, err = models.GetAuditTemplateById(request.AuditTemplateId); err != nil {
log.Error("模板不存在:", request.AuditTemplateId, err)
err = protocol.NewErrWithMessage(5302)
return
}
if template.EnableStatus == protocol.InValid {
err = protocol.NewErrWithMessage(5302)
return
}
if _, err = models.GetChanceTypeById(template.ChanceTypeId); err != nil {
log.Error("一级分类不存在:", request.AuditTemplateId, err)
err = protocol.NewErrWithMessage(5302)
return
}
//2.检查模板是否有权限
... ...