All Downloads are FREE. Search and download functionalities are using the official Maven repository.

top.hmtools.mapper.plus.mysql.delete.DeleteMapperPlusProvider Maven / Gradle / Ivy

package top.hmtools.mapper.plus.mysql.delete;

import org.apache.ibatis.mapping.MappedStatement;

import tk.mybatis.mapper.mapperhelper.MapperHelper;
import top.hmtools.mapper.plus.mysql.BaseMysql;

public class DeleteMapperPlusProvider extends BaseMysql{
	
	public DeleteMapperPlusProvider(Class mapperClass, MapperHelper mapperHelper) {
		super(mapperClass, mapperHelper);
	}

	/**
	 * 指定主键名称(Java类字段名字符串),主键集合,删除指定记录集合
	 * 
注意入参异常造成误删除全部数据的危害 * @param ms * @return */ public String delSomeByPk(MappedStatement ms){ final Class entityClass = getEntityClass(ms); return this.mergeToSQLstr(entityClass, "delete/delSomeByPk"); } /** * 根据条件删除 *
注意入参异常造成误删除全部数据的危害 * @param ms * @return */ public String delSomeByCondition(MappedStatement ms) { final Class entityClass = getEntityClass(ms); return this.mergeToSQLstr(entityClass, "delete/delSomeByCondition"); } /** * 支持批量的逻辑删除 * @param ms * @return */ public String delSomeByPkLogic(MappedStatement ms){ final Class entityClass = getEntityClass(ms); return this.mergeToSQLstr(entityClass, "update/updateSomeTheColumnByPk"); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy