From 5278ba77395ff34e495e0508d753bd4ba659a79a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 8 Jan 2024 09:50:46 +0800 Subject: [PATCH] 1 --- business/model/const.go | 4 +++ business/model/print.go | 17 ++++++----- business/model/print_temp.go | 58 +++++++++++++++++------------------- 3 files changed, 41 insertions(+), 38 deletions(-) diff --git a/business/model/const.go b/business/model/const.go index 8c433eb72..ae16740eb 100644 --- a/business/model/const.go +++ b/business/model/const.go @@ -336,6 +336,10 @@ const ( WaybillStatusCanceled = 115 WaybillStatusFailed = 120 // 这个状态存在的意义是区分于WaybillStatusCanceled,比如达达平台在这种状态下再次创建运单的方式不一样 WaybillStatusEndEnd = 120 + + WaybillStatusCourierAssigned = 12 //已分配骑手 + WaybillStatusDeliverReminder = 30 // 催单 + ) var ( diff --git a/business/model/print.go b/business/model/print.go index a6b0a0754..cc5b93512 100644 --- a/business/model/print.go +++ b/business/model/print.go @@ -37,14 +37,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 `orm:"type(text)" 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"` // 模板类型 - 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-不使用 + TempName string `json:"temp_name" db:"temp_name"` // 模板名称 + TempRank string `orm:"type(text)" 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"` // 模板类型 + 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"` // 模板字段属性 } type Apps struct { diff --git a/business/model/print_temp.go b/business/model/print_temp.go index 8bbfa0ef8..da3f52b59 100644 --- a/business/model/print_temp.go +++ b/business/model/print_temp.go @@ -1,39 +1,37 @@ package model -import ( - "time" -) - -type SystemTemp struct { - ID int `orm:"column(id)" json:"id" db:"id"` - CreatedAt *time.Time `json:"created_at" db:"created_at"` - 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 `orm:"type(text)" 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 { +// +//type SystemTemp struct { +// ID int `orm:"column(id)" json:"id" db:"id"` +// CreatedAt *time.Time `json:"created_at" db:"created_at"` +// 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 `orm:"type(text)" 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"` // 模板类型 +// 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 { +//// return [][]string{ +//// []string{"PrintNo"}, +//// } +////} +// +//func (v *SystemTemp) TableIndex() [][]string { // return [][]string{ -// []string{"PrintNo"}, +// []string{"UserId", "TempType", "TempSize"}, +// []string{"PrintSn"}, // } //} -func (v *SystemTemp) TableIndex() [][]string { - return [][]string{ - []string{"UserId", "TempType", "TempSize"}, - []string{"PrintSn"}, - } -} - const ( TempTypeMerchantUser = `user_store` // 商户自定义模板-商户看 TempTypeConsumerUser = `user_consumer` // 商户自定义模板-消费用户看