⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 booktypeservice.java

📁 一套网上书店系统采用JAVABEAN+SERVLET+JSP
💻 JAVA
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -