修复插入数据,数据库设置了默认值不生效问题
This commit is contained in:
@@ -21,7 +21,7 @@ public class BaseServiceImpl<M extends BaseMapper<T>, T extends BaseEntity<T>> e
|
||||
|
||||
@Override
|
||||
public Long add(T entity) {
|
||||
mapper.insert(entity);
|
||||
mapper.insertSelective(entity);
|
||||
return entity.getId();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user