返回运行方法,可以写在一行 callback&&callback()

return DiscountMap[discountType] && DiscountMap[discountType](price)

原文地址:https://www.cnblogs.com/pengchenggang/p/11412222.html