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 );
    	
    }
    
    

  • 相关阅读:
    Golang 函数
    Golang type
    Golang 分支控制和循环
    Golang 字符型
    Golang运算符
    final 和 static 的区别
    Golang标识符命名规则
    Golang值类型与引用类型
    Golang指针
    启动 jvm 参数小总结
  • 原文地址:https://www.cnblogs.com/liyasong/p/6396007.html
Copyright © 2011-2022 走看看