数据动态查找以及动态赋值方法变更

This commit is contained in:
pixel
2020-11-19 17:24:05 +08:00
parent 0286d56e9c
commit a487266f5b
9 changed files with 67 additions and 26 deletions
+4
View File
@@ -19,3 +19,7 @@ type ExaWfLeaveWorkflow struct {
WorkflowBase `json:"wf"`
ExaWfLeave `json:"business"`
}
func (e ExaWfLeave) TableName() string {
return "exa_wf_leaves"
}
+1 -6
View File
@@ -7,10 +7,9 @@ import (
)
var WorkflowBusinessStruct map[string]func() GVA_Workflow
var WorkflowBusinessTable map[string]string
var WorkflowBusinessTable map[string]func() interface{}
type GVA_Workflow interface {
GetTableName() string
CreateWorkflowMove() *WorkflowMove
GetBusinessType() string
GetWorkflowBase() WorkflowBase
@@ -47,10 +46,6 @@ func (w WorkflowBase) GetWorkflowBase() (workflowBase WorkflowBase) {
return w
}
func (w WorkflowBase) GetTableName() string {
return WorkflowBusinessTable[w.BusinessType]
}
//定义clazz常量
const (