feat:完善项目
This commit is contained in:
@ -10,7 +10,7 @@ import (
|
||||
|
||||
type Demand struct {
|
||||
*session.Enterprise
|
||||
local string
|
||||
tenantID uint64
|
||||
}
|
||||
|
||||
type (
|
||||
@ -29,7 +29,7 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
type DemandHandle func(session *session.Enterprise, local string) *Demand
|
||||
type DemandHandle func(session *session.Enterprise, tenantID uint64) *Demand
|
||||
|
||||
// List 列表信息
|
||||
func (c *Demand) List(title string, status, page, pageSize int) (*controller.ReturnPages, error) {
|
||||
@ -37,7 +37,7 @@ func (c *Demand) List(title string, status, page, pageSize int) (*controller.Ret
|
||||
|
||||
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{Where: model2.NewWhere("uid", c.UID)},
|
||||
@ -116,7 +116,7 @@ func (c *Demand) Form(params *DemandParams) error {
|
||||
|
||||
return model2.Updates(mServiceDemand.ServiceDemand, mServiceDemand.ServiceDemand)
|
||||
}
|
||||
mServiceDemand.Local.Local = c.local
|
||||
mServiceDemand.TenantID = c.tenantID
|
||||
mServiceDemand.UID = c.UID
|
||||
|
||||
if params.IsSubmit > 0 {
|
||||
@ -141,10 +141,10 @@ func (c *Demand) Delete(id uint64) error {
|
||||
}
|
||||
|
||||
func NewDemand() DemandHandle {
|
||||
return func(session *session.Enterprise, local string) *Demand {
|
||||
return func(session *session.Enterprise, tenantID uint64) *Demand {
|
||||
return &Demand{
|
||||
Enterprise: session,
|
||||
local: local,
|
||||
tenantID: tenantID,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user