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 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 getOrderList(String key, int index); public int getCount(); public Map getnewOrderByDate(int days, Date date); public Map getnewOrderByMonth(int months, Date date); public Map getOrderTotalByDate(int i, Date date); public Map 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 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 findOldOrderListAll(); /** * 获取最近的一个订单 * * @return */ public Order getLatestOrder(); }