- 京西自营商城可以存订单了

This commit is contained in:
gazebo
2019-09-02 18:33:43 +08:00
parent 7ca4429e43
commit 4e617f4ef5
17 changed files with 503 additions and 280 deletions

View File

@@ -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) {

View File

@@ -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