ActStoreSkuParam2Model中没有关注的ActSkuFake时被零除的问题
This commit is contained in:
@@ -161,6 +161,7 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
|
||||
actSkuMap.ActualActPrice = 1
|
||||
}
|
||||
}
|
||||
if act.Type != model.ActSkuFake {
|
||||
if err2 := checkDiscountValidation(act.Type, int(actSkuMap.ActualActPrice*100/actSkuMap.VendorPrice)); err2 != nil {
|
||||
v.ErrMsg = err2.Error()
|
||||
v.ActualActPrice = actSkuMap.ActualActPrice
|
||||
@@ -170,6 +171,7 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
|
||||
actStoreSkuMapList = append(actStoreSkuMapList, actSkuMap)
|
||||
}
|
||||
}
|
||||
}
|
||||
wholeValidVendorMap[vendorID] = 1
|
||||
} else if !dao.IsNoRowsError(err) {
|
||||
return nil, nil, nil, err
|
||||
|
||||
Reference in New Issue
Block a user