mt sku
This commit is contained in:
@@ -650,7 +650,8 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku, isQueryMidPric
|
|||||||
t1.jds_stock_switch,
|
t1.jds_stock_switch,
|
||||||
t1.preparation_time,
|
t1.preparation_time,
|
||||||
t1.best_seller,
|
t1.best_seller,
|
||||||
t1.tiktok_attribute
|
t1.tiktok_attribute,
|
||||||
|
t1.mt_attribute
|
||||||
`
|
`
|
||||||
if isBySku {
|
if isBySku {
|
||||||
sqlData += " ,t2.id sku_id"
|
sqlData += " ,t2.id sku_id"
|
||||||
|
|||||||
@@ -182,6 +182,11 @@ func UpdateSkuNameTiktokBrandName(db *DaoDB, upc, brandName, brandId string) {
|
|||||||
ExecuteSQL(db, sql, []interface{}{brandName, brandId, upc}...)
|
ExecuteSQL(db, sql, []interface{}{brandName, brandId, upc}...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UpdateSkuNameMtAttr(db *DaoDB, id int64, attr string) {
|
||||||
|
sql := ` UPDATE sku_name SET mt_attribute = ? WHERE id = ? `
|
||||||
|
ExecuteSQL(db, sql, []interface{}{attr, id}...)
|
||||||
|
}
|
||||||
|
|
||||||
func GetSkuNames(db *DaoDB, nameIDs []int, upcs []string, name string, isExd bool) (skuNameList []*model.SkuName, err error) {
|
func GetSkuNames(db *DaoDB, nameIDs []int, upcs []string, name string, isExd bool) (skuNameList []*model.SkuName, err error) {
|
||||||
sql := `
|
sql := `
|
||||||
SELECT t1.*
|
SELECT t1.*
|
||||||
|
|||||||
@@ -3,10 +3,11 @@ package dao
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
beego "github.com/astaxie/beego/server/web"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
beego "github.com/astaxie/beego/server/web"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||||
"git.rosy.net.cn/jx-callback/business/model"
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
"git.rosy.net.cn/jx-callback/globals/refutil"
|
"git.rosy.net.cn/jx-callback/globals/refutil"
|
||||||
@@ -108,6 +109,7 @@ type StoreSkuSyncInfo struct {
|
|||||||
SellCities []string
|
SellCities []string
|
||||||
NameCategoryID int `orm:"column(name_category_id)"`
|
NameCategoryID int `orm:"column(name_category_id)"`
|
||||||
TiktokAttribute string `orm:"column(tiktok_attribute)"`
|
TiktokAttribute string `orm:"column(tiktok_attribute)"`
|
||||||
|
MtAttribute string `orm:"column(mt_attribute)"`
|
||||||
YbNameSuffix string //银豹的商品条码后缀
|
YbNameSuffix string //银豹的商品条码后缀
|
||||||
YbBarCode string //银豹的商品条码
|
YbBarCode string //银豹的商品条码
|
||||||
JdsStockSwitch int
|
JdsStockSwitch int
|
||||||
@@ -578,7 +580,7 @@ func GetStoreSkus2(db *DaoDB, vendorID, storeID int, skuIDs []int, mustDirty boo
|
|||||||
%s vendor_sku_id, t1.%s_sync_status sku_sync_status, t1.%s_price vendor_price, t1.%s_lock_time lock_time,t1.vendor_son_sku_id,t1.vendor_sku_attr_id,t1.vendor_main_id,
|
%s vendor_sku_id, t1.%s_sync_status sku_sync_status, t1.%s_price vendor_price, t1.%s_lock_time lock_time,t1.vendor_son_sku_id,t1.vendor_sku_attr_id,t1.vendor_main_id,
|
||||||
t1.store_id, t1.deleted_at bind_deleted_at,t1.status_sale_begin,t1.status_sale_end, t1.jds_ware_id, t1.stock, t1.mt_ladder_box_price,
|
t1.store_id, t1.deleted_at bind_deleted_at,t1.status_sale_begin,t1.status_sale_end, t1.jds_ware_id, t1.stock, t1.mt_ladder_box_price,
|
||||||
t2.*,
|
t2.*,
|
||||||
t3.id name_id, t3.prefix, t3.name, t3.unit, t3.upc, t3.status name_status, t3.category_id name_category_id, t3.yb_name_suffix,t3.tiktok_attribute,
|
t3.id name_id, t3.prefix, t3.name, t3.unit, t3.upc, t3.status name_status, t3.category_id name_category_id, t3.yb_name_suffix,t3.tiktok_attribute,t3.mt_attribute,
|
||||||
t3.jds_stock_switch, t3.preparation_time, t3.img_watermark, t3.ex_vendor_id, t3.img img_origin,t3.upc_brand_name,t3.upc_tiktok_brand_id,
|
t3.jds_stock_switch, t3.preparation_time, t3.img_watermark, t3.ex_vendor_id, t3.img img_origin,t3.upc_brand_name,t3.upc_tiktok_brand_id,
|
||||||
IF(t11.%s <> '', t11.%s, t3.img) img,
|
IF(t11.%s <> '', t11.%s, t3.img) img,
|
||||||
IF(t12.%s <> '', t12.%s, t3.img2) img2,
|
IF(t12.%s <> '', t12.%s, t3.img2) img2,
|
||||||
@@ -708,7 +710,7 @@ func GetFullStoreSkus(db *DaoDB, vendorID, storeID int) (skus []*StoreSkuSyncInf
|
|||||||
t1.%s_sync_status sku_sync_status, t1.%s_price vendor_price, t1.%s_lock_time lock_time,
|
t1.%s_sync_status sku_sync_status, t1.%s_price vendor_price, t1.%s_lock_time lock_time,
|
||||||
t1.store_id, t1.deleted_at bind_deleted_at, t1.stock,
|
t1.store_id, t1.deleted_at bind_deleted_at, t1.stock,
|
||||||
t2.*, t2.id sku_id, t2m.vendor_thing_id vendor_sku_id,
|
t2.*, t2.id sku_id, t2m.vendor_thing_id vendor_sku_id,
|
||||||
t3.id name_id, t3.prefix, t3.name, t3.unit, t3.upc, t3.status name_status, t3.ex_prefix, t3.ex_prefix_begin, t3.ex_prefix_end, t3.category_id name_category_id,t3.tiktok_attribute,t3.upc_brand_name,t3.upc_tiktok_brand_id,
|
t3.id name_id, t3.prefix, t3.name, t3.unit, t3.upc, t3.status name_status, t3.ex_prefix, t3.ex_prefix_begin, t3.ex_prefix_end, t3.category_id name_category_id,t3.tiktok_attribute,t3.mt_attribute,t3.upc_brand_name,t3.upc_tiktok_brand_id,
|
||||||
IF(t11.%s <> '', t11.%s, t3.img) img,
|
IF(t11.%s <> '', t11.%s, t3.img) img,
|
||||||
IF(t12.%s <> '', t12.%s, t3.img2) img2,
|
IF(t12.%s <> '', t12.%s, t3.img2) img2,
|
||||||
IF(t13.%s <> '', t13.%s, t3.desc_img) desc_img,
|
IF(t13.%s <> '', t13.%s, t3.desc_img) desc_img,
|
||||||
|
|||||||
@@ -190,6 +190,7 @@ type SkuName struct {
|
|||||||
Video string `json:"video"` //商品视频地址
|
Video string `json:"video"` //商品视频地址
|
||||||
VideoID string `orm:"column(video_id)" json:"videoID"` //商品视频美团ID
|
VideoID string `orm:"column(video_id)" json:"videoID"` //商品视频美团ID
|
||||||
TiktokAttribute string `orm:"column(tiktok_attribute);size(1024)" json:"tiktokAttribute"` //抖音分类属性的存储
|
TiktokAttribute string `orm:"column(tiktok_attribute);size(1024)" json:"tiktokAttribute"` //抖音分类属性的存储
|
||||||
|
MtAttribute string `orm:"column(mt_attribute);size(1024)" json:"MtAttribute"` //美团分类属性的存储
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*SkuName) TableUnique() [][]string {
|
func (*SkuName) TableUnique() [][]string {
|
||||||
|
|||||||
@@ -175,6 +175,7 @@ func SetMessageDetail(req *JXMsg, vendorID int, elmAppID string) error {
|
|||||||
//生成京西消息ID detail
|
//生成京西消息ID detail
|
||||||
msgID := GenMsgDetailID(req, vendorID, elmAppID)
|
msgID := GenMsgDetailID(req, vendorID, elmAppID)
|
||||||
data, _ := json.Marshal(req)
|
data, _ := json.Marshal(req)
|
||||||
|
globals.SugarLogger.Debugf("SetMessageDetail data=%s", string(data))
|
||||||
err := rdb.RPush(msgID, string(data))
|
err := rdb.RPush(msgID, string(data))
|
||||||
ok, err := rdb.ExpireResult(msgID, ExpireTimeDay)
|
ok, err := rdb.ExpireResult(msgID, ExpireTimeDay)
|
||||||
if err != nil || !ok {
|
if err != nil || !ok {
|
||||||
@@ -198,6 +199,7 @@ func SetUserList(jxMsg *JXMsg, userList *UserMessageList, vendorID int, elmAppID
|
|||||||
}
|
}
|
||||||
//存储当前数据
|
//存储当前数据
|
||||||
data, _ := json.Marshal(userList)
|
data, _ := json.Marshal(userList)
|
||||||
|
globals.SugarLogger.Debugf("SetUserList data=%s", string(data))
|
||||||
err = rdb.RPush(msgID, string(data))
|
err = rdb.RPush(msgID, string(data))
|
||||||
ok, err := rdb.ExpireResult(msgID, ExpireTimeDay)
|
ok, err := rdb.ExpireResult(msgID, ExpireTimeDay)
|
||||||
if err != nil || !ok {
|
if err != nil || !ok {
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ package mtwm
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"regexp"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||||
@@ -12,8 +15,6 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/business/partner"
|
"git.rosy.net.cn/jx-callback/business/partner"
|
||||||
"git.rosy.net.cn/jx-callback/business/partner/putils"
|
"git.rosy.net.cn/jx-callback/business/partner/putils"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"regexp"
|
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -241,6 +242,34 @@ func (p *PurchaseHandler) DeleteStoreCategory(ctx *jxcontext.Context, storeID in
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetCategoryAttrList 根据末级类目id获取类目属性列表
|
||||||
|
func GetCategoryAttrList(appOrgCode string, tagID int) (categoryAttrListResult []*mtwmapi.CategoryAttrListResult, err error) {
|
||||||
|
if resp, err := getAPI(appOrgCode, 0, "").CategoryAttrList(int64(tagID)); err == nil {
|
||||||
|
return resp, nil
|
||||||
|
}
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
//GetCategoryAttrValueList 查询特殊属性的属性值列表
|
||||||
|
func GetCategoryAttrValueList(appOrgCode, keyword string, attrID int) (categoryAttrValueListResult []*mtwmapi.CategoryAttrValueListResult, err error) {
|
||||||
|
if attrID != utils.Str2Int(mtwmapi.SpecialAttrBrand) && attrID != utils.Str2Int(mtwmapi.SpecialAttrProducer) || len(keyword) == 0 || len(appOrgCode) == 0 {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
if resp, err := getAPI(appOrgCode, 0, "").CategoryAttrValueList(int64(attrID), keyword); err == nil {
|
||||||
|
return resp, nil
|
||||||
|
}
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRetailRecommendTag 根据商品UPC或名称或类目ID查询平台推荐类目及类目属性信息
|
||||||
|
func GetRetailRecommendTag(appOrgCode, appPoiCode, name string, tagID, tagType int) (*mtwmapi.RetailRecommendTagResp, error) {
|
||||||
|
if resp, err := getAPI(appOrgCode, 0, "").RetailRecommendTag(name, appPoiCode, tagID, tagType); err == nil {
|
||||||
|
return resp, nil
|
||||||
|
} else {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//批量更新商品进货价
|
//批量更新商品进货价
|
||||||
func BatchSetRestockingPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, param []*mtwmapi.SpuData) error {
|
func BatchSetRestockingPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, param []*mtwmapi.SpuData) error {
|
||||||
if err := getAPI(getStoreVendorOrgCode(storeID), storeID, "").BatchSetRestockingPrice(ctx.GetTrackInfo(), vendorStoreID, param); err != nil {
|
if err := getAPI(getStoreVendorOrgCode(storeID), storeID, "").BatchSetRestockingPrice(ctx.GetTrackInfo(), vendorStoreID, param); err != nil {
|
||||||
@@ -323,7 +352,8 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
|||||||
foodData["min_order_count"] = 1
|
foodData["min_order_count"] = 1
|
||||||
}
|
}
|
||||||
foodData["unit"] = storeSku.Unit
|
foodData["unit"] = storeSku.Unit
|
||||||
attr := SwitchAttr(storeSku.VendorVendorCatID)
|
//todo 增加商品必填属性
|
||||||
|
attr := SwitchAttr(getAPI(getStoreVendorOrgCode(storeID), storeID, vendorStoreID), vendorStoreID, storeSku.VendorVendorCatID, storeSku.NameID, storeSku.Name, isCreate)
|
||||||
if attr != "" {
|
if attr != "" {
|
||||||
foodData["common_attr_value"] = attr
|
foodData["common_attr_value"] = attr
|
||||||
}
|
}
|
||||||
@@ -452,27 +482,92 @@ func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, v
|
|||||||
return failedList, err
|
return failedList, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func SwitchAttr(vendorCatID int64) (attrs string) {
|
// CommonAttrValue 类目对应属性值
|
||||||
switch vendorCatID {
|
type CommonAttrValue struct {
|
||||||
case 200002727:
|
AttrID int `json:"attr_id"` //普通属性Id
|
||||||
return mtwmapi.MtwmSkuAttr200002727
|
AttrName string `json:"attr_name"` //普通属性名称
|
||||||
case 200001555:
|
ValueList []ValueList `json:"valueList"`
|
||||||
return mtwmapi.MtwmSkuAttr200001555
|
}
|
||||||
case 200002728:
|
type ValueList struct {
|
||||||
return mtwmapi.MtwmSkuAttr200002728
|
ValueID int `json:"value_id"` //普通属性值Id,当属性值录入方式为文本时,该参数无需上传;若该普通属性可扩展则支持自定义 1.负值 2.同一个商品的同一个普通属性内唯一
|
||||||
case 200001519, 200000592:
|
Value string `json:"value"` //普通属性值名称(与普通属性值Id一一对应),支持自定义。
|
||||||
return mtwmapi.MtwmSkuAttr200000592
|
}
|
||||||
case 200002704, 200002731:
|
|
||||||
return mtwmapi.MtwmSkuAttr200002731
|
func SwitchAttr(apiObj *mtwmapi.API, vendorStoreID string, vendorCatID int64, nameID int, name string, isNeed bool) (attrs string) {
|
||||||
case 200002716:
|
var (
|
||||||
return mtwmapi.MtwmSkuAttr200002716
|
db *dao.DaoDB
|
||||||
case 200002667, 200002713, 200002670:
|
tempCatID int64
|
||||||
return mtwmapi.MtwmSkuAttr200002670
|
attrValue CommonAttrValue
|
||||||
case 200002680:
|
attrValues []CommonAttrValue
|
||||||
return mtwmapi.MtwmSkuAttr200002680
|
)
|
||||||
default:
|
if isNeed == false && nameID != 0 { //是否为纯创建
|
||||||
return ""
|
if tData, err := dao.GetSkuNames(db, []int{nameID}, nil, "", false); err == nil && len(tData) > 0 {
|
||||||
|
if tData[0].MtAttribute != "[]" && tData[0].MtAttribute != "{}" && tData[0].MtAttribute != "" {
|
||||||
|
return tData[0].MtAttribute
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if vendorCatID == 0 { //创建商品时无分类,使用推荐分类
|
||||||
|
if comTag, err := apiObj.RetailRecommendTag(name, vendorStoreID, 0, mtwmapi.TypeCategory); err == nil && comTag.TagID != 0 {
|
||||||
|
tempCatID = int64(comTag.TagID)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tempCatID = vendorCatID
|
||||||
|
}
|
||||||
|
//根据类目id获取类目属性列表
|
||||||
|
if attrList, err := apiObj.CategoryAttrList(tempCatID); err == nil && len(attrList) > 0 {
|
||||||
|
for _, v := range attrList {
|
||||||
|
if v.Need == mtwmapi.NeedYes {
|
||||||
|
attrValue = CommonAttrValue{
|
||||||
|
AttrID: utils.Str2Int(v.AttrID),
|
||||||
|
AttrName: v.AttrName,
|
||||||
|
}
|
||||||
|
if v.AttrID == mtwmapi.SpecialAttrBrand || v.AttrID == mtwmapi.SpecialAttrProducer { //单独获取特殊属性
|
||||||
|
if data, err1 := apiObj.CategoryAttrValueList(utils.Str2Int64(v.AttrID), name); err1 == nil && len(data) > 0 {
|
||||||
|
attrValue.ValueList = []ValueList{{ //默认取推荐第一个
|
||||||
|
ValueID: utils.Str2Int(data[0].ValueID),
|
||||||
|
Value: data[0].Value,
|
||||||
|
}}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if len(v.ValueList) > 0 {
|
||||||
|
attrValue.ValueList = []ValueList{{
|
||||||
|
ValueID: utils.Str2Int(v.ValueList[0].ValueID),
|
||||||
|
Value: v.ValueList[0].Value,
|
||||||
|
}}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
attrValues = append(attrValues, attrValue)
|
||||||
|
temp, _ := json.Marshal(attrValues)
|
||||||
|
attrs = string(temp)
|
||||||
|
globals.SugarLogger.Debugf("SwitchAttr attrValues=%s", utils.Format4Output(attrValues, false))
|
||||||
|
} else {
|
||||||
|
switch vendorCatID { //兜底处理
|
||||||
|
case 200002727:
|
||||||
|
attrs = mtwmapi.MtwmSkuAttr200002727
|
||||||
|
case 200001555:
|
||||||
|
attrs = mtwmapi.MtwmSkuAttr200001555
|
||||||
|
case 200002728:
|
||||||
|
attrs = mtwmapi.MtwmSkuAttr200002728
|
||||||
|
case 200001519, 200000592:
|
||||||
|
attrs = mtwmapi.MtwmSkuAttr200000592
|
||||||
|
case 200002704, 200002731:
|
||||||
|
attrs = mtwmapi.MtwmSkuAttr200002731
|
||||||
|
case 200002716:
|
||||||
|
attrs = mtwmapi.MtwmSkuAttr200002716
|
||||||
|
case 200002667, 200002713, 200002670:
|
||||||
|
attrs = mtwmapi.MtwmSkuAttr200002670
|
||||||
|
case 200002680:
|
||||||
|
attrs = mtwmapi.MtwmSkuAttr200002680
|
||||||
|
default:
|
||||||
|
attrs = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//更新进数据库
|
||||||
|
dao.UpdateSkuNameMtAttr(db, int64(nameID), attrs)
|
||||||
|
globals.SugarLogger.Debugf("SwitchAttr attrs=%s", utils.Format4Output(attrs, false))
|
||||||
return attrs
|
return attrs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
package controllers
|
package controllers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"git.rosy.net.cn/jx-callback/business/partner/purchase/mtwm"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||||
@@ -11,8 +16,6 @@ import (
|
|||||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/tiktok_store"
|
"git.rosy.net.cn/jx-callback/business/partner/purchase/tiktok_store"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"github.com/astaxie/beego/server/web"
|
"github.com/astaxie/beego/server/web"
|
||||||
"strings"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type SkuController struct {
|
type SkuController struct {
|
||||||
@@ -790,6 +793,37 @@ func (c *SkuController) GetTiktokCategoryValue() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Title 根据美团分类id获取平台属性值
|
||||||
|
// @Description 根据美团分类id获取平台属性值
|
||||||
|
// @Param token header string true "认证token"
|
||||||
|
// @Param appOrgCode query string true "美团app"
|
||||||
|
// @Param categoryId query int64 true "美团类目id"
|
||||||
|
// @Success 200 {object} controllers.CallResult
|
||||||
|
// @Failure 200 {object} controllers.CallResult
|
||||||
|
// @router /GetMTCategoryAttrList [get]
|
||||||
|
func (c *SkuController) GetMTCategoryAttrList() {
|
||||||
|
c.callGetMTCategoryAttrList(func(params *tSkuGetMTCategoryAttrListParams) (interface{}, string, error) {
|
||||||
|
data, err := mtwm.GetCategoryAttrList(params.AppOrgCode, params.CategoryId)
|
||||||
|
return data, "", err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Title 根据美团属性id 查询特殊属性(品牌、产地)
|
||||||
|
// @Description 根据美团属性id 查询特殊属性(品牌、产地)
|
||||||
|
// @Param token header string true "认证token"
|
||||||
|
// @Param appOrgCode query string true "美团app"
|
||||||
|
// @Param attrId query int64 true "属性id"
|
||||||
|
// @Param keyword query string true "属性值的关键词"
|
||||||
|
// @Success 200 {object} controllers.CallResult
|
||||||
|
// @Failure 200 {object} controllers.CallResult
|
||||||
|
// @router /GetMTCategoryAttrValueList [get]
|
||||||
|
func (c *SkuController) GetMTCategoryAttrValueList() {
|
||||||
|
c.callGetMTCategoryAttrValueList(func(params *tSkuGetMTCategoryAttrValueListParams) (interface{}, string, error) {
|
||||||
|
data, err := mtwm.GetCategoryAttrValueList(params.AppOrgCode, params.Keyword, params.AttrId)
|
||||||
|
return data, "", err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// @Title 更新美团到京东分类映射
|
// @Title 更新美团到京东分类映射
|
||||||
// @Description 更新美团到京东分类映射
|
// @Description 更新美团到京东分类映射
|
||||||
// @Param token header string true "认证token"
|
// @Param token header string true "认证token"
|
||||||
|
|||||||
@@ -1953,6 +1953,24 @@ func init() {
|
|||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|
||||||
|
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"],
|
||||||
|
web.ControllerComments{
|
||||||
|
Method: "GetMTCategoryAttrList",
|
||||||
|
Router: `/GetMTCategoryAttrList`,
|
||||||
|
AllowHTTPMethods: []string{"get"},
|
||||||
|
MethodParams: param.Make(),
|
||||||
|
Filters: nil,
|
||||||
|
Params: nil})
|
||||||
|
|
||||||
|
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"],
|
||||||
|
web.ControllerComments{
|
||||||
|
Method: "GetMTCategoryAttrValueList",
|
||||||
|
Router: `/GetMTCategoryAttrValueList`,
|
||||||
|
AllowHTTPMethods: []string{"get"},
|
||||||
|
MethodParams: param.Make(),
|
||||||
|
Filters: nil,
|
||||||
|
Params: nil})
|
||||||
|
|
||||||
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"],
|
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:SkuController"],
|
||||||
web.ControllerComments{
|
web.ControllerComments{
|
||||||
Method: "UpdateMtCatToJd",
|
Method: "UpdateMtCatToJd",
|
||||||
|
|||||||
Reference in New Issue
Block a user