admin
2019-12-06 cd637932a970e7935b17d41568fe89c92775bccc
fanli/src/main/java/com/yeshi/fanli/service/inter/order/CommonOrderService.java
@@ -5,6 +5,7 @@
import java.util.List;
import java.util.Map;
import com.yeshi.fanli.dto.order.CommonOrderAddResultDTO;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.jd.JDOrder;
import com.yeshi.fanli.entity.order.CommonOrder;
@@ -12,6 +13,7 @@
import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
import com.yeshi.fanli.exception.order.CommonOrderException;
import com.yeshi.fanli.vo.order.CommonOrderVO;
import com.yeshi.fanli.vo.order.OrderCountVO;
import net.sf.json.JSONObject;
@@ -76,8 +78,9 @@
    *            到账状态
    * @return
    */
   public List<CommonOrderVO> getOrderByUid(AcceptData acceptData, Integer page, Long uid, Integer state, Integer type, Integer orderState,
         String orderNo, String startTime, String endTime, Integer dateType, Integer source) throws CommonOrderException;
   public List<CommonOrderVO> getOrderByUid(AcceptData acceptData, Integer page, Long uid, Integer state, Integer type,
         Integer orderState, String orderNo, String startTime, String endTime, Integer dateType, Integer source)
         throws CommonOrderException,Exception;
   /**
    * 统计订单-根据红包类型 自购 邀请 分享
@@ -93,7 +96,8 @@
    * @param uid
    * @return
    */
   public long countBonusOrderNumber(Long uid, Integer type, Integer isToday, String startTime, String endTime, Integer source);
   public long countBonusOrderNumber(Long uid, Integer type, Integer isToday, String startTime, String endTime,
         Integer source);
   /**
    * 统计订单
@@ -101,7 +105,8 @@
    * @param uid
    * @return
    */
   public BigDecimal countBonusOrderMoney(Long uid, Integer type, Integer isToday, String startTime, String endTime, Integer source);
   public BigDecimal countBonusOrderMoney(Long uid, Integer type, Integer isToday, String startTime, String endTime,
         Integer source);
   /**
    * 统计奖金订单数量、金额
@@ -114,7 +119,7 @@
    * @return
    */
   public Map<String, Object> countBonusOrderMoneyAndNumber(Long uid, Integer type, Integer day, String startTime,
         String endTime);
         String endTime, Integer source);
   /**
    * 根据条件统计
@@ -125,8 +130,8 @@
    * @param endTime
    * @return
    */
   public Map<String, BigDecimal> countByUidAndOrderState(Long uid, Integer type, String startTime, String endTime,
         Integer day, Integer source);
   public Long countUserOrderToApp(Long uid, Integer type, String startTime, String endTime,
         Integer day, Integer source, Integer state, Integer stateOrder);
   /**
    * 根据订单号与订单类型查询订单
@@ -145,7 +150,7 @@
    * @return
    * @throws CommonOrderException
    */
   public List<CommonOrder> addTaoBaoOrder(List<TaoBaoOrder> taoBaoOrder, Long uid) throws CommonOrderException;
   public List<CommonOrderAddResultDTO> addTaoBaoOrder(List<TaoBaoOrder> taoBaoOrder, Long uid) throws CommonOrderException;
   /**
    * 缓存拼多多类普通订单
@@ -155,7 +160,7 @@
    * @return
    * @throws CommonOrderException
    */
   public List<CommonOrder> addPDDOrder(List<PDDOrder> pddOrderList, Long uid) throws CommonOrderException;
   public List<CommonOrderAddResultDTO> addPDDOrder(List<PDDOrder> pddOrderList, Long uid) throws CommonOrderException;
   /**
    * 缓存京东普通订单
@@ -165,7 +170,7 @@
    * @return
    * @throws CommonOrderException
    */
   public List<CommonOrder> addJDOrder(JDOrder jdOrder, Long uid) throws CommonOrderException;
   public List<CommonOrderAddResultDTO> addJDOrder(JDOrder jdOrder, Long uid) throws CommonOrderException;
   /**
    * 根据用户ID,订单状态,结算时间统计订单数量
@@ -219,11 +224,13 @@
    */
   public List<CommonOrderVO> listQuery(long start, int count, Integer keyType, String key, Integer state,
         Integer type, Integer orderState, String startTime, String endTime, Integer source) throws CommonOrderException;
         Integer type, Integer orderState, String startTime, String endTime, Integer source,
         List<Long> listShopId, List<Long> listGoodsId, Date minTime, BigDecimal money)
         throws CommonOrderException;
   public long countQuery(Integer keyType, String key, Integer state, Integer type, Integer orderState,
         String startTime, String endTime, Integer source) throws CommonOrderException;
         String startTime, String endTime, Integer source,
         List<Long> listShopId, List<Long> listGoodsId,Date minTime, BigDecimal money) throws CommonOrderException;
   /**
    * 查询订单
@@ -242,7 +249,7 @@
    * @param orderNo
    * @return
    */
   public JSONObject getRewardJumpInfo(String orderNo);
   public JSONObject getRewardJumpInfo(String orderNo, Integer goodsType);
   /**
    * 根据交易号获取订单详情
@@ -280,7 +287,80 @@
    * @param pageSize
    * @return
    */
   List<CommonOrder> listBySourceTypeAndStateAndThirdCrateTime(int sourceType, Integer state, Long minTime,
   public List<CommonOrder> listBySourceTypeAndStateAndThirdCrateTime(int sourceType, Integer state, Long minTime,
         Long maxTime, int page, int pageSize);
   /**
    * 查询订单 -根据订单号
    *
    * @param uid
    * @param orderNO
    * @return
    */
   public List<CommonOrder> getByOrderNo(Long uid, String orderNO);
   /**
    * 根据用户ID查询最近一条有效的订单
    *
    * @param uid
    * @return
    */
   public CommonOrder selectLatestValidByUid(Long uid);
   /**
    * 查询首笔有效订单
    * @param uid
    * @return
    */
   public CommonOrderVO firstValidOrderByUid(Long uid);
   /**
    * 查询首笔有效订单
    * @param uid
    * @param type 类型: 1自购  2分享 3邀请
    * @return
    */
   public CommonOrderVO firstValidOrderByUidAndType(Long uid, Integer type);
   /**
    * 查询是否上月到账订单
    * @param uid
    * @param type 类型: 1自购  2分享 3邀请
    * @return
    */
   public CommonOrderVO firstValidOrderLastMonthByUidAndType(Long uid, Integer type);
   /**
    * 首个分享订单
    * @param uid
    * @return
    */
   public CommonOrder getFirstShareOrderByUid(Long uid);
   /**
    * 订单中获得有效奖金
    * @param orderNo
    * @param sourceType
    * @return
    */
   public BigDecimal getTotalRewardMoneyByOrderNoAndSourceType(String orderNo, Integer sourceType);
   /**
    * 统计24小时有效自购订单
    * @param uid
    * @param minTime
    * @return
    */
   public long count24HValidOrderByUid(Long uid, Date minTime);
   /**
    * 订单统计有效数量
    * @param uid
    * @param day
    * @param source
    * @return
    */
   public OrderCountVO getOrderCount(Long uid, Integer day, Integer source);
}