|
@@ -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);
|
|
|
+ .format(((double) content.getBytes().length / (double) 1024)/(double)1000);
|
|
|
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);
|
|
|
+ .format(((double) content.getBytes().length / (double) 1024)/(double)1000);
|
|
|
throw new StatusException("500010", "通知内容总大小不得超过5MB,当前大小为:" + currentLength + "MB");
|
|
|
}
|
|
|
|