This commit is contained in:
苏尹岚
2021-02-03 16:09:31 +08:00
parent 5129eb9c64
commit 58411e0d85
3 changed files with 21 additions and 2 deletions

View File

@@ -8,6 +8,8 @@ import (
"strings" "strings"
"time" "time"
"git.rosy.net.cn/jx-callback/business/partner/purchase/ebai"
"git.rosy.net.cn/baseapi/utils/errlist" "git.rosy.net.cn/baseapi/utils/errlist"
"git.rosy.net.cn/jx-callback/globals/api2" "git.rosy.net.cn/jx-callback/globals/api2"
@@ -150,6 +152,7 @@ func InitServiceInfo(version string, buildTime time.Time, gitCommit string) {
"apiFunctionName": model.ApiFunctionName, "apiFunctionName": model.ApiFunctionName,
"vendorStatus": model.VendorStatus, "vendorStatus": model.VendorStatus,
"couponsStatus": model.CouponStatusName, "couponsStatus": model.CouponStatusName,
"ebaiSupplierID": ebai.EbaiSupplierIDMap,
}, },
} }
} }

View File

@@ -407,8 +407,8 @@ func GetStoreCategories(db *DaoDB, vendorID, storeID int, skuIDs []int, level in
LEFT JOIN store_sku_category_map t5p ON t4p.id = t5p.category_id AND t5.store_id = t5p.store_id AND t5p.deleted_at = ? LEFT JOIN store_sku_category_map t5p ON t4p.id = t5p.category_id AND t5.store_id = t5p.store_id AND t5p.deleted_at = ?
LEFT JOIN store_map t1 ON t1.store_id = t5.store_id AND t1.vendor_id = ? LEFT JOIN store_map t1 ON t1.store_id = t5.store_id AND t1.vendor_id = ?
LEFT JOIN store t6 ON t6.id = t5.store_id LEFT JOIN store t6 ON t6.id = t5.store_id
WHERE t5.store_id = ? AND t5.deleted_at = ? AND t4.is_sync <> ?` WHERE t5.store_id = ? AND t4.is_sync <> ?`
sqlParams = append(sqlParams, utils.DefaultTimeValue, utils.DefaultTimeValue, vendorID, storeID, utils.DefaultTimeValue, model.YES) sqlParams = append(sqlParams, utils.DefaultTimeValue, utils.DefaultTimeValue, vendorID, storeID, model.YES)
if mustDirty { if mustDirty {
sql += " AND t5.%s_sync_status <> 0" sql += " AND t5.%s_sync_status <> 0"
fieldPrefixParams = append(fieldPrefixParams, fieldPrefix) fieldPrefixParams = append(fieldPrefixParams, fieldPrefix)
@@ -417,6 +417,8 @@ func GetStoreCategories(db *DaoDB, vendorID, storeID int, skuIDs []int, level in
sql += " AND t4.level = ?" sql += " AND t4.level = ?"
sqlParams = append(sqlParams, level) sqlParams = append(sqlParams, level)
} }
fmt.Println(sql)
fmt.Println(sqlParams)
if err = GetRows(db, &cats, fmt.Sprintf(sql, fieldPrefixParams...), sqlParams...); err != nil { if err = GetRows(db, &cats, fmt.Sprintf(sql, fieldPrefixParams...), sqlParams...); err != nil {
return nil, err return nil, err
} }

View File

@@ -13,6 +13,20 @@ import (
"git.rosy.net.cn/jx-callback/globals/api" "git.rosy.net.cn/jx-callback/globals/api"
) )
const (
EbaiSupplierIDsc = "1486975681715"
EbaiSupplierIDc4 = "2233065879"
EbaiSupplierIDgy = "2267230126"
)
var (
EbaiSupplierIDMap = map[string]string{
EbaiSupplierIDsc: "饿百商超",
EbaiSupplierIDc4: "饿百好菜",
EbaiSupplierIDgy: "饿百果园",
}
)
var ( var (
CurPurchaseHandler *PurchaseHandler CurPurchaseHandler *PurchaseHandler
) )