打包费参数有效性检查
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package model
|
||||
|
||||
import "reflect"
|
||||
|
||||
const (
|
||||
ConfigTypeSys = "Sys"
|
||||
ConfigTypePricePack = "PricePack"
|
||||
@@ -15,6 +17,12 @@ const (
|
||||
ConfigSysMtwmSkuBoxFee = "MtwmSkuBoxFee" // 美团外卖单商品打包费
|
||||
)
|
||||
|
||||
type SysConfigLimit struct {
|
||||
ValueType reflect.Kind
|
||||
MinValue int64
|
||||
MaxValue int64
|
||||
}
|
||||
|
||||
var (
|
||||
ConfigTypeName = map[string]string{
|
||||
ConfigTypeSys: "系统",
|
||||
@@ -23,6 +31,24 @@ var (
|
||||
ConfigTypeBank: "银行",
|
||||
ConfigTypeRole: "角色",
|
||||
}
|
||||
|
||||
SysConfigLimitMap = map[string]*SysConfigLimit{
|
||||
ConfigSysEbaiBoxFee: &SysConfigLimit{
|
||||
ValueType: reflect.Int,
|
||||
MinValue: 0,
|
||||
MaxValue: 500,
|
||||
},
|
||||
ConfigSysMtwmBoxFee: &SysConfigLimit{
|
||||
ValueType: reflect.Int,
|
||||
MinValue: 0,
|
||||
MaxValue: 500,
|
||||
},
|
||||
ConfigSysMtwmSkuBoxFee: &SysConfigLimit{
|
||||
ValueType: reflect.Int,
|
||||
MinValue: 0,
|
||||
MaxValue: 50,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
type NewConfig struct {
|
||||
|
||||
Reference in New Issue
Block a user