Browse Source

fix: 分组设置保存 双评比例不能设置为0

caozixuan 9 tháng trước cách đây
mục cha
commit
d861fb8f6c

+ 4 - 0
src/main/java/cn/com/qmth/mps/service/impl/PaperGroupServiceImpl.java

@@ -222,9 +222,13 @@ public class PaperGroupServiceImpl extends ServiceImpl<PaperGroupDao, PaperGroup
 		Double arbitrateThreshold = domain.getArbitrateThreshold();
 		if (doubleEnable) {
 			// 如果开启双评
+
 			if (Objects.isNull(doubleRate) || doubleRate < 0 || doubleRate > 1) {
 				throw new StatusException("双评比例未正确设置");
 			}
+			if (doubleRate == 0) {
+				throw new StatusException("双评比例不能设置为0");
+			}
 			if (Objects.isNull(arbitrateMethod)) {
 				throw new StatusException("仲裁方式未设置");
 			}