package com.yeshi.fanli.service.inter.order;
|
|
import java.math.BigDecimal;
|
import java.util.Date;
|
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;
|
import com.yeshi.fanli.entity.order.ESOrder;
|
import com.yeshi.fanli.entity.pdd.PDDOrder;
|
import com.yeshi.fanli.entity.suning.SuningOrderInfo;
|
import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
|
import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
|
import com.yeshi.fanli.entity.vipshop.VipShopOrder;
|
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;
|
|
public interface CommonOrderService {
|
|
|
public int insert(CommonOrder record);
|
|
public int insertSelective(CommonOrder record);
|
|
public int updateByPrimaryKey(CommonOrder record);
|
|
public int updateByPrimaryKeySelective(CommonOrder record);
|
|
public int deleteByPrimaryKey(Long id);
|
|
public CommonOrder selectByPrimaryKey(Long id);
|
|
/**
|
* 查询用户订单 并订单号分组
|
*
|
* @param start
|
* @param count
|
* @param uid
|
* @param state
|
* @param type
|
* @param orderNo
|
* 订单号
|
* @param startTime
|
* 起始系统录入时间
|
* @param endTime
|
* 结束系统录入时间
|
* @return
|
* @throws CommonOrderException
|
*/
|
public List<CommonOrderVO> listGroupOrderNoByUid(long start, int count, Long uid, Integer state, Integer type,
|
Integer orderState, String orderNo, String startTime, String endTime, Integer dateType, Integer source)
|
throws CommonOrderException;
|
|
/**
|
* 统计查询
|
*
|
* @param uid
|
* @param state
|
* @param type
|
* @param orderNo
|
* @param startTime
|
* @param endTime
|
* @return
|
* @throws CommonOrderException
|
*/
|
long countGroupOrderNoByUid(Long uid, Integer state, Integer type, Integer orderState, String orderNo,
|
String startTime, String endTime, Integer dateType, List<Integer> listSource) throws CommonOrderException;
|
|
/**
|
* 移动段订单列表
|
*
|
* @param start
|
* @param count
|
* @param uid
|
* 用户id
|
* @param type
|
* 到账状态
|
* @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, List<Integer> listSource)
|
throws CommonOrderException,Exception;
|
|
/**
|
* 统计订单-根据红包类型 自购 邀请 分享
|
*
|
* @param uid
|
* @return
|
*/
|
public Map<String, BigDecimal> countHistoryOrder(Long uid, Integer day, Integer source);
|
|
/**
|
* 统计订单
|
*
|
* @param uid
|
* @return
|
*/
|
public long countBonusOrderNumber(Long uid, Integer type, Integer isToday, String startTime, String endTime,
|
Integer source);
|
|
/**
|
* 统计订单
|
*
|
* @param uid
|
* @return
|
*/
|
public BigDecimal countBonusOrderMoney(Long uid, Integer type, Integer isToday, String startTime, String endTime,
|
Integer source);
|
|
/**
|
* 统计奖金订单数量、金额
|
*
|
* @param uid
|
* @param type
|
* @param day
|
* @param startTime
|
* @param endTime
|
* @return
|
*/
|
public Map<String, Object> countBonusOrderMoneyAndNumber(Long uid, Integer type, Integer day, String startTime,
|
String endTime, Integer source);
|
|
/**
|
* 根据条件统计
|
*
|
* @param uid
|
* @param type
|
* @param startTime
|
* @param endTime
|
* @return
|
*/
|
public Long countUserOrderToApp(Long uid, Integer type, String startTime, String endTime,
|
Integer day, Integer source, Integer state, Integer stateOrder);
|
|
/**
|
* 根据订单号与订单类型查询订单
|
*
|
* @param sourceType
|
* @param orderId
|
* @return
|
*/
|
public List<CommonOrder> listBySourceTypeAndOrderId(int sourceType, String orderId);
|
|
/**
|
* 缓存淘宝类普通订单
|
*
|
* @param taoBaoOrder
|
* @param uid
|
* @return
|
* @throws CommonOrderException
|
*/
|
public List<CommonOrderAddResultDTO> addTaoBaoOrder(List<TaoBaoOrder> taoBaoOrder, Long uid) throws CommonOrderException;
|
|
/**
|
* 缓存拼多多类普通订单
|
*
|
* @param pddOrderList
|
* @param uid
|
* @return
|
* @throws CommonOrderException
|
*/
|
public List<CommonOrderAddResultDTO> addPDDOrder(List<PDDOrder> pddOrderList, Long uid) throws CommonOrderException;
|
|
/**
|
* 缓存京东普通订单
|
*
|
* @param jdOrderList
|
* @param uid
|
* @return
|
* @throws CommonOrderException
|
*/
|
public List<CommonOrderAddResultDTO> addJDOrder(JDOrder jdOrder, Long uid) throws CommonOrderException;
|
|
|
/**
|
* 添加唯品会订单
|
* @Title: addVipShopOrder
|
* @Description:
|
* @param order
|
* @param uid
|
* @return
|
* @throws CommonOrderException
|
* List<CommonOrderAddResultDTO> 返回类型
|
* @throws
|
*/
|
public List<CommonOrderAddResultDTO> addVipShopOrder(VipShopOrder order, Long uid) throws CommonOrderException;
|
|
|
|
/**
|
* 添加苏宁订单
|
* @Title: addVipShopOrder
|
* @Description:
|
* @param order
|
* @param uid
|
* @return
|
* @throws CommonOrderException
|
* List<CommonOrderAddResultDTO> 返回类型
|
* @throws
|
*/
|
public List<CommonOrderAddResultDTO> addSuningOrder(List<SuningOrderInfo> suningOrderList, Long uid) throws CommonOrderException;
|
|
|
/**
|
* 根据用户ID,订单状态,结算时间统计订单数量
|
*
|
* @param uid
|
* @param state
|
* @param minDate
|
* @param maxDate
|
* @return
|
*/
|
public long countByUidAndOrderStateWithOrderBalanceTime(Long uid, int state, Date minDate, Date maxDate);
|
|
/**
|
* 后端查询订单列表
|
*
|
* @param start
|
* @param count
|
* @param uid
|
* @param state
|
* @param type
|
* @param orderState
|
* @param orderNo
|
* @param startTime
|
* @param endTime
|
* @param dateType
|
* 1昨天 2今天 3本月 4 上月
|
* @return
|
* @throws CommonOrderException
|
*/
|
public List<CommonOrderVO> listQueryByUid(long start, int count, Long uid, Integer state, Integer type,
|
Integer orderState, String orderNo, String startTime, String endTime, Integer dateType)
|
throws CommonOrderException;
|
|
public long countQueryByUid(Long uid, Integer state, Integer type, Integer orderState, String orderNo,
|
String startTime, String endTime, Integer dateType) throws CommonOrderException;
|
|
/**
|
* 查询所有用户订单
|
*
|
* @param start
|
* @param count
|
* @param keyType
|
* @param key
|
* @param state
|
* @param type
|
* @param orderState
|
* @param startTime
|
* @param endTime
|
* @return
|
* @throws CommonOrderException
|
*/
|
|
public List<CommonOrderVO> listQuery(long start, int count, Integer keyType, String key, Integer state,
|
Integer type, Integer orderState, String startTime, String endTime, Integer source,
|
List<Long> listShopId, List<Long> listGoodsId, Date minTime, BigDecimal money,BigDecimal payment)
|
throws CommonOrderException;
|
|
public long countQuery(Integer keyType, String key, Integer state, Integer type, Integer orderState,
|
String startTime, String endTime, Integer source,
|
List<Long> listShopId, List<Long> listGoodsId,Date minTime, BigDecimal money,BigDecimal payment) throws CommonOrderException;
|
|
/**
|
* 查询订单
|
*
|
* @param uid
|
* @param orderNo
|
* @return
|
* @throws CommonOrderException
|
*/
|
public CommonOrderVO getCommonOrderByOrderNo(Long uid, String orderNo, Integer orderState, Integer sourceType)
|
throws CommonOrderException;
|
|
/**
|
* 使用奖励券成功后跳转 修改
|
*
|
* @param orderNo
|
* @return
|
*/
|
public JSONObject getRewardJumpInfo(String orderNo, Integer goodsType);
|
|
/**
|
* 根据交易号获取订单详情
|
*
|
* @param sourceType
|
* @param tradeId
|
* @return
|
*/
|
public CommonOrder selectBySourceTypeAndTradeId(int sourceType, String tradeId);
|
|
/**
|
* 删除错误订单
|
*
|
* @param coId
|
*/
|
public void deleteErrorCommonOrder(Long coId);
|
|
/**
|
* 根据订单类型与交易ID查询
|
*
|
* @param sourceType
|
* @param tradeId
|
* @return
|
*/
|
public List<CommonOrder> listBySourceTypeAndTradeId(int sourceType, String tradeId);
|
|
/**
|
* 根据条件查询订单
|
*
|
* @param sourceType
|
* @param state
|
* @param minTime
|
* @param maxTime
|
* @param page
|
* @param pageSize
|
* @return
|
*/
|
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, List<Integer> listSource);
|
|
/**
|
* 搜索订单信息
|
* @param page
|
* @param size
|
* @param uid
|
* @param list
|
* @return
|
*/
|
public List<CommonOrderVO> searchOrderByUid(AcceptData acceptData, int page, int size, Long uid, List<ESOrder> list) throws Exception;
|
|
public long countSearchOrderByUid(Long uid, List<ESOrder> list);
|
|
/**
|
* 返回订单的第三方创建时间
|
* @Title: getThirdCreateTime
|
* @Description:
|
* @param orderId
|
* @param sourceType
|
* @return
|
* Date 返回类型
|
* @throws
|
*/
|
public Date getThirdCreateTime(String orderId,int sourceType);
|
|
|
public List<CommonOrder> getMinSettleTimeAndUid();
|
|
/**
|
* 新版红包信息2.1
|
* @param acceptData
|
* @param page
|
* @param uid
|
* @param state
|
* @param type
|
* @param orderState
|
* @param orderNo
|
* @param startTime
|
* @param endTime
|
* @param dateType
|
* @param listSource
|
* @return
|
* @throws CommonOrderException
|
* @throws Exception
|
*/
|
public List<CommonOrderVO> getOrderList(AcceptData acceptData, Integer page, Long uid, Integer state, Integer type,
|
Integer orderState, String orderNo, String startTime, String endTime, Integer dateType,
|
List<Integer> listSource) throws CommonOrderException, Exception;
|
|
long countOrderList(Long uid, Integer state, Integer type, Integer orderState, String orderNo, String startTime,
|
String endTime, Integer dateType, List<Integer> listSource);
|
|
/**
|
* 维权金额计算
|
* @param listWQ
|
* @param sourceType
|
* @param uid
|
* @return
|
*/
|
public BigDecimal getWeiQuanMoney(List<TaoBaoWeiQuanOrder> listWQ, int sourceType, Long uid);
|
|
|
/**
|
* 统计订单记录数量-非订单号为主
|
* @param uid
|
* @param payment
|
* @return
|
*/
|
public long countOrderByUidAndSettled(Long uid, BigDecimal payment);
|
|
/**
|
* 获取最新的淘宝订单号
|
* @return
|
*/
|
public String getNewestOrderNoByTaoBao();
|
|
/**
|
* 根据订单号查询
|
* @param orderNo
|
* @return
|
*/
|
public List<CommonOrder> listByOrderNo(String orderNo);
|
|
/**
|
* 根据订单类型+ 订单号查询
|
* @param uid
|
* @param orderNO
|
* @param sourceType
|
* @return
|
*/
|
public List<CommonOrder> getByOrderNoAndSourceType(Long uid, String orderNO, int sourceType);
|
|
}
|