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