- temp.
This commit is contained in:
33
business/jxstore/skuman/skuman.go
Normal file
33
business/jxstore/skuman/skuman.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user