Merge remote-tracking branch 'origin/mark' into don
This commit is contained in:
@@ -179,6 +179,8 @@ func (*ActStoreSkuMap) TableIndex() [][]string {
|
||||
type ActStoreSku2 struct {
|
||||
MapID int `orm:"column(map_id)"`
|
||||
|
||||
Type int `json:"type"`
|
||||
|
||||
ActStoreSku
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ var (
|
||||
VendorIDELM: "Elm",
|
||||
VendorIDEBAI: "Ebai",
|
||||
VendorIDWSC: "Wsc",
|
||||
VendorIDJX: "Jx",
|
||||
|
||||
VendorIDDada: "Dada",
|
||||
VendorIDMTPS: "Mtps",
|
||||
@@ -86,6 +87,7 @@ var (
|
||||
VendorIDELM: "饿了么",
|
||||
VendorIDEBAI: "饿百新零售",
|
||||
VendorIDWSC: "微盟微商城",
|
||||
VendorIDJX: "京西自营",
|
||||
|
||||
VendorIDDada: "达达众包",
|
||||
VendorIDMTPS: "美团配送",
|
||||
|
||||
@@ -358,6 +358,7 @@ func GetEffectiveActStoreSkuInfo(db *DaoDB, actID int, vendorIDs []int, storeIDs
|
||||
}
|
||||
sql := `
|
||||
SELECT
|
||||
t1.type,
|
||||
t2.*,
|
||||
t3.actual_act_price, t3.sync_status, t3.vendor_price, t3.vendor_id
|
||||
FROM act t1
|
||||
|
||||
@@ -91,7 +91,21 @@ func GetStoreDetail(db *DaoDB, storeID, vendorID int) (storeDetail *StoreDetail,
|
||||
}
|
||||
|
||||
func GetStoreDetailByVendorStoreID(db *DaoDB, vendorStoreID string, vendorID int) (storeDetail *StoreDetail, err error) {
|
||||
return getStoreDetail(db, 0, vendorID, vendorStoreID)
|
||||
if vendorID != model.VendorIDJX {
|
||||
return getStoreDetail(db, 0, vendorID, vendorStoreID)
|
||||
}
|
||||
store := &model.Store{}
|
||||
store.ID = int(utils.Str2Int64WithDefault(vendorStoreID, 0))
|
||||
if err = GetEntity(db, store); err == nil {
|
||||
// todo 还要补全其它参数
|
||||
storeDetail = &StoreDetail{
|
||||
Store: *store,
|
||||
VendorStoreID: vendorStoreID,
|
||||
VendorStatus: store.Status,
|
||||
PricePercentage: 100,
|
||||
}
|
||||
}
|
||||
return storeDetail, err
|
||||
}
|
||||
|
||||
func GetPossibleStoresByPlaceName(db *DaoDB, cityName, provinceName string) (storeList []*StoreDetail, err error) {
|
||||
|
||||
@@ -30,12 +30,12 @@ type GoodsOrder struct {
|
||||
ConsigneeMobile string `orm:"size(32)" json:"consigneeMobile"`
|
||||
ConsigneeMobile2 string `orm:"size(32)" json:"consigneeMobile2"`
|
||||
ConsigneeAddress string `orm:"size(255)" json:"consigneeAddress"`
|
||||
CoordinateType int `json:"-"`
|
||||
ConsigneeLng int `json:"-"` // 坐标 * (10的六次方)
|
||||
ConsigneeLat int `json:"-"` // 坐标 * (10的六次方)
|
||||
SkuCount int `json:"skuCount"` // 商品类别数量,即有多少种商品(注意在某些情况下,相同SKU的商品由于售价不同,也会当成不同商品在这个值里)
|
||||
GoodsCount int `json:"goodsCount"` // 商品个数
|
||||
Status int `json:"status"` // 参见OrderStatus*相关的常量定义
|
||||
CoordinateType int `json:"coordinateType"`
|
||||
ConsigneeLng int `json:"consigneeLng"` // 坐标 * (10的六次方)
|
||||
ConsigneeLat int `json:"consigneeLat"` // 坐标 * (10的六次方)
|
||||
SkuCount int `json:"skuCount"` // 商品类别数量,即有多少种商品(注意在某些情况下,相同SKU的商品由于售价不同,也会当成不同商品在这个值里)
|
||||
GoodsCount int `json:"goodsCount"` // 商品个数
|
||||
Status int `json:"status"` // 参见OrderStatus*相关的常量定义
|
||||
VendorStatus string `orm:"size(255)" json:"vendorStatus"`
|
||||
LockStatus int `json:"lockStatus"`
|
||||
LockStatusTime time.Time `orm:"type(datetime);null" json:"lockStatusTime"` // last lock status time
|
||||
|
||||
@@ -170,6 +170,7 @@ type SkuCategoryMap struct {
|
||||
VendorOrgCode string `orm:"size(32)" json:"vendorOrgCode"` // 同一平台下不同的商户代码,如果只有一个,可以为空
|
||||
|
||||
VendorCatID string `orm:"size(32);column(vendor_cat_id)" json:"vendorCatID"`
|
||||
SyncStatus int8 `orm:"default(2)"`
|
||||
}
|
||||
|
||||
func (*SkuCategoryMap) TableUnique() [][]string {
|
||||
|
||||
@@ -356,7 +356,8 @@ type StoreMap struct {
|
||||
StoreID int `orm:"column(store_id)" json:"storeID"`
|
||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||
VendorStoreID string `orm:"column(vendor_store_id);size(48)" json:"vendorStoreID"`
|
||||
Status int `json:"status"` // 取值同Store.Status
|
||||
Status int `json:"status"` // 取值同Store.Status
|
||||
StoreName string `orm:"size(255)" json:"storeName"` // 平台门店的名字
|
||||
|
||||
PricePercentage int16 `orm:"default(100)" json:"pricePercentage"` // todo 厂商价格相对于本地价格的百分比,这个字段的修改会比较特殊,因为可能需要刷新厂商价格
|
||||
PricePercentagePack string `orm:"size(32)" json:"pricePercentagePack"` //
|
||||
@@ -404,12 +405,13 @@ type VendorStoreSnapshot struct {
|
||||
VendorStoreID string `orm:"column(vendor_store_id);size(48)" json:"vendorStoreID"`
|
||||
SnapshotAt time.Time `orm:"type(datetime)" json:"snapshotAt"` // 这个不同于CreatedAt,SnapshotAt是逻辑上的时间,CreatedAt是实际存储的时间
|
||||
|
||||
Status int `json:"status"` // 取值同Store.Status
|
||||
OpenTime1 int16 `json:"openTime1"` // 930就表示9点半,用两个的原因是为了支持中午休息,1与2的时间段不能交叉,为0表示没有
|
||||
CloseTime1 int16 `json:"closeTime1"` // 格式同上
|
||||
OpenTime2 int16 `json:"openTime2"` // 格式同上
|
||||
CloseTime2 int16 `json:"closeTime2"` // 格式同上
|
||||
DeliveryType int8 `orm:"default(0)" json:"deliveryType"` // 配送类型
|
||||
Status int `json:"status"` // 取值同Store.Status
|
||||
OpenTime1 int16 `json:"openTime1"` // 930就表示9点半,用两个的原因是为了支持中午休息,1与2的时间段不能交叉,为0表示没有
|
||||
CloseTime1 int16 `json:"closeTime1"` // 格式同上
|
||||
OpenTime2 int16 `json:"openTime2"` // 格式同上
|
||||
CloseTime2 int16 `json:"closeTime2"` // 格式同上
|
||||
DeliveryType int8 `orm:"default(0)" json:"deliveryType"` // 配送类型
|
||||
StoreName string `orm:"size(255)" json:"storeName"` // 平台门店的名字
|
||||
}
|
||||
|
||||
func (*VendorStoreSnapshot) TableUnique() [][]string {
|
||||
|
||||
Reference in New Issue
Block a user