修改kafka推送时空指针异常
This commit is contained in:
parent
a298b74dfb
commit
b7b58ab7bc
@ -128,24 +128,6 @@ public class FloatingPopulation {
|
|||||||
if(id_card_number != null && id_card_number.length() > 20 ) {
|
if(id_card_number != null && id_card_number.length() > 20 ) {
|
||||||
throw new ParamsException("身份证号超出长度");
|
throw new ParamsException("身份证号超出长度");
|
||||||
}
|
}
|
||||||
if(StringUtils.isEmpty(location_all)) {
|
|
||||||
throw new ParamsException("区域全名称(/隔开)名不能为空");
|
|
||||||
}
|
|
||||||
if(location_all != null && location_all.length() > 255 ) {
|
|
||||||
throw new ParamsException("区域全名称(/隔开)超出长度");
|
|
||||||
}
|
|
||||||
if(StringUtils.isEmpty(location_code)) {
|
|
||||||
throw new ParamsException("区域编码名不能为空");
|
|
||||||
}
|
|
||||||
if(location_code != null && location_code.length() > 100 ) {
|
|
||||||
throw new ParamsException("区域编码超出长度");
|
|
||||||
}
|
|
||||||
if(StringUtils.isEmpty(location_area)) {
|
|
||||||
throw new ParamsException("区域旗县区名称名不能为空");
|
|
||||||
}
|
|
||||||
if(location_area != null && location_area.length() > 100 ) {
|
|
||||||
throw new ParamsException("区域旗县区名称超出长度");
|
|
||||||
}
|
|
||||||
if(inflow_reason != null && inflow_reason.length() > 255 ) {
|
if(inflow_reason != null && inflow_reason.length() > 255 ) {
|
||||||
throw new ParamsException("流入原因超出长度");
|
throw new ParamsException("流入原因超出长度");
|
||||||
}
|
}
|
||||||
|
@ -467,7 +467,7 @@ public class BasePopulationInfoServiceImpl extends DefaultBaseService implements
|
|||||||
jObj.put("action", action);
|
jObj.put("action", action);
|
||||||
PopulationInfo info = new PopulationInfo();
|
PopulationInfo info = new PopulationInfo();
|
||||||
info.setfull_name(params.get("fullName") == null ? "" : params.get("fullName").toString());
|
info.setfull_name(params.get("fullName") == null ? "" : params.get("fullName").toString());
|
||||||
info.setname_used_before(params.get("nameUsedBefore").toString());
|
info.setname_used_before(params.get("nameUsedBefore") == null ? "" : params.get("nameUsedBefore").toString());
|
||||||
String gender = IdCardVerifyUtil.getIdCardGender(params.get("idCardNumber").toString());
|
String gender = IdCardVerifyUtil.getIdCardGender(params.get("idCardNumber").toString());
|
||||||
info.setgender("1".equals(gender) ? "男" : "女");
|
info.setgender("1".equals(gender) ? "男" : "女");
|
||||||
info.setage(IdCardVerifyUtil.getAgeFromIdCardNumber(params.get("idCardNumber").toString()));
|
info.setage(IdCardVerifyUtil.getAgeFromIdCardNumber(params.get("idCardNumber").toString()));
|
||||||
|
Loading…
Reference in New Issue
Block a user