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

📄 qxdaoimpl.java

📁 JAVA E拍网上购物业务管理 使用CRM业务流程
💻 JAVA
字号:
package org.ch02zf.dao.daoImpl;

import java.sql.SQLException;

import javax.servlet.jsp.jstl.sql.Result;

import org.ch02zf.dao.QXDao;
import org.ch02zf.entity.QX;

public class QXDaoImpl implements QXDao{

	public Result getQX() {
		// TODO Auto-generated method stub
		CommonDao cd  = new CommonDao();
		cd.setConn(BasicDao.getCon());
		String sql = "select * from tbl_qx order by qxid ";
		cd.setSqlvalue(sql);
		Result result = null;
		try {
			result = cd.executeQuery();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return result;
	}

	public QX getQXbyId(int qxid) {
		// TODO Auto-generated method stub
		CommonDao cd  = new CommonDao();
		cd.setConn(BasicDao.getCon());
		String sql = "select * from tbl_qx where qxid = "+qxid;
		cd.setSqlvalue(sql);
		Result result = null;
		QX qx = new QX();
		try {
			result = cd.executeQuery();
			if(result.getRowCount()>0)
			{
				qx.setQxid((Integer)result.getRows()[0].get("qxid"));
				qx.setQx((String)result.getRows()[0].get("qx"));
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return qx;
	}
	
}

⌨️ 快捷键说明

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