diff --git a/src/main/java/com/glxp/api/service/CustomService.java b/src/main/java/com/glxp/api/service/CustomService.java new file mode 100644 index 00000000..6f5771ca --- /dev/null +++ b/src/main/java/com/glxp/api/service/CustomService.java @@ -0,0 +1,12 @@ +package com.glxp.api.service; + +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +public interface CustomService extends IService { + int insertIgnore(T entity); + int insertIgnoreBatch(List entityList); + int replace(T entity); + int replaceBatch(List entityList); +} diff --git a/src/main/java/com/glxp/api/service/CustomServiceImpl.java b/src/main/java/com/glxp/api/service/CustomServiceImpl.java new file mode 100644 index 00000000..fbe97193 --- /dev/null +++ b/src/main/java/com/glxp/api/service/CustomServiceImpl.java @@ -0,0 +1,29 @@ +package com.glxp.api.service; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.dao.BaseMapperPlus; + +import java.util.List; + +public class CustomServiceImpl, T> extends ServiceImpl, T> implements CustomService{ + @Override + public int insertIgnore(T entity) { + return baseMapper.insertIgnore(entity); + } + + @Override + public int insertIgnoreBatch(List entityList) { + return baseMapper.insertIgnoreBatch(entityList); + } + + @Override + public int replace(T entity) { + return baseMapper.replace(entity); + } + + @Override + public int replaceBatch(List entityList) { + return baseMapper.replaceBatch(entityList); + } +}