This commit is contained in:
gazebo
2018-08-23 21:07:29 +08:00
parent dc3a14b448
commit 7352ca409a
6 changed files with 79 additions and 5 deletions

View File

@@ -0,0 +1,33 @@
package skuman
import (
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/business/model/dao"
)
const (
defJdCategoryID = 20462
)
type Sku struct {
*model.Sku
}
func New(sku *model.Sku) *Sku {
return &Sku{
Sku: sku,
}
}
func GetJdCategoryID(sku *model.Sku) int {
cat, _ := dao.GetCategory(sku.CategoryID, nil)
jdCategoryID := defJdCategoryID
if cat != nil && cat.JdCategoryID != 0 {
jdCategoryID = cat.JdCategoryID
}
return jdCategoryID
}
func GetCategories(sku *model.Sku) []int {
return nil
}