feat:完善项目

This commit is contained in:
henry
2022-01-15 16:48:49 +08:00
parent 57daf5119d
commit 6d075dab4f
33 changed files with 196 additions and 154 deletions

View File

@ -12,10 +12,10 @@ import (
type Topic struct {
*session.Enterprise
local string
tenantID uint64
}
type TopicHandle func(session *session.Enterprise, local string) *Topic
type TopicHandle func(session *session.Enterprise, tenantID uint64) *Topic
type (
// TopicInfo 课题信息
@ -122,7 +122,7 @@ func (c *Topic) Form(params *TopicParams) error {
mTechnologyTopic.UpdatedAt = time.Now()
return model2.Updates(mTechnologyTopic.TechnologyTopic, mTechnologyTopic.TechnologyTopic)
}
mTechnologyTopic.Local.Local = c.local
mTechnologyTopic.TenantID = c.tenantID
mTechnologyTopic.UID = c.UID
return model2.Create(mTechnologyTopic.TechnologyTopic)
}
@ -145,10 +145,10 @@ func (c *Topic) Delete(id uint64) error {
}
func NewTopic() TopicHandle {
return func(session *session.Enterprise, local string) *Topic {
return func(session *session.Enterprise, tenantID uint64) *Topic {
return &Topic{
Enterprise: session,
local: local,
tenantID: tenantID,
}
}
}