- jd.FullSyncStoreSkus
- refactor mtwm.SyncLocalStoreCategory
This commit is contained in:
@@ -7,16 +7,27 @@ import (
|
||||
|
||||
type StoreDetail struct {
|
||||
model.Store
|
||||
|
||||
VendorStoreID string `orm:"column(vendor_store_id);size(48)" json:"vendorStoreID"`
|
||||
VendorStatus int `json:"vendor_status"` // 取值同Store.Status
|
||||
DeliveryFee int `json:"deliveryFee"`
|
||||
SyncStatus int8 `orm:"default(2)" json:"syncStatus"`
|
||||
model.Place // district info
|
||||
|
||||
PricePercentage int16 `orm:"default(100)" json:"pricePercentage"` // todo 厂商价格相对于本地价格的百分比,这个字段的修改会比较特殊,因为可能需要刷新厂商价格
|
||||
AutoPickup int8 `orm:"default(1)" json:"autoPickup"` // 是否自动拣货
|
||||
DeliveryType int8 `orm:"default(0)" json:"deliveryType"` // 配送类型
|
||||
DeliveryCompetition int8 `orm:"default(1)" json:"deliveryCompetition"` // 是否支持配送竞争
|
||||
IsSync int8 `orm:"default(1)" json:"isSync"` // 是否同步
|
||||
|
||||
model.Place // district info
|
||||
}
|
||||
|
||||
func GetStoreDetail(db *DaoDB, storeID, vendorID int) (storeDetail *StoreDetail, err error) {
|
||||
sql := `
|
||||
SELECT t2.status vendor_status, t2.vendor_store_id, t2.sync_status, district.*, t1.*
|
||||
SELECT t1.*,
|
||||
t2.vendor_store_id, t2.status vendor_status, t2.delivery_fee, t2.sync_status,
|
||||
t2.price_percentage, t2.auto_pickup, t2.delivery_type, t2.delivery_competition, t2.is_sync,
|
||||
district.*
|
||||
FROM store t1
|
||||
JOIN store_map t2 ON t1.id = t2.store_id AND t2.vendor_id = ? AND t2.deleted_at = ?
|
||||
LEFT JOIN place district ON t1.district_code = district.code
|
||||
|
||||
Reference in New Issue
Block a user