资 源 简 介
package com.fenghuo.service;import java.util.ArrayList;import java.util.List;import android.content.Context;import android.database.Cursor;import android.database.SQLException;import android.database.sqlite.SQLiteDatabase;import com.fenghuo.db.DBHelper;import com.fenghuuo.pojo.Product;public class ProductService {private DBHelper helper;public ProductService(Context context){helper =new DBHelper(context);}//查询商品 按价格升序排序 升序price asc 降序:price descpublic ListfindAll(){List list=new ArrayList();SQLiteDatabase db=helper.getReadableDatabase();Cursor c=db.rawQuery("select id ,name,price,address from product order by pric