|
@@ -96,7 +96,7 @@ public abstract class Model<T extends Model<?>> implements Serializable {
|
|
|
* @param queryWrapper 实体对象封装操作类(可以为 null)
|
|
|
*/
|
|
|
public boolean delete(Wrapper<T> queryWrapper) {
|
|
|
- Map<String, Object> map = Maps.newHashMapWithExpectedSize(1);
|
|
|
+ Map<String, Object> map = CollectionUtils.newHashMapWithExpectedSize(1);
|
|
|
map.put(Constants.WRAPPER, queryWrapper);
|
|
|
SqlSession sqlSession = sqlSession();
|
|
|
try {
|
|
@@ -112,7 +112,7 @@ public abstract class Model<T extends Model<?>> implements Serializable {
|
|
|
public boolean updateById() {
|
|
|
Assert.isFalse(StringUtils.checkValNull(pkVal()), "updateById primaryKey is null.");
|
|
|
// updateById
|
|
|
- Map<String, Object> map = Maps.newHashMapWithExpectedSize(1);
|
|
|
+ Map<String, Object> map = CollectionUtils.newHashMapWithExpectedSize(1);
|
|
|
map.put(Constants.ENTITY, this);
|
|
|
SqlSession sqlSession = sqlSession();
|
|
|
try {
|
|
@@ -128,7 +128,7 @@ public abstract class Model<T extends Model<?>> implements Serializable {
|
|
|
* @param updateWrapper 实体对象封装操作类(可以为 null,里面的 entity 用于生成 where 语句)
|
|
|
*/
|
|
|
public boolean update(Wrapper<T> updateWrapper) {
|
|
|
- Map<String, Object> map = Maps.newHashMapWithExpectedSize(2);
|
|
|
+ Map<String, Object> map = CollectionUtils.newHashMapWithExpectedSize(2);
|
|
|
map.put(Constants.ENTITY, this);
|
|
|
map.put(Constants.WRAPPER, updateWrapper);
|
|
|
// update
|
|
@@ -180,7 +180,7 @@ public abstract class Model<T extends Model<?>> implements Serializable {
|
|
|
* @param queryWrapper 实体对象封装操作类(可以为 null)
|
|
|
*/
|
|
|
public List<T> selectList(Wrapper<T> queryWrapper) {
|
|
|
- Map<String, Object> map = Maps.newHashMapWithExpectedSize(1);
|
|
|
+ Map<String, Object> map = CollectionUtils.newHashMapWithExpectedSize(1);
|
|
|
map.put(Constants.WRAPPER, queryWrapper);
|
|
|
SqlSession sqlSession = sqlSession();
|
|
|
try {
|
|
@@ -206,7 +206,7 @@ public abstract class Model<T extends Model<?>> implements Serializable {
|
|
|
* @param queryWrapper 实体对象封装操作类(可以为 null)
|
|
|
*/
|
|
|
public <E extends IPage<T>> E selectPage(E page, Wrapper<T> queryWrapper) {
|
|
|
- Map<String, Object> map = Maps.newHashMapWithExpectedSize(2);
|
|
|
+ Map<String, Object> map = CollectionUtils.newHashMapWithExpectedSize(2);
|
|
|
map.put(Constants.WRAPPER, queryWrapper);
|
|
|
map.put("page", page);
|
|
|
SqlSession sqlSession = sqlSession();
|
|
@@ -224,7 +224,7 @@ public abstract class Model<T extends Model<?>> implements Serializable {
|
|
|
* @param queryWrapper 实体对象封装操作类(可以为 null)
|
|
|
*/
|
|
|
public Integer selectCount(Wrapper<T> queryWrapper) {
|
|
|
- Map<String, Object> map = Maps.newHashMapWithExpectedSize(1);
|
|
|
+ Map<String, Object> map = CollectionUtils.newHashMapWithExpectedSize(1);
|
|
|
map.put(Constants.WRAPPER, queryWrapper);
|
|
|
SqlSession sqlSession = sqlSession();
|
|
|
try {
|