这种结构的代码如何处理
if(id != null){
whereSQL.append("id = "+id).append(" and ");
}else if(mobile != null){
whereSQL.append("mobile = "+mobile).append(" and ");
}else if(agentsName != null){
whereSQL.append("agentsName = "+agentsName).append(" and ");
}else if(id != null){
whereSQL.append("userId = "+userId).append(" and ");
}else if(id != null){
whereSQL.append("invitationCode = "+invitationCode).append(" and ");
}else if(id != null){
whereSQL.append("agentType = "+agentType).append(" and ");
}else if(id != null){
whereSQL.append("del = "+del).append(" and ");
}else if(id != null){
whereSQL.append("areaIds = "+areaIds).append(" and ");
}