|
@@ -167,16 +167,18 @@ public class BasicMessageServiceImpl extends ServiceImpl<BasicMessageMapper, Bas
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- private void checkData(Object ... objects){
|
|
|
|
|
|
+ private void checkData(Object ... objects) {
|
|
for (Object object : objects) {
|
|
for (Object object : objects) {
|
|
- if (object instanceof String){
|
|
|
|
|
|
+ if (Objects.isNull(object)) {
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("调用发送短信方法时必传参数缺失");
|
|
|
|
+ } else if (object instanceof String) {
|
|
String param = String.valueOf(object);
|
|
String param = String.valueOf(object);
|
|
- if (param.length() == 0 || param.equals("null")){
|
|
|
|
|
|
+ if (param.length() == 0 || param.equals("null")) {
|
|
throw ExceptionResultEnum.ERROR.exception("调用发送短信方法时必传参数缺失");
|
|
throw ExceptionResultEnum.ERROR.exception("调用发送短信方法时必传参数缺失");
|
|
}
|
|
}
|
|
- }else if (object instanceof Long){
|
|
|
|
|
|
+ } else if (object instanceof Long) {
|
|
Long param = SystemConstant.convertIdToLong(String.valueOf(object));
|
|
Long param = SystemConstant.convertIdToLong(String.valueOf(object));
|
|
- if (param == null || param == 0){
|
|
|
|
|
|
+ if (param == null || param == 0) {
|
|
throw ExceptionResultEnum.ERROR.exception("调用发送短信方法时必传参数缺失");
|
|
throw ExceptionResultEnum.ERROR.exception("调用发送短信方法时必传参数缺失");
|
|
}
|
|
}
|
|
}
|
|
}
|