Commit 53ef8bb3 authored by yanzg's avatar yanzg

常规BUG的修改

parent 300d5df5
......@@ -11,6 +11,7 @@ import com.yanzuoguang.util.vo.MapRow;
import com.yanzuoguang.util.vo.PageSizeData;
import com.yanzuoguang.util.vo.PageSizeReqVo;
import java.lang.reflect.Array;
import java.util.*;
/**
......@@ -491,7 +492,9 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
String keyField = this.getKey();
Object key = ObjectHelper.get(from, keyField);
ObjectHelper.set(model, keyField, key);
if (model instanceof InitDao) {
((InitDao) model).init();
}
// 执行更新SQL语句
SqlData sqlData = this.getSql(DaoConst.GROUP_ADD);
int ret = this.updateSql(sqlData, model);
......@@ -503,6 +506,34 @@ public abstract class BaseDaoImpl extends BaseDaoSql implements BaseDao {
}
}
/**
* 添加统计数组
*
* @param cls 类型
* @param models 请求实体
* @param <T> 泛型数据
* @return 返回列表
*/
public <T extends Object> List<String> addGroupList(Class<T> cls, List<T> models) {
List<String> ret = new ArrayList<>();
for (T model : models) {
ret.add(this.addGroup(cls, model));
}
return ret;
}
/**
* 添加统计数组
*
* @param cls 类型
* @param models 请求实体
* @param <T> 泛型数据
* @return 返回列表
*/
public <T extends Object> List<String> addGroupArray(Class<T> cls, T... models) {
return this.addGroupList(cls, Arrays.asList(models));
}
/**
* 根据SQL语句名称和实体获取MD5值
*
......
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