feat:完善项目
This commit is contained in:
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user