Commit 5d4ff0f8 authored by yanzg's avatar yanzg

常规BUG的修改

parent d38d4566
package com.yanzuoguang.db.impl;
import com.yanzuoguang.dao.DaoConst;
import com.yanzuoguang.dao.TableAnnotation;
import com.yanzuoguang.extend.ConfigDb;
import com.yanzuoguang.util.base.MethodField;
import com.yanzuoguang.util.base.ObjectHelper;
......@@ -77,6 +78,19 @@ public class AllBeanRowMapper<T> implements RowMapper<T> {
for (Map.Entry<String, MethodField> item : temp.entrySet()) {
String name = item.getKey();
// 获取字段值
MethodField field = item.getValue();
// 获取名称
TableAnnotation annotation = null;
if (field.getField() != null) {
annotation = field.getField().getAnnotation(TableAnnotation.class);
} else if (field.getGetMethod() != null) {
annotation = field.getGetMethod().getAnnotation(TableAnnotation.class);
}
if (annotation != null) {
name = annotation.value();
}
String underscoredName = underscoreName(name);
this.typeField.put(underscoredName, item.getValue());
}
......
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