|
@@ -166,17 +166,9 @@ func (s *GoodsServ) Orders(
|
166
|
166
|
}
|
167
|
167
|
|
168
|
168
|
info.ActualAmount = strconv.FormatFloat(payMoney, 'f', -1, 64)
|
169
|
|
-
|
170
|
|
- // 保存优惠券使用记录
|
171
|
|
- // if coupons != nil && len(coupons) > 0 {
|
172
|
|
- // if err := s.dao.SaveOrdersCoupon(coupons, info); err != nil {
|
173
|
|
- // utils.LogError("保存优惠信息出错: " + err.Error())
|
174
|
|
- // return errors.New("保存优惠信息出错")
|
175
|
|
- // }
|
176
|
|
-
|
177
|
|
- // TODO
|
178
|
|
- // 核销优惠券
|
179
|
|
- // }
|
|
169
|
+ if payMoney > 0 && couponAmount > 0 && info.PayType != models.CONSUME_INNER {
|
|
170
|
+ info.PayType = models.CONSUME_COUPON_COIN
|
|
171
|
+ }
|
180
|
172
|
|
181
|
173
|
// 如果是城币, 则插入用户账户消费记录
|
182
|
174
|
if payMoney > 0 {
|