aa
This commit is contained in:
@@ -307,12 +307,13 @@ type StoreSkuExt struct {
|
|||||||
JxLockTime *time.Time `orm:"null" json:"jxLockTime,omitempty"`
|
JxLockTime *time.Time `orm:"null" json:"jxLockTime,omitempty"`
|
||||||
YbLockTime *time.Time `orm:"null" json:"ybLockTime,omitempty"`
|
YbLockTime *time.Time `orm:"null" json:"ybLockTime,omitempty"`
|
||||||
|
|
||||||
ActPrice int `json:"actPrice"`
|
VendorActMaps []*VendorActMap `json:"vendorActMaps"`
|
||||||
ActID int `orm:"column(act_id)" json:"actID"`
|
ActPrice int `json:"actPrice"`
|
||||||
ActType int `orm:"column(act_type)" json:"actType"`
|
ActID int `orm:"column(act_id)" json:"actID"`
|
||||||
DiscountType int `json:"discountType"`
|
ActType int `orm:"column(act_type)" json:"actType"`
|
||||||
DiscountValue1 int `json:"discountValue1"`
|
DiscountType int `json:"discountType"`
|
||||||
DiscountValue2 int `json:"discountValue2"`
|
DiscountValue1 int `json:"discountValue1"`
|
||||||
|
DiscountValue2 int `json:"discountValue2"`
|
||||||
|
|
||||||
EarningPrice int `json:"earningPrice"`
|
EarningPrice int `json:"earningPrice"`
|
||||||
EarningActID int `orm:"column(earning_act_id)" json:"earningActID"`
|
EarningActID int `orm:"column(earning_act_id)" json:"earningActID"`
|
||||||
@@ -323,6 +324,13 @@ type StoreSkuExt struct {
|
|||||||
MtLadderBoxPrice int `json:"mtLadderBoxPrice"`
|
MtLadderBoxPrice int `json:"mtLadderBoxPrice"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type VendorActMap struct {
|
||||||
|
ActID string `json:"actID"`
|
||||||
|
ActType int `json:"actType"`
|
||||||
|
VendorID int `json:"vendorID"`
|
||||||
|
ActPrice int `json:"actPrice"`
|
||||||
|
}
|
||||||
|
|
||||||
type SkuNameAndPlace struct {
|
type SkuNameAndPlace struct {
|
||||||
model.SkuName
|
model.SkuName
|
||||||
UnitPrice int `json:"unitPrice"`
|
UnitPrice int `json:"unitPrice"`
|
||||||
@@ -1457,6 +1465,7 @@ func UpdateActPrice4StoreSkuNameNew(db *DaoDB, storeIDs, skuIDs []int, skuNamesI
|
|||||||
for _, skuName := range skuNamesInfo.SkuNames {
|
for _, skuName := range skuNamesInfo.SkuNames {
|
||||||
if len(skuName.Skus) > 0 {
|
if len(skuName.Skus) > 0 {
|
||||||
for _, v := range skuName.Skus {
|
for _, v := range skuName.Skus {
|
||||||
|
actVendorMap := make(map[int]*struct{})
|
||||||
if actStoreSku := actStoreSkuMap4Act.GetActStoreSku(skuName.StoreID, v.SkuID, -1); actStoreSku != nil {
|
if actStoreSku := actStoreSkuMap4Act.GetActStoreSku(skuName.StoreID, v.SkuID, -1); actStoreSku != nil {
|
||||||
v.ActPrice = int(actStoreSku.ActualActPrice)
|
v.ActPrice = int(actStoreSku.ActualActPrice)
|
||||||
v.ActID = actStoreSku.ActID
|
v.ActID = actStoreSku.ActID
|
||||||
@@ -1467,6 +1476,13 @@ func UpdateActPrice4StoreSkuNameNew(db *DaoDB, storeIDs, skuIDs []int, skuNamesI
|
|||||||
v.DiscountType = actStoreSku.DiscountType
|
v.DiscountType = actStoreSku.DiscountType
|
||||||
v.DiscountValue1 = actStoreSku.DiscountValue1
|
v.DiscountValue1 = actStoreSku.DiscountValue1
|
||||||
v.DiscountValue2 = actStoreSku.DiscountValue2
|
v.DiscountValue2 = actStoreSku.DiscountValue2
|
||||||
|
v.VendorActMaps = append(v.VendorActMaps, &VendorActMap{
|
||||||
|
ActID: utils.Int2Str(v.ActID),
|
||||||
|
ActType: v.ActType,
|
||||||
|
ActPrice: v.ActPrice,
|
||||||
|
VendorID: actStoreSku.VendorID,
|
||||||
|
})
|
||||||
|
actVendorMap[actStoreSku.VendorID] = &struct{}{}
|
||||||
}
|
}
|
||||||
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)
|
||||||
@@ -1490,6 +1506,15 @@ func UpdateActPrice4StoreSkuNameNew(db *DaoDB, storeIDs, skuIDs []int, skuNamesI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if actVendorMap[model.VendorIDMTWM] == nil {
|
||||||
|
v.VendorActMaps = append(v.VendorActMaps, &VendorActMap{
|
||||||
|
ActID: mtactMap[skuName.StoreID][v.SkuID].ItemID,
|
||||||
|
ActType: mtactMap[skuName.StoreID][v.SkuID].ActType,
|
||||||
|
ActPrice: int(jxutils.StandardPrice2Int(mtactMap[skuName.StoreID][v.SkuID].ActPrice)),
|
||||||
|
VendorID: model.VendorIDMTWM,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
if (actVendorID == -1 || actVendorID == model.VendorIDEBAI) && v.ActPrice == 0 {
|
if (actVendorID == -1 || actVendorID == model.VendorIDEBAI) && v.ActPrice == 0 {
|
||||||
if ebaiactMap != nil {
|
if ebaiactMap != nil {
|
||||||
ebaiact := ebaiactMap[skuName.StoreID][v.SkuID]
|
ebaiact := ebaiactMap[skuName.StoreID][v.SkuID]
|
||||||
@@ -1502,6 +1527,15 @@ func UpdateActPrice4StoreSkuNameNew(db *DaoDB, storeIDs, skuIDs []int, skuNamesI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if actVendorMap[model.VendorIDEBAI] == nil {
|
||||||
|
v.VendorActMaps = append(v.VendorActMaps, &VendorActMap{
|
||||||
|
ActID: ebaiactMap[skuName.StoreID][v.SkuID].ActID,
|
||||||
|
ActType: model.ActSkuDirectDown,
|
||||||
|
ActPrice: int(jxutils.StandardPrice2Int(ebaiactMap[skuName.StoreID][v.SkuID].ActPrice)),
|
||||||
|
VendorID: model.VendorIDEBAI,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
if globals.IsStoreSkuAct {
|
if globals.IsStoreSkuAct {
|
||||||
v.VendorInfoMap = make(map[int]*StoreSkuVendorInfo)
|
v.VendorInfoMap = make(map[int]*StoreSkuVendorInfo)
|
||||||
for _, storeMap := range storeMapMap[skuName.StoreID] {
|
for _, storeMap := range storeMapMap[skuName.StoreID] {
|
||||||
|
|||||||
Reference in New Issue
Block a user