| | |
| | | package com.yeshi.fanli.dao.mybatis; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.dto.HongBaoDTO; |
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2; |
| | | |
| | | public interface HongBaoV2Mapper extends BaseMapper<HongBaoV2> { |
| | | |
| | | HongBaoV2 selectByPrimaryKeyForUpdate(Long id); |
| | | |
| | | /** |
| | | * 获取子红包列表 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | List<HongBaoV2> listChildrenById(Long id); |
| | | |
| | | /** |
| | | * 获取奖金列表(1.4.9之前) |
| | | * |
| | | * @param uid |
| | | * @param start |
| | | * @param count |
| | | * @return |
| | | */ |
| | | List<HongBaoDTO> listJiangJinByUid(@Param("uid") Long uid, @Param("start") long start, @Param("count") int count); |
| | | |
| | | /** |
| | | * 获取奖金数量(1.4.9之前) |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | Long countJiangJinByUid(Long uid); |
| | | |
| | | /** |
| | | * 获取总的提成金额 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | BigDecimal getTotalTiChengMoney(Long uid); |
| | | |
| | | /** |
| | | * 获取总的提成笔数 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | int getTotalTiChengCount(Long uid); |
| | | |
| | | /** |
| | | * 获取还未到账的提成金额 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | BigDecimal getUnGetTiChengMoney(Long uid); |
| | | |
| | | /** |
| | | * 获取总共返利金额 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | BigDecimal getTotalFanLiMoney(Long uid); |
| | | |
| | | /** |
| | | * 获取还未到账的金额 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | BigDecimal getUnRecievedFanLiMoney(Long uid); |
| | | |
| | | /** |
| | | * 根据红包类型获取结算列表 |
| | | * |
| | | * @param type |
| | | * @param count |
| | | * @return |
| | | */ |
| | | List<HongBaoV2> listCanBalanceHongBaoByType(@Param("type") int type, @Param("count") int count); |
| | | |
| | | /** |
| | | * 获取能够结算的分享赚和邀请赚的用户列表 |
| | | * |
| | | * @param count |
| | | * @return |
| | | */ |
| | | List<Long> listUidCanBanlanceShareAndInvite(int count); |
| | | |
| | | /** |
| | | * 根据用户ID,类型获取能够结算的红包 |
| | | * |
| | | * @param type |
| | | * @param uid |
| | | * @param count |
| | | * @return |
| | | */ |
| | | List<HongBaoV2> listCanBalanceHongBaoByTypeAndUid(@Param("types") List<Integer> type, @Param("uid") Long uid, |
| | | @Param("count") int count); |
| | | |
| | | } |