From 4a38f13d7bbd409535ff0e73587e336ed9e65364 Mon Sep 17 00:00:00 2001 From: wj <1285151836@qq.com> Date: Thu, 11 May 2023 14:14:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89Iservice=E5=92=8CSer?= =?UTF-8?q?viceImpl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/glxp/api/service/CustomService.java | 12 ++++++++ .../glxp/api/service/CustomServiceImpl.java | 29 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 src/main/java/com/glxp/api/service/CustomService.java create mode 100644 src/main/java/com/glxp/api/service/CustomServiceImpl.java 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); + } +}