整错了

This commit is contained in:
苏尹岚
2020-08-18 16:42:32 +08:00
parent f87efb7484
commit 37b2ddc358
2 changed files with 11 additions and 15 deletions

View File

@@ -238,11 +238,7 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
if storeSkuInfo != nil {
jxPrice := storeSkuInfo.Price
actSkuMap.VendorPrice = int64(getVendorPriceFromStoreSkuBind(storeSkuInfo, vendorID))
if act.Type == model.ActSkuDiscount {
v.OriginalPrice = int64(storeSkuInfo.JxPrice)
} else {
v.OriginalPrice = int64(jxPrice)
}
v.OriginalPrice = int64(jxPrice)
}
var err2 error
if act.Type != model.ActSkuFake { // 非结算,要计算实际活动价格
@@ -1528,16 +1524,16 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) {
continue
}
for _, actStoreSku2 := range actStoreSkus {
actStoreSku := &model.ActStoreSku{
actStoreSkuMap := &model.ActStoreSkuMap{
ModelIDCULD: model.ModelIDCULD{
ID: actStoreSku2.ID,
ID: actStoreSku2.MapID,
},
ActID: actStoreSku2.ActID,
OriginalPrice: actStoreSku2.OriginalPrice,
StoreID: actStoreSku2.StoreID,
SkuID: actStoreSku2.SkuID,
TrendPrcie: actStoreSku2.TrendPrcie,
TrendType: actStoreSku2.TrendType,
// ActID: actStoreSku2.ActID,
// OriginalPrice: actStoreSku2.OriginalPrice,
// StoreID: actStoreSku2.StoreID,
// SkuID: actStoreSku2.SkuID,
// TrendPrcie: actStoreSku2.TrendPrcie,
// TrendType: actStoreSku2.TrendType,
}
storeSkus, _ := dao.GetStoresSkusInfo(db, []int{actStoreSku.StoreID}, []int{actStoreSku.SkuID})
if len(storeSkus) == 0 {

View File

@@ -160,8 +160,6 @@ type ActStoreSku struct {
ActPrice int64 `orm:"" json:"actPrice"` // 单品级活动用SKU级指定的价格非0覆盖CustomPricePercentage与Act中的PricePercentage
EarningPrice int64 `json:"earningPrice"` // 活动商品设置,结算给门店老板的钱
Stock int `orm:"" json:"stock"` // 活动库存
TrendType int `json:"trendType"` //折扣活动使用涨跌趋势1为涨2为跌0为不动
TrendPrcie int `json:"trendPrice"` //涨跌具体多少
}
func (*ActStoreSku) TableUnique() [][]string {
@@ -184,6 +182,8 @@ type ActStoreSkuMap struct {
VendorPrice int64 `json:"vendorPrice"` // 创建活动时的平台价格
ActualActPrice int64 `json:"actualActPrice"` // 单品级活动用,创建活动时商品的活动价格
EarningPrice int64 `json:"earningPrice"` // 活动商品设置,结算给门店老板的钱
TrendType int `json:"trendType"` //折扣活动使用涨跌趋势1为涨2为跌0为不动
TrendPrcie int `json:"trendPrice"` //涨跌具体多少
}
func (*ActStoreSkuMap) TableUnique() [][]string {