package cn.huge.module.knowledge.dao.mapper;
|
|
import cn.huge.module.knowledge.domain.dto.DictionaryDTO;
|
import cn.huge.module.knowledge.domain.dto.LawInfoPageDTO;
|
import cn.huge.module.knowledge.domain.po.LawInfo;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import org.apache.ibatis.annotations.Param;
|
import org.springframework.data.domain.PageRequest;
|
import org.springframework.stereotype.Repository;
|
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* @title: 法律表持久层业务处理
|
* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
|
* @company: hugeinfo
|
* @author: huangh
|
* @time: 2024-12-05 16:15:00
|
* @version 1.0
|
*/
|
|
@Repository
|
public interface LawInfoMapper extends BaseMapper<LawInfo> {
|
|
/**
|
* 更新对象
|
* @param entity 对象
|
*/
|
void updateLawInfo(@Param("entity") LawInfo entity);
|
|
/**
|
* 条件更新对象
|
* @param entity 对象
|
* @param terms 条件
|
*/
|
void updateLawInfoTerms(@Param("entity") LawInfo entity, @Param("terms") Map<String, Object> terms);
|
|
/**
|
* 根据编号物理删除
|
* @param id 查询条件集合
|
*/
|
void deleteLawInfo(@Param("id") String id);
|
|
/**
|
* 按条件查询结果集
|
* @param terms 查询条件集合
|
* @return List<LawInfo>
|
*/
|
List<LawInfo> listTerms(@Param("terms") Map<String, Object> terms);
|
|
/**
|
* 按条件查询实体总数
|
* @param terms 查询条件集合
|
* @return long
|
*/
|
long countTerms(@Param("terms") Map<String, Object> terms);
|
|
/**
|
* 按条件查询实体分页结果集
|
* @param page 分页对象
|
* @param terms 查询条件集合
|
* @return List<LawInfo>
|
*/
|
List<LawInfoPageDTO> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
|
|
/**
|
* 按条件查询实体总数-包含法条关键词
|
* @param terms 查询条件集合
|
* @return long
|
*/
|
long countTermsKeyLaw(@Param("terms") Map<String, Object> terms);
|
|
/**
|
* 按条件查询实体分页结果集-包含法条关键词
|
* @param page 分页对象
|
* @param terms 查询条件集合
|
* @return List<LawInfo>
|
*/
|
List<LawInfoPageDTO> pageTermsKeyLaw(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
|
|
/**
|
* 统计各类别法律
|
* @return List<LawCategoryDTO>
|
*/
|
List<DictionaryDTO> categoryCount(@Param("terms") Map<String, Object> terms);
|
}
|