- GetServerInfo added.

This commit is contained in:
gazebo
2018-09-11 18:34:59 +08:00
parent 7f4c125279
commit 4dcc31e36d
11 changed files with 186 additions and 69 deletions

View File

@@ -13,8 +13,9 @@ const (
)
const (
SkuNameStatusNormal = 0
SkuNameStatusDontSale = 1
SkuStatusDeleted = -1
SkuStatusDontSale = 0
SkuStatusNormal = 1
)
var (
@@ -52,6 +53,23 @@ var (
}
)
var (
CategoryTypeName map[int]string
SkuStatusName map[int]string
)
func init() {
CategoryTypeName = map[int]string{
SkuCategoryNormal: "普通类别",
SkuCategorySpecial: "特殊类别",
}
SkuStatusName = map[int]string{
SkuStatusDeleted: "删除",
SkuStatusDontSale: "下架",
SkuStatusNormal: "上架",
}
}
// 这个指的是厂商(比如京东到家,饿百)自已的商品分类,与商家自己的商品分类是两回事
type SkuVendorCategory struct {
ModelIDCUL
@@ -103,7 +121,6 @@ type SkuName struct {
BrandID int `orm:"column(brand_id);default(0)" json:"brandID"` // 此属性暂时没有使用
CategoryID int `orm:"column(category_id)" json:"categoryID"` // 标准类别
Status int `json:"status"`
IsGlobal int8 `orm:"default(1)" json:"isGlobal"` // 是否是全部全国可见如果否的话可见性由SkuPlace决定
Unit string `orm:"size(8)" json:"unit"`
@@ -126,6 +143,7 @@ type Sku struct {
SpecQuality float32 `json:"specQuality"`
SpecUnit string `orm:"size(8)" json:"specUnit"` // 质量或容量
Weight int `json:"weight"` // 重量/质量单位为克当相应的SkuName的SpecUnit为g或kg时必须等于SpecQuality
Status int `json:"status"`
JdID int64 `orm:"column(jd_id)" json:"jdID"`
JdSyncStatus int8 `orm:"default(2)" json:"jdSyncStatus"`

View File

@@ -17,6 +17,35 @@ const (
DeliveryRangeTypeRadius = 3
)
const (
StoreDeliveryTypeCrowdSourcing = 0 //缺省,平台众包配送,可转自送
StoreDeliveryTypeByPlatform = 1 //平台专送
StoreDeliveryTypeByStore = 2 //完全门店自送
)
var (
StoreStatusName map[int]string
DeliveryRangeTypeName map[int]string
DeliveryTypeName map[int]string
)
func init() {
StoreStatusName = map[int]string{
StoreStatusDisabled: "禁用",
StoreStatusClosed: "休息",
StoreStatusOpened: "营业中",
}
DeliveryRangeTypeName = map[int]string{
DeliveryRangeTypePolygon: "多边形",
DeliveryRangeTypeRadius: "圆",
}
DeliveryTypeName = map[int]string{
StoreDeliveryTypeCrowdSourcing: "平台众包配送",
StoreDeliveryTypeByPlatform: "平台专送",
StoreDeliveryTypeByStore: "门店自送",
}
}
type Store struct {
ModelIDCUL