booktypeservice.java

来自「一套网上书店系统采用JAVABEAN+SERVLET+JSP」· Java 代码 · 共 41 行

JAVA
41
字号
package cn.dang.service;

import java.util.ArrayList;
import java.util.List;

import cn.dang.dao.AllDAO;
import cn.dang.entity.BookType;

public class BookTypeService {
	private AllDAO allDAO=new AllDAO();
	
	// 查询小类的信息
	public BookType getBookTypeInfo(int id) throws Throwable {
		String sql = "select * from twotype where tid=" + id;
		return allDAO.getDtDAO().querySmallTypeInfo(sql);
	}
	
	public void updateBookTypeInfo(ArrayList values_list) throws Throwable{
		String sql="update twotype set typename=?,oid=? where tid=?";
		allDAO.getDtDAO().UpdateBookTypeInfo(sql, values_list);
	}
	public void deleteBookTypeInfo(ArrayList values_list) throws Throwable{
		String sql="delete from twotype where oid=?";
		allDAO.getDtDAO().UpdateBookTypeInfo(sql, values_list);
	}
	
	public void deleteBookTypeInfoByTid(ArrayList values_list) throws Throwable{
		String sql="delete from twotype where tid=?";
		allDAO.getDtDAO().UpdateBookTypeInfo(sql, values_list);
	}
	
	public void insertBooTypeInfo(ArrayList values_list) throws Throwable{
		String sql="insert into twotype(typename,oid) values(?,?)";
		allDAO.getDtDAO().UpdateBookTypeInfo(sql, values_list);
	}
	
	public List<BookType> getSomeBookType(String oid) throws Throwable{
		String sql="select * from twotype where oid="+oid;
		return allDAO.getDtDAO().querySmallType(sql);
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?