package com.yeshi.fanli.dao.mybatis.order; import java.math.BigDecimal; import java.util.Date; import java.util.List; import java.util.Map; import org.apache.ibatis.annotations.Param; import com.yeshi.fanli.dao.BaseMapper; import com.yeshi.fanli.entity.order.CommonOrder; import com.yeshi.fanli.vo.order.CommonOrderVO; public interface CommonOrderMapper extends BaseMapper { /** * 查询用户订单 并订单号分组 * * @param start * @param count * @param uid * @return */ List listUserOrder(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid, @Param("state") Integer state, @Param("type") Integer type, @Param("orderState") Integer orderState, @Param("orderNo") String orderNo, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("day") Integer day); /** * 统计用户订单 并订单号分组 * * @param start * @param count * @param uid * @return */ long countUserOrder(@Param("uid") Long uid, @Param("state") Integer state, @Param("type") Integer type, @Param("orderState") Integer orderState, @Param("orderNo") String orderNo, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("day") Integer day); /** * 判断部分失效状态 * @param uid * @param orderNo * @return */ CommonOrderVO getBuFenOrderState(@Param("uid") Long uid, @Param("orderNo") String orderNo); /** * 根据用户ID,订单状态和订单结算时间统计订单的数量 * * @param uid * @param state * @param minDate * @param maxDate * @return */ long countByUidAndOrderStateWithOrderBalanceTime(@Param("uid")Long uid, @Param("state")int state,@Param("minDate") Date minDate,@Param("maxDate") Date maxDate); /** * 根据订单号、订单类型查询商品 * * @param list * 订单对象 * @return */ List listOrderGoodsInfo(List list); /** * 统计历史订单数量 * * @param uid * @return */ Map countHistoryOrder(@Param("uid") Long uid, @Param("day") Integer day); /** * 昨日总订单-根据红包类型 自购 邀请 分享 * * @param uid * @return */ Map countByUidAndOrderState(@Param("uid") Long uid, @Param("type") Integer type, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("day") Integer day); /** * 奖金订单数量 * * @param uid * @return */ long countBonusOrderNumber(@Param("uid") Long uid, @Param("type") Integer type, @Param("day") Integer day, @Param("startTime") String startTime, @Param("endTime") String endTime); /** * 奖金统计 * * @param uid * @return */ BigDecimal countBonusOrderMoney(@Param("uid") Long uid, @Param("type") Integer type, @Param("day") Integer day, @Param("startTime") String startTime, @Param("endTime") String endTime); /** * 奖金统计 * * @param uid * @return */ Map countBonusOrderMoneyAndNumber(@Param("uid")Long uid, @Param("type")Integer type, @Param("day")Integer day, @Param("startTime")String startTime, @Param("endTime")String endTime); int countByOrderNOAndOrderType(@Param("orderNO") String orderNO, @Param("orderType") int orderType); /** * 根据订单号与订单排序值获取详情 * * @param orderNo * -订单号 * @param orderBy * -订单排序值 * @param orderType * -订单类型 * @return */ CommonOrder selectByOrderNoAndOrderTypeAndOrderBy(@Param("orderNo") String orderNo, @Param("orderType") int orderType, @Param("orderBy") int orderBy); /** * 订单列表查询 * @param start * @param count * @param uid * @param state * @param type * @param orderState * @param startTime * @param endTime * @return */ List listQueryByUid(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid, @Param("state") Integer state, @Param("type") Integer type, @Param("orderState") Integer orderState, @Param("orderNo") String orderNo, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("day") Integer day); /** * 统计 */ long countQueryByUid(@Param("uid") Long uid, @Param("state") Integer state, @Param("type") Integer type, @Param("orderState") Integer orderState, @Param("orderNo") String orderNo, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("day") Integer day); /** * 订单列表查询 * @param start * @param count * @param uid * @param state * @param type * @param orderState * @param startTime * @param endTime * @return */ List listQuery(@Param("start") long start, @Param("count") int count, @Param("keyType") Integer keyType, @Param("key") String key, @Param("state") Integer state, @Param("type") Integer type, @Param("orderState") Integer orderState, @Param("startTime") String startTime, @Param("endTime") String endTime); /** * 统计 */ long countQuery(@Param("keyType") Integer keyType, @Param("key") String key, @Param("state") Integer state, @Param("type") Integer type, @Param("orderState")Integer orderState, @Param("startTime") String startTime, @Param("endTime") String endTime); }