feat:完善项目信息
This commit is contained in:
@ -10,10 +10,9 @@ import (
|
||||
|
||||
type Agent struct {
|
||||
*session.Enterprise
|
||||
local string
|
||||
}
|
||||
|
||||
type AgentHandle func(session *session.Enterprise, local string) *Agent
|
||||
type AgentHandle func(session *session.Enterprise) *Agent
|
||||
|
||||
type (
|
||||
// AgentCompany 经纪人公司信息
|
||||
@ -120,10 +119,9 @@ func (c *Agent) Delete(id uint64) error {
|
||||
}
|
||||
|
||||
func NewAgent() AgentHandle {
|
||||
return func(session *session.Enterprise, local string) *Agent {
|
||||
return func(session *session.Enterprise) *Agent {
|
||||
return &Agent{
|
||||
Enterprise: session,
|
||||
local: local,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,10 +14,9 @@ import (
|
||||
// Company 公司信息
|
||||
type Company struct {
|
||||
*session.Enterprise
|
||||
local string
|
||||
}
|
||||
|
||||
type CompanyHandle func(session *session.Enterprise, local string) *Company
|
||||
type CompanyHandle func(session *session.Enterprise) *Company
|
||||
|
||||
type (
|
||||
// CompanyDetail 详细信息
|
||||
@ -150,10 +149,9 @@ func (c *Company) Match(title string, industrys, keywords []string) ([]*CompanyM
|
||||
}
|
||||
|
||||
func NewCompany() CompanyHandle {
|
||||
return func(session *session.Enterprise, local string) *Company {
|
||||
return func(session *session.Enterprise) *Company {
|
||||
return &Company{
|
||||
Enterprise: session,
|
||||
local: local,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,10 +11,10 @@ import (
|
||||
// Equipment 设备信息
|
||||
type Equipment struct {
|
||||
*session.Enterprise
|
||||
local string
|
||||
tenantID uint64
|
||||
}
|
||||
|
||||
type EquipmentHandle func(session *session.Enterprise, local string) *Equipment
|
||||
type EquipmentHandle func(session *session.Enterprise, tenantID uint64) *Equipment
|
||||
|
||||
type (
|
||||
EquipmentInstance struct {
|
||||
@ -35,7 +35,7 @@ func (c *Equipment) List(kind int, code, title string, page, pageSize int) (*con
|
||||
|
||||
where := []*model2.ModelWhereOrder{
|
||||
&model2.ModelWhereOrder{
|
||||
Where: model2.NewWhere("local", c.local),
|
||||
Where: model2.NewWhere("tenant_id", c.tenantID),
|
||||
Order: model2.NewOrder("id", model2.OrderModeToDesc),
|
||||
},
|
||||
&model2.ModelWhereOrder{
|
||||
@ -94,7 +94,7 @@ func (c *Equipment) Form(params *EquipmentParams) error {
|
||||
if mManageEquipment.ID > 0 {
|
||||
return model2.Updates(mManageEquipment.ManageEquipment, mManageEquipment.ManageEquipment)
|
||||
}
|
||||
mManageEquipment.Local.Local = c.local
|
||||
mManageEquipment.TenantID = c.tenantID
|
||||
mManageEquipment.UID = c.UID
|
||||
return model2.Create(mManageEquipment.ManageEquipment)
|
||||
}
|
||||
@ -117,10 +117,10 @@ func (c *Equipment) Delete(id uint64) error {
|
||||
}
|
||||
|
||||
func NewEquipment() EquipmentHandle {
|
||||
return func(session *session.Enterprise, local string) *Equipment {
|
||||
return func(session *session.Enterprise, tenantID uint64) *Equipment {
|
||||
return &Equipment{
|
||||
Enterprise: session,
|
||||
local: local,
|
||||
tenantID: tenantID,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,10 +14,9 @@ import (
|
||||
|
||||
type Expert struct {
|
||||
*session.Enterprise
|
||||
local string
|
||||
}
|
||||
|
||||
type ExpertHandle func(session *session.Enterprise, local string) *Expert
|
||||
type ExpertHandle func(session *session.Enterprise) *Expert
|
||||
|
||||
type (
|
||||
// ExpertInfo 专家信息
|
||||
@ -294,10 +293,9 @@ func (c *Expert) CooperateDetail(id uint64) (*CooperateDetailInfo, error) {
|
||||
}
|
||||
|
||||
func NewExpert() ExpertHandle {
|
||||
return func(session *session.Enterprise, local string) *Expert {
|
||||
return func(session *session.Enterprise) *Expert {
|
||||
return &Expert{
|
||||
Enterprise: session,
|
||||
local: local,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,10 +12,9 @@ import (
|
||||
|
||||
type Laboratory struct {
|
||||
*session.Enterprise
|
||||
local string
|
||||
}
|
||||
|
||||
type LaboratoryHandle func(session *session.Enterprise, local string) *Laboratory
|
||||
type LaboratoryHandle func(session *session.Enterprise) *Laboratory
|
||||
|
||||
type (
|
||||
// LaboratoryMatchInfo 实验室匹配信息
|
||||
@ -194,10 +193,9 @@ func (c *Laboratory) Equipment(id uint64, page, pageSize int) (*controller.Retur
|
||||
}
|
||||
|
||||
func NewLaboratory() LaboratoryHandle {
|
||||
return func(session *session.Enterprise, local string) *Laboratory {
|
||||
return func(session *session.Enterprise) *Laboratory {
|
||||
return &Laboratory{
|
||||
Enterprise: session,
|
||||
local: local,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,10 +12,9 @@ import (
|
||||
|
||||
type Research struct {
|
||||
*session.Enterprise
|
||||
local string
|
||||
}
|
||||
|
||||
type ResearchHandle func(session *session.Enterprise, local string) *Research
|
||||
type ResearchHandle func(session *session.Enterprise) *Research
|
||||
|
||||
type (
|
||||
// ResearchLaboratory 科研机构下实验室信息
|
||||
@ -120,10 +119,9 @@ func (c *Research) Visit(page, pageSize int) (*controller.ReturnPages, error) {
|
||||
}
|
||||
|
||||
func NewResearch() ResearchHandle {
|
||||
return func(session *session.Enterprise, local string) *Research {
|
||||
return func(session *session.Enterprise) *Research {
|
||||
return &Research{
|
||||
Enterprise: session,
|
||||
local: local,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user