
top.hmtools.mapper.plus.mysql.delete.IMysqlDeleteMapperPlus Maven / Gradle / Ivy
package top.hmtools.mapper.plus.mysql.delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.UpdateProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;
@RegisterMapper
public interface IMysqlDeleteMapperPlus {
//################################ 删
/**
* 指定主键名称(Java类字段名字符串),主键集合,删除指定记录集合
*
注意:key 是否 null,是否 空字符串。ids 是否 null,是否部分含有空字符串,是否全部空字符串,是否长度为 0
*
入参均不得为null或者为空,为防止造成误删除数据,目前采用SQL语句错误方式处理(“where”后面无内容)
* @param key
* @param ids
* @return
*/
@DeleteProvider(type = DeleteMapperPlusProvider.class,method="dynamicSQL")
Integer delSomeByPk(@Param(value="key")String key,@Param(value="ids")String... ids);
/**
* 根据条件,删除指定记录集合
*
注意:condition 是否为null,condition中是否部分属性为null,空字符串;condition中是否全部属性为null,空字符串
*
入参均不得为null或者为空,为防止造成误删除数据,目前采用SQL语句错误方式处理(“where”后面无内容)
* @param condition
* @return
*/
@DeleteProvider(type = DeleteMapperPlusProvider.class,method="dynamicSQL")
Integer delSomeByCondition(T condition);
/**
* 逻辑批量删除
* @param statekey 表示状态的字段名
* @param statevalue 表示逻辑删除状态的值
* @param key 主键字段名
* @param ids 要删除的主键值集合
* @return
*/
@UpdateProvider(type = DeleteMapperPlusProvider.class,method="dynamicSQL")
Integer delSomeByPkLogic(@Param(value="stateKey")String statekey,@Param(value="stateValue")Object statevalue,@Param(value="key")String key,@Param(value="ids")String... ids);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy