银豹创建商品测试,新增查询api

This commit is contained in:
苏尹岚
2020-03-23 16:41:59 +08:00
parent b4502545d5
commit c0e580ccd3
3 changed files with 158 additions and 6 deletions

View File

@@ -46,6 +46,9 @@ type StoreDetail struct {
JdStoreLevel string `json:"jdStoreLevel"` //京东门店等级
IsOrder int `json:"isOrder"` //是否是下预订单门店
YbAppID string `orm:"column(yb_app_id)" json:"ybAppID"`
YbAppKey string `json:"ybAppKey"`
}
// 带快递门店信息的
@@ -89,7 +92,7 @@ func getStoreDetail(db *DaoDB, storeID, vendorID int, vendorStoreID string) (sto
sql := `
SELECT t1.*,
t2.vendor_store_id, t2.status vendor_status, t2.delivery_fee_deduction_sill, t2.delivery_fee_deduction_fee, t2.sync_status, t2.vendor_org_code,
t2.price_percentage, t2.auto_pickup, t2.delivery_type, t2.delivery_competition, t2.is_sync, t2.vendor_store_name, t2.is_order,
t2.price_percentage, t2.auto_pickup, t2.delivery_type, t2.delivery_competition, t2.is_sync, t2.vendor_store_name, t2.is_order, t2.yb_app_id, t2.yb_app_key,
t3.value price_percentage_pack_str,
t4.value freight_deduction_pack_str,
district.name district_name,

View File

@@ -109,9 +109,6 @@ type StoreSkuSyncInfo struct {
ActPercentage int `json:"actPercentage"` // 直降活动百分比
ActSyncStatus int8 `orm:"default(2)" json:"actSyncStatus"`
VendorActPrice int64 `json:"vendorActPrice"` // 保存数据用,实际的活动价
YbAppID string `orm:"column(yb_app_id)" json:"ybAppID"` //银豹对应门店的appID
YbAppKey string `json:"ybAppKey"` //银豹对应门店的appkey
}
type MissingStoreSkuInfo struct {
@@ -389,7 +386,7 @@ func GetStoreSkus2(db *DaoDB, vendorID, storeID int, skuIDs []int, mustDirty boo
}
sql := `
SELECT
t14.vendor_id, t14.vendor_org_code, t14.yb_app_id, t14.yb_app_key,
t14.vendor_id, t14.vendor_org_code,
t1.id bind_id, t1.sku_id, t1.price, t1.unit_price, t1.status store_sku_status,
%s vendor_sku_id, t1.%s_sync_status sku_sync_status, t1.%s_price vendor_price, t1.%s_lock_time lock_time,
t1.store_id, t1.deleted_at bind_deleted_at,t1.status_sale_begin,t1.status_sale_end,