Przeglądaj źródła

修改优惠券发放规则

hgw 3 lat temu
rodzic
commit
f53e1b9792

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysCouponServiceImpl.java

@@ -19,6 +19,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.math.BigDecimal;
 import java.util.*;
 
 @Service
@@ -153,7 +154,7 @@ public class SysCouponServiceImpl extends BaseServiceImpl<Integer, SysCoupon> im
                 if (Objects.isNull(sysCoupon.getFullAmount())) {
                     throw new BizException("请指定达标金额");
                 }
-                if (sysCoupon.getFaceValue().compareTo(sysCoupon.getFullAmount()) < 0) {
+                if (sysCoupon.getFaceValue().compareTo(sysCoupon.getFullAmount()) > 0) {
                     throw new BizException("优惠的金额不能超过优惠券满减额度");
                 }
                 break;