| | |
| | | package com.yeshi.fanli.dao.mybatis.order;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.dao.BaseMapper;
|
| | | import com.yeshi.fanli.entity.order.HongBaoOrder;
|
| | |
|
| | | public interface HongBaoOrderMapper extends BaseMapper<HongBaoOrder> {
|
| | |
|
| | | /**
|
| | | * 根据订单ID查询对象
|
| | | * |
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | HongBaoOrder selectByCommonOrderId(Long id);
|
| | |
|
| | | /**
|
| | | * 根据红包ID查询对象
|
| | | * |
| | | * @param id
|
| | | * @return
|
| | | */
|
| | | HongBaoOrder selectByHongBaoId(Long id);
|
| | |
|
| | | /**
|
| | | * 返利订单列表(1.4.9之前)
|
| | | * |
| | | * @param uid
|
| | | * @param start
|
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | List<HongBaoOrder> listFanLiOrder(@Param("uid") Long uid, @Param("start") long start, @Param("count") int count);
|
| | |
|
| | | /**
|
| | | * 返利订单数量(1.4.9之前)
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | Long countFanLiOrder(Long uid);
|
| | |
|
| | | /**
|
| | | * 根据订单号与红包类型计算订单数量
|
| | | * |
| | | * @param orderNo
|
| | | * @param type
|
| | | * @return
|
| | | */
|
| | | long countByOrderNoAndHongBaoType(@Param("orderNo") String orderNo, @Param("type") int type,
|
| | | @Param("sourceType") int sourceType);
|
| | |
|
| | | /**
|
| | | * 返利超过100的,且最小时间
|
| | | * |
| | | * @param uid
|
| | | * @param minTime
|
| | | * @return
|
| | | */
|
| | | public int countOrderCountMoneyMoreByUidAndMinTime(@Param("uid") Long uid, @Param("minTime") Date minTime,
|
| | | @Param("money") BigDecimal money);
|
| | |
|
| | | /**
|
| | | * 维权订单数量(包含邀请赚)
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public int countWeiQuanOrderByUid(@Param("uid") Long uid, @Param("minTime") Date minTime);
|
| | |
|
| | | /**
|
| | | * 维权订单返还的金额
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | public BigDecimal sumWeiQuanOrderFanAmountByUid(@Param("uid") Long uid, @Param("minTime") Date minTime);
|
| | |
|
| | | /**
|
| | | * 维权订单数量
|
| | | * @param uid
|
| | | * @param minMoney
|
| | | * @param minTime
|
| | | * @return
|
| | | */
|
| | | public int countWeiQuanOrderWithMinCommision(@Param("uid")Long uid,@Param("minMoney") BigDecimal minMoney,@Param("minTime") Date minTime);
|
| | |
|
| | | |
| | | /**
|
| | | * 根据订单ID与来源类型查询
|
| | | * @param orderId
|
| | | * @param sourceType
|
| | | * @return
|
| | | */
|
| | | public List<HongBaoOrder> listByOrderIdAndSourceType(@Param("orderId") String orderId,
|
| | | @Param("sourceType") int sourceType);
|
| | | |
| | | |
| | | /**
|
| | | * 根据订单ID与来源类型查询详情
|
| | | * @param orderId
|
| | | * @param sourceType
|
| | | * @return
|
| | | */
|
| | | public List<HongBaoOrder> listDetailByOrderIdAndSourceType(@Param("orderId") String orderId,
|
| | | @Param("sourceType") int sourceType);
|
| | | } |
| | | package com.yeshi.fanli.dao.mybatis.order; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.order.HongBaoOrder; |
| | | |
| | | public interface HongBaoOrderMapper extends BaseMapper<HongBaoOrder> { |
| | | |
| | | /** |
| | | * 根据订单ID查询对象 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | HongBaoOrder selectByCommonOrderId(Long id); |
| | | |
| | | /** |
| | | * 根据红包ID查询对象 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | HongBaoOrder selectByHongBaoId(Long id); |
| | | |
| | | /** |
| | | * 返利订单列表(1.4.9之前) |
| | | * |
| | | * @param uid |
| | | * @param start |
| | | * @param count |
| | | * @return |
| | | */ |
| | | List<HongBaoOrder> listFanLiOrder(@Param("uid") Long uid, @Param("start") long start, @Param("count") int count); |
| | | |
| | | /** |
| | | * 返利订单数量(1.4.9之前) |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | Long countFanLiOrder(Long uid); |
| | | |
| | | /** |
| | | * 根据订单号与红包类型计算订单数量 |
| | | * |
| | | * @param orderNo |
| | | * @param type |
| | | * @return |
| | | */ |
| | | long countByOrderNoAndHongBaoType(@Param("orderNo") String orderNo, @Param("type") int type, |
| | | @Param("sourceType") int sourceType); |
| | | |
| | | /** |
| | | * 返利超过100的,且最小时间 |
| | | * |
| | | * @param uid |
| | | * @param minTime |
| | | * @return |
| | | */ |
| | | public int countOrderCountMoneyMoreByUidAndMinTime(@Param("uid") Long uid, @Param("minTime") Date minTime, |
| | | @Param("money") BigDecimal money); |
| | | |
| | | /** |
| | | * 维权订单数量(包含邀请赚) |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public int countWeiQuanOrderByUid(@Param("uid") Long uid, @Param("minTime") Date minTime); |
| | | |
| | | /** |
| | | * 维权订单返还的金额 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public BigDecimal sumWeiQuanOrderFanAmountByUid(@Param("uid") Long uid, @Param("minTime") Date minTime); |
| | | |
| | | /** |
| | | * 维权订单数量 |
| | | * @param uid |
| | | * @param minMoney |
| | | * @param minTime |
| | | * @return |
| | | */ |
| | | public int countWeiQuanOrderWithMinCommision(@Param("uid")Long uid,@Param("minMoney") BigDecimal minMoney,@Param("minTime") Date minTime); |
| | | |
| | | |
| | | /** |
| | | * 根据订单ID与来源类型查询 |
| | | * @param orderId |
| | | * @param sourceType |
| | | * @return |
| | | */ |
| | | public List<HongBaoOrder> listByOrderIdAndSourceType(@Param("orderId") String orderId, |
| | | @Param("sourceType") int sourceType); |
| | | |
| | | |
| | | /** |
| | | * 根据订单ID与来源类型查询详情 |
| | | * @param orderId |
| | | * @param sourceType |
| | | * @return |
| | | */ |
| | | public List<HongBaoOrder> listDetailByOrderIdAndSourceType(@Param("orderId") String orderId, |
| | | @Param("sourceType") int sourceType); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据订单ID与来源类型查询详情 |
| | | * @param orderId |
| | | * @param sourceType |
| | | * @return |
| | | */ |
| | | public List<HongBaoOrder> listDetailByOrderIdAndSourceTypeAndUid(@Param("orderId") String orderId, |
| | | @Param("sourceType") int sourceType, @Param("uid") long uid); |
| | | } |
| | | |
| | | |