修改问题

This commit is contained in:
Rosy-zhudan
2019-08-30 16:59:46 +08:00
parent 02bb89d67d
commit b9ec8067ac
5 changed files with 11 additions and 4 deletions

View File

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

View File

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

View File

@@ -49,7 +49,7 @@ const (
FieldActID = "ActID"
FieldVendorActID = "VendorActID"
FieldSkuSeq = "seq"
FieldSkuSeq = "Seq"
)
type ModelIDCUL struct {

View File

@@ -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())
}
// 饿百的排序是从大到小

View File

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