|
@@ -212,9 +212,11 @@ public class CorporateLibraryController {
|
|
|
int sl = 3;
|
|
|
String searchLevel = request.getParameter("searchLevel");
|
|
|
try {
|
|
|
- sl = Integer.parseInt(searchLevel);
|
|
|
- if (sl < 1 || sl > 3) {
|
|
|
- return MessageManage.getInstance().getResultContent(Constant.PARAM_ERROR, "参数错误", "参数错误");
|
|
|
+ if(StringUtils.hasText(searchLevel)){
|
|
|
+ sl = Integer.parseInt(searchLevel);
|
|
|
+ if (sl < 1 || sl > 3) {
|
|
|
+ return MessageManage.getInstance().getResultContent(Constant.PARAM_ERROR, "参数错误", "参数错误");
|
|
|
+ }
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
return MessageManage.getInstance().getResultContent(Constant.PARAM_ERROR, "参数错误", "参数错误");
|