tomap
This commit is contained in:
@@ -9,6 +9,8 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/netprinter"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"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/api"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
@@ -1518,9 +1520,29 @@ func (c *StoreController) GetDDScope() {
|
||||
func (c *StoreController) CreateDDStoreFence() {
|
||||
c.callCreateDDStoreFence(func(params *tStoreCreateDDStoreFenceParams) (retVal interface{}, errCode string, err error) {
|
||||
payload := make(map[string]map[string]string)
|
||||
if err = utils.UnmarshalUseNumber([]byte(params.Payload), &payload); err == nil {
|
||||
retVal, err = cms.AssistCreateFence(payload)
|
||||
info := make(map[string]map[string]string)
|
||||
if result, err := utils.Unmarshal2Map([]byte(params.Payload), &payload); err == nil {
|
||||
for i, j := range result {
|
||||
if temp, err := tiktok_store.ToMap(j); err != nil {
|
||||
globals.SugarLogger.Debugf("tomap err==============%v", err)
|
||||
return nil, "", err
|
||||
} else {
|
||||
for k, v := range temp {
|
||||
info[i] = map[string]string{utils.Int2Str(k): v}
|
||||
}
|
||||
}
|
||||
}
|
||||
retVal, err = cms.AssistCreateFence(info)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 批量创建抖店包邮运费模板
|
||||
// @Description 批量创建抖店包邮运费模板
|
||||
// @Param token header string true "认证token"
|
||||
// @Param shipFee formData int true "包邮金额"
|
||||
// @Param payload formData string true "json数据,[]string对象"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /CreateFreeShipTemplates [post]
|
||||
|
||||
Reference in New Issue
Block a user