zoukankan      html  css  js  c++  java
  • 公共的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 );
    	
    }
    
    

  • 相关阅读:
    Repo介绍
    =vscode========》快捷键
    linux c延时程序大全
    Linux vi/vim
    =vscode========》实用小技巧
    编程中闰年判断条件
    代码质量的评价标准
    Python如何计算编辑距离?
    python 格式化输出保留一位小数
    字符串拆分 split()方法
  • 原文地址:https://www.cnblogs.com/liyasong/p/6396007.html
Copyright © 2011-2022 走看看