lideyin 5 rokov pred
rodič
commit
f87c41a943

+ 2 - 2
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/controller/NoticeController.java

@@ -252,7 +252,7 @@ public class NoticeController extends ControllerSupport {
 		if (content.getBytes().length > 5 * 1024) {
 			DecimalFormat decimalFormat = new DecimalFormat("#.##");
 			String currentLength = decimalFormat
-					.format(((double) content.getBytes().length / (double) 1024)/(double)1000);
+					.format(((double) content.getBytes().length / (double) 1024)/(double)1024);
 			throw new StatusException("500010", "通知内容总大小不得超过5MB,当前大小为:" + currentLength + "MB");
 		}
 	}
@@ -275,7 +275,7 @@ public class NoticeController extends ControllerSupport {
 		if (content.getBytes().length > 5 * 1024) {
 			DecimalFormat decimalFormat = new DecimalFormat("#.##");
 			String currentLength = decimalFormat
-					.format(((double) content.getBytes().length / (double) 1024)/(double)1000);
+					.format(((double) content.getBytes().length / (double) 1024)/(double)1024);
 			throw new StatusException("500010", "通知内容总大小不得超过5MB,当前大小为:" + currentLength + "MB");
 		}