Commit 609409f8 by s_guodong

bigDecimal转int

parent 96a4bb21
...@@ -21,6 +21,7 @@ import org.springframework.stereotype.Component; ...@@ -21,6 +21,7 @@ import org.springframework.stereotype.Component;
import java.io.Serializable; import java.io.Serializable;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.math.BigDecimal;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.*; import java.util.*;
...@@ -359,8 +360,11 @@ public class MyBatisDaoSession extends AbstractDaoSession implements IDaoSession ...@@ -359,8 +360,11 @@ public class MyBatisDaoSession extends AbstractDaoSession implements IDaoSession
} }
for (int i = 0; i < result.size(); i++) { for (int i = 0; i < result.size(); i++) {
Map<String, Object> map1 = result.get(i); Map<String, Object> map1 = result.get(i);
if (map1.get("COUNT") != null) { Set<Map.Entry<String, Object>> entries = map1.entrySet();
map1.put("COUNT", Integer.valueOf(map1.get("COUNT") + "")); for (Map.Entry<String, Object> entry : entries) {
if (entry.getValue() instanceof BigDecimal) {
entry.setValue(((BigDecimal) entry.getValue()).intValue());
}
} }
} }
resultLocal.set(new ResultSet(result)); resultLocal.set(new ResultSet(result));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment