mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 充电度数达到10度以上才绑定优惠券
This commit is contained in:
@@ -35,6 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -655,8 +656,12 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
|
||||
|
||||
// 给车辆绑定优惠券
|
||||
try {
|
||||
String bindResult = bindCoupon(orderBasicInfo);
|
||||
log.info("绑定优惠券 订单信息:{}, result:{}", orderBasicInfo, bindResult);
|
||||
BigDecimal totalElectricity = new BigDecimal(data.getTotalElectricity());
|
||||
if (totalElectricity.compareTo(BigDecimal.TEN) > 0 ) {
|
||||
// 充电度数大于10度
|
||||
String bindResult = bindCoupon(orderBasicInfo);
|
||||
log.info("绑定优惠券 订单信息:{}, result:{}", orderBasicInfo, bindResult);
|
||||
}
|
||||
}catch (BusinessException e) {
|
||||
log.error("绑定优惠券 error, code:{}, msg:{}", e.getCode(), e.getMessage());
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user