修改代码
This commit is contained in:
@@ -203,7 +203,7 @@ func setOrederDetailFee(result map[string]interface{}, order *model.GoodsOrder)
|
|||||||
categoryId := utils.MustInterface2Int64(activity["categoryId"])
|
categoryId := utils.MustInterface2Int64(activity["categoryId"])
|
||||||
restaurantPart := -jxutils.StandardPrice2Int(utils.MustInterface2Float64(activity["restaurantPart"]))
|
restaurantPart := -jxutils.StandardPrice2Int(utils.MustInterface2Float64(activity["restaurantPart"]))
|
||||||
elemePart := -jxutils.StandardPrice2Int(utils.MustInterface2Float64(activity["elemePart"]))
|
elemePart := -jxutils.StandardPrice2Int(utils.MustInterface2Float64(activity["elemePart"]))
|
||||||
if _, isHave := model.ElmSkuPromotion[int(categoryId)]; isHave {
|
if _, ok := model.ElmSkuPromotion[int(categoryId)]; ok {
|
||||||
order.SkuPmFee += restaurantPart
|
order.SkuPmFee += restaurantPart
|
||||||
order.SkuPmSubsidy += elemePart
|
order.SkuPmSubsidy += elemePart
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ func init() {
|
|||||||
api.Init()
|
api.Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_GetOrder(t *testing.T) {
|
func TestGetOrder(t *testing.T) {
|
||||||
orderID := "3025427524410871880"
|
orderID := "3025427524410871880"
|
||||||
order, err := new(OrderController).GetOrder(orderID)
|
order, err := new(OrderController).GetOrder(orderID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -125,9 +125,9 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ElmSkuPromotion = map[int]string{
|
ElmSkuPromotion = map[int]int{
|
||||||
11: "1",
|
11: 1,
|
||||||
200: "1",
|
200: 1,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user