美图订单优惠分配
This commit is contained in:
@@ -254,9 +254,11 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
|||||||
if skuBenefitDetailMap != nil && skuBenefitDetailMap[sku.VendorSkuID] != nil && ignoreSkuMap[sku.SkuID] == 0 /* && sku.Count == 1 */ {
|
if skuBenefitDetailMap != nil && skuBenefitDetailMap[sku.VendorSkuID] != nil && ignoreSkuMap[sku.SkuID] == 0 /* && sku.Count == 1 */ {
|
||||||
for _, v := range skuBenefitDetailMap[sku.VendorSkuID].WmAppOrderActDetails {
|
for _, v := range skuBenefitDetailMap[sku.VendorSkuID].WmAppOrderActDetails {
|
||||||
if /*skuActTypeMap[v.Type] == 1 && */ strings.Index(v.Remark, skuName) >= 0 && sku.Count == v.Count {
|
if /*skuActTypeMap[v.Type] == 1 && */ strings.Index(v.Remark, skuName) >= 0 && sku.Count == v.Count {
|
||||||
sku.SalePrice -= jxutils.StandardPrice2Int(v.MtCharge + v.PoiCharge)
|
if sku.SalePrice-jxutils.StandardPrice2Int(v.MtCharge+v.PoiCharge) < 0 {
|
||||||
if sku.SalePrice > 0 {
|
continue
|
||||||
|
} else {
|
||||||
ignoreSkuMap[sku.SkuID] = 1
|
ignoreSkuMap[sku.SkuID] = 1
|
||||||
|
sku.SalePrice -= jxutils.StandardPrice2Int(v.MtCharge + v.PoiCharge)
|
||||||
}
|
}
|
||||||
sku.StoreSubName = utils.Int2Str(v.Type)
|
sku.StoreSubName = utils.Int2Str(v.Type)
|
||||||
}
|
}
|
||||||
@@ -265,7 +267,6 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
|||||||
if sku.SalePrice < 0 {
|
if sku.SalePrice < 0 {
|
||||||
sku.SalePrice = jxutils.StandardPrice2Int(utils.MustInterface2Float64(product["price"]))
|
sku.SalePrice = jxutils.StandardPrice2Int(utils.MustInterface2Float64(product["price"]))
|
||||||
}
|
}
|
||||||
|
|
||||||
// if product["isGift"].(bool) {
|
// if product["isGift"].(bool) {
|
||||||
// sku.SkuType = 1
|
// sku.SkuType = 1
|
||||||
// }
|
// }
|
||||||
|
|||||||
Reference in New Issue
Block a user