测试折扣活动
This commit is contained in:
@@ -238,7 +238,11 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
|
||||
if storeSkuInfo != nil {
|
||||
jxPrice := storeSkuInfo.Price
|
||||
actSkuMap.VendorPrice = int64(getVendorPriceFromStoreSkuBind(storeSkuInfo, vendorID))
|
||||
v.OriginalPrice = int64(jxPrice)
|
||||
if act.Type == model.ActSkuDiscount {
|
||||
v.OriginalPrice = int64(storeSkuInfo.JxPrice)
|
||||
} else {
|
||||
v.OriginalPrice = int64(jxPrice)
|
||||
}
|
||||
}
|
||||
var err2 error
|
||||
if act.Type != model.ActSkuFake { // 非结算,要计算实际活动价格
|
||||
@@ -1510,6 +1514,8 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) {
|
||||
db = dao.GetDB()
|
||||
pageSize = 9999
|
||||
)
|
||||
globals.SugarLogger.Debug("ChangeJxPriceByDiscountAct begin:")
|
||||
fmt.Println("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111")
|
||||
page, err := dao.QueryActs(db, 0, 0, pageSize, -1, "", model.VendorIDJX, []int{model.YES}, []int{model.ActSkuDiscount}, nil, 0, nil, 0, utils.ZeroTimeValue, utils.ZeroTimeValue, time.Now().AddDate(0, -3, 0), time.Now())
|
||||
if err != nil {
|
||||
return
|
||||
@@ -1517,6 +1523,7 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) {
|
||||
if len(page.Data) == 0 {
|
||||
return
|
||||
}
|
||||
fmt.Println("122222222222222222222222222222222222222222222222222222222222222222222222222222", utils.Format4Output(page.Data, false))
|
||||
for _, act := range page.Data {
|
||||
_, actStoreSkus, _ := dao.GetActStoreSkuVendorList(db, act.ID, nil, nil, nil, "", 0, pageSize)
|
||||
if len(actStoreSkus) == 0 {
|
||||
@@ -1538,6 +1545,7 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) {
|
||||
if storeSku.Stock == 0 {
|
||||
continue
|
||||
}
|
||||
fmt.Println("33333333333333333333333333333333333333333333333333333333333333", utils.Format4Output(actStoreSku, false))
|
||||
actualStockOut, err = dao.GetOrderStoreSkusCount(db, actStoreSku.StoreID, actStoreSku.SkuID, time.Now().Add(-time.Minute*10), time.Now())
|
||||
dao.Begin(db)
|
||||
defer func() {
|
||||
|
||||
Reference in New Issue
Block a user