• 公共的service接口


    • package com.taotao.manager.service;  
    •   
    • import java.util.List;  
    •   
    • /** 
    •  * @author Administrator 
    •  * 
    •  * @param <T> 
    •  */  
    • public interface BaseService<T> {  
    •     public T queryById(Long Id);  
    •      List<T> queryAll();  
    •     /** 
    •      * 根据条件查询数据的条数 
    •      * @param t 
    •      * @return 
    •      */  
    •     Integer queryCountByWhere(T t);  
    •     /** 
    •      * 根据条件查询列表 
    •      * @param t 
    •      * @return 
    •      */  
    •     List<T> queryListByWheref(T t);  
    •       
    •   
    •     /** 
    •      * 根据分页查询 
    •      * @param page 页数 
    •      * @param rows 每页的行数 
    •      * @return 
    •      */  
    •     List<T> queryByPage(Integer page ,Integer rows) ;  
    •     /** 
    •      * 查询一条数据 
    •      * @return 
    •      */  
    •     T queryOne (T t);  
    •       
    •       
    •     /** 
    •      * 新增一条数据,不忽略空字段 
    •      * @param t 
    •      */  
    •     void save(T t);  
    •     /** 
    •      * 新增一条数据,忽略空字段 
    •      * @param t 
    •      */  
    •     void saveSelective(T t);  
    •       
    •       
    •     /** 
    •      * 更新,不忽略空字段。将空字段置为null 
    •      * @param t 
    •      */  
    •     void updateById(T t );  
    •     /** 
    •      * 更新,忽略空字段。 
    •      * @param t 
    •      */  
    •     void updateByIdSelective(T t );  
    •       
    •     /** 
    •      * 根据id删除一条数据 
    •      * @param id 
    •      */  
    •     void deleteById(Long id);  
    •   
    •     /** 
    •      * 根据id批量删除数据 
    •      * @param ids 
    •      */  
    •     void deleteByIds(List<Object> ids );  
    •       
    • }  
  • 相关阅读:
    Algs4-2.2.1给出原地归并排序merge的排序过程
    Algs4-2.2.2给出自顶向下归并排序的排序过程
    Algs4-2.1.38不同类型的元素
    Algs4-2.1.36不均匀的数据
    Algs4-2.1.37部分有序
    Algs4-2.1.35不均匀的概率分布
    Algs4-2.1.34罕见情况
    升级python到2.7版本pip不可用
    随机验证码
    python文件操作
  • 原文地址:https://www.cnblogs.com/zhangyuhang3/p/6901132.html
Copyright © 2020-2023  润新知