admin
2019-01-03 5981b2cae7c20ec9021c8ccbe1a926f35f640210
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package com.yeshi.fanli.service.inter.order;
 
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.concurrent.locks.ReentrantReadWriteLock;
 
import com.yeshi.fanli.entity.bus.user.Order;
import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
import com.yeshi.fanli.exception.ObjectStateException;
 
public interface OrderService {
 
    public final static ReentrantReadWriteLock orderLock = new ReentrantReadWriteLock(true);
 
    public List<Order> getOrderByUid(int index, long uid);
 
    public long getOrderCountByTime(long startTime, long endTime);
 
    public boolean addOrder(Order order) throws Exception;
 
    public int getCount(long uid);
 
    public List<Order> getOrderList(String key, int index);
 
    public int getCount();
 
    public Map<String, Integer> getnewOrderByDate(int days, Date date);
 
    public Map<String, Integer> getnewOrderByMonth(int months, Date date);
 
    public Map<String, Integer> getOrderTotalByDate(int i, Date date);
 
    public Map<String, Integer> getOrderTotalByMonth(int i, Date date);
 
    public Order getOrder(String orderid, int orderType);
 
    public void failureOrder(final String orderid, final int orderType) throws ObjectStateException;
 
    // 维权订单处理
    public void failureOrderWithWeiQuan(final String orderid, final int orderType) throws ObjectStateException;
 
    public boolean isfirstOrder(long uid);
 
    public List<Order> setOrderState(final String orderid, final int orderType);
 
    public int getCount(String key);
 
    public Order find(long id);
 
    public void update(Order findOrder);
 
    public void update(TaoBaoWeiQuanOrder order);
 
    public Order findOrderByOrderIdAndType(String orderId, int type);
 
    public Order findOrderByOrderIdAndTypeAndVersion(String orderId, int type, int version);
 
    /**
     * 查看出系统添加的一个订单
     * 
     * @param type
     * @param id
     * @return
     */
    public Order getSystemOrderByUid(int type, long id);
 
    /**
     * 查询出所有老订单
     * 
     * @return
     */
    public List<Order> findOldOrderListAll();
 
    /**
     * 获取最近的一个订单
     * 
     * @return
     */
    public Order getLatestOrder();
 
}