//**实现类代码**
String tname = saleName;
String id = goodIds;
//调用service层方法,传入两个参数。报空指针
int count = tpcCombinationSaleService.querySaleindexName(tname, id);
//**service代码**
public int querySaleindexName(String indexName,String id)
throws com.sinovatech.common.exception.AppException;
//**impl代码**
@Override
public int querySaleindexName(String indexName,String id) throws com.sinovatech.common.exception.AppException {
indexName = indexName.trim();
String sql="";
if(!id.equals("")){
sql = "select * from DATA_RRYX.T_PC_COMBINATION_SALE Z where Z.NAME='" + indexName + "' and Z.id <> '"+id+"' and Z.is_delete = 'N'";
}else{
sql = "select * from DATA_RRYX.T_PC_COMBINATION_SALE Z where Z.NAME='" + indexName + "' and Z.is_delete = 'N'";
}
return tpcCombinationSaleDAO.getRecordCountBySQL(sql);
以上为代码,现在我运行测试类正常传参进去后,debug的时候走到调用service方法,没有走方法内部,就直接跳转到Thread类,的dispatchUncaughtException方法,然后就报了空指针异常,请问大佬们可能的原因是在哪里?