|
@@ -132,10 +132,8 @@ func (this *DataExportPack) CreateOrder() {
|
|
|
fullPrice, reducePrice, discount, userLotteryId = util.GetCouponInfo(userId, lotteryId, products)
|
|
|
if fullPrice <= orderMoney {
|
|
|
if discount == 100 {
|
|
|
-
|
|
|
orderMoney = orderMoney - reducePrice
|
|
|
discountPrice = reducePrice
|
|
|
-
|
|
|
} else {
|
|
|
//折扣
|
|
|
disCount_int := int(math.Ceil(discount * 100))
|
|
@@ -143,6 +141,8 @@ func (this *DataExportPack) CreateOrder() {
|
|
|
orderMoney = orderMoney * disCount_int / 1000
|
|
|
}
|
|
|
log.Printf("用户%s 购买数据流量包 使用卡券:%s 折扣金额:%d", userId, userLotteryId, discountPrice)
|
|
|
+ } else {
|
|
|
+ userLotteryId = ""
|
|
|
}
|
|
|
}
|
|
|
//赠品相关
|