拼错了
This commit is contained in:
@@ -1531,7 +1531,7 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) {
|
|||||||
ActID: actStoreSku2.ActID,
|
ActID: actStoreSku2.ActID,
|
||||||
StoreID: actStoreSku2.StoreID,
|
StoreID: actStoreSku2.StoreID,
|
||||||
SkuID: actStoreSku2.SkuID,
|
SkuID: actStoreSku2.SkuID,
|
||||||
TrendPrcie: actStoreSku2.TrendPrcie,
|
TrendPrice: actStoreSku2.TrendPrice,
|
||||||
TrendType: actStoreSku2.TrendType,
|
TrendType: actStoreSku2.TrendType,
|
||||||
ActualActPrice: actStoreSku2.ActualActPrice,
|
ActualActPrice: actStoreSku2.ActualActPrice,
|
||||||
VendorPrice: actStoreSku2.VendorPrice,
|
VendorPrice: actStoreSku2.VendorPrice,
|
||||||
@@ -1602,8 +1602,8 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) {
|
|||||||
} else {
|
} else {
|
||||||
actStoreSkuMap.TrendType = model.TrendTypeNothing
|
actStoreSkuMap.TrendType = model.TrendTypeNothing
|
||||||
}
|
}
|
||||||
actStoreSkuMap.TrendPrcie = int(actualPrice)
|
actStoreSkuMap.TrendPrice = int(actualPrice)
|
||||||
if _, err = dao.UpdateEntity(db, actStoreSkuMap, "ActualActPrice", "TrendType", "TrendPrcie"); err != nil {
|
if _, err = dao.UpdateEntity(db, actStoreSkuMap, "ActualActPrice", "TrendType", "TrendPrice"); err != nil {
|
||||||
dao.Rollback(db)
|
dao.Rollback(db)
|
||||||
}
|
}
|
||||||
} else { //第二档时间内
|
} else { //第二档时间内
|
||||||
@@ -1620,7 +1620,7 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) {
|
|||||||
} else {
|
} else {
|
||||||
actStoreSkuMap.TrendType = model.TrendTypeDown
|
actStoreSkuMap.TrendType = model.TrendTypeDown
|
||||||
}
|
}
|
||||||
actStoreSkuMap.TrendPrcie = int(actualPrice)
|
actStoreSkuMap.TrendPrice = int(actualPrice)
|
||||||
// if _, err = dao.UpdateEntity(db, actStoreSkuMap, "TrendType", "TrendPrcie"); err != nil {
|
// if _, err = dao.UpdateEntity(db, actStoreSkuMap, "TrendType", "TrendPrcie"); err != nil {
|
||||||
// dao.Rollback(db)
|
// dao.Rollback(db)
|
||||||
// }
|
// }
|
||||||
@@ -1628,7 +1628,7 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) {
|
|||||||
if actStoreSkuMap.ActualActPrice <= minJxPrice {
|
if actStoreSkuMap.ActualActPrice <= minJxPrice {
|
||||||
actStoreSkuMap.ActualActPrice = minJxPrice
|
actStoreSkuMap.ActualActPrice = minJxPrice
|
||||||
}
|
}
|
||||||
if _, err = dao.UpdateEntity(db, actStoreSkuMap, "ActualActPrice", "TrendType", "TrendPrcie"); err != nil {
|
if _, err = dao.UpdateEntity(db, actStoreSkuMap, "ActualActPrice", "TrendType", "TrendPrice"); err != nil {
|
||||||
dao.Rollback(db)
|
dao.Rollback(db)
|
||||||
}
|
}
|
||||||
//22:00 恢复库存为100
|
//22:00 恢复库存为100
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ type ActStoreSkuMap struct {
|
|||||||
ActualActPrice int64 `json:"actualActPrice"` // 单品级活动用,创建活动时商品的活动价格
|
ActualActPrice int64 `json:"actualActPrice"` // 单品级活动用,创建活动时商品的活动价格
|
||||||
EarningPrice int64 `json:"earningPrice"` // 活动商品设置,结算给门店老板的钱
|
EarningPrice int64 `json:"earningPrice"` // 活动商品设置,结算给门店老板的钱
|
||||||
TrendType int `json:"trendType"` //折扣活动使用,涨跌趋势,1为涨,2为跌,0为不动
|
TrendType int `json:"trendType"` //折扣活动使用,涨跌趋势,1为涨,2为跌,0为不动
|
||||||
TrendPrcie int `json:"trendPrice"` //涨跌具体多少
|
TrendPrice int `json:"trendPrice"` //涨跌具体多少
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*ActStoreSkuMap) TableUnique() [][]string {
|
func (*ActStoreSkuMap) TableUnique() [][]string {
|
||||||
@@ -229,7 +229,7 @@ type ActStoreSku2 struct {
|
|||||||
SpecUnit string `json:"-"`
|
SpecUnit string `json:"-"`
|
||||||
Comment string `json:"-"`
|
Comment string `json:"-"`
|
||||||
TrendType int `json:"trendType"` //折扣活动使用,涨跌趋势,1为涨,2为跌,0为不动
|
TrendType int `json:"trendType"` //折扣活动使用,涨跌趋势,1为涨,2为跌,0为不动
|
||||||
TrendPrcie int `json:"trendPrice"` //涨跌具体多少
|
TrendPrice int `json:"trendPrice"` //涨跌具体多少
|
||||||
}
|
}
|
||||||
|
|
||||||
type StoreSkuAct struct {
|
type StoreSkuAct struct {
|
||||||
|
|||||||
@@ -1369,7 +1369,7 @@ func UpdateActPrice4StoreSkuNameNew(db *DaoDB, storeIDs, skuIDs []int, skuNamesI
|
|||||||
v.ActType = actStoreSku.Type
|
v.ActType = actStoreSku.Type
|
||||||
v.EarningPrice = int(jxutils.CaculateSkuEarningPrice(int64(v.BindPrice), int64(v.ActPrice), skuName.PayPercentage))
|
v.EarningPrice = int(jxutils.CaculateSkuEarningPrice(int64(v.BindPrice), int64(v.ActPrice), skuName.PayPercentage))
|
||||||
v.TrendType = actStoreSku.TrendType
|
v.TrendType = actStoreSku.TrendType
|
||||||
v.TrendPrice = actStoreSku.TrendPrcie
|
v.TrendPrice = actStoreSku.TrendPrice
|
||||||
}
|
}
|
||||||
if actStoreSku := actStoreSkuMap4EarningPrice.GetActStoreSku(skuName.StoreID, v.SkuID, -1); actStoreSku != nil {
|
if actStoreSku := actStoreSkuMap4EarningPrice.GetActStoreSku(skuName.StoreID, v.SkuID, -1); actStoreSku != nil {
|
||||||
v.EarningPrice = int(actStoreSku.EarningPrice)
|
v.EarningPrice = int(actStoreSku.EarningPrice)
|
||||||
|
|||||||
Reference in New Issue
Block a user