batchDelete fix

上级 447cdd5e
......@@ -59,7 +59,7 @@ public class SqlProviderDelete <T extends JpaBaseEntity>{
ArrayList <String> idValues=(ArrayList<String>)parametersMap.get("idList");
String keyValue="";
for(String value : idValues) {
if(value.trim().length() > 1) {
if(value.trim().length() > 0) {
keyValue += ",'" + value + "'";
_logger.trace("batch delete by id " + value);
}
......
......@@ -136,6 +136,13 @@ public class MyBatisTestRunner {
idList.add("dafd5ba4-d2e3-4656-bd42-178841e610fe");
service.batchDelete(idList);
}
@Test
public void batchDeleteByIds() throws Exception{
_logger.info("batchDeleteByIds...");
service.batchDelete("2");
service.batchDelete("2,639178432667713536");
}
@Test
public void queryPageResults() throws Exception{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册