Merge branch 'master' into dev

yy_dev
胡锐 1 year ago
commit 0a7e1a7eb4
  1. 7
      service/src/main/java/com/hfkj/channel/hsg/config/HsgConfig.java
  2. 4
      service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java

@ -10,7 +10,10 @@ import com.hfkj.config.CommonSysConst;
public class HsgConfig { public class HsgConfig {
public final static String hsgDomainName = CommonSysConst.getSysConfig().getHsg_domain_name(); public final static String hsgDomainName = CommonSysConst.getSysConfig().getHsg_domain_name();
public final static String apiKey = "0C7897EA3BD96156A5881618FF2FF645"; /* public final static String apiKey = "0C7897EA3BD96156A5881618FF2FF645";
public final static String merchId = "20230258302"; public final static String merchId = "20230258302";*/
public final static String apiKey = "B94B5E62807FA56A7260AB581D8A1B48";
public final static String merchId = "20230394901";
} }

@ -119,7 +119,7 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
tradeOrder.setStoreDiscountFinalCostPrice(storeDiscount.getFinalCostPrice()); tradeOrder.setStoreDiscountFinalCostPrice(storeDiscount.getFinalCostPrice());
if (storeDiscount.getDiscountType().equals(StoreDiscountActivityTypeEnum.type1.getNumber())) { if (storeDiscount.getDiscountType().equals(StoreDiscountActivityTypeEnum.type1.getNumber())) {
// 未达到满减门槛 // 未达到满减门槛
if (userDiscount.getDiscountCondition().compareTo(tradeOrder.getTradeAmount()) >= 0) { if (tradeOrder.getTradeAmount().compareTo(storeDiscount.getDiscountCondition()) < 0) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "满减优惠,未达到满减条件"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "满减优惠,未达到满减条件");
} else { } else {
tradeOrder.setStoreDiscountSatisfy(true); tradeOrder.setStoreDiscountSatisfy(true);
@ -155,7 +155,7 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
tradeOrder.setUserDiscountType(userDiscount.getDiscountType()); tradeOrder.setUserDiscountType(userDiscount.getDiscountType());
tradeOrder.setUserDiscountPrice(userDiscount.getDiscountPrice()); tradeOrder.setUserDiscountPrice(userDiscount.getDiscountPrice());
if (userDiscount.getDiscountType().equals(UserDiscountTypeEnum.type1.getNumber())) { if (userDiscount.getDiscountType().equals(UserDiscountTypeEnum.type1.getNumber())) {
if (userDiscount.getDiscountCondition().compareTo(tradeOrder.getTradeAmount()) > 0) { if (tradeOrder.getTradeAmount().compareTo(userDiscount.getDiscountCondition()) < 0) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券未达到满减门槛"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券未达到满减门槛");
} }
tradeOrder.setUserDiscountActualPrice(userDiscount.getDiscountPrice()); tradeOrder.setUserDiscountActualPrice(userDiscount.getDiscountPrice());

Loading…
Cancel
Save