package ${package.Mapper};

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import ${superMapperClassPackage};
import ${package.Entity}.${entity};
#if(${mapperAnnotationClass})
import ${mapperAnnotationClass.name};
#end

/**
 * $!{table.comment} Mapper 接口
 *
 * @author ${author}
 * @version ${version}
 * @since ${date}
 */
#if(${mapperAnnotationClass})
@${mapperAnnotationClass.simpleName}
#end
public interface ${table.mapperName} extends ${superMapperClass}<${entity}> {

    /**
     * 获取查询条件
     *
     * @param entity entity
     * @return 查询条件
     */
    default LambdaQueryWrapper<${entity}> queryCondition(${entity} entity) {
        return this.wrapper()
        #foreach($field in ${table.fields})
                .eq(${type}DO::get${field.capitalName}, entity.get${field.capitalName}())#if(!$foreach.hasNext);#end
        #end
    }

}
