📄 orderslogic.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -