- trim 来源 for jd promotion
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"encoding/gob"
|
"encoding/gob"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/platformapi/jdapi"
|
"git.rosy.net.cn/baseapi/platformapi/jdapi"
|
||||||
@@ -955,8 +956,9 @@ func createLocalPromotionFromRemote(promotionInfoId int64) (retVal *jdapi.Callba
|
|||||||
}
|
}
|
||||||
// globals.SugarLogger.Debugf("jxStoreIDs:%s", utils.Format4Output(jxStoreIDs, false))
|
// globals.SugarLogger.Debugf("jxStoreIDs:%s", utils.Format4Output(jxStoreIDs, false))
|
||||||
// globals.SugarLogger.Debugf("priceList:%s", utils.Format4Output(priceList, false))
|
// globals.SugarLogger.Debugf("priceList:%s", utils.Format4Output(priceList, false))
|
||||||
|
source := strings.Trim(result.Source, "来源")
|
||||||
promotionParams := &PromotionParams{
|
promotionParams := &PromotionParams{
|
||||||
Name: result.Source + "-" + utils.Int64ToStr(result.PromotionInfoId),
|
Name: source + "-" + utils.Int64ToStr(result.PromotionInfoId),
|
||||||
Advertising: "",
|
Advertising: "",
|
||||||
Type: result.PromotionType,
|
Type: result.PromotionType,
|
||||||
BeginAt: result.BeginTime,
|
BeginAt: result.BeginTime,
|
||||||
@@ -966,7 +968,7 @@ func createLocalPromotionFromRemote(promotionInfoId int64) (retVal *jdapi.Callba
|
|||||||
}
|
}
|
||||||
mapData := map[string]interface{}{
|
mapData := map[string]interface{}{
|
||||||
keyPromotionStatus: jd2jxPromotionStatusMap[result.PromotionState],
|
keyPromotionStatus: jd2jxPromotionStatusMap[result.PromotionState],
|
||||||
keyPromotionSource: result.Source,
|
keyPromotionSource: source,
|
||||||
}
|
}
|
||||||
if skuResult != nil {
|
if skuResult != nil {
|
||||||
mapData[keyLimitDaily] = skuResult.LimitDaily
|
mapData[keyLimitDaily] = skuResult.LimitDaily
|
||||||
|
|||||||
Reference in New Issue
Block a user