- 避免饿百网页上拉下来的活动重名
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package ebai
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
@@ -73,7 +74,7 @@ func (c *PurchaseHandler) GetPageActList(ctx *jxcontext.Context, createdFrom tim
|
||||
if utils.Timestamp2Time(ebaiAct.CreateTime).Sub(createdFrom) > 0 {
|
||||
act := &model.Act2{
|
||||
Act: model.Act{
|
||||
Name: ebaiAct.ActivityName,
|
||||
Name: fmt.Sprintf("%s-%s", ebaiAct.ActivityName, ebaiAct.ActivityID),
|
||||
Type: ebaiPageActType2Jx(ebaiAct.ActivityType),
|
||||
Status: ebaiPageActStatus2Jx(ebaiAct.Status),
|
||||
Source: ebaiAct.User,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package jd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
@@ -328,7 +329,8 @@ func getActFromJD(promotionID string) (act *model.Act2, actStoreSkuList []*model
|
||||
result, err := api.JdAPI.QueryPromotionInfo(utils.Str2Int64(promotionID))
|
||||
if err == nil && len(result.SkuResultList) > 0 {
|
||||
act = &model.Act2{
|
||||
Act: model.Act{Name: result.Source + "-" + utils.Int64ToStr(result.PromotionInfoID),
|
||||
Act: model.Act{
|
||||
Name: fmt.Sprintf("%s-%d", result.Source, result.PromotionInfoID),
|
||||
Type: jdSkuActType2Jx(result.PromotionType),
|
||||
Status: jdSkuActStatus2Jx(result.PromotionState),
|
||||
BeginAt: result.SkuResultList[0].BeginTime.GoTime(),
|
||||
|
||||
Reference in New Issue
Block a user