orderslogic.java
来自「>项目名称:电脑电子商务平台 >1.运行环境JDK1.6+Orac」· Java 代码 · 共 63 行
JAVA
63 行
package omega.logic.orders;
import omega.domain.*;
import java.util.List;
import omega.persistence.iface.*;
import omega.persistence.sqlmapdao.OrdersSqlMapDao;
public class OrdersLogic {
OrdersDao orderO = new OrdersSqlMapDao();
public OrdersLogic() {
}
public List findForKey(String key) throws Exception {
List list = orderO.selectAllUser();
for (int i = 0; i < list.size(); i++) {
Orders or = (Orders) list.get(i);
String id = or.getOrderno();
CharSequence cs = key.subSequence(0, key.length());
if (!id.contains(cs)) {
list.remove(i);
i--;
}
}
return list;
}
public List confirmOrder(String key) throws Exception {
List list = orderO.selectAllUser();
for (int i = 0; i < list.size(); i++) {
Orders or = (Orders) list.get(i);
String id = or.getOrderno();
CharSequence cs = key.subSequence(0, key.length());
String tag = or.getTag();
if (tag.equals("0") || !id.contains(cs)) // tag为0 未被处理 tag为1为处理
{
list.remove(i);
i--;
}
}
return list;
}
public Orders getMaxId() throws Exception {
return orderO.getMaxId();
}
public int getCount() throws Exception {
return orderO.getCount();
}
public void Insert(Orders orders) throws Exception {
orderO.insertOrders(orders);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?