This commit is contained in:
richboo111
2023-07-07 18:05:14 +08:00
parent b3ae42fc6d
commit 824b3c1850

View File

@@ -20,7 +20,7 @@ import (
"git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals"
) )
func actType2Txd(actType int) *int64 { func actType2Txd(actType int) int64 {
if actType == model.ActSkuDirectDown { if actType == model.ActSkuDirectDown {
actType = tao_vegetable.DiscountTypeDeductMoney actType = tao_vegetable.DiscountTypeDeductMoney
} else if actType == model.ActSkuSecKill { } else if actType == model.ActSkuSecKill {
@@ -28,7 +28,7 @@ func actType2Txd(actType int) *int64 {
} else if actType == model.ActSkuDiscount { } else if actType == model.ActSkuDiscount {
actType = tao_vegetable.DiscountTypeDiscounts actType = tao_vegetable.DiscountTypeDiscounts
} }
return utils.Int64ToPointer(int64(actType)) return int64(actType)
} }
func actOrderRules2Mtwm(actOrderRules []*model.ActOrderRule) (actDetails []*mtwmapi.FullDiscountActDetail) { func actOrderRules2Mtwm(actOrderRules []*model.ActOrderRule) (actDetails []*mtwmapi.FullDiscountActDetail) {
@@ -51,7 +51,7 @@ func act2TxdActivity(act *model.Act2) (activity *domain.AlibabaRetailMarketingIt
Description: &act.Advertising, Description: &act.Advertising,
Terminals: &[]int32{tao_vegetable.TerminalsAPP}, Terminals: &[]int32{tao_vegetable.TerminalsAPP},
//StoreIds: &[]string{act.s}, //StoreIds: &[]string{act.s},
DiscountType: actType2Txd(act.Type), DiscountType: utils.Int64ToPointer(actType2Txd(act.Type)),
StartTime: utils.Int64ToPointer(act.BeginAt.UnixNano() / int64(time.Millisecond)), StartTime: utils.Int64ToPointer(act.BeginAt.UnixNano() / int64(time.Millisecond)),
EndTime: utils.Int64ToPointer(act.EndAt.UnixNano() / int64(time.Millisecond)), EndTime: utils.Int64ToPointer(act.EndAt.UnixNano() / int64(time.Millisecond)),
} }
@@ -103,7 +103,7 @@ func storeSku2ActData(act *model.Act2, actStoreSku []*model.ActStoreSku2, handle
OutActId: utils.String2Pointer(utils.Int2Str(v.ActID)), OutActId: utils.String2Pointer(utils.Int2Str(v.ActID)),
} }
sType := *actType2Txd(v.Type) sType := actType2Txd(v.Type)
globals.SugarLogger.Debugf("sType=%d", sType) globals.SugarLogger.Debugf("sType=%d", sType)
switch sType { switch sType {
case tao_vegetable.DiscountTypeDeductMoney: case tao_vegetable.DiscountTypeDeductMoney: