Пример #1
0
 public static final Order getServeringOrderByConId(int consulterId) {
   Order order =
       dao.findFirst(
           "select * from consulter_order where consulter_id=? and server_status=0", consulterId);
   if (order == null) {
     order = createOrder(consulterId);
   }
   return order;
 }
Пример #2
0
 private static final Order createOrder(int id) {
   Order order = null;
   synchronized (Order.class) {
     order =
         dao.findFirst(
             "select * from consulter_order where consulter_id=? and server_status=0", id);
     if (order == null) {
       order = new Order();
       order.set("consulter_id", id);
       order.set("status", 0);
       order.set("server_status", 0);
       order.set("create_time", System.currentTimeMillis());
       order.save();
       HuanxinUtil.noticeNewOrder(order);
     }
   }
   return order;
 }
Пример #3
0
 public static final List<Order> getServeringOrderByCusId(Integer cusId) {
   return dao.find(
       "select * from consulter_order where customer_id=? and server_status=0 and status=1",
       cusId);
 }
Пример #4
0
 public static final List<Order> getUnserverOrder() {
   return dao.find("select * from consulter_order where server_status=0 and status=0");
 }