修改问题
This commit is contained in:
@@ -1064,7 +1064,7 @@ func SortCategorySkus(ctx *jxcontext.Context, catID int, skuIDList []int) (err e
|
||||
|
||||
dao.Begin(db)
|
||||
defer func() {
|
||||
if r := recover(); r != nil || err != nil {
|
||||
if r := recover(); r != nil {
|
||||
dao.Rollback(db)
|
||||
if r != nil {
|
||||
panic(r)
|
||||
|
||||
@@ -526,3 +526,10 @@ func GetExistingStoreSkuNameInfo(db *DaoDB, storeIDs, skuNameIDs []int) (storeSk
|
||||
err = GetRows(db, &storeSkuNameList, sql, sqlParams...)
|
||||
return storeSkuNameList, err
|
||||
}
|
||||
|
||||
func (s *StoreSkuSyncInfo) GetSeq() int {
|
||||
if s.Seq > 0 {
|
||||
return s.Seq
|
||||
}
|
||||
return int(s.VendorPrice)
|
||||
}
|
||||
@@ -49,7 +49,7 @@ const (
|
||||
FieldActID = "ActID"
|
||||
FieldVendorActID = "VendorActID"
|
||||
|
||||
FieldSkuSeq = "seq"
|
||||
FieldSkuSeq = "Seq"
|
||||
)
|
||||
|
||||
type ModelIDCUL struct {
|
||||
|
||||
@@ -284,7 +284,7 @@ func getEbaiCat(catID int64, level int) int64 {
|
||||
|
||||
// 饿百的排序是从大到小
|
||||
func genSkuCatRank(storeSku *dao.StoreSkuSyncInfo) int {
|
||||
return int(ebaiapi.MaxSkuCatRank - storeSku.Seq)
|
||||
return int(ebaiapi.MaxSkuCatRank - storeSku.GetSeq())
|
||||
}
|
||||
|
||||
// 饿百的排序是从大到小
|
||||
|
||||
@@ -171,7 +171,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
if storeSku.DescImg != "" {
|
||||
foodData["picture_contents"] = storeSku.DescImg
|
||||
}
|
||||
foodData["sequence"] = storeSku.Seq
|
||||
foodData["sequence"] = storeSku.GetSeq()
|
||||
if storeSku.VendorVendorCatID != 0 {
|
||||
foodData["tag_id"] = utils.Int64ToStr(storeSku.VendorVendorCatID)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user