category_name_origin有值才设置
This commit is contained in:
@@ -26,6 +26,7 @@ var (
|
|||||||
|
|
||||||
type RetailCategoryInfo struct {
|
type RetailCategoryInfo struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
Code string `json:"code"`
|
||||||
Sequence int `json:"sequence"`
|
Sequence int `json:"sequence"`
|
||||||
Level int `json:"level"`
|
Level int `json:"level"`
|
||||||
Children []*RetailCategoryInfo `json:"children"`
|
Children []*RetailCategoryInfo `json:"children"`
|
||||||
@@ -160,7 +161,7 @@ func (a *API) RetailCatUpdate2(poiCode, originCode, originName, code, name, seco
|
|||||||
|
|
||||||
if originCode != "" {
|
if originCode != "" {
|
||||||
params["category_code_origin"] = originCode
|
params["category_code_origin"] = originCode
|
||||||
} else {
|
} else if originName != "" {
|
||||||
params["category_name_origin"] = originName
|
params["category_name_origin"] = originName
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -411,6 +412,7 @@ func interface2Cat(data interface{}, level int) (cat *RetailCategoryInfo) {
|
|||||||
if ok {
|
if ok {
|
||||||
cat = &RetailCategoryInfo{
|
cat = &RetailCategoryInfo{
|
||||||
Name: utils.Interface2String(mapData["name"]),
|
Name: utils.Interface2String(mapData["name"]),
|
||||||
|
Code: utils.Interface2String(mapData["code"]),
|
||||||
Sequence: int(utils.Interface2Int64WithDefault(mapData["sequence"], 0)),
|
Sequence: int(utils.Interface2Int64WithDefault(mapData["sequence"], 0)),
|
||||||
Level: level,
|
Level: level,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user