fix
This commit is contained in:
parent
ed910df0b8
commit
9bdaa75514
@ -113,8 +113,8 @@ func (l *CalculateProductPriceLogic) CalculateProductPrice(req *types.CalculateP
|
|||||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "failed to calculate product price ")
|
return resp.SetStatusWithMessage(basic.CodeServiceErr, "failed to calculate product price ")
|
||||||
}
|
}
|
||||||
return resp.SetStatusWithMessage(basic.CodeOK, "success", types.CalculateProductPriceRsp{
|
return resp.SetStatusWithMessage(basic.CodeOK, "success", types.CalculateProductPriceRsp{
|
||||||
ItemPrice: format.CentitoDollar(itemPrice, 3),
|
ItemPrice: format.NumToStringWithThousandthPercentile(format.CentitoDollar(itemPrice, 3)),
|
||||||
TotalPrice: format.CentitoDollarWithNoHalfAdjust(totalPrice, 2),
|
TotalPrice: format.NumToStringWithThousandthPercentile(format.CentitoDollarWithNoHalfAdjust(totalPrice, 2)),
|
||||||
StepRange: stepRange,
|
StepRange: stepRange,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -126,8 +126,8 @@ func (l *CalculateCartPriceLogic) CalculateCartPrice(req *types.CalculateCartPri
|
|||||||
}
|
}
|
||||||
calculateResultList = append(calculateResultList, types.CalculateResultItem{
|
calculateResultList = append(calculateResultList, types.CalculateResultItem{
|
||||||
CartId: cart.Id,
|
CartId: cart.Id,
|
||||||
ItemPrice: format.CentitoDollar(itemPrice, 3),
|
ItemPrice: format.NumToStringWithThousandthPercentile(format.CentitoDollar(itemPrice, 3)),
|
||||||
TotalPrice: format.CentitoDollarWithNoHalfAdjust(totalPrice, 2),
|
TotalPrice: format.NumToStringWithThousandthPercentile(format.CentitoDollarWithNoHalfAdjust(totalPrice, 2)),
|
||||||
})
|
})
|
||||||
updData := &gmodel.FsShoppingCart{
|
updData := &gmodel.FsShoppingCart{
|
||||||
PurchaseQuantity: &reqPurchaseQuantity,
|
PurchaseQuantity: &reqPurchaseQuantity,
|
||||||
@ -150,7 +150,7 @@ func (l *CalculateCartPriceLogic) CalculateCartPrice(req *types.CalculateCartPri
|
|||||||
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, err.Error())
|
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, err.Error())
|
||||||
}
|
}
|
||||||
return resp.SetStatusWithMessage(basic.CodeOK, "success", types.CalculateCartPriceRsp{
|
return resp.SetStatusWithMessage(basic.CodeOK, "success", types.CalculateCartPriceRsp{
|
||||||
SubTotalPrice: format.CentitoDollarWithNoHalfAdjust(subTotalPrice, 2),
|
SubTotalPrice: format.NumToStringWithThousandthPercentile(format.CentitoDollarWithNoHalfAdjust(subTotalPrice, 2)),
|
||||||
CalculateResultList: calculateResultList,
|
CalculateResultList: calculateResultList,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -185,8 +185,8 @@ func (l *GetCartsLogic) GetCarts(req *types.GetCartsReq, userinfo *auth.UserInfo
|
|||||||
FittingId: *cart.FittingId,
|
FittingId: *cart.FittingId,
|
||||||
FittingName: fittingName,
|
FittingName: fittingName,
|
||||||
},
|
},
|
||||||
ItemPrice: format.CentitoDollar(itemPrice, 3),
|
ItemPrice: format.NumToStringWithThousandthPercentile(format.CentitoDollar(itemPrice, 3)),
|
||||||
TotalPrice: format.CentitoDollarWithNoHalfAdjust(totalPrice, 2),
|
TotalPrice: format.NumToStringWithThousandthPercentile(format.CentitoDollarWithNoHalfAdjust(totalPrice, 2)),
|
||||||
DiyInformation: types.DiyInformation{
|
DiyInformation: types.DiyInformation{
|
||||||
Phone: snapShot.UserDiyInformation.Phone,
|
Phone: snapShot.UserDiyInformation.Phone,
|
||||||
Address: snapShot.UserDiyInformation.Address,
|
Address: snapShot.UserDiyInformation.Address,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user