diff --git a/business/dao/print_temp_utils.go b/business/dao/print_temp_utils.go index 44b13f2e1..4eff18e79 100644 --- a/business/dao/print_temp_utils.go +++ b/business/dao/print_temp_utils.go @@ -12,7 +12,7 @@ import ( var SystemTempObj map[string]*model.SystemTemp -func init() { +func Init() { SystemTempObj = make(map[string]*model.SystemTemp, 0) sysTempList, err := QuerySystemTemp() if err != nil { diff --git a/business/model/print_temp.go b/business/model/print_temp.go index 52e414fdc..734b9f45f 100644 --- a/business/model/print_temp.go +++ b/business/model/print_temp.go @@ -10,15 +10,15 @@ type SystemTemp struct { UpdatedAt *time.Time `json:"updated_at" db:"updated_at"` LastOperator string `json:"last_operator" db:"last_operator"` DeletedAt *time.Time `json:"deleted_at" db:"deleted_at"` - TempName string `json:"temp_name" db:"temp_name"` // 模板名称 - TempRank string `json:"temp_rank" db:"temp_rank"` // 模板顺序 - Temp string `json:"temp" db:"temp"` // 模板 - UserId string `json:"user_id" db:"user_id"` // 所属用户 - TempType string `json:"temp_type" db:"temp_type"` // 模板类型 user_store/user_consumer - TempSize string `json:"temp_size" db:"temp_size"` // 模板尺寸 big/medium/small - PrintSn string `json:"print_sn" db:"print_sn"` // 模板所属打印机 - IsUse int `json:"is_use" db:"is_use"` // 默认使用 1-使用/2-不使用 - Properties string `json:"properties" db:"properties"` // 模板字段属性 + TempName string `json:"temp_name" db:"temp_name"` // 模板名称 + TempRank string `json:"temp_rank" db:"temp_rank"` // 模板顺序 + Temp string `orm:"type(text)" json:"temp" db:"temp"` // 模板 + UserId string `json:"user_id" db:"user_id"` // 所属用户 + TempType string `json:"temp_type" db:"temp_type"` // 模板类型 user_store/user_consumer + TempSize string `json:"temp_size" db:"temp_size"` // 模板尺寸 big/medium/small + PrintSn string `json:"print_sn" db:"print_sn"` // 模板所属打印机 + IsUse int `json:"is_use" db:"is_use"` // 默认使用 1-使用/2-不使用 + Properties string `orm:"type(text)" json:"properties" db:"properties"` // 模板字段属性 } //func (v *SystemTemp) TableUnique() [][]string { diff --git a/main.go b/main.go index 3b928b470..ccb227fa3 100644 --- a/main.go +++ b/main.go @@ -3,6 +3,7 @@ package main import ( "flag" "fmt" + "git.rosy.net.cn/jx-callback/business/dao" "git.rosy.net.cn/jx-callback/business/jxstore/cms" "git.rosy.net.cn/jx-callback/business/jxstore/misc" _ "git.rosy.net.cn/jx-callback/business/model" @@ -36,6 +37,7 @@ func Init() { cms.InitServiceInfo(Version, buildTime, GitCommit) misc.Init() controllers.Init() + dao.Init() } // 返回true表示非运行服务