package com.kidgrow.common.service;
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.kidgrow.common.lock.DistributedLock;
|
|
/**
|
* 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br>
|
*
|
* @Description: Service 接口父类<br>
|
* @Project: <br>
|
* @CreateDate: Created in 2020/2/3 15:55 <br>
|
* @Author: <a href="4345453@kidgrow.com">liuke</a>
|
*/
|
public interface ISuperService<T> extends IService<T> {
|
/**
|
* 幂等性新增记录
|
*
|
* @param entity 实体对象
|
* @param lock 锁实例
|
* @param lockKey 锁的key
|
* @param countWrapper 判断是否存在的条件
|
* @param msg 对象已存在提示信息
|
* @return
|
*/
|
boolean saveIdempotency(T entity, DistributedLock lock, String lockKey, Wrapper<T> countWrapper, String msg);
|
|
/**
|
* 幂等性新增记录
|
*
|
* @param entity 实体对象
|
* @param lock 锁实例
|
* @param lockKey 锁的key
|
* @param countWrapper 判断是否存在的条件
|
* @return
|
*/
|
boolean saveIdempotency(T entity, DistributedLock lock, String lockKey, Wrapper<T> countWrapper);
|
|
/**
|
* 幂等性新增或更新记录
|
*
|
* @param entity 实体对象
|
* @param lock 锁实例
|
* @param lockKey 锁的key
|
* @param countWrapper 判断是否存在的条件
|
* @param msg 对象已存在提示信息
|
* @return
|
*/
|
boolean saveOrUpdateIdempotency(T entity, DistributedLock lock, String lockKey, Wrapper<T> countWrapper, String msg);
|
|
/**
|
* 幂等性新增或更新记录
|
*
|
* @param entity 实体对象
|
* @param lock 锁实例
|
* @param lockKey 锁的key
|
* @param countWrapper 判断是否存在的条件
|
* @return
|
*/
|
boolean saveOrUpdateIdempotency(T entity, DistributedLock lock, String lockKey, Wrapper<T> countWrapper);
|
}
|